@@ -137,6 +137,14 @@ export class RecRecRecommenderView extends LitElement {
137
137
remainTimeMS = DEFAULT_REMAIN_TIME ;
138
138
139
139
// Slider ranges
140
+ @state ( )
141
+ paperCountRange : SliderRange = {
142
+ min : 1 ,
143
+ max : 2 ,
144
+ curValue : 1 ,
145
+ initialValue : 1
146
+ } ;
147
+
140
148
@state ( )
141
149
citationTimeRange : SliderRange = {
142
150
min : 1 ,
@@ -155,7 +163,7 @@ export class RecRecRecommenderView extends LitElement {
155
163
156
164
// Sorting and filter
157
165
@state ( )
158
- sortBy : 'citeTimes' | 'hIndex' = 'citeTimes ' ;
166
+ sortBy : 'citeTimes' | 'hIndex' | 'paperCount' = 'paperCount ' ;
159
167
160
168
curShownCardSizeMultiplier = 1 ;
161
169
@@ -249,6 +257,13 @@ export class RecRecRecommenderView extends LitElement {
249
257
this . remainTimeMS = DEFAULT_REMAIN_TIME ;
250
258
251
259
// Reset the sliders and checkboxes
260
+ this . paperCountRange = {
261
+ min : 1 ,
262
+ max : 2 ,
263
+ curValue : 1 ,
264
+ initialValue : 1
265
+ } ;
266
+
252
267
this . citationTimeRange = {
253
268
min : 1 ,
254
269
max : 2 ,
@@ -564,6 +579,9 @@ export class RecRecRecommenderView extends LitElement {
564
579
this . citationTimeRange . min = minCitationTimes ;
565
580
this . citationTimeRange . max = maxCitationTimes ;
566
581
582
+ this . paperCountRange . min = minPaperCount ;
583
+ this . paperCountRange . max = maxPaperCount ;
584
+
567
585
this . checkedSelectedPaperIDs = structuredClone ( this . selectedPaperIDs ) ;
568
586
569
587
// Update the view
@@ -617,6 +635,8 @@ export class RecRecRecommenderView extends LitElement {
617
635
}
618
636
619
637
// Slider filters
638
+ const paperCountOK =
639
+ recommender . paperCount ! >= this . paperCountRange . curValue ;
620
640
const hIndexOK = recommender . hIndex ! >= this . hIndexRange . curValue ;
621
641
const citeTimesOK =
622
642
recommender . citeTimes ! >= this . citationTimeRange . curValue ;
@@ -635,6 +655,7 @@ export class RecRecRecommenderView extends LitElement {
635
655
recommender . affiliation !== undefined ) ;
636
656
637
657
if (
658
+ paperCountOK &&
638
659
hIndexOK &&
639
660
citeTimesOK &&
640
661
excludeCollaboratorOK &&
@@ -650,6 +671,8 @@ export class RecRecRecommenderView extends LitElement {
650
671
recommenders . sort ( ( a , b ) => b . citeTimes ! - a . citeTimes ! ) ;
651
672
} else if ( this . sortBy === 'hIndex' ) {
652
673
recommenders . sort ( ( a , b ) => b . hIndex ! - a . hIndex ! ) ;
674
+ } else if ( this . sortBy === 'paperCount' ) {
675
+ recommenders . sort ( ( a , b ) => b . paperCount ! - a . paperCount ! ) ;
653
676
}
654
677
655
678
this . curRecommendersSize = recommenders . length ;
@@ -682,10 +705,22 @@ export class RecRecRecommenderView extends LitElement {
682
705
this . updateCitationView ( ) ;
683
706
}
684
707
708
+ paperCountSliderChanged ( e : CustomEvent < number > ) {
709
+ const count = Math . round ( e . detail ) ;
710
+ const newPaperCountRange = { ...this . paperCountRange } ;
711
+ newPaperCountRange . curValue = count ;
712
+ this . paperCountRange = newPaperCountRange ;
713
+
714
+ // Trigger a new recommender view update
715
+ this . updateCitationView ( ) ;
716
+ }
717
+
685
718
selectChanged ( e : InputEvent ) {
686
719
const curValue = ( e . currentTarget as HTMLSelectElement ) . value ;
687
720
if ( curValue === 'hIndex' ) {
688
- this . sortBy = curValue ;
721
+ this . sortBy = 'hIndex' ;
722
+ } else if ( curValue === 'paperCount' ) {
723
+ this . sortBy = 'paperCount' ;
689
724
} else {
690
725
this . sortBy = 'citeTimes' ;
691
726
}
@@ -974,7 +1009,8 @@ export class RecRecRecommenderView extends LitElement {
974
1009
this . selectChanged ( e ) ;
975
1010
} }
976
1011
>
977
- <option value= "citeTimes" > Citing my works </ option>
1012
+ <option value= "paperCount" > Papers citing me </ option>
1013
+ <option value= "citeTimes" > Times citing me </ option>
978
1014
<option value= "hIndex" > H-Index </ option>
979
1015
</ select>
980
1016
</ div>
@@ -986,7 +1022,22 @@ export class RecRecRecommenderView extends LitElement {
986
1022
<div class= "control-section control-section-slider" >
987
1023
<div class= "control-block slider-block" >
988
1024
<div class= "citation-slider-label" >
989
- Cited my works ≥ ${ this . citationTimeRange . curValue } times
1025
+ Papers citing my work ≥ ${ this . paperCountRange . curValue }
1026
+ </ div>
1027
+ <nightjar- slider
1028
+ id= "slider-paper-count"
1029
+ @valueChanged = ${ ( e : CustomEvent < number > ) =>
1030
+ this . paperCountSliderChanged ( e ) }
1031
+ min= ${ this . paperCountRange . min }
1032
+ max= ${ this . paperCountRange . max }
1033
+ curValue= ${ this . paperCountRange . initialValue }
1034
+ .styleConfig = ${ SLIDER_STYLE }
1035
+ > </ nightjar- slider>
1036
+ </ div>
1037
+
1038
+ <div class= "control-block slider-block" >
1039
+ <div class= "citation-slider-label" >
1040
+ Cited my work ≥ ${ this . citationTimeRange . curValue } times
990
1041
</ div>
991
1042
<nightjar- slider
992
1043
id= "slider-citation-time"
@@ -1087,8 +1138,8 @@ export class RecRecRecommenderView extends LitElement {
1087
1138
<div class= "table-title" >
1088
1139
<span
1089
1140
> ${ this . overlayPaperCountsType === 'citeTimes'
1090
- ? 'My papers & Citations by the recommender'
1091
- : "Recommender's papers & Citations of my work" } </ span
1141
+ ? 'My papers & citations by the recommender'
1142
+ : "Recommender's papers & citations of my work" } </ span
1092
1143
>
1093
1144
</ div>
1094
1145
0 commit comments