1
1
import { Component , inject } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
3
import { IIdentified , IManagedObject , InventoryService } from '@c8y/client' ;
4
- import { BottomDrawerService , C8yTranslatePipe , TitleComponent } from '@c8y/ngx-components' ;
4
+ import { C8yTranslatePipe , TitleComponent } from '@c8y/ngx-components' ;
5
5
import {
6
6
AssetPropertyActionDirective ,
7
7
AssetPropertyListComponent ,
@@ -97,7 +97,7 @@ import { JsonPipe } from '@angular/common';
97
97
</div>
98
98
</fieldset>
99
99
<label class="c8y-switch">
100
- <input type="checkbox" [(ngModel)]="searchable " />
100
+ <input type="checkbox" [(ngModel)]="filterable " />
101
101
<span></span>
102
102
<small>searchable</small>
103
103
</label>
@@ -116,21 +116,27 @@ import { JsonPipe } from '@angular/common';
116
116
<span></span>
117
117
<small>showKey</small>
118
118
</label>
119
+ <label class="c8y-switch m-0">
120
+ <input type="checkbox" [(ngModel)]="allowAddingCustomProperties" />
121
+ <span></span>
122
+ <small>allowAddingCustomProperties</small>
123
+ </label>
119
124
</div>
120
125
</div>
121
126
<div class="col-xs-12 col-md-5">
122
127
<div class="card">
123
- <div class="card-inner-scroll d-flex d-col bg-component" style="height: 559px ">
128
+ <div class="card-inner-scroll d-flex d-col bg-component" style="height: 591px ">
124
129
<c8y-asset-property-list
125
130
class="bg-component"
126
131
[asset]="selectedAsset"
127
132
[config]="{
128
133
selectMode: multiSelect,
129
134
showHeader: showHeader,
130
- searchable: searchable ,
135
+ filterable: filterable ,
131
136
showValue: showValue,
132
137
expansionMode: expansionMode,
133
- showKey: showKey
138
+ showKey: showKey,
139
+ allowAddingCustomProperties: allowAddingCustomProperties
134
140
}"
135
141
(selectedProperties)="onSelectedProperties($event)"
136
142
>
@@ -150,7 +156,7 @@ import { JsonPipe } from '@angular/common';
150
156
</div>
151
157
</div>
152
158
<div class="col-xs-12 col-md-4">
153
- <pre class="inner-scroll" style="height: 559px ">{{ assetPropertiesOutput | json }}</pre>
159
+ <pre class="inner-scroll" style="height: 591px ">{{ assetPropertiesOutput | json }}</pre>
154
160
</div>
155
161
</div>` ,
156
162
standalone : true ,
@@ -171,15 +177,15 @@ export class PropertiesSelectorInlineExampleComponent {
171
177
model : IIdentified ;
172
178
selectedAsset : IManagedObject ;
173
179
assetPropertiesOutput : AssetPropertyType [ ] | AssetPropertyType ;
174
- bottomDrawerService = inject ( BottomDrawerService ) ;
175
180
176
181
multiSelect : 'single' | 'multi' | 'none' = 'multi' ;
177
182
expansionMode : 'expandedByDefault' | 'collapsedByDefault' | 'nonCollapsible' =
178
183
'expandedByDefault' ;
179
184
showHeader = true ;
180
185
showValue = true ;
181
186
showKey = true ;
182
- searchable = true ;
187
+ filterable = true ;
188
+ allowAddingCustomProperties = true ;
183
189
184
190
selectionChanged ( e : AssetSelectionChangeEvent ) {
185
191
this . selectedAsset = e . change . item ;
0 commit comments