@aiot-toolkit/parser 2.0.5-beta.9 → 2.0.5-widget-provider-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +11 -11
  2. package/lib/index.d.ts +1 -4
  3. package/lib/index.js +0 -27
  4. package/lib/utils/ParserUtil.js +15 -15
  5. package/lib/ux/config/ExtensionConfig.js +2 -2
  6. package/lib/ux/config/FeatureConfig.js +19 -19
  7. package/lib/ux/config/vela/StyleAttributeConfig.js +87 -87
  8. package/lib/ux/enum/StyleSelectorType.js +6 -6
  9. package/lib/ux/enum/TemplateNodeType.js +2 -2
  10. package/lib/ux/enum/android/StyleSelectorName.js +2 -2
  11. package/lib/ux/parser/ScriptParser.js +2 -2
  12. package/lib/ux/parser/StyleParser.js +62 -62
  13. package/lib/ux/parser/TemplateValueParser.js +49 -49
  14. package/lib/ux/parser/UxParser.js +11 -11
  15. package/lib/ux/translate/android/StyleToTypescript.js +51 -51
  16. package/lib/ux/translate/android/TemplateToTypescript.js +51 -51
  17. package/lib/ux/translate/android/UxToTypescript.js +14 -14
  18. package/lib/ux/translate/android/attributeTranslate/ForTranslate.js +17 -17
  19. package/lib/ux/translate/android/attributeTranslate/IfTranslate.js +9 -9
  20. package/lib/ux/translate/vela/ScriptToTypescript.js +13 -12
  21. package/lib/ux/translate/vela/StyleToTypescript.js +10 -10
  22. package/lib/ux/translate/vela/TemplateToTypescript.js +74 -74
  23. package/lib/ux/translate/vela/TranslateCache.js +2 -2
  24. package/lib/ux/translate/vela/UxToTypescript.js +6 -6
  25. package/lib/ux/translate/vela/VelaContext.js +2 -2
  26. package/lib/ux/translate/vela/plugins/e2e.js +61 -61
  27. package/lib/ux/translate/vela/protobuf/BinaryPlugin.js +172 -172
  28. package/lib/ux/translate/vela/protobuf/protobuf.js +235 -235
  29. package/lib/ux/translate/vela/protobuf/protobufControl.js +159 -159
  30. package/lib/ux/translate/vela/protobuf/vdom_pb.js +2374 -2374
  31. package/lib/ux/translate/vela/runtime/velaTestLibrary.js +104 -104
  32. package/lib/ux/translate/vela/utils/AttributeConfig.js +15 -15
  33. package/lib/ux/translate/vela/utils/ExtendedBoxStyle.js +38 -38
  34. package/lib/ux/translate/vela/utils/SourceMapUtil.js +30 -30
  35. package/lib/ux/translate/vela/utils/TemplateUtil.d.ts +10 -8
  36. package/lib/ux/translate/vela/utils/TemplateUtil.js +206 -191
  37. package/lib/ux/translate/vela/wrap/CbTranslate.js +8 -8
  38. package/lib/ux/translate/vela/wrap/CfTranslate.js +14 -14
  39. package/lib/ux/translate/vela/wrap/CiTranslate.js +11 -11
  40. package/lib/ux/utils/BabelUtil.js +35 -35
  41. package/lib/ux/utils/ElementConfigUtil.js +24 -24
  42. package/lib/ux/utils/StyleMapUtil.js +26 -16
  43. package/lib/ux/utils/StyleUtil.js +165 -165
  44. package/lib/ux/utils/UxUtil.js +32 -32
  45. package/lib/ux/validate/ElementValidate.js +2 -2
  46. package/lib/ux/validate/UxFileValidate.js +2 -2
  47. package/package.json +4 -5
  48. package/lib/xts/XtsParser.d.ts +0 -20
  49. package/lib/xts/XtsParser.js +0 -86
  50. package/lib/xts/XtsToTypescript.d.ts +0 -69
  51. package/lib/xts/XtsToTypescript.js +0 -894
  52. package/lib/xts/config/CommonAttributeList.d.ts +0 -6
  53. package/lib/xts/config/CommonAttributeList.js +0 -17
  54. package/lib/xts/config/classCount.json +0 -38
  55. package/lib/xts/config/commonAttribute.json +0 -84
  56. package/lib/xts/config/componentList.d.ts +0 -56
  57. package/lib/xts/config/componentList.js +0 -9
  58. package/lib/xts/config/predefinedComponent.json +0 -91
  59. package/lib/xts/config/render.json +0 -31
  60. package/lib/xts/data/ElementType.d.ts +0 -6
  61. package/lib/xts/data/ElementType.js +0 -5
  62. package/lib/xts/data/element/CommentElement.d.ts +0 -16
  63. package/lib/xts/data/element/CommentElement.js +0 -26
  64. package/lib/xts/data/element/ElementBase.d.ts +0 -14
  65. package/lib/xts/data/element/ElementBase.js +0 -20
  66. package/lib/xts/data/element/ForElement.d.ts +0 -58
  67. package/lib/xts/data/element/ForElement.js +0 -81
  68. package/lib/xts/data/element/IfElement.d.ts +0 -55
  69. package/lib/xts/data/element/IfElement.js +0 -87
  70. package/lib/xts/data/element/NodeElement.d.ts +0 -39
  71. package/lib/xts/data/element/NodeElement.js +0 -86
  72. package/lib/xts/enum/AttributeType.d.ts +0 -31
  73. package/lib/xts/enum/AttributeType.js +0 -53
  74. package/lib/xts/enum/Framework.d.ts +0 -98
  75. package/lib/xts/enum/Framework.js +0 -107
  76. package/lib/xts/interface/IContext.d.ts +0 -11
  77. package/lib/xts/interface/IContext.js +0 -1
  78. package/lib/xts/interface/IElement.d.ts +0 -17
  79. package/lib/xts/interface/IElement.js +0 -5
  80. package/lib/xts/interface/IExpressNode.d.ts +0 -20
  81. package/lib/xts/interface/IExpressNode.js +0 -1
  82. package/lib/xts/interface/config/ICommon.d.ts +0 -23
  83. package/lib/xts/interface/config/ICommon.js +0 -5
  84. package/lib/xts/interface/config/IRenderNode.d.ts +0 -25
  85. package/lib/xts/interface/config/IRenderNode.js +0 -1
  86. package/lib/xts/interface/validate/IAttibuteValidate.d.ts +0 -8
  87. package/lib/xts/interface/validate/IAttibuteValidate.js +0 -1
  88. package/lib/xts/interface/validate/IComponentValidate.d.ts +0 -9
  89. package/lib/xts/interface/validate/IComponentValidate.js +0 -1
  90. package/lib/xts/interface/validate/IRenderValidate.d.ts +0 -10
  91. package/lib/xts/interface/validate/IRenderValidate.js +0 -1
  92. package/lib/xts/interface/validate/ISourceFileValidate.d.ts +0 -7
  93. package/lib/xts/interface/validate/ISourceFileValidate.js +0 -1
  94. package/lib/xts/utils/AttributeUtil.d.ts +0 -73
  95. package/lib/xts/utils/AttributeUtil.js +0 -206
  96. package/lib/xts/utils/TypeUtil.d.ts +0 -60
  97. package/lib/xts/utils/TypeUtil.js +0 -97
  98. package/lib/xts/utils/TypescriptUtil.d.ts +0 -42
  99. package/lib/xts/utils/TypescriptUtil.js +0 -128
  100. package/lib/xts/validate/AttibuteValidate.d.ts +0 -18
  101. package/lib/xts/validate/AttibuteValidate.js +0 -97
  102. package/lib/xts/validate/ComponentValidate.d.ts +0 -19
  103. package/lib/xts/validate/ComponentValidate.js +0 -90
  104. package/lib/xts/validate/RenderValidate.d.ts +0 -63
  105. package/lib/xts/validate/RenderValidate.js +0 -239
  106. package/lib/xts/validate/SourceFileValidate.d.ts +0 -10
  107. package/lib/xts/validate/SourceFileValidate.js +0 -43
@@ -1,235 +1,235 @@
1
- const vdom_pb = require('./vdom_pb')
2
- /* eslint-disable */
3
-
4
- class AIOT {
5
- constructor(aiotf) {
6
- this.funcArr = []
7
- this.chld = []
8
- this.idCount = -1
9
- this.expCell = new vdom_pb.ExportCell()
10
- this.aiotf = aiotf
11
- this.optArr = []
12
- }
13
-
14
- init(expName) {
15
- this.expCell.setTagname(expName)
16
- }
17
-
18
- parseObj(opts) {
19
- let styVaA = new vdom_pb.StyleValueArr()
20
-
21
- for (let key in opts) {
22
- let sKey = new vdom_pb.StyleKey()
23
- let onesvl = new vdom_pb.OneStyleValue()
24
-
25
- sKey.setValue(key)
26
- onesvl.setKey(sKey)
27
-
28
- let typ = Object.prototype.toString.call(opts[key])
29
- if (typ === '[object Number]') {
30
- // TODO:double
31
- onesvl.setDoublevl(opts[key])
32
- } else if (typ === '[object String]') {
33
- // console.log(`String ${opts[key]}`)
34
- onesvl.setStringvl(opts[key])
35
- } else if (typ === '[object Function]') {
36
- if (this.aiotf == undefined) {
37
- this.funcArr.push(opts[key])
38
- onesvl.setFuncid(this.funcArr.length - 1)
39
- } else {
40
- this.aiotf.funcArr.push(opts[key])
41
- onesvl.setFuncid(this.aiotf.funcArr.length - 1)
42
- }
43
- } else if (typ === '[object Object]') {
44
- // console.log(`object ${opts[key]}`)
45
- let styVaA_ = new vdom_pb.StyleValueArr()
46
- styVaA_ = this.parseObj(opts[key])
47
- onesvl.setStylevlarr(styVaA_)
48
- } else if (typ === '[object Array]') {
49
- //TODO:default string arr
50
- // console.log(`Array ${opts[key]}`)
51
- let strarr = new vdom_pb.StringArr()
52
- strarr.setStringvlarrList(opts[key])
53
- onesvl.setStringarr(strarr)
54
- } else if (typ === '[object Boolean]') {
55
- onesvl.setBoolvl(opts[key])
56
- }
57
- styVaA.addVlarr(onesvl)
58
- }
59
- return styVaA
60
- }
61
-
62
- __cdc__(tagName, opts, childsArr) {
63
- return this.__ce__(tagName, opts, childsArr, '__cdc__')
64
- }
65
-
66
- __ce__(tagName, opts, childsArr, type = '__ce__') {
67
- let tempOne = new vdom_pb.TemplateOne()
68
- let ce = new vdom_pb.TemplateUnit()
69
-
70
- ce.setType(type)
71
- ce.setTag(tagName)
72
- if (Array.isArray(childsArr) && childsArr.length > 0) {
73
- let arr = []
74
- for (let key in childsArr) {
75
- arr.push(childsArr[key].id_)
76
- }
77
- tempOne.setChldsidList(arr)
78
- }
79
- tempOne.setId(++this.idCount)
80
-
81
- let styVaA_ = this.parseObj(opts.__opts__)
82
- ce.setOptsarrList(styVaA_.getVlarrList())
83
-
84
- tempOne.setCv(ce)
85
- this.expCell.addTemplatearr(tempOne)
86
-
87
- return { id_: this.idCount, aiot_: this }
88
- }
89
- __ci__(opts, renderFunc) {
90
- let tempOne = new vdom_pb.TemplateOne()
91
- let ci = new vdom_pb.TemplateUnit()
92
-
93
- ci.setType('__ci__')
94
- tempOne.setId(++this.idCount)
95
-
96
- let styVaA_ = this.parseObj(opts.__opts__)
97
- ci.setOptsarrList(styVaA_.getVlarrList())
98
-
99
- // function(aiot) {
100
-
101
- let aiotif = new AIOT(this)
102
- aiotif.funcArr = this.funcArr
103
- aiotif.optArr = this.optArr
104
-
105
- let renderArr = renderFunc(aiotif)
106
- let typ = Object.prototype.toString.call(renderArr)
107
- if (typ === '[object Object]') {
108
- ci.setTemplaterenderList(renderArr.aiot_.expCell.getTemplatearrList())
109
- } else if (typ === '[object Array]') {
110
- for (let key in renderArr) {
111
- ci.setTemplaterenderList(renderArr[key].aiot_.expCell.getTemplatearrList())
112
- break
113
- }
114
- }
115
-
116
- this.funcArr = aiotif.aiotf.funcArr
117
-
118
- tempOne.setCv(ci)
119
- this.expCell.addTemplatearr(tempOne)
120
-
121
- return { id_: this.idCount, aiot_: this }
122
- }
123
- __cf__(opts, renderFunc) {
124
- let tempOne = new vdom_pb.TemplateOne()
125
- let cf = new vdom_pb.TemplateUnit()
126
-
127
- cf.setType('__cf__')
128
- tempOne.setId(++this.idCount)
129
-
130
- let styVaA_ = this.parseObj(opts.__opts__)
131
- cf.setOptsarrList(styVaA_.getVlarrList())
132
-
133
- let aiotfor = new AIOT()
134
- aiotfor.optArr = this.optArr
135
- let key_, value_
136
-
137
- let renderArr = renderFunc(key_, value_, aiotfor)
138
- let typ = Object.prototype.toString.call(renderArr)
139
- if (typ === '[object Object]') {
140
- cf.setTemplaterenderList(renderArr.aiot_.expCell.getTemplatearrList())
141
- } else if (typ === '[object Array]') {
142
- for (let key in renderArr) {
143
- cf.setTemplaterenderList(renderArr[key].aiot_.expCell.getTemplatearrList())
144
- break
145
- }
146
- }
147
-
148
- if (aiotfor.funcArr.length > 0) {
149
- const fun = function($idx, $item) {
150
- return aiotfor.aiotf.funcArr
151
- }
152
- fun.aiotfor = aiotfor
153
- fun.aiotfor.key = opts.__opts__['key']
154
- fun.aiotfor.value = opts.__opts__['value']
155
- this.funcArr.push(fun)
156
- cf.setFuncrender(this.funcArr.length - 1)
157
- } else {
158
- cf.setFuncrender(-1)
159
- }
160
-
161
- tempOne.setCv(cf)
162
- this.expCell.addTemplatearr(tempOne)
163
-
164
- return { id_: this.idCount, aiot_: this }
165
- }
166
- __cc__(tagName, opts) {
167
- let tempOne = new vdom_pb.TemplateOne()
168
- let cc = new vdom_pb.TemplateUnit()
169
-
170
- cc.setType('__cc__')
171
- cc.setTag(tagName)
172
- tempOne.setId(++this.idCount)
173
-
174
- // 设置__opts__在数组中得索引
175
- // if (Object.keys(opts.__opts__).length > 0) {
176
- // this.optArr.push(opts.__opts__) //save to js
177
- // cc.setOptsid(this.optArr.length - 1)
178
- // } else {
179
- // cc.setOptsid(-1)
180
- // }
181
-
182
- let styVaA_ = this.parseObj(opts.__opts__)
183
- cc.setOptsarrList(styVaA_.getVlarrList())
184
-
185
- tempOne.setCv(cc)
186
- this.expCell.addTemplatearr(tempOne)
187
-
188
- return { id_: this.idCount, aiot_: this }
189
- }
190
- __cb__(opts, renderFunc) {
191
- let tempOne = new vdom_pb.TemplateOne()
192
- let cb = new vdom_pb.TemplateUnit()
193
-
194
- cb.setType('__cb__')
195
- tempOne.setId(++this.idCount)
196
-
197
- let styVaA_ = this.parseObj(opts.__opts__)
198
- cb.setOptsarrList(styVaA_.getVlarrList())
199
-
200
- let aiotcb = new AIOT()
201
- aiotcb.optArr = this.optArr
202
-
203
- let $data
204
- let renderArr = renderFunc($data, aiotcb)
205
- let typ = Object.prototype.toString.call(renderArr)
206
- if (typ === '[object Object]') {
207
- cb.setTemplaterenderList(renderArr.aiot_.expCell.getTemplatearrList())
208
- } else if (typ === '[object Array]') {
209
- for (let key in renderArr) {
210
- cb.setTemplaterenderList(renderArr[key].aiot_.expCell.getTemplatearrList())
211
- break
212
- }
213
- }
214
-
215
- if (aiotcb.funcArr.length > 0) {
216
- const fun = function($data) {
217
- return aiotcb.aiotf.funcArr
218
- }
219
- fun.aiotcb = aiotcb
220
- this.funcArr.push(fun)
221
- cb.setFuncrender(this.funcArr.length - 1)
222
- } else {
223
- cb.setFuncrender(-1)
224
- }
225
-
226
- // this.funcArr = aiotcb.aiotf.funcArr
227
-
228
- tempOne.setCv(cb)
229
- this.expCell.addTemplatearr(tempOne)
230
-
231
- return { id_: this.idCount, aiot_: this }
232
- }
233
- }
234
-
235
- module.exports = AIOT
1
+ const vdom_pb = require('./vdom_pb')
2
+ /* eslint-disable */
3
+
4
+ class AIOT {
5
+ constructor(aiotf) {
6
+ this.funcArr = []
7
+ this.chld = []
8
+ this.idCount = -1
9
+ this.expCell = new vdom_pb.ExportCell()
10
+ this.aiotf = aiotf
11
+ this.optArr = []
12
+ }
13
+
14
+ init(expName) {
15
+ this.expCell.setTagname(expName)
16
+ }
17
+
18
+ parseObj(opts) {
19
+ let styVaA = new vdom_pb.StyleValueArr()
20
+
21
+ for (let key in opts) {
22
+ let sKey = new vdom_pb.StyleKey()
23
+ let onesvl = new vdom_pb.OneStyleValue()
24
+
25
+ sKey.setValue(key)
26
+ onesvl.setKey(sKey)
27
+
28
+ let typ = Object.prototype.toString.call(opts[key])
29
+ if (typ === '[object Number]') {
30
+ // TODO:double
31
+ onesvl.setDoublevl(opts[key])
32
+ } else if (typ === '[object String]') {
33
+ // console.log(`String ${opts[key]}`)
34
+ onesvl.setStringvl(opts[key])
35
+ } else if (typ === '[object Function]') {
36
+ if (this.aiotf == undefined) {
37
+ this.funcArr.push(opts[key])
38
+ onesvl.setFuncid(this.funcArr.length - 1)
39
+ } else {
40
+ this.aiotf.funcArr.push(opts[key])
41
+ onesvl.setFuncid(this.aiotf.funcArr.length - 1)
42
+ }
43
+ } else if (typ === '[object Object]') {
44
+ // console.log(`object ${opts[key]}`)
45
+ let styVaA_ = new vdom_pb.StyleValueArr()
46
+ styVaA_ = this.parseObj(opts[key])
47
+ onesvl.setStylevlarr(styVaA_)
48
+ } else if (typ === '[object Array]') {
49
+ //TODO:default string arr
50
+ // console.log(`Array ${opts[key]}`)
51
+ let strarr = new vdom_pb.StringArr()
52
+ strarr.setStringvlarrList(opts[key])
53
+ onesvl.setStringarr(strarr)
54
+ } else if (typ === '[object Boolean]') {
55
+ onesvl.setBoolvl(opts[key])
56
+ }
57
+ styVaA.addVlarr(onesvl)
58
+ }
59
+ return styVaA
60
+ }
61
+
62
+ __cdc__(tagName, opts, childsArr) {
63
+ return this.__ce__(tagName, opts, childsArr, '__cdc__')
64
+ }
65
+
66
+ __ce__(tagName, opts, childsArr, type = '__ce__') {
67
+ let tempOne = new vdom_pb.TemplateOne()
68
+ let ce = new vdom_pb.TemplateUnit()
69
+
70
+ ce.setType(type)
71
+ ce.setTag(tagName)
72
+ if (Array.isArray(childsArr) && childsArr.length > 0) {
73
+ let arr = []
74
+ for (let key in childsArr) {
75
+ arr.push(childsArr[key].id_)
76
+ }
77
+ tempOne.setChldsidList(arr)
78
+ }
79
+ tempOne.setId(++this.idCount)
80
+
81
+ let styVaA_ = this.parseObj(opts.__opts__)
82
+ ce.setOptsarrList(styVaA_.getVlarrList())
83
+
84
+ tempOne.setCv(ce)
85
+ this.expCell.addTemplatearr(tempOne)
86
+
87
+ return { id_: this.idCount, aiot_: this }
88
+ }
89
+ __ci__(opts, renderFunc) {
90
+ let tempOne = new vdom_pb.TemplateOne()
91
+ let ci = new vdom_pb.TemplateUnit()
92
+
93
+ ci.setType('__ci__')
94
+ tempOne.setId(++this.idCount)
95
+
96
+ let styVaA_ = this.parseObj(opts.__opts__)
97
+ ci.setOptsarrList(styVaA_.getVlarrList())
98
+
99
+ // function(aiot) {
100
+
101
+ let aiotif = new AIOT(this)
102
+ aiotif.funcArr = this.funcArr
103
+ aiotif.optArr = this.optArr
104
+
105
+ let renderArr = renderFunc(aiotif)
106
+ let typ = Object.prototype.toString.call(renderArr)
107
+ if (typ === '[object Object]') {
108
+ ci.setTemplaterenderList(renderArr.aiot_.expCell.getTemplatearrList())
109
+ } else if (typ === '[object Array]') {
110
+ for (let key in renderArr) {
111
+ ci.setTemplaterenderList(renderArr[key].aiot_.expCell.getTemplatearrList())
112
+ break
113
+ }
114
+ }
115
+
116
+ this.funcArr = aiotif.aiotf.funcArr
117
+
118
+ tempOne.setCv(ci)
119
+ this.expCell.addTemplatearr(tempOne)
120
+
121
+ return { id_: this.idCount, aiot_: this }
122
+ }
123
+ __cf__(opts, renderFunc) {
124
+ let tempOne = new vdom_pb.TemplateOne()
125
+ let cf = new vdom_pb.TemplateUnit()
126
+
127
+ cf.setType('__cf__')
128
+ tempOne.setId(++this.idCount)
129
+
130
+ let styVaA_ = this.parseObj(opts.__opts__)
131
+ cf.setOptsarrList(styVaA_.getVlarrList())
132
+
133
+ let aiotfor = new AIOT()
134
+ aiotfor.optArr = this.optArr
135
+ let key_, value_
136
+
137
+ let renderArr = renderFunc(key_, value_, aiotfor)
138
+ let typ = Object.prototype.toString.call(renderArr)
139
+ if (typ === '[object Object]') {
140
+ cf.setTemplaterenderList(renderArr.aiot_.expCell.getTemplatearrList())
141
+ } else if (typ === '[object Array]') {
142
+ for (let key in renderArr) {
143
+ cf.setTemplaterenderList(renderArr[key].aiot_.expCell.getTemplatearrList())
144
+ break
145
+ }
146
+ }
147
+
148
+ if (aiotfor.funcArr.length > 0) {
149
+ const fun = function($idx, $item) {
150
+ return aiotfor.aiotf.funcArr
151
+ }
152
+ fun.aiotfor = aiotfor
153
+ fun.aiotfor.key = opts.__opts__['key']
154
+ fun.aiotfor.value = opts.__opts__['value']
155
+ this.funcArr.push(fun)
156
+ cf.setFuncrender(this.funcArr.length - 1)
157
+ } else {
158
+ cf.setFuncrender(-1)
159
+ }
160
+
161
+ tempOne.setCv(cf)
162
+ this.expCell.addTemplatearr(tempOne)
163
+
164
+ return { id_: this.idCount, aiot_: this }
165
+ }
166
+ __cc__(tagName, opts) {
167
+ let tempOne = new vdom_pb.TemplateOne()
168
+ let cc = new vdom_pb.TemplateUnit()
169
+
170
+ cc.setType('__cc__')
171
+ cc.setTag(tagName)
172
+ tempOne.setId(++this.idCount)
173
+
174
+ // 设置__opts__在数组中得索引
175
+ // if (Object.keys(opts.__opts__).length > 0) {
176
+ // this.optArr.push(opts.__opts__) //save to js
177
+ // cc.setOptsid(this.optArr.length - 1)
178
+ // } else {
179
+ // cc.setOptsid(-1)
180
+ // }
181
+
182
+ let styVaA_ = this.parseObj(opts.__opts__)
183
+ cc.setOptsarrList(styVaA_.getVlarrList())
184
+
185
+ tempOne.setCv(cc)
186
+ this.expCell.addTemplatearr(tempOne)
187
+
188
+ return { id_: this.idCount, aiot_: this }
189
+ }
190
+ __cb__(opts, renderFunc) {
191
+ let tempOne = new vdom_pb.TemplateOne()
192
+ let cb = new vdom_pb.TemplateUnit()
193
+
194
+ cb.setType('__cb__')
195
+ tempOne.setId(++this.idCount)
196
+
197
+ let styVaA_ = this.parseObj(opts.__opts__)
198
+ cb.setOptsarrList(styVaA_.getVlarrList())
199
+
200
+ let aiotcb = new AIOT()
201
+ aiotcb.optArr = this.optArr
202
+
203
+ let $data
204
+ let renderArr = renderFunc($data, aiotcb)
205
+ let typ = Object.prototype.toString.call(renderArr)
206
+ if (typ === '[object Object]') {
207
+ cb.setTemplaterenderList(renderArr.aiot_.expCell.getTemplatearrList())
208
+ } else if (typ === '[object Array]') {
209
+ for (let key in renderArr) {
210
+ cb.setTemplaterenderList(renderArr[key].aiot_.expCell.getTemplatearrList())
211
+ break
212
+ }
213
+ }
214
+
215
+ if (aiotcb.funcArr.length > 0) {
216
+ const fun = function($data) {
217
+ return aiotcb.aiotf.funcArr
218
+ }
219
+ fun.aiotcb = aiotcb
220
+ this.funcArr.push(fun)
221
+ cb.setFuncrender(this.funcArr.length - 1)
222
+ } else {
223
+ cb.setFuncrender(-1)
224
+ }
225
+
226
+ // this.funcArr = aiotcb.aiotf.funcArr
227
+
228
+ tempOne.setCv(cb)
229
+ this.expCell.addTemplatearr(tempOne)
230
+
231
+ return { id_: this.idCount, aiot_: this }
232
+ }
233
+ }
234
+
235
+ module.exports = AIOT