aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
committerMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
commited64b5edff15e702493df21aa3230b81593e6133 (patch)
treea4cb01fdaccc34930a8db403a3097c0d1e40914b /catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts
parent280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff)
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts46
1 files changed, 46 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts b/catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts
new file mode 100644
index 0000000000..16f069a685
--- /dev/null
+++ b/catalog-ui/src/app/ng2/components/properties-table/derived-property/derived-property.component.ts
@@ -0,0 +1,46 @@
+/**
+ * Created by rc2122 on 4/20/2017.
+ */
+import {Component, Input, Output, EventEmitter} from "@angular/core";
+import { DerivedFEProperty, DerivedPropertyType} from "app/models";
+import {PropertiesService} from "../../../services/properties.service";
+
+@Component({
+ selector: 'derived-property',
+ templateUrl: './derived-property.component.html',
+ styleUrls: ['./derived-property.component.less']
+})
+export class DerivedPropertyComponent {
+
+ derivedPropertyTypes = DerivedPropertyType; //http://stackoverflow.com/questions/35835984/how-to-use-a-typescript-enum-value-in-an-angular2-ngswitch-statement
+
+ @Input() propertyObj: DerivedFEProperty;
+ @Input() propertyNameSearchText: string;
+ @Input() expanded: boolean;
+ @Output() valueChanged: EventEmitter<any> = new EventEmitter<any>();
+ @Output() expandChild: EventEmitter<string> = new EventEmitter<string>();
+ @Output() selectProperty: EventEmitter<boolean> = new EventEmitter<boolean>();
+
+
+ constructor ( private propertiesService:PropertiesService){
+ }
+
+
+ propValueChanged = () => {
+ this.valueChanged.emit(this.propertyObj);
+ };
+
+ expandChildById = (id: string) => {
+ this.expandChild.emit(id);
+ }
+
+ checkedChange = (isChecked:boolean) => {
+ this.selectProperty.emit(isChecked);
+ }
+
+ addRows = (flatProperty: DerivedFEProperty): void => {
+ console.log("ADDING A ROW OF TYPE " + flatProperty.type);
+ console.log(flatProperty);
+ }
+
+}