/** * Copyright 2018 the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { OnInit, OnDestroy } from '@angular/core'; import { ObservableMedia } from '@angular/flex-layout'; import { MatSnackBar } from '@angular/material'; import { FormGroup } from '@angular/forms'; import { Subscription } from 'rxjs/Subscription'; import { ApiItemService } from './api-item.service'; import { ApiTableService } from '../api-table/api-table.service'; import { ObjectWithLinks, ModelMeta, Property } from '../../common'; export declare class ApiItemComponent implements OnInit, OnDestroy { media: ObservableMedia; private apiTableService; private snackBar; private service; all$: Subscription; modelMeta: ModelMeta; properties: Property[]; item: ObjectWithLinks; /** * Id for the selected item */ id: number | string; /** * Model name for the selected/new item */ model: string; /** * Form used to create an item(Entity) */ itemFormGroup: FormGroup; constructor(media: ObservableMedia, apiTableService: ApiTableService, snackBar: MatSnackBar, service: ApiItemService); ngOnInit(): void; ngOnDestroy(): void; save(): void; private handleResponse(response); private handleMetaModel(meta); delete(): void; private handleErrors(httpErrorResponse); }