import { Observable } from "rxjs/Observable"; import "rxjs/add/operator/zip"; import "rxjs/add/operator/do"; import "rxjs/add/operator/debounceTime"; import "rxjs/add/operator/distinct"; import "rxjs/add/operator/switch"; import "rxjs/add/operator/finally"; import "rxjs/add/operator/share"; import { NgForm } from "@angular/forms"; import { NgrxJsonApiService, NgrxJsonApiStoreData, NgrxJsonApiZoneService, ResourceError, StoreResource } from 'ngrx-json-api'; import { Store } from "@ngrx/store"; export interface FormBindingConfig { /** * Reference to the forFormElement instance to hook into. */ form: NgForm; /** * Reference to a query from the store to get notified about validation errors. * FormBinding implementation assumes that the query has already been executed * (typically when performing the route to a new page). */ queryId: string; /** * By default a denormalized selectOneResults is used to fetch resources. Any update of those * resources triggers an update of the FormControl states. Set this flag to true to listen to all store changes. */ mapNonResultResources?: boolean; /** * Zone to use within ngrx-json-api. */ zoneId?: string; } /** * Binding between ngrx-jsonapi and angular forms. It serves two purposes: * *