UNPKG

@spartacus/storefront

Version:

Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.

30 lines (29 loc) 1.35 kB
import { ElementRef, ChangeDetectorRef } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { Product, ProductReviewService, Review } from '@spartacus/core'; import { Observable } from 'rxjs'; import { CurrentProductService } from '../../current-product.service'; import * as i0 from "@angular/core"; export declare class ProductReviewsComponent { protected reviewService: ProductReviewService; protected currentProductService: CurrentProductService; private fb; protected cd: ChangeDetectorRef; titleInput: ElementRef; writeReviewButton: ElementRef; isWritingReview: boolean; initialMaxListItems: number; maxListItems: number; reviewForm: FormGroup; product$: Observable<Product>; reviews$: Observable<Review[]>; constructor(reviewService: ProductReviewService, currentProductService: CurrentProductService, fb: FormBuilder, cd: ChangeDetectorRef); initiateWriteReview(): void; cancelWriteReview(): void; setRating(rating: number): void; submitReview(product: Product): void; addReview(product: Product): void; private resetReviewForm; static ɵfac: i0.ɵɵFactoryDeclaration<ProductReviewsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ProductReviewsComponent, "cx-product-reviews", never, {}, {}, never, never>; }