@@ -235,7 +235,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
235
235
| Observable < ( U & NgIterable < T > ) | undefined | null >
236
236
| ( U & NgIterable < T > )
237
237
| null
238
- | undefined
238
+ | undefined ,
239
239
) {
240
240
if ( ! isObservable ( potentialObservable ) ) {
241
241
this . staticValue = potentialObservable ;
@@ -262,7 +262,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
262
262
/** @internal */
263
263
private strategyHandler = strategyHandling (
264
264
this . strategyProvider . primaryStrategy ,
265
- this . strategyProvider . strategies
265
+ this . strategyProvider . strategies ,
266
266
) ;
267
267
/**
268
268
* @description
@@ -309,7 +309,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
309
309
*/
310
310
@Input ( 'rxVirtualForStrategy' )
311
311
set strategy (
312
- strategyName : RxStrategyNames < string > | Observable < RxStrategyNames < string > >
312
+ strategyName : RxStrategyNames < string > | Observable < RxStrategyNames < string > > ,
313
313
) {
314
314
this . strategyHandler . next ( strategyName ) ;
315
315
}
@@ -356,6 +356,8 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
356
356
* }
357
357
*
358
358
* @param renderParent
359
+ *
360
+ * @deprecated this flag will be dropped soon, as it is no longer required when using signal based view & content queries
359
361
*/
360
362
@Input ( 'rxVirtualForParent' ) renderParent = false ;
361
363
@@ -466,8 +468,8 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
466
468
) {
467
469
throw new Error (
468
470
`trackBy must be typeof function or keyof T, but received ${ JSON . stringify (
469
- trackByFnOrKey
470
- ) } .`
471
+ trackByFnOrKey ,
472
+ ) } .`,
471
473
) ;
472
474
}
473
475
if ( trackByFnOrKey == null ) {
@@ -523,7 +525,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
523
525
* @param renderCallback
524
526
*/
525
527
@Input ( 'rxVirtualForRenderCallback' ) set renderCallback (
526
- renderCallback : Subject < U >
528
+ renderCallback : Subject < U > ,
527
529
) {
528
530
this . _renderCallback = renderCallback ;
529
531
}
@@ -561,7 +563,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
561
563
readonly values$ = this . observables$ . pipe (
562
564
coerceObservableWith ( ) ,
563
565
switchAll ( ) ,
564
- shareReplay ( { bufferSize : 1 , refCount : true } )
566
+ shareReplay ( { bufferSize : 1 , refCount : true } ) ,
565
567
) ;
566
568
567
569
/** @internal */
@@ -583,16 +585,16 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
583
585
static ngTemplateContextGuard <
584
586
T ,
585
587
U extends NgIterable < T > = NgIterable < T > ,
586
- K = keyof T
588
+ K = keyof T ,
587
589
> (
588
590
dir : RxVirtualFor < T , U > ,
589
- ctx : any
591
+ ctx : any ,
590
592
) : ctx is RxVirtualForViewContext < T , U , RxListViewComputedContext , K > {
591
593
return true ;
592
594
}
593
595
594
596
constructor (
595
- private readonly templateRef : TemplateRef < RxVirtualForViewContext < T , U > >
597
+ private readonly templateRef : TemplateRef < RxVirtualForViewContext < T , U > > ,
596
598
) { }
597
599
598
600
/** @internal */
@@ -637,9 +639,9 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
637
639
Array . isArray ( values )
638
640
? values
639
641
: values != null
640
- ? Array . from ( values )
641
- : [ ]
642
- )
642
+ ? Array . from ( values )
643
+ : [ ] ,
644
+ ) ,
643
645
) ,
644
646
this . scrollStrategy . renderedRange$ ,
645
647
this . strategyHandler . strategy$ . pipe ( distinctUntilChanged ( ) ) ,
@@ -667,7 +669,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
667
669
changes ,
668
670
iterable ,
669
671
items . length ,
670
- range . start
672
+ range . start ,
671
673
) ;
672
674
const updates = listChanges [ 0 ] . sort ( ( a , b ) => a [ 0 ] - b [ 0 ] ) ;
673
675
const indicesToPosition = new Set < number > ( ) ;
@@ -685,15 +687,15 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
685
687
this . viewRendered$ . next ( update as any ) ;
686
688
}
687
689
} ,
688
- { ngZone : this . patchZone ? this . ngZone : undefined }
690
+ { ngZone : this . patchZone ? this . ngZone : undefined } ,
689
691
) ;
690
692
} ) ;
691
693
this . partiallyFinished = true ;
692
694
const notifyParent = insertedOrRemoved && this . renderParent ;
693
695
this . renderingStart$ . next ( indicesToPosition ) ;
694
696
return combineLatest (
695
697
// emit after all changes are rendered
696
- work$ . length > 0 ? work$ : [ of ( iterable ) ]
698
+ work$ . length > 0 ? work$ : [ of ( iterable ) ] ,
697
699
) . pipe (
698
700
tap ( ( ) => {
699
701
this . templateManager . setItemCount ( items . length ) ;
@@ -719,16 +721,16 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
719
721
{
720
722
ngZone : this . patchZone ? this . ngZone : undefined ,
721
723
scope : ( this . cdRef as any ) . context || this . cdRef ,
722
- }
723
- ) . pipe ( ignoreElements ( ) )
724
- )
724
+ } ,
725
+ ) . pipe ( ignoreElements ( ) ) ,
726
+ ) ,
725
727
)
726
728
: ( o$ ) => o$ ,
727
729
this . handleError ( ) ,
728
- map ( ( ) => iterable )
730
+ map ( ( ) => iterable ) ,
729
731
) ;
730
732
} ) ,
731
- this . handleError ( )
733
+ this . handleError ( ) ,
732
734
) ;
733
735
}
734
736
@@ -739,7 +741,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
739
741
this . partiallyFinished = false ;
740
742
this . errorHandler . handleError ( err ) ;
741
743
return of ( null ) ;
742
- } )
744
+ } ) ,
743
745
) ;
744
746
}
745
747
@@ -755,12 +757,12 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
755
757
/** @internal */
756
758
private createViewContext (
757
759
item : T ,
758
- computedContext : RxListViewComputedContext
760
+ computedContext : RxListViewComputedContext ,
759
761
) : RxVirtualForViewContext < T , U , RxListViewComputedContext > {
760
762
return new RxVirtualForViewContext (
761
763
item ,
762
764
this . values ! as U ,
763
- computedContext
765
+ computedContext ,
764
766
) ;
765
767
}
766
768
@@ -770,7 +772,7 @@ export class RxVirtualFor<T, U extends NgIterable<T> = NgIterable<T>>
770
772
view : EmbeddedViewRef <
771
773
RxVirtualForViewContext < T , U , RxListViewComputedContext >
772
774
> ,
773
- computedContext ?: RxListViewComputedContext
775
+ computedContext ?: RxListViewComputedContext ,
774
776
) : void {
775
777
view . context . updateContext ( computedContext ! ) ;
776
778
view . context . $implicit = item ;
0 commit comments