aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html
blob: 3ab47074e75610b14eb54392c426f4c77e6b7075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<div class="properties-table">
    <div class="table-header">
        <div class="table-cell col1">Property Name</div>
        <div class="table-cell col2">Type</div>
        <div class="table-cell col3">ES</div>
        <div class="table-cell valueCol">Value</div>
    </div>
    <div class="table-body">
        <div class="no-data" *ngIf="!feInstancesNames">No data to display</div>

        <div *ngFor="let instanceName of feInstancesNames; trackBy:instanceName">
            <div class="table-rows-header">{{instanceName | contentAfterLastDot}}</div>

            <div class="table-row" *ngFor="let property of fePropertiesMap[instanceName]; trackBy:property?.name" (click)="onClickPropertyRow(property, instanceName, $event)" [ngClass]="{'selected': selectedPropertyId === property.uniqueId}">
                <div class="table-cell col1">
                <checkbox [label]="property.name"
                          [(checked)]="property.isSelected"
                          [disabled]="property.isDisabled || property.isDeclared"
                          (checkedChange)="propertyChecked(property)"
                          tooltip="{{property.name}}"></checkbox>
                    <span *ngIf="property.description" class="property-description-icon sprite-new show-desc" tooltip="{{property.description}}"></span>
                </div>
                <div class="table-cell col2">{{property.type | contentAfterLastDot}}</div>
                <div class="table-cell col3">{{property.schema && property.schema.property && property.schema.property.type ? (property.schema.property.type
                    | contentAfterLastDot) : ''}}</div>
                <div class="table-cell valueCol">
                    <!-- [ngClass]="{'filtered':property.name === propertyNameSearchText}" (selectProperty)="propertySelected(property, $event, flatProperty.propertiesName)" [propType]="property.type" [propSchema]="property.schema" [propKey]="" [propValue]="property.value"-->
                    <dynamic-property
                        [selectedPropertyId]="selectedPropertyId"
                        [canBeDeclared]="true"
                        [property]="property"
                        [expandedChildId]="property.expandedChildPropertyId"
                        [propChildren]="property.flattenedChildren | filterChildProperties : property.expandedChildPropertyId"
                        (valueChanged)="propValueChanged(property);"
                        (expandChild)="property.updateExpandedChildPropertyId($event)"
                        (clickOnPropertyRow)="onClickPropertyInnerRow($event, instanceName)"
                        (checkProperty)="propertyChecked(property, $event)"
                        >
                    </dynamic-property>

                </div>
            </div>
<!--
                <div *ngIf="!property.isSimpleType && !property.isDeclared" class="table-cell valueCol child-property-container">

                    <div class="child-property-row" *ngFor="let flatProperty of property.flattenedChildren | filterChildProperties : property.expandedChildPropertyId"
                        [ngClass]="{'selected': selectedPropertyId === flatProperty.uniqueId}" (click)="clickOnPropertyRow(flatProperty, instanceName, $event)" [@fadeIn]="''">
                        <derived-property [propertyObj]="flatProperty"  [propertyNameSearchText]="propertyNameSearchText" [expanded]="flatProperty.propertiesName == property.expandedChildPropertyId"
                                    (selectProperty)="propertySelected(property, $event, flatProperty.propertiesName)" (valueChanged)="propValueChanged(property)" (expandChild)="property.updateExpandedChildPropertyId($event)"></derived-property>
                    </div>

                </div>
                <!--


                <property [propertyObj]="flatProperty"
                        [expanded]="flatProperty.parentName == property.expandedChildPropertyId"
                        (valueChanged)="propValueChanged($event)"
                        (selectChildProperty)="onChildPropertySelected($event)"></property>
                <list-property *ngIf="property.type == 'list'"
                                    [property]="property"
                            [selectedPropertyId]="selectedPropertyId"
                                    (valueChanged)="propValueChanged($event)"
                            (selectChildProperty)="onChildPropertySelected($event)"></list-property>
                <map-property *ngIf="property.type == 'map'"
                            [property]="property"
                            [selectedPropertyId]="selectedPropertyId"
                            (valueChanged)="propValueChanged($event)"
                            (selectChildProperty)="onChildPropertySelected($event)"></map-property>
                <properties-value-inner-table *ngIf="property.isDataType"
                                            [property]="property"
                                            [selectedPropertyId]="selectedPropertyId"
                                            (selectChildProperty)="onChildPropertySelected($event)"
                                            (valueChanged)="propValueChanged($event)"></properties-value-inner-table>
                -->



        </div>

    </div>
</div>
<!--
<div class="properties-table" style="display:block">
    <div class="table-header">
        <div class="table-cell col1">Property Name</div>
        <div class="table-cell col2">Type</div>
        <div class="table-cell col3">ES</div>
        <div class="table-cell valueCol">Value</div>
    </div>
    <div class="table-body">
        <div class="no-data" *ngIf="!properties || !properties.length">No data to display</div>
        <div class="table-row" *ngFor="let property of properties" (click)="clickOnPropertyRow(property)">
            <div class="table-cell col1"><checkbox [label]="property.name" [(checked)]="property.isSelected" (checkedChange)="propSelected(property)" [disabled]="property.isDisabled"></checkbox></div>
            <div class="table-cell col2">{{property.type | contentAfterLastDot}}</div>
            <div class="table-cell col3">{{property.schema && property.schema.property && property.schema.property.type ? (property.schema.property.type | contentAfterLastDot) : ''}}</div>
            <div class="table-cell valueCol" [class.inner-table-container]="property.childrenProperties || !property.isSimpleType">
                <!--<input class="value-input" *ngIf="property.isSimpleType"
                       type="property.derivedFromSimpleTypeName || property.type"
                       [(ngModel)]="property.value"
                        (change)="putDefaultValueInEmptyProperty(property);propValueChanged(property);"
                       pattern="validationUtils.getValidationPattern(property.type)"/>
                <dynamic-element
                    class="value-input"
                    *ngIf="property.isSimpleType"
                    [(value)]="property.value"
                    (valueChange)="putDefaultValueInEmptyProperty(property);propValueChanged(property);"
                    [type]="property.derivedFromSimpleTypeName || property.type"
                    [name]="property.name">
                </dynamic-element>
                <list-property *ngIf="property.type == 'list'"
                                      [property]="property"
                               [selectedPropertyId]="selectedPropertyId"
                                      (valueChanged)="propValueChanged($event)"
                               (selectChildProperty)="onChildPropertySelected($event)"></list-property>
                <map-property *ngIf="property.type == 'map'"
                               [property]="property"
                              [selectedPropertyId]="selectedPropertyId"
                               (valueChanged)="propValueChanged($event)"
                               (selectChildProperty)="onChildPropertySelected($event)"></map-property>
                <properties-value-inner-table *ngIf="property.isDataType"
                                              [property]="property"
                                              [selectedPropertyId]="selectedPropertyId"
                                              (selectChildProperty)="onChildPropertySelected($event)"
                                              (valueChanged)="propValueChanged($event)"></properties-value-inner-table>
            </div>

        </div>
    </div>
</div> -->