@@ -153,29 +153,6 @@ function buildAggregationStats(packages, relations, maxDepth) {
153153 return stats ;
154154}
155155
156- function buildAggregationStatsForPackageFilter ( packages , relations , packageFilterFqn , maxDepth ) {
157- const filterPrefix = packageFilterFqn ? `${ packageFilterFqn } .` : null ;
158- const withinFilter = fqn => ! packageFilterFqn || fqn === packageFilterFqn || fqn . startsWith ( filterPrefix ) ;
159- const filteredPackages = packages . filter ( item => withinFilter ( item . fqn ) ) ;
160- const filteredRelations = relations . filter ( relation => withinFilter ( relation . from ) && withinFilter ( relation . to ) ) ;
161- return buildAggregationStats ( filteredPackages , filteredRelations , maxDepth ) ;
162- }
163-
164- function buildAggregationStatsForRelated ( packages , relations , rootFqn , maxDepth , aggregationDepth , relatedFilterMode ) {
165- if ( ! rootFqn ) {
166- return buildAggregationStats ( packages , relations , maxDepth ) ;
167- }
168- const aggregatedRoot = getAggregatedFqn ( rootFqn , aggregationDepth ) ;
169- const relatedSet = collectRelatedSet ( aggregatedRoot , relations , aggregationDepth , relatedFilterMode ) ;
170- const relatedPackages = packages . filter ( item => relatedSet . has ( getAggregatedFqn ( item . fqn , aggregationDepth ) ) ) ;
171- const relatedRelations = relations . filter ( relation => {
172- const from = getAggregatedFqn ( relation . from , aggregationDepth ) ;
173- const to = getAggregatedFqn ( relation . to , aggregationDepth ) ;
174- return relatedSet . has ( from ) && relatedSet . has ( to ) ;
175- } ) ;
176- return buildAggregationStats ( relatedPackages , relatedRelations , maxDepth ) ;
177- }
178-
179156function buildAggregationStatsForFilters ( packages , relations , packageFilterFqn , relatedFilterFqn , maxDepth , aggregationDepth , relatedFilterMode ) {
180157 const withinPackageFilter = fqn => {
181158 if ( ! packageFilterFqn ) return true ;
@@ -516,18 +493,6 @@ function renderPackageTable(context) {
516493 } ) ;
517494}
518495
519- function filterPackageTableRows ( packageFilterFqn ) {
520- const rows = dom . getPackageTableRows ( ) ;
521- const rowFqns = Array . from ( rows , row => {
522- const fqnCell = row . querySelector ( 'td.fqn' ) ;
523- return fqnCell ? fqnCell . textContent : '' ;
524- } ) ;
525- const visibility = buildPackageRowVisibility ( rowFqns , packageFilterFqn ) ;
526- rows . forEach ( ( row , index ) => {
527- row . classList . toggle ( 'hidden' , ! visibility [ index ] ) ;
528- } ) ;
529- }
530-
531496function filterRelatedTableRows ( fqn , context ) {
532497 const rows = dom . getPackageTableRows ( ) ;
533498 const { relations} = getPackageSummaryData ( context ) ;
@@ -1252,8 +1217,6 @@ if (typeof module !== 'undefined' && module.exports) {
12521217 getCommonPrefixDepth,
12531218 getPackageFqnFromTypeFqn,
12541219 buildAggregationStats,
1255- buildAggregationStatsForPackageFilter,
1256- buildAggregationStatsForRelated,
12571220 buildAggregationStatsForFilters,
12581221 normalizePackageFilterValue,
12591222 normalizeAggregationDepthValue,
@@ -1269,7 +1232,6 @@ if (typeof module !== 'undefined' && module.exports) {
12691232 buildPackageTableActionSpecs,
12701233 buildPackageTableRowElement,
12711234 renderPackageTable,
1272- filterPackageTableRows,
12731235 filterRelatedTableRows,
12741236 renderRelatedFilterLabel,
12751237 setRelatedFilterAndRender,
0 commit comments