UNPKG

@spartacus/storefront

Version:

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

40 lines (39 loc) 1.81 kB
import { ElementRef, OnInit } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; import { ActiveCartService, Cart, OrderEntry, PromotionLocation } from '@spartacus/core'; import { Observable } from 'rxjs'; import { ICON_TYPE } from '../../../../cms-components/misc/icon/icon.model'; import { ModalService } from '../../../../shared/components/modal/modal.service'; import * as i0 from "@angular/core"; export declare class AddedToCartDialogComponent implements OnInit { protected modalService: ModalService; protected cartService: ActiveCartService; iconTypes: typeof ICON_TYPE; entry$: Observable<OrderEntry>; cart$: Observable<Cart>; loaded$: Observable<boolean>; addedEntryWasMerged$: Observable<boolean>; numberOfEntriesBeforeAdd: number; promotionLocation: PromotionLocation; quantity: number; modalIsOpen: boolean; dialog: ElementRef; form: FormGroup; protected quantityControl$: Observable<FormControl>; constructor(modalService: ModalService, cartService: ActiveCartService); /** * Returns an observable formControl with the quantity of the cartEntry, * but also updates the entry in case of a changed value. * The quantity can be set to zero in order to remove the entry. */ getQuantityControl(): Observable<FormControl>; ngOnInit(): void; /** * Adds quantity and entryNumber form controls to the FormGroup. * Returns quantity form control. */ protected getQuantityFormControl(entry: OrderEntry): FormControl; dismissModal(reason?: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<AddedToCartDialogComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AddedToCartDialogComponent, "cx-added-to-cart-dialog", never, {}, {}, never, never>; }