@@ -107,21 +107,28 @@ function generateKey(name: string): string {
107
107
*/
108
108
export function getTableColumValues (
109
109
allProps : Array < Property > ,
110
- options : Schema ,
110
+ options : Schema
111
111
) : Array < {
112
112
property : Property ;
113
113
index : number ;
114
114
complexPrefix : string ;
115
+ isEnumeration : boolean ;
115
116
} > {
116
117
return allProps . flatMap ( ( property : Property , index : number ) => {
118
+ const isEnumeration = property . characteristic && property . characteristic instanceof DefaultEnumeration ;
117
119
if ( property . effectiveDataType ?. isComplex && property . characteristic instanceof DefaultSingleEntity ) {
118
120
const complexPropObj = options . templateHelper . getComplexProperties ( property , options ) ;
119
121
return complexPropObj . properties . map ( ( complexProp : Property , index : number ) => {
120
- return { property : complexProp , index : index , complexPrefix : `${ complexPropObj . complexProp } .` } ;
122
+ return {
123
+ property : complexProp ,
124
+ index : index ,
125
+ complexPrefix : `${ complexPropObj . complexProp } .` ,
126
+ isEnumeration,
127
+ } ;
121
128
} ) ;
122
129
}
123
130
124
- return [ { property : property , index : index , complexPrefix : '' } ] ;
131
+ return [ { property : property , index : index , complexPrefix : '' , isEnumeration } ] ;
125
132
} ) ;
126
133
}
127
134
@@ -168,11 +175,11 @@ export function getCustomRowActions(options: any): string {
168
175
const formattedAction = action . replace ( / \. [ ^ / . ] + $ / , '' ) ;
169
176
const formattedActionKebab = formattedAction . replace ( / \s + / g, '-' ) . toLowerCase ( ) ;
170
177
const commonParts = `data-test="custom-action-icon" *ngIf="is${ classify (
171
- formattedActionKebab ,
178
+ formattedActionKebab
172
179
) } Visible" (click)="executeCustomAction($event, '${ formattedActionKebab } ', row)" style="cursor: pointer;" matTooltip="{{ '${ options . templateHelper . getVersionedAccessPrefix (
173
- options ,
180
+ options
174
181
) } ${ formattedActionKebab } .customRowAction' | transloco }}" aria-hidden="false" attr.aria-label="{{ '${ options . templateHelper . getVersionedAccessPrefix (
175
- options ,
182
+ options
176
183
) } ${ formattedActionKebab } .customRowAction' | transloco }}"`;
177
184
return `${ action . lastIndexOf ( '.' ) > - 1 ? `<mat-icon svgIcon="${ formattedAction } " ${ commonParts } ></mat-icon>` : '' } ${
178
185
action . lastIndexOf ( '.' ) === - 1 ? `<mat-icon ${ commonParts } class="material-icons">${ action } </mat-icon>` : ''
@@ -246,7 +253,7 @@ export function resolveJsPropertyType(property: Property): string {
246
253
if ( property . characteristic . elementCharacteristic ) {
247
254
return resolveJsCharacteristicType (
248
255
property . characteristic . elementCharacteristic ,
249
- property . characteristic . elementCharacteristic . dataType ,
256
+ property . characteristic . elementCharacteristic . dataType
250
257
) ;
251
258
}
252
259
0 commit comments