@@ -33,7 +33,8 @@ function processChildProperty(child, sharedModel) {
33
33
return {
34
34
'name' : child . name [ 0 ] . value ,
35
35
'type' : child . syntax . return . type . specName [ 0 ] . value ,
36
- 'propertyDescription' : {
36
+ 'propertyDescription' :
37
+ {
37
38
'text' : addCodeTag ( [ child . summary , child . remarks ] . join ( '' ) ) ,
38
39
'hasEnum' : enumFields . length > 0 ,
39
40
'enum' : enumFields ,
@@ -43,27 +44,34 @@ function processChildProperty(child, sharedModel) {
43
44
}
44
45
}
45
46
47
+ const filterProperties = propertyCandidate => propertyCandidate . type === 'property' && ! propertyCandidate ?. attributes . some ( attribute =>
48
+ attribute . type === 'System.ComponentModel.BrowsableAttribute' && attribute . arguments [ 0 ] . value === false ) ;
49
+
46
50
function extractPropertiesData ( model , sharedModel ) {
47
51
return model ?. children
48
- . filter ( child => child . type === 'property' && child . syntax )
52
+ . filter ( filterProperties )
49
53
. map ( child => processChildProperty ( child , sharedModel ) ) ;
50
54
}
51
55
52
56
function extractPropertiesFromInheritedMembersData ( model , sharedModel ) {
53
57
return model . inheritedMembers
54
- . filter ( inheritedMember => inheritedMember . type === 'property' )
55
- . map ( inheritedMember => (
56
- processChildProperty (
58
+ . filter ( filterProperties )
59
+ . map ( inheritedMember =>
60
+ (
61
+ processChildProperty
62
+ (
57
63
sharedModel [ `~/api/${ inheritedMember . parent } .yml` ] . children . find ( inheritedMemberChild => inheritedMemberChild . uid === inheritedMember . uid ) ,
58
64
sharedModel
59
65
)
60
- ) ) ;
66
+ )
67
+ ) ;
61
68
}
62
69
63
70
function extractConstituentOperatorsData ( model ) {
64
71
return model ?. children
65
72
. filter ( child => child . type === 'property' && model . __global . _shared ?. [ `~/api/${ child . syntax . return . type . uid } .yml` ] . type === 'class' )
66
- . map ( child => {
73
+ . map ( child =>
74
+ {
67
75
const deviceModel = model . __global . _shared ?. [ `~/api/${ child . syntax . return . type . uid } .yml` ] ;
68
76
const subProperties = sortPropertiesData ( extractPropertiesData ( deviceModel , model . __global . _shared ) ) ;
69
77
return {
@@ -73,7 +81,8 @@ function extractConstituentOperatorsData(model) {
73
81
'hasSubProperties' : subProperties === undefined || subProperties . length === 0 ? false : true ,
74
82
'subProperties' : subProperties ,
75
83
} ;
76
- } ) ;
84
+ }
85
+ ) ;
77
86
}
78
87
79
88
function extractOperatorData ( model ) {
0 commit comments