export interface ExpansionPanelTreeHeader {
description: string;
title: string;
}
export interface ExpansionPanelTreeRouterLink {
queryParams: { [k: string]: any; }
fragment: string;
queryParamsHandling: QueryParamsHandling;
preserveFragment: boolean;
skipLocationChange: boolean;
replaceUrl: boolean;
state?: { [k: string]: any; };
routerLink: string | any[];
}
export interface ExpansionPanelTree {
data: {
header?: ExpansionPanelTreeHeader;
routerLink?: ExpansionPanelTreeRouterLink;
},
childList: ExpansionPanelTree[];
}
export interface IndexTree {
data: { id: string; };
childList: TreeIndex[];
}
export interface ExpansionPanelIndexToHeaderTranslations {
[lang: string]: {
indexTreeDataId: string;
header: {
title: string;
description: string;
}
}
}
Enhancement
Metadata
Description
expansion-panelexpansion-panelneeds a tree as input, which signature is:ExpansionPanelTreehas an emptychildList, it will not be a "mat-expansion-pannel" but amat-toolbar. This toolbar will contain a<a>with all therouterLinkinputs (cf. references bellow).ExpansionPanelTreedata come from an NgRx selector which use anIndexTreeselector and aCurrentLangselector.findRequestfor each part of the tree that is synced (when anExpansionPanelTreeis expanded, it will reveal itschildList, triggering newfindRequests, one for each of the "future"childList. This will allow to have no latency in the user experience, as achildListwill be loaded/synced ahead of time : before the user want to see it.Reference(s)