@WidgetComponent

nm-data-list-hierachical-component

File

src/app/shared/widgets/data-list/data-list-hierachical-component/data-list-hierachical.component.ts

Extends

DataListComponent

Metadata

providers EditAttributeService
selector nm-data-list-hierachical-component
styleUrls .data-list-component/data-list.component.scss,
data-list-hierachical.component.scss
templateUrl ./data-list-hierachical.component.html

Index

Widget inputs
Widget outputs
Properties
Methods
Inputs
Outputs

Constructor

constructor(localStorageService: LocalStorageService, dialog: DialogService, translateService: TranslateService, currentLocaleService: CurrentLocaleService, notificationService: CustomNotificationService, widgetFrameService: WidgetframeService, appContext: AppContext, appdataStore: AppdataStore, cdr: ChangeDetectorRef, http: HttpClient, progressbarService: ProgressbarService, editAttributeService: EditAttributeService, scrollService: ScrollService, dataListExportService: DataListExportService, websocketService: WebsocketService, userService: UserService, dataListEndEditService: DataListEndEditService, validationService: ValidationService, unsavedChangesService: UnsavedChangesService, appService: AppService, module: NmModuleDescriptor)
Parameters :
Name Type Optional
localStorageService LocalStorageService no
dialog DialogService no
translateService TranslateService no
currentLocaleService CurrentLocaleService no
notificationService CustomNotificationService no
widgetFrameService WidgetframeService no
appContext AppContext no
appdataStore AppdataStore no
cdr ChangeDetectorRef no
http HttpClient no
progressbarService ProgressbarService no
editAttributeService EditAttributeService no
scrollService ScrollService no
dataListExportService DataListExportService no
websocketService WebsocketService no
userService UserService no
dataListEndEditService DataListEndEditService no
validationService ValidationService no
unsavedChangesService UnsavedChangesService no
appService AppService no
module NmModuleDescriptor no

Inputs

dynamicColumnHandler
expandChildren
additionalParams
Inherited from DataListComponent
Defined in DataListComponent:318
attributeUrl
Inherited from DataListComponent
Defined in DataListComponent:289
autoFocus

Type: boolean

Default value: false

Inherited from DataListComponent
Defined in DataListComponent:340
clearCellSelection
Inherited from DataListComponent
Defined in DataListComponent:238
clearFiltersAndSorting
Inherited from DataListComponent
Defined in DataListComponent:266
clearRowSelection
Inherited from DataListComponent
Defined in DataListComponent:252
configuration

Type: DataListConfiguration

Inherited from DataListComponent
Defined in DataListComponent:160
contextIdentifier
Inherited from DataListComponent
Defined in DataListComponent:206
data
Inherited from DataListComponent
Defined in DataListComponent:201
dataTypeInput
Inherited from DataListComponent
Defined in DataListComponent:275
dataTypeMode
Inherited from DataListComponent
Defined in DataListComponent:196
disableCellEditMode
Inherited from DataListComponent
Defined in DataListComponent:229
dynamicColumnsIn
Inherited from DataListComponent
Defined in DataListComponent:309
eagerLimit
Inherited from DataListComponent
Defined in DataListComponent:284
endGridEditMode
Inherited from DataListComponent
Defined in DataListComponent:261
export
Inherited from DataListComponent
Defined in DataListComponent:224
filterColumns
Inherited from DataListComponent
Defined in DataListComponent:323
locale
Inherited from DataListComponent
Defined in DataListComponent:181
preselectAttributeProfile
Inherited from DataListComponent
Defined in DataListComponent:332
products
Inherited from DataListComponent
Defined in DataListComponent:294
refreshRows
Inherited from DataListComponent
Defined in DataListComponent:299
reload
Inherited from DataListComponent
Defined in DataListComponent:186
reset
Inherited from DataListComponent
Defined in DataListComponent:191
resetEditData
Inherited from DataListComponent
Defined in DataListComponent:172
restoreGlobalFilter
Inherited from DataListComponent
Defined in DataListComponent:304
rowSelection
Inherited from DataListComponent
Defined in DataListComponent:247
shownAttributesIn
Inherited from DataListComponent
Defined in DataListComponent:215
uri
Inherited from DataListComponent
Defined in DataListComponent:167
widgetId

Type: string

Inherited from DataListComponent
Defined in DataListComponent:164

Outputs

childSelectedItems $event type: EventEmitter
dynamicIslandColumns $event type: EventEmitter
api $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:391
currentData $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:379
dataLoaded $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:376
dataType $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:370
dynamicColumns $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:346
dynamicPrefix $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:343
editableCell $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:382
editedRow $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:358
editedRows $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:355
gridOutput $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:364
isValid $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:373
onCellSelect $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:409
onDrop $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:406
reorderedRows $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:403
rowEditEnter $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:385
rowEditLeave $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:388
selectedItems $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:349
shownAttributes $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:352
statusOut $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:400
tileClicked $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:397
toggleButtonChange $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:394
total $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:361
viewMode $event type: EventEmitter
Inherited from DataListComponent
Defined in DataListComponent:367

Methods

Protected clearSelectedIslandRows
clearSelectedIslandRows()
Returns : void
Protected clearSelectedRows
clearSelectedRows()
Returns : void
Private combineSelectionEvents
combineSelectionEvents()
Returns : void
Private createIslandColumns
createIslandColumns(island: DataListHierachicalConfiguration)
Parameters :
Name Type Optional
island DataListHierachicalConfiguration no
Returns : void
Protected dataLoaded
dataLoaded(data: )
Parameters :
Name Optional
data no
Returns : void
Public doReload
doReload()
Returns : void
Protected doReset
doReset()
Returns : void
Public editIslandShownAttributes
editIslandShownAttributes(island: DataListHierachicalConfiguration)
Parameters :
Name Type Optional
island DataListHierachicalConfiguration no
Returns : void
Private getOrCreateIslandService
getOrCreateIslandService(parentId: string, island: DataListHierachicalConfiguration)
Parameters :
Name Type Optional
parentId string no
island DataListHierachicalConfiguration no
Returns : any
Protected getShownAttributes
getShownAttributes()
Returns : any[]
gridCreated
gridCreated(event: IGridCreatedEventArgs, island: DataListHierachicalConfiguration)
Parameters :
Name Type Optional
event IGridCreatedEventArgs no
island DataListHierachicalConfiguration no
Returns : void
Protected handleInput
handleInput(link: )
Parameters :
Name Optional
link no
Returns : void
islandColumns
islandColumns(island: DataListHierachicalConfiguration)
Parameters :
Name Type Optional
island DataListHierachicalConfiguration no
islandService
islandService(parentId: string)
Parameters :
Name Type Optional
parentId string no
Returns : DataListService
ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
Public onChildCellEdit
onChildCellEdit(childGrid: IgxGridComponent | IgxHierarchicalGridComponent, event: IGridEditEventArgs, configuration: DataListHierachicalConfiguration, parent: string)
Parameters :
Name Type Optional Default value
childGrid IgxGridComponent | IgxHierarchicalGridComponent no
event IGridEditEventArgs no
configuration DataListHierachicalConfiguration no this.configuration
parent string no
Returns : void
onDataTypeChange
onDataTypeChange()
Returns : void
onRowSelection
onRowSelection(event: IRowSelectionEventArgs)
Parameters :
Name Type Optional
event IRowSelectionEventArgs no
Returns : void
onViewModeChange
onViewModeChange()
Returns : void
Public processData
processData(event: , reset: boolean)
Parameters :
Name Type Optional
event no
reset boolean no
Returns : void
Public processDataOnChange
processDataOnChange(event: , reset: boolean)
Parameters :
Name Type Optional
event no
reset boolean no
Returns : void
Private setColumnsByIslandName
setColumnsByIslandName(columns: , name: )
Parameters :
Name Optional
columns no
name no
Returns : void
Private setIslandColumns
setIslandColumns(columns: , islandColumns: , localStorageEntry: )
Parameters :
Name Optional
columns no
islandColumns no
localStorageEntry no
Returns : void
Public showFilteringRow
showFilteringRow(event: )
Parameters :
Name Optional
event no
Returns : void
Protected updateDataLocale
updateDataLocale(locale: )
Parameters :
Name Optional
locale no
Returns : void
updateDynamicColumns
updateDynamicColumns(attributes: )
Parameters :
Name Optional
attributes no
Returns : void
Protected updateLocale
updateLocale(locale: )
Parameters :
Name Optional
locale no
Returns : void
Protected validateAllRows
validateAllRows()
Returns : boolean
Public applyDensityFromLocalStorage
applyDensityFromLocalStorage()
Inherited from DataListComponent
Defined in DataListComponent:2209
Returns : void
Private applyExcelPasteData
applyExcelPasteData(response: , selectedCell: )
Inherited from DataListComponent
Defined in DataListComponent:2599
Parameters :
Name Optional
response no
selectedCell no
Returns : void
Private autosizeColumns
autosizeColumns()
Inherited from DataListComponent
Defined in DataListComponent:636
Returns : void
Protected buildLazyAllSelectionEvent
buildLazyAllSelectionEvent(event: any, grid: IgxGridBaseDirective, service: DataListService)
Inherited from DataListComponent
Defined in DataListComponent:1787
Parameters :
Name Type Optional
event any no
grid IgxGridBaseDirective no
service DataListService no
Returns : SelectionParams
Protected buildSelectionEvent
buildSelectionEvent(event: any, grid: IgxGridComponent | IgxHierarchicalGridComponent | IgxTreeGridComponent, service: DataListService)
Inherited from DataListComponent
Defined in DataListComponent:1816
Parameters :
Name Type Optional
event any no
grid IgxGridComponent | IgxHierarchicalGridComponent | IgxTreeGridComponent no
service DataListService no
Returns : SelectionParams
calcTableHeight
calcTableHeight()
Inherited from DataListComponent
Defined in DataListComponent:2343
Returns : string
Private checkCellForErrors
checkCellForErrors(cell: ListCellEditComponent | ListCellComponent)
Inherited from DataListComponent
Defined in DataListComponent:2199
Parameters :
Name Type Optional
cell ListCellEditComponent | ListCellComponent no
Returns : boolean
Public clearAllFiltersAndSorting
clearAllFiltersAndSorting(clearGrouping: , loadData: boolean, restoreGlobalFilter: )
Inherited from DataListComponent
Defined in DataListComponent:1941
Parameters :
Name Type Optional Default value
clearGrouping no true
loadData boolean no true
restoreGlobalFilter no false
Returns : void
Public clearColumnFilter
clearColumnFilter(input: any, column: any)
Inherited from DataListComponent
Defined in DataListComponent:2099
Parameters :
Name Type Optional
input any no
column any no
Returns : void
Public clearGlobalFilter
clearGlobalFilter()
Inherited from DataListComponent
Defined in DataListComponent:1936
Returns : void
Protected clearSelectedRows
clearSelectedRows()
Inherited from DataListComponent
Defined in DataListComponent:1082
Returns : void
closeContextMenu
closeContextMenu()
Inherited from DataListComponent
Defined in DataListComponent:2137
Returns : void
columnInit
columnInit(column: any)
Inherited from DataListComponent
Defined in DataListComponent:2084
Parameters :
Name Type Optional
column any no
Returns : void
columnOrderChanged
columnOrderChanged(columnIdentifiers: string[])
Inherited from DataListComponent
Defined in DataListComponent:2659
Parameters :
Name Type Optional
columnIdentifiers string[] no
Returns : void
Protected dataLoaded
dataLoaded(data: )
Inherited from DataListComponent
Defined in DataListComponent:599
Parameters :
Name Optional
data no
Returns : void
Public dataPasted
dataPasted(processedData: string[][])
Inherited from DataListComponent
Defined in DataListComponent:2428
Parameters :
Name Type Optional
processedData string[][] no
Returns : void
Private doInitialSorting
doInitialSorting()
Inherited from DataListComponent
Defined in DataListComponent:1181
Returns : void
Public doRefresh
doRefresh()
Inherited from DataListComponent
Defined in DataListComponent:1109
Returns : void
Public doReload
doReload(force: boolean)
Inherited from DataListComponent
Defined in DataListComponent:1094
Parameters :
Name Type Optional Default value
force boolean no false
Returns : void
Protected doReset
doReset()
Inherited from DataListComponent
Defined in DataListComponent:1089
Returns : void
Public editShownAttributes
editShownAttributes()
Inherited from DataListComponent
Defined in DataListComponent:1585
Returns : void
Private emitDataListStatus
emitDataListStatus(lastChange: string)
Inherited from DataListComponent
Defined in DataListComponent:1142
Parameters :
Name Type Optional
lastChange string no
Returns : void
Public fireEditedRowsEvent
fireEditedRowsEvent(rowId: string, gridRow: any, parent: string, attributes: , configuration: DataListConfiguration)
Inherited from DataListComponent
Defined in DataListComponent:1536
Parameters :
Name Type Optional
rowId string no
gridRow any no
parent string no
attributes no
configuration DataListConfiguration no
Returns : void
Public getCellClass
getCellClass(nmColumn: )
Inherited from DataListComponent
Defined in DataListComponent:2314
Parameters :
Name Optional
nmColumn no
Returns : any
Public getColumnHeaderClasses
getColumnHeaderClasses(column: Column)
Inherited from DataListComponent
Defined in DataListComponent:1993
Parameters :
Name Type Optional
column Column no
Returns : {}
Private getCurrentRowIndex
getCurrentRowIndex(rowList: , cursorPosition: )
Inherited from DataListComponent
Defined in DataListComponent:2494
Parameters :
Name Optional
rowList no
cursorPosition no
Returns : any
Public getDynamicPrefix
getDynamicPrefix()
Inherited from DataListComponent
Defined in DataListComponent:1978
Returns : string
Public getGridColumnWidth
getGridColumnWidth(column: Column)
Inherited from DataListComponent
Defined in DataListComponent:660
Parameters :
Name Type Optional
column Column no
Returns : any
getHeaderClass
getHeaderClass(nmColumn: )
Inherited from DataListComponent
Defined in DataListComponent:2252
Parameters :
Name Optional
nmColumn no
Returns : any
Public getHighlightReadOnly
getHighlightReadOnly()
Inherited from DataListComponent
Defined in DataListComponent:2310
Returns : boolean
Protected getShownAttributes
getShownAttributes()
Inherited from DataListComponent
Defined in DataListComponent:1697
Returns : any
Private getSortDirection
getSortDirection(direction: )
Inherited from DataListComponent
Defined in DataListComponent:1201
Parameters :
Name Optional
direction no
Returns : any
getTableHeight
getTableHeight()
Inherited from DataListComponent
Defined in DataListComponent:2336
Returns : string
Public getTranslationKey
getTranslationKey(column: Column)
Inherited from DataListComponent
Defined in DataListComponent:1986
Parameters :
Name Type Optional
column Column no
Returns : any
Public groupingComparer
groupingComparer(column: Column)
Inherited from DataListComponent
Defined in DataListComponent:2015
Parameters :
Name Type Optional
column Column no
Returns : any
Protected handleInput
handleInput(link: )
Inherited from DataListComponent
Defined in DataListComponent:1422
Parameters :
Name Optional
link no
Returns : void
Public ngAfterViewInit
ngAfterViewInit()
Inherited from DataListComponent
Defined in DataListComponent:1150
Returns : void
Public ngOnDestroy
ngOnDestroy()
Inherited from DataListComponent
Defined in DataListComponent:1739
Returns : void
Public ngOnInit
ngOnInit()
Inherited from DataListComponent
Defined in DataListComponent:697
Returns : void
onCellClick
onCellClick(event: )
Inherited from DataListComponent
Defined in DataListComponent:1747
Parameters :
Name Optional
event no
Returns : void
onCellEdit
onCellEdit(event: IGridEditEventArgs, configuration: DataListConfiguration)
Inherited from DataListComponent
Defined in DataListComponent:1496
Parameters :
Name Type Optional Default value
event IGridEditEventArgs no
configuration DataListConfiguration no this.configuration
Returns : void
onCellEditEnter
onCellEditEnter(event: IGridEditEventArgs)
Inherited from DataListComponent
Defined in DataListComponent:2228
Parameters :
Name Type Optional
event IGridEditEventArgs no
Returns : void
onCellEditExit
onCellEditExit()
Inherited from DataListComponent
Defined in DataListComponent:2241
Returns : void
Public onColumnFilterInput
onColumnFilterInput(input: any, column: IgxColumnComponent)
Inherited from DataListComponent
Defined in DataListComponent:2090
Parameters :
Name Type Optional
input any no
column IgxColumnComponent no
Returns : void
onDataColumnsChange
onDataColumnsChange(visibleDataColumns: string[], showAllColumns: boolean)
Inherited from DataListComponent
Defined in DataListComponent:2663
Parameters :
Name Type Optional Default value
visibleDataColumns string[] no
showAllColumns boolean no false
Returns : void
Public onDataTypeChange
onDataTypeChange(reload: boolean)
Inherited from DataListComponent
Defined in DataListComponent:1118
Parameters :
Name Type Optional Default value
reload boolean no true
Returns : void
Public onDrop
onDrop(event: )
Inherited from DataListComponent
Defined in DataListComponent:2466
Parameters :
Name Optional
event no
Returns : void
Public onExport
onExport(settings: )
Inherited from DataListComponent
Defined in DataListComponent:1728
Parameters :
Name Optional
settings no
Returns : void
onFilteringDone
onFilteringDone()
Inherited from DataListComponent
Defined in DataListComponent:2680
Returns : void
Public onFilterValueChange
onFilterValueChange()
Inherited from DataListComponent
Defined in DataListComponent:2019
Returns : void
onHeaderSelectorClick
onHeaderSelectorClick(event: any)
Inherited from DataListComponent
Defined in DataListComponent:1778
Parameters :
Name Type Optional
event any no
Returns : void
Protected onInput
onInput(link: )
Inherited from DataListComponent
Defined in DataListComponent:1440
Parameters :
Name Optional
link no
Returns : void
Public onItemDropped
onItemDropped(event: , cell: IgxGridCell, column: Column)
Inherited from DataListComponent
Defined in DataListComponent:2286
Parameters :
Name Type Optional
event no
cell IgxGridCell no
column Column no
Returns : void
onRangeSelection
onRangeSelection(event: GridSelectionRange)
Inherited from DataListComponent
Defined in DataListComponent:2031
Parameters :
Name Type Optional
event GridSelectionRange no
Returns : void
Public onRowDragStart
onRowDragStart(event: )
Inherited from DataListComponent
Defined in DataListComponent:2461
Parameters :
Name Optional
event no
Returns : any
Public onRowEdit
onRowEdit(event: IGridEditEventArgs, configuration: DataListConfiguration, parent: string)
Inherited from DataListComponent
Defined in DataListComponent:1451
Parameters :
Name Type Optional Default value
event IGridEditEventArgs no
configuration DataListConfiguration no this.configuration
parent string no null
Returns : void
Public onRowEditCancel
onRowEditCancel()
Inherited from DataListComponent
Defined in DataListComponent:2108
Returns : void
Public onRowEditEnter
onRowEditEnter()
Inherited from DataListComponent
Defined in DataListComponent:2104
Returns : void
Public onRowSelection
onRowSelection(event: any)
Inherited from DataListComponent
Defined in DataListComponent:1773
Parameters :
Name Type Optional
event any no
Returns : void
onViewModeChange
onViewModeChange()
Inherited from DataListComponent
Defined in DataListComponent:1890
Returns : void
Public onVisibilityChanged
onVisibilityChanged(event: )
Inherited from DataListComponent
Defined in DataListComponent:2050
Parameters :
Name Optional
event no
Returns : void
Public openContextmenu
openContextmenu(eventArgs: )
Inherited from DataListComponent
Defined in DataListComponent:2112
Parameters :
Name Optional
eventArgs no
Returns : void
Public openDialogForShownAttributes
openDialogForShownAttributes()
Inherited from DataListComponent
Defined in DataListComponent:1596
Returns : void
Private prepareExcelPasteRequestData
prepareExcelPasteRequestData(selectedCell: , processedData: string[][])
Inherited from DataListComponent
Defined in DataListComponent:2522
Parameters :
Name Type Optional
selectedCell no
processedData string[][] no
Public primaryKey
primaryKey(configuration: DataListTreeConfiguration)
Inherited from DataListComponent
Defined in DataListComponent:1447
Parameters :
Name Type Optional
configuration DataListTreeConfiguration no
Returns : string
processDataOnChange
processDataOnChange(event: , reset: boolean)
Inherited from DataListComponent
Defined in DataListComponent:2673
Parameters :
Name Type Optional
event no
reset boolean no
Returns : void
Public reRender
reRender(ids: string[])
Inherited from DataListComponent
Defined in DataListComponent:1431
Parameters :
Name Type Optional
ids string[] no
Returns : void
selectAvailableRows
selectAvailableRows(result: SelectionParams, grid: IgxGridBaseDirective, service: DataListService, rowData: any[])
Inherited from DataListComponent
Defined in DataListComponent:1863
Parameters :
Name Type Optional
result SelectionParams no
grid IgxGridBaseDirective no
service DataListService no
rowData any[] no
Returns : any
Private setDefaultGroupingExpression
setDefaultGroupingExpression()
Inherited from DataListComponent
Defined in DataListComponent:1047
Returns : void
Private setDefaultSortingExpressions
setDefaultSortingExpressions()
Inherited from DataListComponent
Defined in DataListComponent:1067
Returns : void
Protected setDynamicColumns
setDynamicColumns(attributes: )
Inherited from DataListComponent
Defined in DataListComponent:1717
Parameters :
Name Optional
attributes no
Returns : void
Protected setEditedRowsData
setEditedRowsData(rowId: string, row: any, parent: string, attributes: , configuration: DataListConfiguration)
Inherited from DataListComponent
Defined in DataListComponent:1548
Parameters :
Name Type Optional
rowId string no
row any no
parent string no
attributes no
configuration DataListConfiguration no
Returns : void
Public setStaticHeight
setStaticHeight(newrows: number)
Inherited from DataListComponent
Defined in DataListComponent:669
Parameters :
Name Type Optional Default value
newrows number no 0
Returns : void
Public showFilteringRow
showFilteringRow(event: )
Inherited from DataListComponent
Defined in DataListComponent:1932
Parameters :
Name Optional
event no
Returns : void
Public sortStrategy
sortStrategy(column: Column)
Inherited from DataListComponent
Defined in DataListComponent:2007
Parameters :
Name Type Optional
column Column no
Returns : ISortingStrategy
Public stopPropagation
stopPropagation(event: , field: )
Inherited from DataListComponent
Defined in DataListComponent:2072
Parameters :
Name Optional
event no
field no
Returns : boolean
Protected subscribeToInputs
subscribeToInputs()
Inherited from DataListComponent
Defined in DataListComponent:1211
Returns : void
Public takeRecommendedAttributes
takeRecommendedAttributes(recommendedAttributes: RecommendedAttributes)
Inherited from DataListComponent
Defined in DataListComponent:2403
Parameters :
Name Type Optional
recommendedAttributes RecommendedAttributes no
Returns : boolean
Public tileClicked
tileClicked(event: )
Inherited from DataListComponent
Defined in DataListComponent:2282
Parameters :
Name Optional
event no
Returns : void
Public toggleMode
toggleMode(event: )
Inherited from DataListComponent
Defined in DataListComponent:2278
Parameters :
Name Optional
event no
Returns : void
Public trackColumns
trackColumns(index: number, column: Column)
Inherited from DataListComponent
Defined in DataListComponent:1968
Parameters :
Name Type Optional
index number no
column Column no
Returns : string
Protected updateDataLocale
updateDataLocale(locale: )
Inherited from DataListComponent
Defined in DataListComponent:1035
Parameters :
Name Optional
locale no
Returns : void
updateDataOutput
updateDataOutput()
Inherited from DataListComponent
Defined in DataListComponent:2245
Returns : void
Public updateDynamicColumns
updateDynamicColumns(attributes: )
Inherited from DataListComponent
Defined in DataListComponent:1713

Function that gets called everytime the columns get updated from the SelectAttributesDialogComponent. Will directly call setDynamicColumns, if not overwritten

Parameters :
Name Optional
attributes no
Returns : void
Protected updateLocale
updateLocale(locale: )
Inherited from DataListComponent
Defined in DataListComponent:1042
Parameters :
Name Optional
locale no
Returns : void
Private updateTranslations
updateTranslations(transObj?: LangChangeEvent)
Inherited from DataListComponent
Defined in DataListComponent:1571
Parameters :
Name Type Optional
transObj LangChangeEvent yes
Returns : void
Protected validateAllRows
validateAllRows()
Inherited from DataListComponent
Defined in DataListComponent:2163
Returns : boolean
Protected validateGrid
validateGrid(grid: IgxGridBaseDirective)
Inherited from DataListComponent
Defined in DataListComponent:2167
Parameters :
Name Type Optional
grid IgxGridBaseDirective no
Returns : boolean
Public validateList
validateList(validation: any, configuration: DataListConfiguration)
Inherited from DataListComponent
Defined in DataListComponent:2143
Parameters :
Name Type Optional
validation any no
configuration DataListConfiguration no
Returns : void

Properties

Private _islandColumns
_islandColumns: Map<string | DataListColumnsService>
Type : Map<string | DataListColumnsService>
Default value : new Map()
Private _islandColumnsStorages
_islandColumnsStorages: Map<string | LocalStorageEntry>
Type : Map<string | LocalStorageEntry>
Default value : new Map()
Private _islandListServices
_islandListServices: Map<string | DataListService>
Type : Map<string | DataListService>
Default value : new Map()
Public columnWidthDefault
columnWidthDefault: number
Type : number
Default value : 100
Private dynamicColumnHandlerInput
dynamicColumnHandlerInput:
Default value : new BehaviorSubject<any>(null)
Private expandChildrenInput
expandChildrenInput:
Default value : new Subject<any>()
Public hgrid
hgrid: IgxHierarchicalGridComponent
Type : IgxHierarchicalGridComponent
Decorators : ViewChild
Public removeIslandCss
removeIslandCss: boolean
Type : boolean
Private rootSelection
rootSelection: SelectionParams
Type : SelectionParams
Public rowCollapsedIcon
rowCollapsedIcon: string
Type : string
Public rowEditable
rowEditable: boolean
Type : boolean
Public rowExpandedIcon
rowExpandedIcon: string
Type : string
Private selections
selections: IslandSelectionParams
Type : IslandSelectionParams
Default value : {}
Public tableGridHeight
tableGridHeight: string
Type : string
Public tableGridWidth
tableGridWidth: string
Type : string
Public _primaryKey
_primaryKey: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:558
Private ALWAYS_ALLOWED_TYPES
ALWAYS_ALLOWED_TYPES: []
Type : []
Default value : [ "LOCALIZED_STRING", "PLAIN_STRING", "INTEGER_NUMBER", "DECIMAL_NUMBER", "DATE", ]
Inherited from DataListComponent
Defined in DataListComponent:2514
Public attributesDataType
attributesDataType: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:442
Public attributeUrl
attributeUrl: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:440
Public attributeUrlChannel
attributeUrlChannel:
Default value : new Subject<string>()
Inherited from DataListComponent
Defined in DataListComponent:411
Public attributeUrlParams
attributeUrlParams: any
Type : any
Default value : {}
Inherited from DataListComponent
Defined in DataListComponent:441
Public availableDataTypes
availableDataTypes: any[]
Type : any[]
Default value : []
Inherited from DataListComponent
Defined in DataListComponent:518
Public cellEditModeActive
cellEditModeActive: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:444
Private cellSelectable
cellSelectable: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:551
childComponentMenu
childComponentMenu: DataListContextMenuComponent
Type : DataListContextMenuComponent
Decorators : ViewChild
Inherited from DataListComponent
Defined in DataListComponent:466
Private clearCellSelectionChannel
clearCellSelectionChannel:
Default value : new Subject<void>()
Inherited from DataListComponent
Defined in DataListComponent:428
Private clearFiltersAndSortingChannel
clearFiltersAndSortingChannel:
Default value : new Subject<void>()
Inherited from DataListComponent
Defined in DataListComponent:432
Private clearRowSelectionChannel
clearRowSelectionChannel:
Default value : new Subject<void>()
Inherited from DataListComponent
Defined in DataListComponent:429
Private clearSortingAndFilteringOnReset
clearSortingAndFilteringOnReset: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:565
Public clipboardOptions
clipboardOptions: any
Type : any
Inherited from DataListComponent
Defined in DataListComponent:560
Public columns
columns: DataListColumnsService
Type : DataListColumnsService
Inherited from DataListComponent
Defined in DataListComponent:522
Public columnSelector
columnSelector: ColumnSelectorCallback
Type : ColumnSelectorCallback
Inherited from DataListComponent
Defined in DataListComponent:525
Public contentVisible
contentVisible: boolean
Type : boolean
Default value : true
Inherited from DataListComponent
Defined in DataListComponent:514
Public contextContent
contextContent:
Inherited from DataListComponent
Defined in DataListComponent:504
Public contextIdentifierChannel
contextIdentifierChannel:
Default value : new ReplaySubject<any>(1)
Inherited from DataListComponent
Defined in DataListComponent:425
Public contextMenuColumn
contextMenuColumn: Column
Type : Column
Inherited from DataListComponent
Defined in DataListComponent:447
Public contextMenuCoordinates
contextMenuCoordinates: any
Type : any
Default value : { x: 50, y: 50, }
Inherited from DataListComponent
Defined in DataListComponent:506
Public contextValue
contextValue:
Inherited from DataListComponent
Defined in DataListComponent:505
Public currentDataChannel
currentDataChannel:
Default value : new ReplaySubject<any>(1)
Inherited from DataListComponent
Defined in DataListComponent:423
Public currentLocaleService
currentLocaleService: CurrentLocaleService
Type : CurrentLocaleService
Inherited from DataListComponent
Defined in DataListComponent:580
Private customFilter
customFilter:
Default value : CustomFilteringOperand.instance()
Inherited from DataListComponent
Defined in DataListComponent:573
Private dataChannel
dataChannel:
Default value : new ReplaySubject<any>(1)
Inherited from DataListComponent
Defined in DataListComponent:419
Protected dataInitialized
dataInitialized: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:546
dataListStateDirective
dataListStateDirective: DataListStateDirective
Type : DataListStateDirective
Decorators : ViewChild
Inherited from DataListComponent
Defined in DataListComponent:468
Public dataType
dataType:
Inherited from DataListComponent
Defined in DataListComponent:516
Public dataTypeInputChannel
dataTypeInputChannel:
Default value : new Subject<any>()
Inherited from DataListComponent
Defined in DataListComponent:450
Public dataTypeModeChannel
dataTypeModeChannel:
Default value : new BehaviorSubject<string>("choose")
Inherited from DataListComponent
Defined in DataListComponent:449
Public density
density: DisplayDensity
Type : DisplayDensity
Default value : DisplayDensity.compact
Inherited from DataListComponent
Defined in DataListComponent:557
Private disableCellEditModeChannel
disableCellEditModeChannel:
Default value : new Subject<void>()
Inherited from DataListComponent
Defined in DataListComponent:427
Private disableContextMenu
disableContextMenu: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:550
Public dynamicColumnsInSubject
dynamicColumnsInSubject:
Default value : new Subject<any[]>()
Inherited from DataListComponent
Defined in DataListComponent:414
Public eagerLimitChannel
eagerLimitChannel: ReplaySubject<number>
Type : ReplaySubject<number>
Default value : new ReplaySubject<number>( 1 )
Inherited from DataListComponent
Defined in DataListComponent:457
editableListCells
editableListCells: QueryList<ListCellEditComponent>
Type : QueryList<ListCellEditComponent>
Decorators : ViewChildren
Inherited from DataListComponent
Defined in DataListComponent:470
Protected editedRows
editedRows: DataListEditedRows
Type : DataListEditedRows
Default value : {}
Inherited from DataListComponent
Defined in DataListComponent:547
Private endGridEditChannel
endGridEditChannel:
Default value : new Subject<void>()
Inherited from DataListComponent
Defined in DataListComponent:431
Private exportChannel
exportChannel:
Default value : new Subject<any>()
Inherited from DataListComponent
Defined in DataListComponent:421
Public filterColumnsChannel
filterColumnsChannel:
Default value : new Subject<any>()
Inherited from DataListComponent
Defined in DataListComponent:424
Public filterMode
filterMode: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:453
Public frameHeight
frameHeight: number
Type : number
Default value : DEFAULT_FRAME_HEIGHT_PX
Inherited from DataListComponent
Defined in DataListComponent:540
Private getNextPageOnLazyLoad
getNextPageOnLazyLoad: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:552
Public globalFilterInput
globalFilterInput: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:531
Public globalFilterValue
globalFilterValue: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:530
Public grid
grid: IgxGridComponent
Type : IgxGridComponent
Decorators : ViewChild
Inherited from DataListComponent
Defined in DataListComponent:461
Public groupingEnabled
groupingEnabled: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:534
Public groupingExpressions
groupingExpressions: IGroupingExpression[]
Type : IGroupingExpression[]
Default value : []
Inherited from DataListComponent
Defined in DataListComponent:451
Public groupRowTemplate
groupRowTemplate: TemplateRef<any>
Type : TemplateRef<any>
Decorators : ViewChild
Inherited from DataListComponent
Defined in DataListComponent:463
Public heightModifier
heightModifier: number
Type : number
Default value : 0
Inherited from DataListComponent
Defined in DataListComponent:542
Public hideFilters
hideFilters: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:568
Public identifierCol
identifierCol:
Inherited from DataListComponent
Defined in DataListComponent:517
Public infoText
infoText: string
Type : string
Default value : "list.results"
Inherited from DataListComponent
Defined in DataListComponent:512
Public initialDataType
initialDataType: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:519
inputBoxes
inputBoxes: QueryList<ElementRef>
Type : QueryList<ElementRef>
Decorators : ViewChildren
Inherited from DataListComponent
Defined in DataListComponent:472
Private inputChannel
inputChannel: ReplaySubject<any>
Type : ReplaySubject<any>
Default value : new ReplaySubject<any>(1)
Inherited from DataListComponent
Defined in DataListComponent:416
Public isEagerLoading
isEagerLoading: boolean
Type : boolean
Default value : true
Inherited from DataListComponent
Defined in DataListComponent:499
Public isListMode
isListMode: boolean
Type : boolean
Default value : true
Inherited from DataListComponent
Defined in DataListComponent:485
Public lastSelectedCells
lastSelectedCells: GridSelectionRange
Type : GridSelectionRange
Inherited from DataListComponent
Defined in DataListComponent:533
Private lastUriLocalStorage
lastUriLocalStorage: LocalStorageEntry
Type : LocalStorageEntry
Inherited from DataListComponent
Defined in DataListComponent:486
listCells
listCells: QueryList<ListCellComponent>
Type : QueryList<ListCellComponent>
Decorators : ViewChildren
Inherited from DataListComponent
Defined in DataListComponent:471
Public listService
listService: DataListService
Type : DataListService
Inherited from DataListComponent
Defined in DataListComponent:523
Private localeChannel
localeChannel:
Default value : new BehaviorSubject<any>(null)
Inherited from DataListComponent
Defined in DataListComponent:418
Private localstorageColumnsEntry
localstorageColumnsEntry: LocalStorageEntry
Type : LocalStorageEntry
Inherited from DataListComponent
Defined in DataListComponent:488
Private localstorageShownAttributesEntry
localstorageShownAttributesEntry: LocalStorageEntry
Type : LocalStorageEntry
Inherited from DataListComponent
Defined in DataListComponent:487
menuTrigger
menuTrigger: MatMenuTrigger
Type : MatMenuTrigger
Decorators : ViewChild
Inherited from DataListComponent
Defined in DataListComponent:464
Public noopFilterStrategy
noopFilterStrategy:
Default value : NoopFilteringStrategy.instance()
Inherited from DataListComponent
Defined in DataListComponent:571
Public noopSortStrategy
noopSortStrategy:
Default value : NoopSortingStrategy.instance()
Inherited from DataListComponent
Defined in DataListComponent:572
Public outlet
outlet: IgxOverlayOutletDirective
Type : IgxOverlayOutletDirective
Decorators : ViewChild
Inherited from DataListComponent
Defined in DataListComponent:478
Public overrideTileClickEvent
overrideTileClickEvent: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:562
Private pageLimitPerScroll
pageLimitPerScroll: number
Type : number
Inherited from DataListComponent
Defined in DataListComponent:553
Public pinningConfig
pinningConfig: IPinningConfig
Type : IPinningConfig
Default value : { columns: ColumnPinningPosition.Start, rows: RowPinningPosition.Top, }
Inherited from DataListComponent
Defined in DataListComponent:480
Private preselectAttributeProfile
preselectAttributeProfile: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:435
Private preselectAttributeProfileChannel
preselectAttributeProfileChannel:
Default value : new Subject<string>()
Inherited from DataListComponent
Defined in DataListComponent:433
Public productChannel
productChannel:
Default value : new Subject<string[]>()
Inherited from DataListComponent
Defined in DataListComponent:412
Public refreshRows
refreshRows:
Default value : new Subject<any[]>()
Inherited from DataListComponent
Defined in DataListComponent:413
Private reloadChannel
reloadChannel: Subject<any>
Type : Subject<any>
Default value : new Subject<any>()
Inherited from DataListComponent
Defined in DataListComponent:417
Public reloadOnDataTypeChange
reloadOnDataTypeChange: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:520
Public removeColumnHeader
removeColumnHeader: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:570
Public resetChannel
resetChannel:
Default value : new Subject<any>()
Inherited from DataListComponent
Defined in DataListComponent:422
Private resetEditDataChannel
resetEditDataChannel:
Default value : new Subject<void>()
Inherited from DataListComponent
Defined in DataListComponent:415
Public restoreGlobalFilter
restoreGlobalFilter:
Default value : new BehaviorSubject<boolean>(false)
Inherited from DataListComponent
Defined in DataListComponent:426
Public rowPinningEnabled
rowPinningEnabled: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:541
Public rowSelectable
rowSelectable: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:502
Private rowSelectionChannel
rowSelectionChannel:
Default value : new Subject<any>()
Inherited from DataListComponent
Defined in DataListComponent:430
Public rowSelectionMode
rowSelectionMode: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:503
Public rowSelectionType
rowSelectionType: string
Type : string
Default value : "multiple"
Inherited from DataListComponent
Defined in DataListComponent:564
Public selectAllCheckbox
selectAllCheckbox: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:563
Public selectedDataType
selectedDataType: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:532
Private selectedDataTypeStorage
selectedDataTypeStorage: LocalStorageEntry
Type : LocalStorageEntry
Inherited from DataListComponent
Defined in DataListComponent:491
Public selectedViewMode
selectedViewMode:
Inherited from DataListComponent
Defined in DataListComponent:529
Public selectOptions
selectOptions:
Inherited from DataListComponent
Defined in DataListComponent:548
Public selectOptionsUriChannel
selectOptionsUriChannel: ReplaySubject<any>
Type : ReplaySubject<any>
Default value : new ReplaySubject<any>( 1 )
Inherited from DataListComponent
Defined in DataListComponent:454
Public showActionsInTableColumn
showActionsInTableColumn: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:569
Public showAllColumns
showAllColumns: boolean
Type : boolean
Default value : true
Inherited from DataListComponent
Defined in DataListComponent:567
Public showFilterRow
showFilterRow: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:511
Private shownAttributesInputChannel
shownAttributesInputChannel:
Default value : new ReplaySubject<any>(1)
Inherited from DataListComponent
Defined in DataListComponent:420
Public slideChange
slideChange:
Default value : new Subject<number>()
Inherited from DataListComponent
Defined in DataListComponent:438
Public slidevalue
slidevalue: number
Type : number
Default value : 3
Inherited from DataListComponent
Defined in DataListComponent:437
Private sortBy
sortBy: SortBy[]
Type : SortBy[]
Inherited from DataListComponent
Defined in DataListComponent:554
Public sortingExpressions
sortingExpressions: ISortingExpression[]
Type : ISortingExpression[]
Default value : []
Inherited from DataListComponent
Defined in DataListComponent:452
Public storingEnabled
storingEnabled: boolean
Type : boolean
Default value : false
Inherited from DataListComponent
Defined in DataListComponent:566
Public tableGridHeight
tableGridHeight: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:543
Public tableGridWidth
tableGridWidth: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:544
Public tableHeight
tableHeight: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:539
Private tableHeightRelativeToRows
tableHeightRelativeToRows: boolean
Type : boolean
Inherited from DataListComponent
Defined in DataListComponent:555
Private tableHeightVisibleRows
tableHeightVisibleRows: number
Type : number
Inherited from DataListComponent
Defined in DataListComponent:556
Public tableWidth
tableWidth: null
Type : null
Default value : null
Inherited from DataListComponent
Defined in DataListComponent:436
Public tileIdentifierField
tileIdentifierField: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:161
Public tileRedirectLink
tileRedirectLink: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:561
Public toggleButtonLabel
toggleButtonLabel: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:559
Public total
total:
Inherited from DataListComponent
Defined in DataListComponent:500
unsubscribe
unsubscribe:
Default value : NgUnsubscribe.create()
Inherited from DataListComponent
Defined in DataListComponent:497
Private viewModeLocalStorage
viewModeLocalStorage: LocalStorageEntry
Type : LocalStorageEntry
Inherited from DataListComponent
Defined in DataListComponent:490
Public viewModeOptions
viewModeOptions:
Inherited from DataListComponent
Defined in DataListComponent:528
Public viewPortHeight
viewPortHeight: number
Type : number
Default value : window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
Inherited from DataListComponent
Defined in DataListComponent:535
Public visibleDataColumns
visibleDataColumns: string[]
Type : string[]
Inherited from DataListComponent
Defined in DataListComponent:493
Public visibleDataColumnsOptions
visibleDataColumnsOptions: Observable<Column[]>
Type : Observable<Column[]>
Inherited from DataListComponent
Defined in DataListComponent:495
Public visibleDataColumnsStorage
visibleDataColumnsStorage: LocalStorageEntry
Type : LocalStorageEntry
Inherited from DataListComponent
Defined in DataListComponent:494
Public widgetSortingStrategy
widgetSortingStrategy:
Default value : new WidgetSortingStrategy()
Inherited from DataListComponent
Defined in DataListComponent:527
Public wikiLink
wikiLink: string
Type : string
Inherited from DataListComponent
Defined in DataListComponent:513

Accessors

dynamicColumnHandler
setdynamicColumnHandler(value: )
Parameters :
Name Optional
value no
Returns : void
expandChildren
setexpandChildren(value: )
Parameters :
Name Optional
value no
Returns : void
import {
  ChangeDetectorRef,
  Component,
  EventEmitter,
  Inject,
  Input,
  Optional,
  Output,
  Renderer2,
  ViewChild,
} from "@angular/core";
import {
  IGridCreatedEventArgs,
  IGridEditEventArgs,
  IgxGridBaseDirective,
  IgxGridComponent,
  IgxHierarchicalGridComponent,
  IRowSelectionEventArgs,
} from "@infragistics/igniteui-angular";
import { getOrDefault, throwIfUndefined } from "../../widget.configuration";

import { distinctUntilChanged, map, takeUntil } from "rxjs/operators";
import {
  LocalStorageEntry,
  LocalStorageService,
} from "../../../components/local-storage/local-storage.service";
import { DataListService } from "../data-list.service";
import { SelectAttributesDialogComponent } from "../../../components/dialog/selectAttributesDialog.component";
import {
  angularWidgetBridgeInput,
  deepCopy,
} from "../../../components/util/util.service";
import { CurrentLocaleService } from "../../../components/i18n/currentLocale.service";
import { TranslateService } from "@ngx-translate/core";
import { WidgetframeService } from "../../widgetframe/widgetframe.service";
import { AppContext } from "../../../components/app-context/app.context";
import { AppdataStore } from "../../../components/appdata/appdata.store";
import {
  DataListHierachicalConfiguration,
  IslandSelectionParams,
  SelectionParams,
} from "../../interfaces/list.interfaces";

import { HttpClient } from "@angular/common/http";
import { ProgressbarService } from "../../../components/progressbar/progressbar.service";
import { DataListColumnsService } from "../data-list-columns.service";
import { EditAttributeService } from "../../../components/edit-attribute/edit-attribute.service";
import { DataListComponent } from "../data-list-component/data-list.component";
import { BehaviorSubject, Subject } from "rxjs";
import {
  DeletionMode,
  Scope,
} from "../../../components/local-storage/local-storage-constants";
import { ScrollService } from "../../../components/scroll/scroll.service";
import { DataListExportService } from "../data-list-export.service";
import { CustomNotificationService } from "../../../components/notification/customnotification.service";
import { AppService } from "../../configuration/app.service";
import { WebsocketService } from "../../../components/services/websocket.service";
import { UserService } from "../../../components/user/user.service";
import { DataListEndEditService } from "../data-list-end-edit.service";
import { ValidationService } from "../../../components/validation";
import { DialogService } from "../../../components/dialog/dialog.service";
import { UnsavedChangesService } from "../../../components/util";
import {
  NmModuleDescriptor,
  NOVOMIND_MODULE_DESCRIPTOR,
} from "../../../../nm.module-descriptor";

@Component({
  selector: "nm-data-list-hierachical-component",
  templateUrl: "./data-list-hierachical.component.html",
  styleUrls: [
    "../data-list-component/data-list.component.scss",
    "./data-list-hierachical.component.scss",
  ],
  providers: [EditAttributeService],
})
export class DataListHierachicalComponent extends DataListComponent {
  private _islandColumns: Map<string, DataListColumnsService> = new Map();
  private _islandColumnsStorages: Map<string, LocalStorageEntry> = new Map();
  private _islandListServices: Map<string, DataListService> = new Map();
  @ViewChild("table", { static: true })
  public hgrid: IgxHierarchicalGridComponent;

  @Input("dynamicColumnHandler")
  public set dynamicColumnHandler(value) {
    angularWidgetBridgeInput(
      value,
      this.dynamicColumnHandlerInput,
      this.unsubscribe
    );
  }

  @Input("expandChildren")
  public set expandChildren(value) {
    angularWidgetBridgeInput(value, this.expandChildrenInput, this.unsubscribe);
  }

  @Output()
  public childSelectedItems = new EventEmitter<IslandSelectionParams>();

  @Output("dynamicIslandColumns")
  public dynamicIslandColumnsOutput = new EventEmitter<any>();

  public columnWidthDefault = 100;

  private rootSelection: SelectionParams;
  private selections: IslandSelectionParams = {};
  private dynamicColumnHandlerInput = new BehaviorSubject<any>(null);
  private expandChildrenInput = new Subject<any>();
  public rowEditable: boolean;
  public removeIslandCss: boolean;
  public rowCollapsedIcon: string;
  public rowExpandedIcon: string;
  public tableGridHeight: string;
  public tableGridWidth: string;

  constructor(
    localStorageService: LocalStorageService,
    dialog: DialogService,
    translateService: TranslateService,
    currentLocaleService: CurrentLocaleService,
    notificationService: CustomNotificationService,
    widgetFrameService: WidgetframeService,
    appContext: AppContext,
    appdataStore: AppdataStore,
    cdr: ChangeDetectorRef,
    http: HttpClient,
    progressbarService: ProgressbarService,
    editAttributeService: EditAttributeService,
    scrollService: ScrollService,
    dataListExportService: DataListExportService,
    websocketService: WebsocketService,
    userService: UserService,
    dataListEndEditService: DataListEndEditService,
    validationService: ValidationService,
    unsavedChangesService: UnsavedChangesService,
    @Optional() appService: AppService,
    @Inject(NOVOMIND_MODULE_DESCRIPTOR) module: NmModuleDescriptor
  ) {
    super(
      localStorageService,
      dialog,
      notificationService,
      translateService,
      currentLocaleService,
      widgetFrameService,
      appContext,
      appdataStore,
      cdr,
      http,
      progressbarService,
      editAttributeService,
      scrollService,
      dataListExportService,
      websocketService,
      userService,
      dataListEndEditService,
      validationService,
      unsavedChangesService,
      appService,
      module
    );
  }

  public doReload() {
    super.doReload();
    this._islandListServices.forEach((service) => {
      service.reloadGrid();
      service.grid.deselectAllRows();
    });
  }

  protected handleInput(link) {
    super.handleInput(link);
    this.grid.collapseAll();
  }

  ngOnInit() {
    this.expandChildrenInput
      .pipe(takeUntil(this.unsubscribe))
      .subscribe((data) => {
        this.grid["expandChildren"] = data;
      });

    if (this.configuration.islands) {
      for (let island of this.configuration.islands) {
        this.createIslandColumns(island);

        island.rowSelectionMode =
          island.rowSelectionMode || this.rowSelectionMode;

        let service = this.islandColumns(island);

        if (island.attributeUrl && island.dynamicColumnLink) {
          this.widgetFrameService
            .getData(island.dynamicColumnLink)
            .pipe(map((data) => data["_embedded"]["attributes"]))
            .subscribe((attributes) => {
              service.updateColumns(attributes);
            });
        }
      }
    }
    super.ngOnInit();

    // post-process
    for (let island of this.configuration.islands) {
      this.islandColumns(island).dataType = this.selectedDataType;

      island.rowSelectionMode =
        island.rowSelectionMode || this.rowSelectionMode;
    }

    this.rowEditable = getOrDefault(this.configuration.rowEditable, true);
    this.removeIslandCss = getOrDefault(
      this.configuration.removeIslandCss,
      false
    );
    this.rowCollapsedIcon = getOrDefault(
      this.configuration.rowCollapsedIcon,
      "chevron_right"
    );
    this.rowExpandedIcon = getOrDefault(
      this.configuration.rowExpandedIcon,
      "expand_more"
    );
    this.tableGridHeight = getOrDefault(
      this.configuration.tableGridHeight,
      "100%"
    );
    this.tableGridWidth = getOrDefault(
      this.configuration.tableGridWidth,
      "100%"
    );
  }

  ngAfterViewInit() {
    super.ngAfterViewInit();

    this.listService.data
      .pipe(distinctUntilChanged(), takeUntil(this.unsubscribe))
      .subscribe((d) => {
        if (this.grid) {
          this.grid.data = d;
          this.grid.cdr.detectChanges();
        }
      });
  }

  onViewModeChange() {
    super.onViewModeChange();
    if (this.configuration.handleViewModeInBackend === true) {
      this.clearSelectedIslandRows();
    }
  }

  islandService(parentId: string): DataListService {
    return this._islandListServices.get(parentId);
  }

  islandColumns(
    island: DataListHierachicalConfiguration
  ): DataListColumnsService {
    return this._islandColumns.get(island.key);
  }

  private getOrCreateIslandService(
    parentId: string,
    island: DataListHierachicalConfiguration
  ) {
    if (!this._islandListServices.has(parentId)) {
      let dynamicColumns = this.islandColumns(island);

      const service = new DataListService(
        this.http,
        this.progressbarService,
        this.notificationService,
        this.translateService,
        dynamicColumns,
        this.websocketService,
        this._islandColumnsStorages.get(island.key),
        this.userService
      );

      service.selectedLocale = this.listService.selectedLocale;

      this._islandListServices.set(parentId, service);
    }

    return this.islandService(parentId);
  }

  private createIslandColumns(island: DataListHierachicalConfiguration) {
    if (!this._islandColumns.has(island.key)) {
      let service = new DataListColumnsService(
        island,
        this.appService,
        this.translateService
      );
      service.dynamicColumns
        .pipe(takeUntil(this.unsubscribe))
        .subscribe((data) => {
          this.dynamicIslandColumnsOutput.next({
            columns: data,
            island: island.key,
          });
        });
      this._islandColumns.set(island.key, service);
      const localstorageShownAttributesEntry =
        this.localStorageService.getLocalStorageEntry(
          `${island.key}-` + this.configuration.localStorageShownAttributes,
          Scope.USER_AND_CLIENT,
          DeletionMode.NEVER
        );
      if (localstorageShownAttributesEntry.exists()) {
        service.shownAttributes = JSON.parse(
          localstorageShownAttributesEntry.value
        );
        service.updateColumns(service.shownAttributes);
      }
      this._islandColumnsStorages.set(
        island.key,
        localstorageShownAttributesEntry
      );
    }
  }

  protected validateAllRows(): boolean {
    let mainGridValid = super.validateAllRows();
    if (!mainGridValid) {
      return false;
    }

    return Array.from(this._islandListServices.values()).every((service) =>
      this.validateGrid(service.grid)
    );
  }

  gridCreated(
    event: IGridCreatedEventArgs,
    island: DataListHierachicalConfiguration
  ) {
    if (!island.link) return;

    let service = this.getOrCreateIslandService(event.parentID, island);
    let parent = this.grid.getRowByKey(event.parentID).rowData;

    event.grid.rowEdit.pipe(takeUntil(this.unsubscribe)).subscribe((data) => {
      this.onRowEdit(data, island, parent[this.primaryKey(this.configuration)]);
    });

    event.grid.cellEditEnter
      .pipe(takeUntil(this.unsubscribe))
      .subscribe((data) => {
        this.onCellEditEnter(data);
        this.dataListEndEditService.beginEdit(event.grid);
      });

    event.grid.cellEdit.pipe(takeUntil(this.unsubscribe)).subscribe((data) => {
      this.onChildCellEdit(
        event.grid,
        data,
        island,
        parent[this.primaryKey(this.configuration)]
      );
    });

    event.grid.rowSelected
      .pipe(takeUntil(this.unsubscribe))
      .subscribe((data) => {
        const convertedEvent = this.buildSelectionEvent(
          data,
          event.grid,
          service
        );

        if (!this.selections[island.key]) {
          this.selections[island.key] = {};
        }

        this.selections[island.key][event.parentID] = convertedEvent;
        this.combineSelectionEvents();
      });

    let initialized = false;

    event.grid.columnInit.subscribe((e) => {
      if (initialized) {
        return;
      }

      initialized = true;

      service.initialize(
        event.grid,
        true,
        island,
        () => {
          if (!this.isEagerLoading) {
            this.listService.updateHierarchicalDataTotalCount();
          }
          this.cdr.markForCheck();
        },
        this.cdr,
        this.selectedDataType
      );

      event.grid.data = [];

      event.grid.isLoading = true;

      service.data.subscribe((data) => {
        event.grid.isLoading = false;
        event.grid.data = data;
        event.grid.cdr.detectChanges();
      });

      let linkCfg = island.link;
      let link: string;
      if (linkCfg.type == "from-response") {
        link = parent._links[linkCfg.key].href;
      }
      service.updateLink(link);
    });
  }

  onRowSelection(event: IRowSelectionEventArgs) {
    const params = this.buildSelectionEvent(event, this.grid, this.listService);
    this.rootSelection = params;
    this.combineSelectionEvents();
  }

  private combineSelectionEvents() {
    let event = Object.assign({}, this.rootSelection || {});

    for (let islandKey in this.selections) {
      if (!this.selections.hasOwnProperty(islandKey)) {
        continue;
      }

      if (!event.children) {
        event.children = {};
      }

      if (!event.children[islandKey]) {
        event.children[islandKey] = {};
      }

      let childSelections = event.children[islandKey];

      let islandSelection = this.selections[islandKey];
      for (let parent in islandSelection) {
        if (!islandSelection.hasOwnProperty(parent)) {
          continue;
        }

        let selection = islandSelection[parent];

        if (selection.count > 0) {
          childSelections[parent] = selection;
        }
      }
    }

    this.selectedItems.next(event);
  }

  protected clearSelectedRows() {
    super.clearSelectedRows();
    this.clearSelectedIslandRows();
  }

  protected clearSelectedIslandRows() {
    this.selections = {};
    this.rootSelection = null;
    this._islandListServices.forEach((service) => {
      service.grid.deselectAllRows();
    });
    this.combineSelectionEvents();
  }

  protected doReset() {
    super.doReset();
    this.clearSelectedIslandRows();
  }

  protected dataLoaded(data) {
    super.dataLoaded(data);

    // If we ever have more than one island configured this method needs a rework, since it will always just take the first!
    // This is because we have no way to find out which islandListService is matching which island right now, since the id is always just the parent id!
    const island = this.configuration.islands[0];

    //If island data is not fetched from link, no need for service
    if (!island.link) return;

    this._islandListServices.forEach((value, key) => {
      const row = this.grid.getRowByKey(key);

      if (!row) {
        if (this.listService.isEagerLoading) {
          console.warn(
            `Can't correctly update children of parent ${key} maybe it isn't in the list any longer?`
          );
        }
        value.grid.deselectAllRows();
        return;
      }
      const parent = row.rowData;
      let linkCfg = island.link;
      let link: string;
      if (linkCfg.type == "from-response") {
        // It is possible that we have no link in the response, if this is a table that is only expandable conditionally (e.g. in a different viewmode)
        if (!parent._links[linkCfg.key]) {
          return;
        }
        link = parent._links[linkCfg.key].href;
      }
      value.updateLink(link);
    });
  }

  public editIslandShownAttributes(island: DataListHierachicalConfiguration) {
    let dynamicColumns = this.islandColumns(island);

    let dialogRef = this.dialog.open(SelectAttributesDialogComponent, {
      minWidth: "900px",
      maxWidth: "900px",
      minHeight: "700px",
    });
    dialogRef.componentInstance.preselectedAttributes =
      dynamicColumns.shownAttributes;
    dialogRef.componentInstance.showRestrictToCategoryButton = getOrDefault(
      this.configuration.showRestrictToCategoryButton,
      false
    );
    dialogRef.componentInstance.restrictAttributesToCategoryOnAttributeDialogOpen =
      getOrDefault(
        this.configuration.restrictAttributesToCategoryOnAttributeDialogOpen,
        false
      );
    dialogRef.componentInstance.enableSorting = true;
    dialogRef.componentInstance.attributeUrl = throwIfUndefined(
      island.attributeUrl
    );
    dialogRef.afterClosed().subscribe((data) => {
      if (data) {
        this.setIslandColumns(
          data,
          dynamicColumns,
          this._islandColumnsStorages.get(island.key)
        );
      }
    });
  }

  private setColumnsByIslandName(columns, name) {
    this.setIslandColumns(
      columns,
      this._islandColumns.get(name),
      this._islandColumnsStorages.get(name)
    );
  }

  private setIslandColumns(columns, islandColumns, localStorageEntry) {
    islandColumns.shownAttributes = deepCopy(columns);
    localStorageEntry.value = JSON.stringify(columns);
    islandColumns.updateColumns(columns);
  }

  public processData(event, reset: boolean) {
    console.log(event, reset);
  }

  public showFilteringRow(event) {
    this.showFilterRow = !this.showFilterRow;
    event.preventDefault();
    event.stopPropagation();
  }

  public processDataOnChange(event, reset: boolean) {
    if (event) {
      this.listService.processData(reset);
    }
  }

  ngOnDestroy() {
    super.ngOnDestroy();

    this._islandColumns.forEach((value) => value.destroy());
    this._islandListServices.forEach((value) => value.ngOnDestroy());
  }

  updateDynamicColumns(attributes) {
    if (this.dynamicColumnHandlerInput.value) {
      const fn = this.dynamicColumnHandlerInput.value;
      fn(
        attributes,
        this.setDynamicColumns.bind(this),
        this.setColumnsByIslandName.bind(this)
      );
    } else {
      super.updateDynamicColumns(attributes);
    }
  }

  protected getShownAttributes(): any[] {
    let columns = [];
    for (let island of this.configuration.islands) {
      columns.push(...this.islandColumns(island).shownAttributes);
    }
    const set = new Set();

    columns.push(...super.getShownAttributes());
    return columns.filter((entry) => {
      const id = entry.identifier;
      if (set.has(id)) {
        return false;
      }
      set.add(id);
      return true;
    });
  }

  onDataTypeChange() {
    super.onDataTypeChange();
    for (let island of this.configuration.islands) {
      this.islandColumns(island).dataType = this.selectedDataType;
    }
  }

  public onChildCellEdit(
    childGrid: IgxGridComponent | IgxHierarchicalGridComponent,
    event: IGridEditEventArgs,
    configuration: DataListHierachicalConfiguration = this.configuration,
    parent: string
  ) {
    if (configuration.rowEditable) {
      return;
    }

    let row = childGrid.getRowByKey(event.rowID);

    if (!event.newValue) {
      return;
    }

    if (event.oldValue && event.oldValue.value === event.newValue.value) {
      return;
    }
    const attributes = { [event.newValue.identifier]: event.newValue };
    this.fireEditedRowsEvent(
      event.rowID,
      row.rowData,
      parent,
      attributes,
      configuration
    );
  }

  protected updateDataLocale(locale) {
    super.updateDataLocale(locale);

    if (this._islandColumns) {
      this._islandColumns.forEach((service) => {
        service.updateDynamicColumnsHeaders(locale);
      });
    }

    if (this._islandListServices) {
      this._islandListServices.forEach((service) => {
        service.selectedLocale = locale;
        service.processData(true);
      });
    }
  }

  protected updateLocale(locale) {
    super.updateLocale(locale);

    if (this._islandColumns) {
      this._islandColumns.forEach((service) => {
        service.updateDynamicColumnsHeaders(locale);
      });
    }
  }
}
<div class="nm-dataList__header --hierachical">
  <mat-form-field
    *ngIf="globalFilterInput"
    class="nm-dataList__headerInput --hierachical"
  >
    <input
      matInput
      type="text"
      [placeholder]="'placeholder.free.text.search' | translate"
      [(ngModel)]="globalFilterValue"
      (input)="onFilterValueChange()"
      [nmAutofocus]="configuration.focusFreeTextSearch"
    />

    <button
      mat-button
      *ngIf="globalFilterValue"
      matSuffix
      mat-icon-button
      color="primary"
      class="nm-dataList__headerClearButton"
      aria-label="Clear"
      (click)="clearGlobalFilter()"
    >
      <mat-icon>close</mat-icon>
    </button>
  </mat-form-field>

  <button
    *ngIf="configuration.removeAllFiltersButton"
    class="nm-dataList__headerInput --hierachical"
    [disabled]="
      grid.filteringExpressionsTree.filteringOperands.length === 0 &&
      grid.sortingExpressions.length === 0
    "
    mat-icon-button
    [pTooltip]="'placeholder.reset.config.table' | translate"
    [showDelay]="300"
    color="primary"
    (click)="clearAllFiltersAndSorting()"
  >
    <mat-icon>settings_backup_restore</mat-icon>
  </button>

  <div
    *ngIf="!configuration.removeHeaderAdditionalSpace"
    style="flex-grow: 1"
  ></div>

  <ng-container
    *ngIf="listService.recommendedAttributes | async as recommendedAttributes"
  >
    <a
      *ngIf="recommendedAttributes != null && recommendedAttributes.count !== 0"
      (click)="takeRecommendedAttributes(recommendedAttributes)"
    >
      {{
        "label.take.recommended.attributes"
          | translate: { count: recommendedAttributes.count }
      }}
    </a>
  </ng-container>

  <mat-form-field
    class="nm-dataList__headerSelection --hierachical"
    *ngIf="
      dataTypeModeChannel.value === 'choose' && availableDataTypes.length > 0
    "
  >
    <mat-label>{{ "placeholder.dataType" | translate }}</mat-label>
    <nm-combo
      [options]="availableDataTypes"
      [(value)]="selectedDataType"
      (valueChange)="onDataTypeChange()"
      [clearable]="false"
      [showHeader]="availableDataTypes.length > 2"
    >
      <ng-template nmComboOption let-option>
        {{ option | translate }}
      </ng-template>

      <ng-template nmComboTrigger let-api let-selection="selection">
        {{ selection[0] | translate }}
      </ng-template>
    </nm-combo>
  </mat-form-field>

  <mat-slide-toggle
    *ngIf="configuration.enableToggleButton"
    tooltipPosition="bottom"
    (change)="toggleMode($event)"
    >{{ toggleButtonLabel | translate }}</mat-slide-toggle
  >

  <button
    *ngIf="isListMode && attributeUrl"
    mat-stroked-button
    class="nm-dataList__headerButton --hierachical"
    (click)="editShownAttributes()"
  >
    {{ "button.attributes" | translate }}
  </button>

  <button
    *ngIf="configuration.reloadButton"
    class="nm-dataList__headerButton"
    mat-icon-button
    [pTooltip]="'label.refresh' | translate"
    [showDelay]="300"
    color="primary"
    [disabled]="!(listService.data | async)"
    (click)="doRefresh()"
  >
    <mat-icon class="nm-grey-button">refresh</mat-icon>
  </button>

  <ng-container *ngFor="let island of configuration.islands">
    <ng-container *ngIf="island.shownAttributesSelection">
      <button
        class="nm-dataList__headerButton --hierachical"
        mat-button
        color="primary"
        (click)="editIslandShownAttributes(island)"
      >
        {{ "button.columns" | translate }} ({{ island.key }})
      </button>
    </ng-container>
  </ng-container>

  <mat-form-field
    class="nm-dataList__headerSelection --hierachical"
    *ngIf="configuration.viewModeSelection"
  >
    <mat-label>{{ "placeholder.viewMode" | translate }}</mat-label>
    <nm-combo
      [options]="viewModeOptions"
      displayKey="description"
      [(value)]="selectedViewMode"
      (valueChange)="onViewModeChange()"
      [clearable]="false"
      [showHeader]="viewModeOptions.length > 2"
    >
      <ng-template nmComboOption let-option>
        <mat-icon *ngIf="option.icon">{{ option.icon }}</mat-icon>
        {{ option.description | translate }}
      </ng-template>

      <ng-template nmComboTrigger let-api let-selection="selection">
        <ng-container *ngIf="selection[0] as option">
          <span class="nm-dataList__viewMode--trigger">
            <mat-icon *ngIf="option.icon">{{ option.icon }}</mat-icon>
            {{ option.description | translate }}
          </span>
        </ng-container>
      </ng-template>
    </nm-combo>
  </mat-form-field>

  <div
    *ngIf="
      configuration.visibleDataColumnsSelection &&
      selectedDataType === 'attributes'
    "
    class="nm-dataList__headerSelection_icon"
  >
    <nm-combo
      matTooltip="{{ 'label.hidden.columns' | translate }}"
      [options]="columns.dataColumnsConfigurableVisibility | async"
      [valueKey]="'field'"
      [displayKey]="'header' | translate"
      [filterPlaceholder]="'placeholder.search' | translate"
      [multiple]="true"
      [value]="visibleDataColumns"
      [clearable]="false"
      [iconMode]="true"
      (valueChange)="onDataColumnsChange($event)"
    >
      <ng-template nmComboOption let-option>
        {{ option.header | translate }}
      </ng-template>
      <ng-template nmComboTrigger let-option>
        <mat-icon
          color="primary"
          matBadge="{{
            (columns.dataColumnsConfigurableVisibility | async).length -
              visibleDataColumns.length
          }}"
          >view_column</mat-icon
        >
      </ng-template>
    </nm-combo>
  </div>
</div>
<div
  [ngClass]="
    selectedDataType + ' ' + selectedViewMode?.identifier + ' ' + filterMode
  "
  [class.removeIslandCss]="removeIslandCss"
  [ngStyle]="{ height: tableHeight }"
>
  <igx-hierarchical-grid
    nm-paste-handler
    [pasteGrid]="table"
    (onDataProcessed)="dataPasted($event)"
    [height]="tableGridHeight"
    [width]="tableGridWidth"
    [hideRowSelectors]="!rowSelectable"
    [rowEditable]="rowEditable"
    [rowSelection]="rowSelectionMode"
    [displayDensity]="density"
    [primaryKey]="_primaryKey"
    [autoGenerate]="false"
    [allowFiltering]="true"
    (dataPreLoad)="listService.processData(false)"
    (sortingDone)="processDataOnChange($event, true)"
    (contextMenu)="openContextmenu($event)"
    (rowEdit)="onRowEdit($event)"
    (cellEdit)="onCellEdit($event)"
    (cellEditEnter)="onCellEditEnter($event)"
    (cellEditExit)="onCellEditExit()"
    (filteringDone)="onFilteringDone()"
    (rowSelected)="onRowSelection($event)"
    [class.showFilterRow]="showFilterRow"
    (rangeSelected)="onRangeSelection($event)"
    [filterMode]="filterMode"
    [sortingExpressions]="sortingExpressions"
    [tableIdentifier]="
      (contextIdentifierChannel | async)
        ? (contextIdentifierChannel | async)
        : (configuration.identifier
            ? configuration.identifier
            : configuration.title) +
          (selectedDataType ? '-' + selectedDataType : '')
    "
    [clipboardOptions]="clipboardOptions"
    [pinning]="pinningConfig"
    [hideRowSelectors]="!rowSelectable"
    (columnOrderChanged)="columnOrderChanged($event)"
    [dataList]="this"
    [locale]="listService.selectedLocale || currentLocaleService.currentLocale"
    statefulDataList
    #table
  >
    <ng-template
      *ngIf="configuration.hasChildrenKey"
      igxRowCollapsedIndicator
      let-row
    >
      <div
        class="custom-indicator"
        (click)="
          !row.rowData[configuration.hasChildrenKey]
            ? $event.stopPropagation()
            : ''
        "
        [matTooltip]="
          row.rowData[configuration.hasChildrenKey]
            ? (configuration.expanderTooltip | translate)
            : ''
        "
      >
        <mat-icon
          [style.visibility]="
            row.rowData[configuration.hasChildrenKey] ? 'visible' : 'hidden'
          "
          >{{ rowCollapsedIcon }}</mat-icon
        >
      </div>
    </ng-template>

    <ng-template *ngIf="configuration.hasChildrenKey" igxRowExpandedIndicator>
      <div class="custom-indicator">
        <mat-icon>{{ rowExpandedIcon }}</mat-icon>
      </div>
    </ng-template>

    <igx-column
      *ngFor="
        let nmColumn of columns.dataColumns
          | async
          | nmDataListColumnSettings
            : this
            : (columns.columnOrder | async)
            : visibleDataColumns
            : showAllColumns;
        trackBy: trackColumns
      "
      [field]="nmColumn.field"
      [sortable]="nmColumn.sortable"
      [filterable]="nmColumn.filter"
      [header]="nmColumn.settings.header | translate"
      [width]="nmColumn.width ? nmColumn.width : '200px'"
      [minWidth]="nmColumn.minWidth ? nmColumn.minWidth : '0px'"
      [maxWidth]="nmColumn.maxWidth ? nmColumn.maxWidth : '10000px'"
      [pinned]="nmColumn.pinned"
      [hidden]="nmColumn.hidden"
      [disableHiding]="nmColumn.disableHiding ? nmColumn.disableHiding : true"
      [editable]="nmColumn.editable"
      [movable]="true"
      [resizable]="true"
      [dataType]="nmColumn.dataType"
      [additionalTemplateContext]="nmColumn"
      [cellClasses]="nmColumn.settings.cellClasses"
      [headerClasses]="nmColumn.settings.headerClasses"
      [headerTemplate]="
        filterMode === 'inlineFilter' ? columnHeaderTemplate : null
      "
      [cellEditorTemplate]="columnEditorTemplate"
      [cellTemplate]="columnCellTemplate"
    >
    </igx-column>

    <ng-container *ngFor="let island of configuration.islands">
      <igx-row-island
        [key]="island.key"
        [primaryKey]="primaryKey(island)"
        [autoGenerate]="false"
        [hideRowSelectors]="!rowSelectable"
        [rowSelection]="island.rowSelectionMode"
        [rowEditable]="rowEditable"
        (gridCreated)="gridCreated($event, island)"
        (dataPreLoad)="processData($event, false)"
        (sortingDone)="processData($event, true)"
        (filteringDone)="processData($event, true)"
        [width]="'100%'"
      >
        <ng-container
          *ngFor="
            let col of islandColumns(island).columns
              | async
              | nmDataListColumnSettings
                : this
                : (columns.columnOrder | async)
                : visibleDataColumns
                : showAllColumns;
            trackBy: trackColumns
          "
        >
          <igx-column
            [field]="col.field"
            [sortable]="col.sortable"
            [filterable]="col.filter"
            [header]="col.settings.header | translate"
            [width]="col.width ? col.width : columnWidthDefault"
            [minWidth]="col.minWidth ? col.minWidth : '0px'"
            [maxWidth]="col.maxWidth ? col.maxWidth : '10000px'"
            [pinned]="col.pinned"
            [hidden]="col.hidden"
            [editable]="col.editable"
            [dataType]="col.dataType"
            [movable]="true"
            [cellClasses]="col.settings.cellClasses"
            [headerClasses]="col.settings.headerClasses"
            [resizable]="true"
          >
            <ng-template igxCellEditor let-val let-cell="cell">
              <nm-list-cell-edit
                *ngIf="cell?.column"
                [column]="col"
                [cell]="cell"
                [dataType]="island.dataType"
                [validation]="{ grid: this, config: configuration.islands }"
                [attr.data-rowindex]="cell.row.index"
              >
              </nm-list-cell-edit>
            </ng-template>

            <ng-template igxCell let-val let-cell="cell">
              <nm-list-cell
                *ngIf="cell?.column && !cell.row.rowData.cache"
                [column]="col"
                [source]="cell.row.rowData[col.settings.source]"
                [row]="cell.row.rowData"
                [cell]="cell"
                [value]="cell.value"
                [density]="density"
                [ignoreSeconds]="island.ignoreSeconds"
                [chipColors]="island.chipColors"
                [columnSelector]="columnSelector"
                [attr.data-rowindex]="cell.row.index"
              >
              </nm-list-cell>
              <nm-content-preview
                *ngIf="cell.row.rowData.cache"
                [min-width]="col.minWidth"
                [max-width]="col.width || col.maxWidth"
              >
              </nm-content-preview>
            </ng-template>
          </igx-column>
        </ng-container>
      </igx-row-island>
    </ng-container>

    <igx-action-strip
      *ngIf="!rowPinningEnabled; else rowPinningEnabledTemplate"
      #actionStrip
    >
      <ng-container
        *ngTemplateOutlet="
          !this.cellEditModeActive ? actionStripTemplate : undefined;
          context: { actionStrip: actionStrip }
        "
      >
      </ng-container>
    </igx-action-strip>

    <ng-template #rowPinningEnabledTemplate>
      <igx-action-strip *ngIf="rowPinningEnabled" #actionStrip>
        <ng-container
          *ngTemplateOutlet="
            actionStripTemplate;
            context: { actionStrip: actionStrip }
          "
        >
        </ng-container>
        <igx-grid-pinning-actions></igx-grid-pinning-actions>
      </igx-action-strip>
    </ng-template>
  </igx-hierarchical-grid>
</div>
<div
  *ngIf="childComponentMenu.menuObs | async"
  style="position: fixed"
  #menuTrigger="matMenuTrigger"
  [style.left]="contextMenuCoordinates.x"
  [style.top]="contextMenuCoordinates.y"
  [matMenuTriggerFor]="childComponentMenu.menu.menu"
></div>
<nm-grid-contextmenu
  [cell]="contextMenuCoordinates.cell"
  [grid]="this"
  [selected-items]="selectedItems"
  [total]="listService.totalSubject"
  [column]="contextMenuColumn"
  [configuration]="configuration"
  [link]="listService.linkWithoutPaging"
  [api]="apiEmitter | async"
  (closeContextMenu)="closeContextMenu()"
></nm-grid-contextmenu>

<ng-template #actionStripTemplate let-actionStrip="actionStrip">
  <nm-list-cell-action-strip
    [actionColumns]="columns.actionColumns | async"
    [rowContext]="actionStrip.context"
    [dataType]="listService.dataType"
  >
  </nm-list-cell-action-strip>
</ng-template>

<div igxOverlayOutlet></div>

<ng-template
  #columnHeaderTemplate
  let-column
  let-templateContext="additionalTemplateContext"
>
  <div
    class="title-inner"
    [attr.draggable]="false"
    [ngClass]="templateContext?.settings.columnHeaderClasses"
  >
    <span *ngIf="!templateContext?.filter" class="nm-title-container">
      {{
        (templateContext?.dynamicHeader
          ? listService.dataType + "-" + templateContext?.header
          : templateContext?.header
        ) | translate
      }}</span
    >
    <mat-form-field
      *ngIf="templateContext?.filter"
      class="nm-list-column-search"
      [attr.draggable]="false"
    >
      <input
        [attr.draggable]="false"
        #inputBox
        [ngClass]="column.field"
        matInput
        type="text"
        (click)="stopPropagation($event, column.field)"
        [placeholder]="
          (templateContext?.dynamicHeader
            ? listService.dataType + '-' + templateContext?.header
            : templateContext?.header
          ) | translate
        "
        [(ngModel)]="dataListStateDirective.columnFilterInput[column.field]"
        (input)="
          onColumnFilterInput(
            dataListStateDirective.columnFilterInput[column.field],
            column
          )
        "
      />

      <button
        (click)="$event.stopPropagation()"
        [attr.draggable]="false"
        mat-button
        *ngIf="dataListStateDirective.columnFilterInput[column.field]"
        matSuffix
        mat-icon-button
        aria-label="Clear"
        (click)="
          clearColumnFilter(
            dataListStateDirective.columnFilterInput[column.field],
            column
          )
        "
      >
        <mat-icon [attr.draggable]="false">close</mat-icon>
      </button>
    </mat-form-field>

    <mat-icon
      class="nm-table-head-icon nm-table-pin fa fa fa-thumb-tack fade-in"
      [class.pinned]="column.pinned"
      [attr.draggable]="false"
      (click)="column.pinned = !column.pinned"
    ></mat-icon>
  </div>
</ng-template>

<ng-template
  #columnEditorTemplate
  let-val
  let-cell="cell"
  let-templateContext="additionalTemplateContext"
>
  <nm-list-cell-edit
    [column]="templateContext"
    [dataType]="listService.dataType"
    [cell]="cell"
    [validation]="{ grid: this, config: configuration }"
  >
  </nm-list-cell-edit>
</ng-template>

<ng-template
  #columnCellTemplate
  let-val
  let-cell="cell"
  let-templateContext="additionalTemplateContext"
>
  <nm-list-cell
    *ngIf="cell?.column && !cell.row.rowData.cache"
    [column]="templateContext"
    [source]="cell.row.rowData[templateContext?.settings.source]"
    [highlightReadOnly]="templateContext?.settings.highlightReadOnly"
    [row]="cell.row.rowData"
    [value]="cell.value"
    [cell]="cell"
    [density]="density"
    [ignoreSeconds]="configuration.ignoreSeconds"
    [columnSelector]="columnSelector"
    [chipColors]="configuration.chipColors"
    igxDrop
    (dropped)="onItemDropped($event, cell, templateContext)"
    [attr.data-rowindex]="cell.row.index"
  >
  </nm-list-cell>
  <nm-list-cell
    *ngIf="
      cell?.column && !cell.row.rowData.cache && templateContext?.draggable
    "
    [column]="templateContext"
    [source]="cell.row.rowData[templateContext?.settings.source]"
    [highlightReadOnly]="templateContext?.settings.highlightReadOnly"
    [row]="cell.row.rowData"
    [value]="cell.value"
    [cell]="cell"
    [density]="density"
    [ignoreSeconds]="configuration.ignoreSeconds"
    [columnSelector]="columnSelector"
    igxDrop
    (dropped)="onItemDropped($event, cell, templateContext)"
    [igxDrag]="{
      type: 'data-list-row',
      source: cell.row.rowData,
      column: templateContext
    }"
    [attr.data-rowindex]="cell.row.index"
    igxDragHandle
  >
  </nm-list-cell>
  <nm-content-preview
    *ngIf="cell.row.rowData.cache"
    [min-width]="templateContext?.minWidth"
    [max-width]="templateContext?.width || templateContext?.maxWidth"
  >
  </nm-content-preview>
</ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""