Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 1x 1x 1x 1x 1x 3x 3x 3x | import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { ProductContextDisplayProperties } from 'ish-core/facades/product-context.facade';
import { ShoppingFacade } from 'ish-core/facades/shopping.facade';
import { GenerateLazyComponent } from 'ish-core/utils/module-loader/generate-lazy-component.decorator';
import { WishlistsFacade } from '../../facades/wishlists.facade';
/**
* The Wishlist Widget Component displays all unique items from all wish lists.
*/
@Component({
selector: 'ish-wishlist-widget',
templateUrl: './wishlist-widget.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
@GenerateLazyComponent()
export class WishlistWidgetComponent implements OnInit {
allWishlistsItemsSkus$: Observable<string[]>;
tileConfiguration: Partial<ProductContextDisplayProperties>;
constructor(private wishlistsFacade: WishlistsFacade, private shoppingFacade: ShoppingFacade) {
this.tileConfiguration = {
addToWishlist: false,
addToOrderTemplate: false,
addToCompare: false,
addToQuote: false,
};
}
ngOnInit() {
this.allWishlistsItemsSkus$ = this.shoppingFacade.excludeFailedProducts$(
this.wishlistsFacade.allWishlistsItemsSkus$
);
}
}
|