2 * Copyright (c) 2017 ZTE Corporation.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * and the Apache License 2.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * ZTE - initial API and implementation and/or initial documentation
13 import { AfterViewInit, Component, EventEmitter, Input, Output } from '@angular/core';
15 import { ValueSource } from '../../model/value-source.enum';
16 import { ValueType } from '../../model/value-type.enum';
17 import { Parameter} from '../../model/workflow/parameter';
20 * property component presents information of a workflow node.
21 * the presented information can be edit in this component.
22 * it may load information dynamically. the content may be different for different node type.
25 selector: 'b4t-editable-property',
26 templateUrl: 'editable-property.component.html',
28 export class EditablePropertyComponent {
29 @Input() public parameter: Parameter;
30 @Input() public showLabel: boolean;
31 @Input() public valueSource: ValueSource[];
32 @Output() public parameterChange = new EventEmitter<Parameter>();
34 private editing = false;
36 public isEditing(): boolean {
44 public completeEdit() {
46 this.parameterChange.emit(this.parameter);