UNPKG

@spartacus/storefront

Version:

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

45 lines (44 loc) 2.46 kB
import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { Address, AddressValidation, Country, GlobalMessageService, Region, Title, TranslationService, UserAddressService, UserService } from '@spartacus/core'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; import { ModalRef, ModalService } from '../../../../shared/components/modal/index'; import * as i0 from "@angular/core"; export declare class AddressFormComponent implements OnInit, OnDestroy { protected fb: FormBuilder; protected userService: UserService; protected userAddressService: UserAddressService; protected globalMessageService: GlobalMessageService; protected modalService: ModalService; protected translation: TranslationService; countries$: Observable<Country[]>; titles$: Observable<Title[]>; regions$: Observable<Region[]>; selectedCountry$: BehaviorSubject<string>; addresses$: Observable<Address[]>; addressData: Address; actionBtnLabel: string; cancelBtnLabel: string; setAsDefaultField: boolean; showTitleCode: boolean; showCancelBtn: boolean; submitAddress: EventEmitter<any>; backToAddress: EventEmitter<any>; addressVerifySub: Subscription; regionsSub: Subscription; suggestedAddressModalRef: ModalRef; addressForm: FormGroup; constructor(fb: FormBuilder, userService: UserService, userAddressService: UserAddressService, globalMessageService: GlobalMessageService, modalService: ModalService, translation: TranslationService); ngOnInit(): void; getTitles(): Observable<Title[]>; protected handleAddressVerificationResults(results: AddressValidation): void; countrySelected(country: Country): void; regionSelected(region: Region): void; toggleDefaultAddress(): void; back(): void; verifyAddress(): void; openSuggestedAddress(results: AddressValidation): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AddressFormComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AddressFormComponent, "cx-address-form", never, { "addressData": "addressData"; "actionBtnLabel": "actionBtnLabel"; "cancelBtnLabel": "cancelBtnLabel"; "setAsDefaultField": "setAsDefaultField"; "showTitleCode": "showTitleCode"; "showCancelBtn": "showCancelBtn"; }, { "submitAddress": "submitAddress"; "backToAddress": "backToAddress"; }, never, never>; }