@@ -21,9 +21,6 @@ module.exports = {
21
21
isBehavior : function ( item ) {
22
22
return ( ( item && item . type ) || this . type ) == 'behavior' ;
23
23
} ,
24
- isJso : function ( item ) {
25
- return ( ( item && item . type ) || this . type ) == 'jso' ;
26
- } ,
27
24
getNestedBehaviors : function ( item , name ) {
28
25
var _this = this ;
29
26
var properties = [ ] ;
@@ -104,22 +101,27 @@ module.exports = {
104
101
if ( / ^ n u m b e r / i. test ( t ) ) return 'double' ;
105
102
if ( / ^ f u n c t i o n / i. test ( t ) ) return 'Function' ;
106
103
var b = this . findBehavior ( t ) ;
107
- return b ? this . className ( b . name ) : "JavaScriptObject" ;
104
+ if ( b ) {
105
+ var c = this . camelCase ( t ) ;
106
+ return c != t ? c + 'Element' : c ;
107
+ }
108
+
109
+ return "JavaScriptObject" ;
108
110
} ,
109
111
sortProperties : function ( properties ) {
110
112
111
113
} ,
112
114
getGettersAndSetters : function ( properties ) {
113
- // Sorting properties so String methods are at end
115
+ // Sorting properties so no-typed and String methods are at end
114
116
properties . sort ( function ( a , b ) {
115
117
var t1 = this . computeType ( a . type ) ;
116
118
var t2 = this . computeType ( b . type ) ;
117
- return t1 == t2 ? 0 : t1 == 'String' ? 1 : - 1 ;
119
+ return t1 == t2 ? 0 : ! a . type && b . type ? 1 : a . type && ! b . type ? - 1 : t1 == 'String' ? 1 : - 1 ;
118
120
} . bind ( this ) ) ;
119
121
var ret = [ ] ;
120
122
var done = { } ;
121
123
_ . forEach ( properties , function ( item ) {
122
- if ( item . type != 'Function' ) {
124
+ if ( item . published || ! item . private && item . type && ! / f u n c t i o n / i . test ( item . type ) ) {
123
125
item . getter = item . getter || this . computeGetterWithPrefix ( item ) ;
124
126
item . setter = item . setter || ( this . computeSetterWithPrefix ( item ) + '(' + this . computeType ( item . type ) + ' value)' ) ;
125
127
// JsInterop does not support a property with two signatures
@@ -136,7 +138,7 @@ module.exports = {
136
138
var arr = this . getGettersAndSetters ( properties ) ;
137
139
_ . forEach ( arr , function ( item ) {
138
140
var itType = this . computeType ( item . type ) ;
139
- if ( item . published && itType != 'String' && itType != 'boolean' ) {
141
+ if ( itType != 'String' && itType != 'boolean' ) {
140
142
for ( var j = 0 ; j < arr . length ; j ++ ) {
141
143
if ( arr [ j ] . name == item . name && arr [ j ] . type == 'String' ) {
142
144
return ;
@@ -158,7 +160,7 @@ module.exports = {
158
160
var ret = [ ] ;
159
161
var done = { } ;
160
162
_ . forEach ( properties , function ( item ) {
161
- if ( item . type == 'Function' ) {
163
+ if ( ! item . private && ! item . published && / f u n c t i o n / i . test ( item . type ) ) {
162
164
item . method = item . method || item . name + '(' + this . typedParamsString ( item ) + ')' ;
163
165
// JsInterop + SDM do not support method overloading if one signature is object
164
166
var other = item . method . replace ( / S t r i n g / , 'Object' ) ;
0 commit comments