@nativescript/core 8.9.0-napi-es5.0 → 8.9.0-napi.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 (571) hide show
  1. package/abortcontroller/abortsignal.js +16 -23
  2. package/abortcontroller/abortsignal.js.map +1 -1
  3. package/abortcontroller/index.js +14 -20
  4. package/abortcontroller/index.js.map +1 -1
  5. package/accessibility/accessibility-common.js +8 -8
  6. package/accessibility/accessibility-common.js.map +1 -1
  7. package/accessibility/accessibility-css-helper.js +27 -27
  8. package/accessibility/accessibility-css-helper.js.map +1 -1
  9. package/accessibility/accessibility-properties.js +22 -23
  10. package/accessibility/accessibility-properties.js.map +1 -1
  11. package/accessibility/accessibility-service-common.js +12 -22
  12. package/accessibility/accessibility-service-common.js.map +1 -1
  13. package/accessibility/accessibility-service.android.js +27 -39
  14. package/accessibility/accessibility-service.android.js.map +1 -1
  15. package/accessibility/accessibility-service.ios.js +14 -17
  16. package/accessibility/accessibility-service.ios.js.map +1 -1
  17. package/accessibility/font-scale-common.js +2 -2
  18. package/accessibility/font-scale-common.js.map +1 -1
  19. package/accessibility/font-scale.android.js +7 -8
  20. package/accessibility/font-scale.android.js.map +1 -1
  21. package/accessibility/font-scale.ios.js +9 -10
  22. package/accessibility/font-scale.ios.js.map +1 -1
  23. package/accessibility/index.android.js +77 -83
  24. package/accessibility/index.android.js.map +1 -1
  25. package/accessibility/index.ios.js +34 -36
  26. package/accessibility/index.ios.js.map +1 -1
  27. package/animation-frame/animation-native.ios.js +1 -1
  28. package/animation-frame/animation-native.ios.js.map +1 -1
  29. package/animation-frame/index.js +16 -16
  30. package/animation-frame/index.js.map +1 -1
  31. package/application/application-common.js +196 -214
  32. package/application/application-common.js.map +1 -1
  33. package/application/application-shims.js +39 -39
  34. package/application/application-shims.js.map +1 -1
  35. package/application/application.android.js +110 -149
  36. package/application/application.android.js.map +1 -1
  37. package/application/application.ios.js +162 -197
  38. package/application/application.ios.js.map +1 -1
  39. package/application-settings/index.android.js +11 -11
  40. package/application-settings/index.android.js.map +1 -1
  41. package/application-settings/index.ios.js +1 -1
  42. package/application-settings/index.ios.js.map +1 -1
  43. package/bundle-entry-points.js +1 -1
  44. package/bundle-entry-points.js.map +1 -1
  45. package/color/color-common.js +157 -200
  46. package/color/color-common.js.map +1 -1
  47. package/color/index.android.js +4 -14
  48. package/color/index.android.js.map +1 -1
  49. package/color/index.ios.js +14 -24
  50. package/color/index.ios.js.map +1 -1
  51. package/color/known-colors.js +144 -144
  52. package/color/known-colors.js.map +1 -1
  53. package/connectivity/index.android.js +23 -23
  54. package/connectivity/index.android.js.map +1 -1
  55. package/connectivity/index.ios.js +25 -25
  56. package/connectivity/index.ios.js.map +1 -1
  57. package/console/index.js +20 -24
  58. package/console/index.js.map +1 -1
  59. package/core-types/index.js +38 -38
  60. package/core-types/index.js.map +1 -1
  61. package/css/CSS3Parser.js +104 -106
  62. package/css/CSS3Parser.js.map +1 -1
  63. package/css/CSSNativeScript.js +29 -34
  64. package/css/CSSNativeScript.js.map +1 -1
  65. package/css/css-tree-parser.js.map +1 -1
  66. package/css/parser.js +158 -178
  67. package/css/parser.js.map +1 -1
  68. package/css/system-classes.js +9 -9
  69. package/css/system-classes.js.map +1 -1
  70. package/css-mediaquery/index.js +27 -29
  71. package/css-mediaquery/index.js.map +1 -1
  72. package/data/observable/index.js +115 -124
  73. package/data/observable/index.js.map +1 -1
  74. package/data/observable-array/index.js +119 -176
  75. package/data/observable-array/index.js.map +1 -1
  76. package/data/virtual-array/index.js +61 -74
  77. package/data/virtual-array/index.js.map +1 -1
  78. package/debugger/InspectorBackendCommands.js +137 -161
  79. package/debugger/InspectorBackendCommands.js.map +1 -1
  80. package/debugger/devtools-elements.common.js +20 -20
  81. package/debugger/devtools-elements.common.js.map +1 -1
  82. package/debugger/devtools-elements.js +2 -2
  83. package/debugger/devtools-elements.js.map +1 -1
  84. package/debugger/dom-node.js +61 -73
  85. package/debugger/dom-node.js.map +1 -1
  86. package/debugger/index.js +19 -19
  87. package/debugger/index.js.map +1 -1
  88. package/debugger/webinspector-css.js +25 -30
  89. package/debugger/webinspector-css.js.map +1 -1
  90. package/debugger/webinspector-dom.js +38 -43
  91. package/debugger/webinspector-dom.js.map +1 -1
  92. package/debugger/webinspector-network.android.js +103 -132
  93. package/debugger/webinspector-network.android.js.map +1 -1
  94. package/debugger/webinspector-network.ios.js +100 -128
  95. package/debugger/webinspector-network.ios.js.map +1 -1
  96. package/file-system/file-system-access.android.js +414 -421
  97. package/file-system/file-system-access.android.js.map +1 -1
  98. package/file-system/file-system-access.ios.js +203 -213
  99. package/file-system/file-system-access.ios.js.map +1 -1
  100. package/file-system/index.js +294 -372
  101. package/file-system/index.js.map +1 -1
  102. package/fps-meter/fps-native.android.js +15 -18
  103. package/fps-meter/fps-native.android.js.map +1 -1
  104. package/fps-meter/fps-native.ios.js +9 -11
  105. package/fps-meter/fps-native.ios.js.map +1 -1
  106. package/fps-meter/index.js +11 -11
  107. package/fps-meter/index.js.map +1 -1
  108. package/globals/index.js +88 -112
  109. package/globals/index.js.map +1 -1
  110. package/http/http-request/http-request-common.js +5 -5
  111. package/http/http-request/http-request-common.js.map +1 -1
  112. package/http/http-request/index.android.js +53 -54
  113. package/http/http-request/index.android.js.map +1 -1
  114. package/http/http-request/index.ios.js +56 -58
  115. package/http/http-request/index.ios.js.map +1 -1
  116. package/http/index.js +19 -19
  117. package/http/index.js.map +1 -1
  118. package/image-asset/image-asset-common.js +25 -37
  119. package/image-asset/image-asset-common.js.map +1 -1
  120. package/image-asset/index.android.js +17 -25
  121. package/image-asset/index.android.js.map +1 -1
  122. package/image-asset/index.ios.js +25 -35
  123. package/image-asset/index.ios.js.map +1 -1
  124. package/image-source/image-source-common.js +2 -2
  125. package/image-source/image-source-common.js.map +1 -1
  126. package/image-source/index.android.js +152 -178
  127. package/image-source/index.android.js.map +1 -1
  128. package/image-source/index.ios.js +177 -203
  129. package/image-source/index.ios.js.map +1 -1
  130. package/index.js +4 -8
  131. package/index.js.map +1 -1
  132. package/matrix/index.js +17 -27
  133. package/matrix/index.js.map +1 -1
  134. package/media-query-list/index.js +61 -87
  135. package/media-query-list/index.js.map +1 -1
  136. package/module-name-resolver/index.js +21 -24
  137. package/module-name-resolver/index.js.map +1 -1
  138. package/module-name-resolver/non-bundle-workflow-compat.js +24 -24
  139. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  140. package/module-name-resolver/qualifier-matcher/index.js +46 -46
  141. package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
  142. package/package.json +1 -1
  143. package/platform/common.js +5 -5
  144. package/platform/common.js.map +1 -1
  145. package/platform/device/index.android.js +68 -107
  146. package/platform/device/index.android.js.map +1 -1
  147. package/platform/device/index.ios.js +62 -101
  148. package/platform/device/index.ios.js.map +1 -1
  149. package/platform/screen/index.android.js +32 -63
  150. package/platform/screen/index.android.js.map +1 -1
  151. package/platform/screen/index.ios.js +29 -60
  152. package/platform/screen/index.ios.js.map +1 -1
  153. package/profiling/index.js +40 -47
  154. package/profiling/index.js.map +1 -1
  155. package/text/text-common.js +36 -49
  156. package/text/text-common.js.map +1 -1
  157. package/timer/index.android.js +20 -30
  158. package/timer/index.android.js.map +1 -1
  159. package/timer/index.ios.js +12 -22
  160. package/timer/index.ios.js.map +1 -1
  161. package/trace/index.js +26 -36
  162. package/trace/index.js.map +1 -1
  163. package/ui/action-bar/action-bar-common.js +193 -252
  164. package/ui/action-bar/action-bar-common.js.map +1 -1
  165. package/ui/action-bar/index.android.js +170 -212
  166. package/ui/action-bar/index.android.js.map +1 -1
  167. package/ui/action-bar/index.ios.js +208 -251
  168. package/ui/action-bar/index.ios.js.map +1 -1
  169. package/ui/activity-indicator/activity-indicator-common.js +6 -11
  170. package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
  171. package/ui/activity-indicator/index.android.js +20 -26
  172. package/ui/activity-indicator/index.android.js.map +1 -1
  173. package/ui/activity-indicator/index.ios.js +23 -31
  174. package/ui/activity-indicator/index.ios.js.map +1 -1
  175. package/ui/animation/animation-common.js +43 -50
  176. package/ui/animation/animation-common.js.map +1 -1
  177. package/ui/animation/animation-interfaces.js +3 -5
  178. package/ui/animation/animation-interfaces.js.map +1 -1
  179. package/ui/animation/index.android.js +90 -94
  180. package/ui/animation/index.android.js.map +1 -1
  181. package/ui/animation/index.ios.js +225 -191
  182. package/ui/animation/index.ios.js.map +1 -1
  183. package/ui/animation/keyframe-animation.js +67 -89
  184. package/ui/animation/keyframe-animation.js.map +1 -1
  185. package/ui/builder/binding-builder.js +31 -31
  186. package/ui/builder/binding-builder.js.map +1 -1
  187. package/ui/builder/component-builder/index.js +37 -37
  188. package/ui/builder/component-builder/index.js.map +1 -1
  189. package/ui/builder/index.js +54 -59
  190. package/ui/builder/index.js.map +1 -1
  191. package/ui/builder/xml2ui.js +128 -158
  192. package/ui/builder/xml2ui.js.map +1 -1
  193. package/ui/button/button-common.js +18 -25
  194. package/ui/button/button-common.js.map +1 -1
  195. package/ui/button/index.android.js +69 -80
  196. package/ui/button/index.android.js.map +1 -1
  197. package/ui/button/index.ios.js +103 -114
  198. package/ui/button/index.ios.js.map +1 -1
  199. package/ui/content-view/index.js +60 -78
  200. package/ui/content-view/index.js.map +1 -1
  201. package/ui/core/bindable/bindable-expressions.js +93 -101
  202. package/ui/core/bindable/bindable-expressions.js.map +1 -1
  203. package/ui/core/bindable/bindable-resources.js +1 -1
  204. package/ui/core/bindable/index.js +136 -141
  205. package/ui/core/bindable/index.js.map +1 -1
  206. package/ui/core/control-state-change/index.android.js +5 -7
  207. package/ui/core/control-state-change/index.android.js.map +1 -1
  208. package/ui/core/control-state-change/index.ios.js +9 -13
  209. package/ui/core/control-state-change/index.ios.js.map +1 -1
  210. package/ui/core/properties/index.js +440 -489
  211. package/ui/core/properties/index.js.map +1 -1
  212. package/ui/core/view/index.android.js +348 -384
  213. package/ui/core/view/index.android.js.map +1 -1
  214. package/ui/core/view/index.ios.js +364 -400
  215. package/ui/core/view/index.ios.js.map +1 -1
  216. package/ui/core/view/view-common.js +655 -944
  217. package/ui/core/view/view-common.js.map +1 -1
  218. package/ui/core/view/view-helper/index.android.js +15 -19
  219. package/ui/core/view/view-helper/index.android.js.map +1 -1
  220. package/ui/core/view/view-helper/index.ios.js +81 -85
  221. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  222. package/ui/core/view/view-helper/view-helper-common.js +44 -49
  223. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  224. package/ui/core/view-base/index.js +371 -426
  225. package/ui/core/view-base/index.js.map +1 -1
  226. package/ui/core/weak-event-listener/index.js +25 -26
  227. package/ui/core/weak-event-listener/index.js.map +1 -1
  228. package/ui/date-picker/date-picker-common.js +30 -35
  229. package/ui/date-picker/date-picker-common.js.map +1 -1
  230. package/ui/date-picker/index.android.js +43 -51
  231. package/ui/date-picker/index.android.js.map +1 -1
  232. package/ui/date-picker/index.ios.js +51 -61
  233. package/ui/date-picker/index.ios.js.map +1 -1
  234. package/ui/dialogs/dialogs-common.js +18 -18
  235. package/ui/dialogs/dialogs-common.js.map +1 -1
  236. package/ui/dialogs/index.android.js +86 -98
  237. package/ui/dialogs/index.android.js.map +1 -1
  238. package/ui/dialogs/index.ios.js +67 -80
  239. package/ui/dialogs/index.ios.js.map +1 -1
  240. package/ui/editable-text-base/editable-text-base-common.js +29 -35
  241. package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
  242. package/ui/editable-text-base/index.android.js +106 -112
  243. package/ui/editable-text-base/index.android.js.map +1 -1
  244. package/ui/editable-text-base/index.ios.js +47 -53
  245. package/ui/editable-text-base/index.ios.js.map +1 -1
  246. package/ui/embedding/index.android.js +2 -3
  247. package/ui/embedding/index.android.js.map +1 -1
  248. package/ui/frame/activity.android.js +44 -44
  249. package/ui/frame/activity.android.js.map +1 -1
  250. package/ui/frame/callbacks/activity-callbacks.js +118 -123
  251. package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
  252. package/ui/frame/callbacks/fragment-callbacks.js +139 -141
  253. package/ui/frame/callbacks/fragment-callbacks.js.map +1 -1
  254. package/ui/frame/fragment.android.js +21 -21
  255. package/ui/frame/fragment.android.js.map +1 -1
  256. package/ui/frame/fragment.ios.js +1 -1
  257. package/ui/frame/fragment.transitions.android.js +105 -114
  258. package/ui/frame/fragment.transitions.android.js.map +1 -1
  259. package/ui/frame/frame-common.d.ts +1 -1
  260. package/ui/frame/frame-common.js +249 -285
  261. package/ui/frame/frame-common.js.map +1 -1
  262. package/ui/frame/frame-helpers.js +1 -1
  263. package/ui/frame/frame-helpers.js.map +1 -1
  264. package/ui/frame/frame-stack.js +4 -4
  265. package/ui/frame/frame-stack.js.map +1 -1
  266. package/ui/frame/index.android.js +239 -291
  267. package/ui/frame/index.android.js.map +1 -1
  268. package/ui/frame/index.ios.js +133 -167
  269. package/ui/frame/index.ios.js.map +1 -1
  270. package/ui/gestures/gestures-common.js +15 -29
  271. package/ui/gestures/gestures-common.js.map +1 -1
  272. package/ui/gestures/index.android.js +108 -124
  273. package/ui/gestures/index.android.js.map +1 -1
  274. package/ui/gestures/index.ios.js +108 -121
  275. package/ui/gestures/index.ios.js.map +1 -1
  276. package/ui/gestures/touch-manager.js +42 -48
  277. package/ui/gestures/touch-manager.js.map +1 -1
  278. package/ui/html-view/html-view-common.js +9 -14
  279. package/ui/html-view/html-view-common.js.map +1 -1
  280. package/ui/html-view/index.android.js +37 -43
  281. package/ui/html-view/index.android.js.map +1 -1
  282. package/ui/html-view/index.ios.js +62 -73
  283. package/ui/html-view/index.ios.js.map +1 -1
  284. package/ui/image/image-common.js +47 -57
  285. package/ui/image/image-common.js.map +1 -1
  286. package/ui/image/index.android.js +54 -59
  287. package/ui/image/index.android.js.map +1 -1
  288. package/ui/image/index.ios.js +65 -72
  289. package/ui/image/index.ios.js.map +1 -1
  290. package/ui/image/symbol-effects-common.js +2 -6
  291. package/ui/image/symbol-effects-common.js.map +1 -1
  292. package/ui/image/symbol-effects.android.js +4 -10
  293. package/ui/image/symbol-effects.android.js.map +1 -1
  294. package/ui/image/symbol-effects.ios.js +7 -11
  295. package/ui/image/symbol-effects.ios.js.map +1 -1
  296. package/ui/image-cache/image-cache-common.js +57 -61
  297. package/ui/image-cache/image-cache-common.js.map +1 -1
  298. package/ui/image-cache/index.android.js +23 -27
  299. package/ui/image-cache/index.android.js.map +1 -1
  300. package/ui/image-cache/index.ios.js +24 -29
  301. package/ui/image-cache/index.ios.js.map +1 -1
  302. package/ui/label/index.android.js +29 -38
  303. package/ui/label/index.android.js.map +1 -1
  304. package/ui/label/index.ios.js +89 -102
  305. package/ui/label/index.ios.js.map +1 -1
  306. package/ui/layouts/absolute-layout/absolute-layout-common.js +25 -30
  307. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  308. package/ui/layouts/absolute-layout/index.android.js +6 -12
  309. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  310. package/ui/layouts/absolute-layout/index.ios.js +32 -40
  311. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  312. package/ui/layouts/dock-layout/dock-layout-common.js +16 -21
  313. package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
  314. package/ui/layouts/dock-layout/index.android.js +11 -17
  315. package/ui/layouts/dock-layout/index.android.js.map +1 -1
  316. package/ui/layouts/dock-layout/index.ios.js +45 -53
  317. package/ui/layouts/dock-layout/index.ios.js.map +1 -1
  318. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +90 -115
  319. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  320. package/ui/layouts/flexbox-layout/index.android.js +92 -97
  321. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  322. package/ui/layouts/flexbox-layout/index.ios.js +366 -427
  323. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  324. package/ui/layouts/grid-layout/grid-layout-common.js +159 -211
  325. package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
  326. package/ui/layouts/grid-layout/index.android.js +49 -55
  327. package/ui/layouts/grid-layout/index.android.js.map +1 -1
  328. package/ui/layouts/grid-layout/index.ios.js +340 -348
  329. package/ui/layouts/grid-layout/index.ios.js.map +1 -1
  330. package/ui/layouts/layout-base-common.js +78 -106
  331. package/ui/layouts/layout-base-common.js.map +1 -1
  332. package/ui/layouts/layout-base.android.js +25 -31
  333. package/ui/layouts/layout-base.android.js.map +1 -1
  334. package/ui/layouts/layout-base.ios.js +21 -27
  335. package/ui/layouts/layout-base.ios.js.map +1 -1
  336. package/ui/layouts/root-layout/index.android.js +47 -46
  337. package/ui/layouts/root-layout/index.android.js.map +1 -1
  338. package/ui/layouts/root-layout/index.ios.js +54 -53
  339. package/ui/layouts/root-layout/index.ios.js.map +1 -1
  340. package/ui/layouts/root-layout/root-layout-common.js +186 -190
  341. package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
  342. package/ui/layouts/stack-layout/index.android.js +6 -12
  343. package/ui/layouts/stack-layout/index.android.js.map +1 -1
  344. package/ui/layouts/stack-layout/index.ios.js +62 -69
  345. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  346. package/ui/layouts/stack-layout/stack-layout-common.js +7 -12
  347. package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
  348. package/ui/layouts/wrap-layout/index.android.js +10 -16
  349. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  350. package/ui/layouts/wrap-layout/index.ios.js +70 -76
  351. package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
  352. package/ui/layouts/wrap-layout/wrap-layout-common.js +13 -18
  353. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  354. package/ui/list-picker/index.android.js +42 -48
  355. package/ui/list-picker/index.android.js.map +1 -1
  356. package/ui/list-picker/index.ios.js +26 -36
  357. package/ui/list-picker/index.ios.js.map +1 -1
  358. package/ui/list-picker/list-picker-common.js +27 -32
  359. package/ui/list-picker/list-picker-common.js.map +1 -1
  360. package/ui/list-view/index.android.js +98 -110
  361. package/ui/list-view/index.android.js.map +1 -1
  362. package/ui/list-view/index.ios.js +121 -137
  363. package/ui/list-view/index.ios.js.map +1 -1
  364. package/ui/list-view/list-view-common.js +100 -116
  365. package/ui/list-view/list-view-common.js.map +1 -1
  366. package/ui/page/index.android.js +57 -65
  367. package/ui/page/index.android.js.map +1 -1
  368. package/ui/page/index.ios.js +98 -107
  369. package/ui/page/index.ios.js.map +1 -1
  370. package/ui/page/page-common.js +113 -145
  371. package/ui/page/page-common.js.map +1 -1
  372. package/ui/placeholder/index.android.js +10 -16
  373. package/ui/placeholder/index.android.js.map +1 -1
  374. package/ui/placeholder/index.js +6 -12
  375. package/ui/placeholder/index.js.map +1 -1
  376. package/ui/progress/index.android.js +28 -34
  377. package/ui/progress/index.android.js.map +1 -1
  378. package/ui/progress/index.ios.js +29 -39
  379. package/ui/progress/index.ios.js.map +1 -1
  380. package/ui/progress/progress-common.js +11 -16
  381. package/ui/progress/progress-common.js.map +1 -1
  382. package/ui/proxy-view-container/index.js +90 -111
  383. package/ui/proxy-view-container/index.js.map +1 -1
  384. package/ui/repeater/index.js +100 -112
  385. package/ui/repeater/index.js.map +1 -1
  386. package/ui/scroll-view/index.android.d.ts +1 -1
  387. package/ui/scroll-view/index.android.js +75 -95
  388. package/ui/scroll-view/index.android.js.map +1 -1
  389. package/ui/scroll-view/index.ios.js +72 -92
  390. package/ui/scroll-view/index.ios.js.map +1 -1
  391. package/ui/scroll-view/scroll-view-common.js +45 -65
  392. package/ui/scroll-view/scroll-view-common.js.map +1 -1
  393. package/ui/search-bar/index.android.js +88 -94
  394. package/ui/search-bar/index.android.js.map +1 -1
  395. package/ui/search-bar/index.ios.js +74 -88
  396. package/ui/search-bar/index.ios.js.map +1 -1
  397. package/ui/search-bar/search-bar-common.js +13 -18
  398. package/ui/search-bar/search-bar-common.js.map +1 -1
  399. package/ui/segmented-bar/index.android.js +98 -112
  400. package/ui/segmented-bar/index.android.js.map +1 -1
  401. package/ui/segmented-bar/index.ios.js +63 -80
  402. package/ui/segmented-bar/index.ios.js.map +1 -1
  403. package/ui/segmented-bar/segmented-bar-common.js +61 -81
  404. package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
  405. package/ui/slider/index.android.js +43 -49
  406. package/ui/slider/index.android.js.map +1 -1
  407. package/ui/slider/index.ios.js +49 -59
  408. package/ui/slider/index.ios.js.map +1 -1
  409. package/ui/slider/slider-common.js +28 -35
  410. package/ui/slider/slider-common.js.map +1 -1
  411. package/ui/styling/background-common.js +98 -100
  412. package/ui/styling/background-common.js.map +1 -1
  413. package/ui/styling/background.android.js +35 -38
  414. package/ui/styling/background.android.js.map +1 -1
  415. package/ui/styling/background.ios.js +252 -258
  416. package/ui/styling/background.ios.js.map +1 -1
  417. package/ui/styling/box-shadow.js +2 -6
  418. package/ui/styling/box-shadow.js.map +1 -1
  419. package/ui/styling/converters.js +7 -7
  420. package/ui/styling/converters.js.map +1 -1
  421. package/ui/styling/css-animation-parser.js +56 -69
  422. package/ui/styling/css-animation-parser.js.map +1 -1
  423. package/ui/styling/css-selector.js +425 -522
  424. package/ui/styling/css-selector.js.map +1 -1
  425. package/ui/styling/css-shadow.js +2 -2
  426. package/ui/styling/css-shadow.js.map +1 -1
  427. package/ui/styling/css-stroke.js +3 -3
  428. package/ui/styling/css-stroke.js.map +1 -1
  429. package/ui/styling/css-utils.js +22 -22
  430. package/ui/styling/css-utils.js.map +1 -1
  431. package/ui/styling/font-common.js +44 -59
  432. package/ui/styling/font-common.js.map +1 -1
  433. package/ui/styling/font.android.js +34 -42
  434. package/ui/styling/font.android.js.map +1 -1
  435. package/ui/styling/font.ios.js +49 -54
  436. package/ui/styling/font.ios.js.map +1 -1
  437. package/ui/styling/linear-gradient.js +13 -17
  438. package/ui/styling/linear-gradient.js.map +1 -1
  439. package/ui/styling/style/index.js +36 -47
  440. package/ui/styling/style/index.js.map +1 -1
  441. package/ui/styling/style-properties.js +291 -306
  442. package/ui/styling/style-properties.js.map +1 -1
  443. package/ui/styling/style-scope.js +377 -416
  444. package/ui/styling/style-scope.js.map +1 -1
  445. package/ui/switch/index.android.js +41 -47
  446. package/ui/switch/index.android.js.map +1 -1
  447. package/ui/switch/index.ios.js +57 -66
  448. package/ui/switch/index.ios.js.map +1 -1
  449. package/ui/switch/switch-common.js +11 -16
  450. package/ui/switch/switch-common.js.map +1 -1
  451. package/ui/tab-view/index.android.js +187 -206
  452. package/ui/tab-view/index.android.js.map +1 -1
  453. package/ui/tab-view/index.ios.js +161 -177
  454. package/ui/tab-view/index.ios.js.map +1 -1
  455. package/ui/tab-view/tab-view-common.js +143 -197
  456. package/ui/tab-view/tab-view-common.js.map +1 -1
  457. package/ui/text-base/formatted-string.js +105 -158
  458. package/ui/text-base/formatted-string.js.map +1 -1
  459. package/ui/text-base/index.android.js +130 -136
  460. package/ui/text-base/index.android.js.map +1 -1
  461. package/ui/text-base/index.ios.js +112 -120
  462. package/ui/text-base/index.ios.js.map +1 -1
  463. package/ui/text-base/span.js +102 -158
  464. package/ui/text-base/span.js.map +1 -1
  465. package/ui/text-base/text-base-common.js +181 -268
  466. package/ui/text-base/text-base-common.js.map +1 -1
  467. package/ui/text-field/index.android.js +18 -24
  468. package/ui/text-field/index.android.js.map +1 -1
  469. package/ui/text-field/index.ios.js +70 -80
  470. package/ui/text-field/index.ios.js.map +1 -1
  471. package/ui/text-field/text-field-common.js +8 -13
  472. package/ui/text-field/text-field-common.js.map +1 -1
  473. package/ui/text-view/index.android.js +13 -19
  474. package/ui/text-view/index.android.js.map +1 -1
  475. package/ui/text-view/index.ios.js +116 -124
  476. package/ui/text-view/index.ios.js.map +1 -1
  477. package/ui/text-view/text-view-common.js +3 -9
  478. package/ui/text-view/text-view-common.js.map +1 -1
  479. package/ui/time-picker/index.android.js +18 -24
  480. package/ui/time-picker/index.android.js.map +1 -1
  481. package/ui/time-picker/index.ios.js +61 -69
  482. package/ui/time-picker/index.ios.js.map +1 -1
  483. package/ui/time-picker/time-picker-common.js +37 -42
  484. package/ui/time-picker/time-picker-common.js.map +1 -1
  485. package/ui/transition/fade-transition.android.js +8 -14
  486. package/ui/transition/fade-transition.android.js.map +1 -1
  487. package/ui/transition/fade-transition.ios.js +4 -10
  488. package/ui/transition/fade-transition.ios.js.map +1 -1
  489. package/ui/transition/flip-transition.android.js +14 -18
  490. package/ui/transition/flip-transition.android.js.map +1 -1
  491. package/ui/transition/index.android.js +24 -27
  492. package/ui/transition/index.android.js.map +1 -1
  493. package/ui/transition/index.ios.js +18 -22
  494. package/ui/transition/index.ios.js.map +1 -1
  495. package/ui/transition/modal-transition.android.js +4 -10
  496. package/ui/transition/modal-transition.android.js.map +1 -1
  497. package/ui/transition/modal-transition.ios.js +18 -25
  498. package/ui/transition/modal-transition.ios.js.map +1 -1
  499. package/ui/transition/page-transition.android.js +57 -71
  500. package/ui/transition/page-transition.android.js.map +1 -1
  501. package/ui/transition/page-transition.ios.js +19 -27
  502. package/ui/transition/page-transition.ios.js.map +1 -1
  503. package/ui/transition/shared-transition-helper.android.js +8 -12
  504. package/ui/transition/shared-transition-helper.android.js.map +1 -1
  505. package/ui/transition/shared-transition-helper.ios.js +442 -539
  506. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  507. package/ui/transition/shared-transition.js +77 -76
  508. package/ui/transition/shared-transition.js.map +1 -1
  509. package/ui/transition/slide-transition.android.js +17 -22
  510. package/ui/transition/slide-transition.android.js.map +1 -1
  511. package/ui/transition/slide-transition.ios.js +7 -11
  512. package/ui/transition/slide-transition.ios.js.map +1 -1
  513. package/ui/utils.ios.js +13 -13
  514. package/ui/utils.ios.js.map +1 -1
  515. package/ui/web-view/index.android.js +50 -64
  516. package/ui/web-view/index.android.js.map +1 -1
  517. package/ui/web-view/index.ios.js +50 -73
  518. package/ui/web-view/index.ios.js.map +1 -1
  519. package/ui/web-view/web-view-common.js +29 -43
  520. package/ui/web-view/web-view-common.js.map +1 -1
  521. package/utils/android/index.js +26 -27
  522. package/utils/android/index.js.map +1 -1
  523. package/utils/common.js +49 -65
  524. package/utils/common.js.map +1 -1
  525. package/utils/constants.android.js +1 -1
  526. package/utils/constants.android.js.map +1 -1
  527. package/utils/constants.ios.js +1 -1
  528. package/utils/constants.ios.js.map +1 -1
  529. package/utils/debug.js +32 -54
  530. package/utils/debug.js.map +1 -1
  531. package/utils/index.android.js +40 -36
  532. package/utils/index.android.js.map +1 -1
  533. package/utils/index.ios.js +9 -9
  534. package/utils/index.ios.js.map +1 -1
  535. package/utils/ios/index.js +45 -42
  536. package/utils/ios/index.js.map +1 -1
  537. package/utils/layout-helper/index.android.js +4 -4
  538. package/utils/layout-helper/index.android.js.map +1 -1
  539. package/utils/layout-helper/index.ios.js +2 -2
  540. package/utils/layout-helper/index.ios.js.map +1 -1
  541. package/utils/layout-helper/layout-helper-common.js +13 -13
  542. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  543. package/utils/lazy.js +2 -2
  544. package/utils/lazy.js.map +1 -1
  545. package/utils/macrotask-scheduler.js +6 -6
  546. package/utils/macrotask-scheduler.js.map +1 -1
  547. package/utils/mainthread-helper.android.js +4 -4
  548. package/utils/mainthread-helper.android.js.map +1 -1
  549. package/utils/mainthread-helper.ios.js +1 -1
  550. package/utils/mainthread-helper.ios.js.map +1 -1
  551. package/utils/module-merge.js +1 -1
  552. package/utils/module-merge.js.map +1 -1
  553. package/utils/native-helper.android.js +19 -19
  554. package/utils/native-helper.android.js.map +1 -1
  555. package/utils/native-helper.ios.js +16 -23
  556. package/utils/native-helper.ios.js.map +1 -1
  557. package/utils/number-utils.js +3 -3
  558. package/utils/number-utils.js.map +1 -1
  559. package/utils/platform-check.js +6 -6
  560. package/utils/platform-check.js.map +1 -1
  561. package/utils/types.js +33 -43
  562. package/utils/types.js.map +1 -1
  563. package/wgc/crypto/SubtleCrypto.js +132 -167
  564. package/wgc/crypto/SubtleCrypto.js.map +1 -1
  565. package/wgc/crypto/index.d.ts +1 -1
  566. package/wgc/crypto/index.js +10 -18
  567. package/wgc/crypto/index.js.map +1 -1
  568. package/xhr/index.js +226 -308
  569. package/xhr/index.js.map +1 -1
  570. package/xml/index.js +78 -118
  571. package/xml/index.js.map +1 -1
@@ -10,19 +10,19 @@ import { paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddin
10
10
  import { getClass } from '../../../utils/types';
11
11
  import { profile } from '../../../profiling';
12
12
  import * as ssm from '../../styling/style-scope';
13
- var domNodeModule;
13
+ let domNodeModule;
14
14
  function ensuredomNodeModule() {
15
15
  if (!domNodeModule) {
16
16
  domNodeModule = require('../../../debugger/dom-node');
17
17
  }
18
18
  }
19
- var styleScopeModule;
19
+ let styleScopeModule;
20
20
  function ensureStyleScopeModule() {
21
21
  if (!styleScopeModule) {
22
22
  styleScopeModule = require('../../styling/style-scope');
23
23
  }
24
24
  }
25
- var defaultBindingSource = {};
25
+ const defaultBindingSource = {};
26
26
  /**
27
27
  * Gets an ancestor from a given type.
28
28
  * @param view - Starting view (child view).
@@ -30,16 +30,16 @@ var defaultBindingSource = {};
30
30
  * Returns an instance of a view (if found), otherwise undefined.
31
31
  */
32
32
  export function getAncestor(view, criterion) {
33
- var matcher = null;
33
+ let matcher = null;
34
34
  if (typeof criterion === 'string') {
35
- matcher = function (view) { return view.typeName === criterion; };
35
+ matcher = (view) => view.typeName === criterion;
36
36
  }
37
37
  else {
38
- matcher = function (view) { return view instanceof criterion; };
38
+ matcher = (view) => view instanceof criterion;
39
39
  }
40
- for (var parent_1 = view.parent; parent_1 != null; parent_1 = parent_1.parent) {
41
- if (matcher(parent_1)) {
42
- return parent_1;
40
+ for (let parent = view.parent; parent != null; parent = parent.parent) {
41
+ if (matcher(parent)) {
42
+ return parent;
43
43
  }
44
44
  }
45
45
  return null;
@@ -57,8 +57,8 @@ export function getViewById(view, id) {
57
57
  if (view.id === id) {
58
58
  return view;
59
59
  }
60
- var retVal;
61
- var descendantsCallback = function (child) {
60
+ let retVal;
61
+ const descendantsCallback = function (child) {
62
62
  if (child.id === id) {
63
63
  retVal = child;
64
64
  // break the iteration by returning false
@@ -82,8 +82,8 @@ export function getViewByDomId(view, domId) {
82
82
  if (view._domId === domId) {
83
83
  return view;
84
84
  }
85
- var retVal;
86
- var descendantsCallback = function (child) {
85
+ let retVal;
86
+ const descendantsCallback = function (child) {
87
87
  if (view._domId === domId) {
88
88
  retVal = child;
89
89
  // break the iteration by returning false
@@ -105,11 +105,11 @@ export function querySelectorAll(view, selector) {
105
105
  if (!view) {
106
106
  return [];
107
107
  }
108
- var retVal = [];
108
+ const retVal = [];
109
109
  if (view[selector]) {
110
110
  retVal.push(view);
111
111
  }
112
- var descendantsCallback = function (child) {
112
+ const descendantsCallback = function (child) {
113
113
  if (child[selector]) {
114
114
  retVal.push(child);
115
115
  }
@@ -127,8 +127,8 @@ export function eachDescendant(view, callback) {
127
127
  if (!callback || !view) {
128
128
  return;
129
129
  }
130
- var continueIteration;
131
- var localCallback = function (child) {
130
+ let continueIteration;
131
+ const localCallback = function (child) {
132
132
  continueIteration = callback(child);
133
133
  if (continueIteration) {
134
134
  child.eachChild(localCallback);
@@ -137,7 +137,7 @@ export function eachDescendant(view, callback) {
137
137
  };
138
138
  view.eachChild(localCallback);
139
139
  }
140
- var viewIdCounter = 1;
140
+ let viewIdCounter = 1;
141
141
  // const contextMap = new WeakMap<Object, Map<string, WeakRef<Object>[]>>();
142
142
  // function getNativeView(context: Object, typeName: string): Object {
143
143
  // let typeMap = contextMap.get(context);
@@ -188,25 +188,24 @@ var SuspendType;
188
188
  }
189
189
  SuspendType.toString = toString;
190
190
  })(SuspendType || (SuspendType = {}));
191
- var DEFAULT_VIEW_PADDINGS = new Map();
191
+ const DEFAULT_VIEW_PADDINGS = new Map();
192
192
  /**
193
193
  *
194
194
  * @nsView ViewBase
195
195
  */
196
- var ViewBase = /** @class */ (function (_super) {
197
- __extends(ViewBase, _super);
198
- function ViewBase() {
199
- var _this = _super.call(this) || this;
200
- _this._onLoadedCalled = false;
201
- _this._onUnloadedCalled = false;
196
+ export class ViewBase extends Observable {
197
+ constructor() {
198
+ super();
199
+ this._onLoadedCalled = false;
200
+ this._onUnloadedCalled = false;
202
201
  /**
203
202
  * Default visual state, defaults to 'normal'
204
203
  *
205
204
  * @nsProperty
206
205
  */
207
- _this.defaultVisualState = 'normal';
208
- /* "ui/styling/style-scope" */ _this._cssState = new ssm.CssState(new WeakRef(_this));
209
- _this.pseudoClassAliases = {
206
+ this.defaultVisualState = 'normal';
207
+ /* "ui/styling/style-scope" */ this._cssState = new ssm.CssState(new WeakRef(this));
208
+ this.pseudoClassAliases = {
210
209
  highlighted: ['active', 'pressed'],
211
210
  };
212
211
  /**
@@ -215,148 +214,110 @@ var ViewBase = /** @class */ (function (_super) {
215
214
  * of CSS variables/classes. That variable ensures that _addViewToNativeVisualTree
216
215
  * is not called in _setupAsRootView
217
216
  */
218
- _this.mIsRootView = false;
219
- _this._domId = viewIdCounter++;
220
- _this._style = new Style(new WeakRef(_this));
221
- _this.cssClasses = new Set();
222
- _this.cssPseudoClasses = new Set();
223
- _this.cssPseudoClasses.add(_this.defaultVisualState);
224
- _this.notify({ eventName: ViewBase.createdEvent, type: _this.constructor.name, object: _this });
225
- return _this;
226
- }
227
- Object.defineProperty(ViewBase.prototype, "parentNode", {
228
- // Used in Angular. TODO: remove from here
229
- /**
230
- * Gets the template parent or the native parent. Sets the template parent.
231
- */
232
- get: function () {
233
- return this._templateParent || this.parent;
234
- },
235
- set: function (node) {
236
- this._templateParent = node;
237
- },
238
- enumerable: false,
239
- configurable: true
240
- });
241
- Object.defineProperty(ViewBase.prototype, "nativeView", {
242
- get: function () {
243
- // this._disableNativeViewRecycling = true;
244
- return this.nativeViewProtected;
245
- },
246
- set: function (value) {
247
- this.setNativeView(value);
248
- },
249
- enumerable: false,
250
- configurable: true
251
- });
252
- Object.defineProperty(ViewBase.prototype, "typeName", {
253
- // TODO: Use Type.prototype.typeName instead.
254
- /**
255
- * Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
256
- */
257
- get: function () {
258
- return getClass(this);
259
- },
260
- enumerable: false,
261
- configurable: true
262
- });
263
- Object.defineProperty(ViewBase.prototype, "style", {
264
- /**
265
- * Gets the style object associated to this view.
266
- */
267
- get: function () {
268
- return this._style;
269
- },
270
- /**
271
- *
272
- * @nsProperty
273
- */
274
- set: function (inlineStyle /* | string */) {
275
- if (typeof inlineStyle === 'string') {
276
- this.setInlineStyle(inlineStyle);
277
- }
278
- else {
279
- throw new Error('View.style property is read-only.');
280
- }
281
- },
282
- enumerable: false,
283
- configurable: true
284
- });
285
- Object.defineProperty(ViewBase.prototype, "android", {
286
- get: function () {
287
- // this._disableNativeViewRecycling = true;
288
- return this._androidView;
289
- },
290
- enumerable: false,
291
- configurable: true
292
- });
293
- Object.defineProperty(ViewBase.prototype, "ios", {
294
- get: function () {
295
- // this._disableNativeViewRecycling = true;
296
- return this._iosView;
297
- },
298
- enumerable: false,
299
- configurable: true
300
- });
301
- Object.defineProperty(ViewBase.prototype, "isLoaded", {
302
- get: function () {
303
- return this._isLoaded;
304
- },
305
- enumerable: false,
306
- configurable: true
307
- });
308
- Object.defineProperty(ViewBase.prototype, 'class', {
309
- get: function () {
310
- return this.className;
311
- },
312
- set: function (v) {
313
- this.className = v;
314
- },
315
- enumerable: false,
316
- configurable: true
317
- });
217
+ this.mIsRootView = false;
218
+ this._domId = viewIdCounter++;
219
+ this._style = new Style(new WeakRef(this));
220
+ this.cssClasses = new Set();
221
+ this.cssPseudoClasses = new Set();
222
+ this.cssPseudoClasses.add(this.defaultVisualState);
223
+ this.notify({ eventName: ViewBase.createdEvent, type: this.constructor.name, object: this });
224
+ }
225
+ // Used in Angular. TODO: remove from here
226
+ /**
227
+ * Gets the template parent or the native parent. Sets the template parent.
228
+ */
229
+ get parentNode() {
230
+ return this._templateParent || this.parent;
231
+ }
232
+ set parentNode(node) {
233
+ this._templateParent = node;
234
+ }
235
+ get nativeView() {
236
+ // this._disableNativeViewRecycling = true;
237
+ return this.nativeViewProtected;
238
+ }
239
+ set nativeView(value) {
240
+ this.setNativeView(value);
241
+ }
242
+ // TODO: Use Type.prototype.typeName instead.
243
+ /**
244
+ * Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
245
+ */
246
+ get typeName() {
247
+ return getClass(this);
248
+ }
249
+ /**
250
+ * Gets the style object associated to this view.
251
+ */
252
+ get style() {
253
+ return this._style;
254
+ }
255
+ /**
256
+ *
257
+ * @nsProperty
258
+ */
259
+ set style(inlineStyle /* | string */) {
260
+ if (typeof inlineStyle === 'string') {
261
+ this.setInlineStyle(inlineStyle);
262
+ }
263
+ else {
264
+ throw new Error('View.style property is read-only.');
265
+ }
266
+ }
267
+ get android() {
268
+ // this._disableNativeViewRecycling = true;
269
+ return this._androidView;
270
+ }
271
+ get ios() {
272
+ // this._disableNativeViewRecycling = true;
273
+ return this._iosView;
274
+ }
275
+ get isLoaded() {
276
+ return this._isLoaded;
277
+ }
278
+ get ['class']() {
279
+ return this.className;
280
+ }
281
+ set ['class'](v) {
282
+ this.className = v;
283
+ }
318
284
  /**
319
285
  * Returns the child view with the specified id.
320
286
  */
321
- ViewBase.prototype.getViewById = function (id) {
287
+ getViewById(id) {
322
288
  return getViewById(this, id);
323
- };
289
+ }
324
290
  /**
325
291
  * Returns the child view with the specified domId.
326
292
  */
327
- ViewBase.prototype.getViewByDomId = function (domId) {
293
+ getViewByDomId(domId) {
328
294
  return getViewByDomId(this, domId);
329
- };
330
- Object.defineProperty(ViewBase.prototype, "page", {
331
- /**
332
- * Gets owner page. This is a read-only property.
333
- */
334
- get: function () {
335
- if (this.parent) {
336
- return this.parent.page;
337
- }
338
- return null;
339
- },
340
- enumerable: false,
341
- configurable: true
342
- });
295
+ }
296
+ /**
297
+ * Gets owner page. This is a read-only property.
298
+ */
299
+ get page() {
300
+ if (this.parent) {
301
+ return this.parent.page;
302
+ }
303
+ return null;
304
+ }
343
305
  /**
344
306
  * @unstable
345
307
  * Ensures a dom-node for this view.
346
308
  */
347
- ViewBase.prototype.ensureDomNode = function () {
309
+ ensureDomNode() {
348
310
  if (!this.domNode) {
349
311
  ensuredomNodeModule();
350
312
  this.domNode = new domNodeModule.DOMNode(this);
351
313
  }
352
- };
314
+ }
353
315
  // Overridden so we don't raise `propertyChange`
354
316
  // The property will raise its own event.
355
- ViewBase.prototype.set = function (name, value) {
317
+ set(name, value) {
356
318
  this[name] = WrappedValue.unwrap(value);
357
- };
358
- ViewBase.prototype.onLoaded = function () {
359
- var _this = this;
319
+ }
320
+ onLoaded() {
360
321
  this.setFlag(Flags.superOnLoadedCalled, true);
361
322
  if (this._isLoaded) {
362
323
  return;
@@ -364,58 +325,57 @@ var ViewBase = /** @class */ (function (_super) {
364
325
  this._isLoaded = true;
365
326
  this._cssState.onLoaded();
366
327
  this._resumeNativeUpdates(SuspendType.Loaded);
367
- this.eachChild(function (child) {
368
- _this.loadView(child);
328
+ this.eachChild((child) => {
329
+ this.loadView(child);
369
330
  return true;
370
331
  });
371
332
  this._emit('loaded');
372
- };
373
- ViewBase.prototype.onUnloaded = function () {
374
- var _this = this;
333
+ }
334
+ onUnloaded() {
375
335
  this.setFlag(Flags.superOnUnloadedCalled, true);
376
336
  if (!this._isLoaded) {
377
337
  return;
378
338
  }
379
339
  this._suspendNativeUpdates(SuspendType.Loaded);
380
- this.eachChild(function (child) {
381
- _this.unloadView(child);
340
+ this.eachChild((child) => {
341
+ this.unloadView(child);
382
342
  return true;
383
343
  });
384
344
  this._isLoaded = false;
385
345
  this._cssState.onUnloaded();
386
346
  this._emit('unloaded');
387
- };
388
- ViewBase.prototype._layoutParent = function () {
347
+ }
348
+ _layoutParent() {
389
349
  if (this.parent) {
390
350
  this.parent._layoutParent();
391
351
  }
392
- };
393
- ViewBase.prototype._suspendNativeUpdates = function (type) {
352
+ }
353
+ _suspendNativeUpdates(type) {
394
354
  if (type) {
395
355
  this._suspendNativeUpdatesCount = this._suspendNativeUpdatesCount | type;
396
356
  }
397
357
  else {
398
358
  this._suspendNativeUpdatesCount++;
399
359
  }
400
- };
401
- ViewBase.prototype._resumeNativeUpdates = function (type) {
360
+ }
361
+ _resumeNativeUpdates(type) {
402
362
  if (type) {
403
363
  this._suspendNativeUpdatesCount = this._suspendNativeUpdatesCount & ~type;
404
364
  }
405
365
  else {
406
366
  if ((this._suspendNativeUpdatesCount & SuspendType.IncrementalCountMask) === 0) {
407
- throw new Error("Invalid call to ".concat(this, "._resumeNativeUpdates"));
367
+ throw new Error(`Invalid call to ${this}._resumeNativeUpdates`);
408
368
  }
409
369
  this._suspendNativeUpdatesCount--;
410
370
  }
411
371
  if (!this._suspendNativeUpdatesCount) {
412
372
  this.onResumeNativeUpdates();
413
373
  }
414
- };
374
+ }
415
375
  /**
416
376
  * Allow multiple updates to be performed on the instance at once.
417
377
  */
418
- ViewBase.prototype._batchUpdate = function (callback) {
378
+ _batchUpdate(callback) {
419
379
  try {
420
380
  this._suspendNativeUpdates(SuspendType.Incremental);
421
381
  return callback();
@@ -423,8 +383,8 @@ var ViewBase = /** @class */ (function (_super) {
423
383
  finally {
424
384
  this._resumeNativeUpdates(SuspendType.Incremental);
425
385
  }
426
- };
427
- ViewBase.prototype.setFlag = function (flag, value) {
386
+ }
387
+ setFlag(flag, value) {
428
388
  switch (flag) {
429
389
  case Flags.superOnLoadedCalled:
430
390
  this._onLoadedCalled = value;
@@ -433,91 +393,88 @@ var ViewBase = /** @class */ (function (_super) {
433
393
  this._onUnloadedCalled = value;
434
394
  break;
435
395
  }
436
- };
437
- ViewBase.prototype.isFlagSet = function (flag) {
396
+ }
397
+ isFlagSet(flag) {
438
398
  switch (flag) {
439
399
  case Flags.superOnLoadedCalled:
440
400
  return this._onLoadedCalled;
441
401
  case Flags.superOnUnloadedCalled:
442
402
  return this._onUnloadedCalled;
443
403
  }
444
- };
445
- ViewBase.prototype.callFunctionWithSuper = function (flag, func) {
404
+ }
405
+ callFunctionWithSuper(flag, func) {
446
406
  this.setFlag(flag, false);
447
407
  func();
448
408
  if (!this.isFlagSet(flag)) {
449
- throw new Error("super.".concat(flag, " not called in ").concat(this));
409
+ throw new Error(`super.${flag} not called in ${this}`);
450
410
  }
451
- };
452
- ViewBase.prototype.callLoaded = function () {
453
- var _this = this;
454
- this.callFunctionWithSuper(Flags.superOnLoadedCalled, function () { return _this.onLoaded(); });
455
- };
456
- ViewBase.prototype.callUnloaded = function () {
457
- var _this = this;
458
- this.callFunctionWithSuper(Flags.superOnUnloadedCalled, function () { return _this.onUnloaded(); });
459
- };
460
- ViewBase.prototype.notifyPseudoClassChanged = function (pseudoClass) {
411
+ }
412
+ callLoaded() {
413
+ this.callFunctionWithSuper(Flags.superOnLoadedCalled, () => this.onLoaded());
414
+ }
415
+ callUnloaded() {
416
+ this.callFunctionWithSuper(Flags.superOnUnloadedCalled, () => this.onUnloaded());
417
+ }
418
+ notifyPseudoClassChanged(pseudoClass) {
461
419
  this.notify({ eventName: ':' + pseudoClass, object: this });
462
- };
463
- ViewBase.prototype.getAllAliasedStates = function (name) {
464
- var allStates = [name];
420
+ }
421
+ getAllAliasedStates(name) {
422
+ const allStates = [name];
465
423
  if (name in this.pseudoClassAliases) {
466
- for (var i = 0, length_1 = this.pseudoClassAliases[name].length; i < length_1; i++) {
424
+ for (let i = 0, length = this.pseudoClassAliases[name].length; i < length; i++) {
467
425
  allStates.push(this.pseudoClassAliases[name][i]);
468
426
  }
469
427
  }
470
428
  return allStates;
471
- };
429
+ }
472
430
  /**
473
431
  * @protected
474
432
  * @unstable
475
433
  * A widget can call this method to add a matching css pseudo class.
476
434
  */
477
- ViewBase.prototype.addPseudoClass = function (name) {
478
- var allStates = this.getAllAliasedStates(name);
479
- for (var i = 0, length_2 = allStates.length; i < length_2; i++) {
435
+ addPseudoClass(name) {
436
+ const allStates = this.getAllAliasedStates(name);
437
+ for (let i = 0, length = allStates.length; i < length; i++) {
480
438
  if (!this.cssPseudoClasses.has(allStates[i])) {
481
439
  this.cssPseudoClasses.add(allStates[i]);
482
440
  this.notifyPseudoClassChanged(allStates[i]);
483
441
  }
484
442
  }
485
- };
443
+ }
486
444
  /**
487
445
  * @protected
488
446
  * @unstable
489
447
  * A widget can call this method to discard matching css pseudo class.
490
448
  */
491
- ViewBase.prototype.deletePseudoClass = function (name) {
492
- var allStates = this.getAllAliasedStates(name);
493
- for (var i = 0, length_3 = allStates.length; i < length_3; i++) {
449
+ deletePseudoClass(name) {
450
+ const allStates = this.getAllAliasedStates(name);
451
+ for (let i = 0, length = allStates.length; i < length; i++) {
494
452
  if (this.cssPseudoClasses.has(allStates[i])) {
495
453
  this.cssPseudoClasses.delete(allStates[i]);
496
454
  this.notifyPseudoClassChanged(allStates[i]);
497
455
  }
498
456
  }
499
- };
500
- ViewBase.prototype.bindingContextChanged = function (data) {
457
+ }
458
+ bindingContextChanged(data) {
501
459
  this.bindings.get('bindingContext').bind(data.value);
502
- };
503
- ViewBase.prototype.bind = function (options, source) {
504
- if (source === void 0) { source = defaultBindingSource; }
505
- var targetProperty = options.targetProperty;
460
+ }
461
+ bind(options, source = defaultBindingSource) {
462
+ const targetProperty = options.targetProperty;
506
463
  this.unbind(targetProperty);
507
464
  if (!this.bindings) {
508
465
  this.bindings = new Map();
509
466
  }
510
- var binding = new Binding(this, options);
467
+ const binding = new Binding(this, options);
511
468
  this.bindings.set(targetProperty, binding);
512
- var bindingSource = source;
469
+ let bindingSource = source;
513
470
  if (bindingSource === defaultBindingSource) {
514
471
  bindingSource = this.bindingContext;
515
472
  binding.sourceIsBindingContext = true;
516
473
  if (targetProperty === 'bindingContext') {
517
474
  this.bindingContextBoundToParentBindingContextChanged = true;
518
- var parent_2 = this.parent;
519
- if (parent_2) {
520
- parent_2.on('bindingContextChange', this.bindingContextChanged, this);
475
+ const parent = this.parent;
476
+ if (parent) {
477
+ parent.on('bindingContextChange', this.bindingContextChanged, this);
521
478
  }
522
479
  else {
523
480
  this.shouldAddHandlerToParentBindingContextChanged = true;
@@ -525,13 +482,13 @@ var ViewBase = /** @class */ (function (_super) {
525
482
  }
526
483
  }
527
484
  binding.bind(bindingSource);
528
- };
529
- ViewBase.prototype.unbind = function (property) {
530
- var bindings = this.bindings;
485
+ }
486
+ unbind(property) {
487
+ const bindings = this.bindings;
531
488
  if (!bindings) {
532
489
  return;
533
490
  }
534
- var binding = bindings.get(property);
491
+ const binding = bindings.get(property);
535
492
  if (binding) {
536
493
  binding.unbind();
537
494
  bindings.delete(property);
@@ -539,53 +496,51 @@ var ViewBase = /** @class */ (function (_super) {
539
496
  if (property === 'bindingContext') {
540
497
  this.shouldAddHandlerToParentBindingContextChanged = false;
541
498
  this.bindingContextBoundToParentBindingContextChanged = false;
542
- var parent_3 = this.parent;
543
- if (parent_3) {
544
- parent_3.off('bindingContextChange', this.bindingContextChanged, this);
499
+ const parent = this.parent;
500
+ if (parent) {
501
+ parent.off('bindingContextChange', this.bindingContextChanged, this);
545
502
  }
546
503
  }
547
504
  }
548
505
  }
549
- };
550
- ViewBase.prototype.performLayout = function (currentRun) {
551
- var _this = this;
552
- if (currentRun === void 0) { currentRun = 0; }
506
+ }
507
+ performLayout(currentRun = 0) {
553
508
  // if there's an animation in progress we need to delay the layout
554
509
  // we've added a guard of 5000 milliseconds execution
555
510
  // to make sure that the layout will happen even if the animation haven't finished in 5 seconds
556
511
  if (this._shouldDelayLayout() && currentRun < 100) {
557
- setTimeout(function () { return _this.performLayout(currentRun); }, currentRun);
512
+ setTimeout(() => this.performLayout(currentRun), currentRun);
558
513
  currentRun++;
559
514
  }
560
515
  else {
561
516
  this.parent.requestLayout();
562
517
  }
563
- };
518
+ }
564
519
  /**
565
520
  * Invalidates the layout of the view and triggers a new layout pass.
566
521
  */
567
- ViewBase.prototype.requestLayout = function () {
522
+ requestLayout() {
568
523
  // Default implementation for non View instances (like TabViewItem).
569
- var parent = this.parent;
524
+ const parent = this.parent;
570
525
  if (parent) {
571
526
  this.performLayout();
572
527
  }
573
- };
528
+ }
574
529
  /**
575
530
  * Iterates over children of type ViewBase.
576
531
  * @param callback Called for each child of type ViewBase. Iteration stops if this method returns falsy value.
577
532
  */
578
- ViewBase.prototype.eachChild = function (callback) {
533
+ eachChild(callback) {
579
534
  //
580
- };
581
- ViewBase.prototype._inheritStyles = function (view) {
535
+ }
536
+ _inheritStyles(view) {
582
537
  propagateInheritableProperties(this, view);
583
538
  view._inheritStyleScope(this._styleScope);
584
539
  propagateInheritableCssProperties(this.style, view.style);
585
- };
586
- ViewBase.prototype._addView = function (view, atIndex) {
540
+ }
541
+ _addView(view, atIndex) {
587
542
  if (Trace.isEnabled()) {
588
- Trace.write("".concat(this, "._addView(").concat(view, ", ").concat(atIndex, ")"), Trace.categories.ViewHierarchy);
543
+ Trace.write(`${this}._addView(${view}, ${atIndex})`, Trace.categories.ViewHierarchy);
589
544
  }
590
545
  if (!view) {
591
546
  throw new Error('Expecting a valid View instance.');
@@ -602,11 +557,11 @@ var ViewBase = /** @class */ (function (_super) {
602
557
  if (this.domNode) {
603
558
  this.domNode.onChildAdded(view);
604
559
  }
605
- };
560
+ }
606
561
  /**
607
562
  * Method is intended to be overridden by inheritors and used as "protected"
608
563
  */
609
- ViewBase.prototype._addViewCore = function (view, atIndex) {
564
+ _addViewCore(view, atIndex) {
610
565
  this._inheritStyles(view);
611
566
  if (this._context) {
612
567
  view._setupUI(this._context, atIndex);
@@ -614,38 +569,38 @@ var ViewBase = /** @class */ (function (_super) {
614
569
  if (this._isLoaded) {
615
570
  this.loadView(view);
616
571
  }
617
- };
572
+ }
618
573
  /**
619
574
  * Load view.
620
575
  * @param view to load.
621
576
  */
622
- ViewBase.prototype.loadView = function (view) {
577
+ loadView(view) {
623
578
  if (view && !view.isLoaded) {
624
579
  view.callLoaded();
625
580
  }
626
- };
581
+ }
627
582
  /**
628
583
  * When returning true the callLoaded method will be run in setTimeout
629
584
  * Method is intended to be overridden by inheritors and used as "protected"
630
585
  */
631
- ViewBase.prototype._shouldDelayLayout = function () {
586
+ _shouldDelayLayout() {
632
587
  return false;
633
- };
588
+ }
634
589
  /**
635
590
  * Unload view.
636
591
  * @param view to unload.
637
592
  */
638
- ViewBase.prototype.unloadView = function (view) {
593
+ unloadView(view) {
639
594
  if (view && view.isLoaded) {
640
595
  view.callUnloaded();
641
596
  }
642
- };
597
+ }
643
598
  /**
644
599
  * Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
645
600
  */
646
- ViewBase.prototype._removeView = function (view) {
601
+ _removeView(view) {
647
602
  if (Trace.isEnabled()) {
648
- Trace.write("".concat(this, "._removeView(").concat(view, ")"), Trace.categories.ViewHierarchy);
603
+ Trace.write(`${this}._removeView(${view})`, Trace.categories.ViewHierarchy);
649
604
  }
650
605
  if (view.parent !== this) {
651
606
  throw new Error('View not added to this instance. View: ' + view + ' CurrentParent: ' + view.parent + ' ExpectedParent: ' + this);
@@ -656,27 +611,27 @@ var ViewBase = /** @class */ (function (_super) {
656
611
  this._removeViewCore(view);
657
612
  view.parent = undefined;
658
613
  view._parentChanged(this);
659
- };
614
+ }
660
615
  /**
661
616
  * Method is intended to be overridden by inheritors and used as "protected"
662
617
  */
663
- ViewBase.prototype._removeViewCore = function (view) {
618
+ _removeViewCore(view) {
664
619
  this.unloadView(view);
665
620
  if (view._context) {
666
621
  view._tearDownUI();
667
622
  }
668
- };
623
+ }
669
624
  /**
670
625
  * Creates a native view.
671
626
  * Returns either android.view.View or UIView.
672
627
  */
673
- ViewBase.prototype.createNativeView = function () {
628
+ createNativeView() {
674
629
  return undefined;
675
- };
630
+ }
676
631
  /**
677
632
  * Clean up references to the native view.
678
633
  */
679
- ViewBase.prototype.disposeNativeView = function () {
634
+ disposeNativeView() {
680
635
  // Unset those values so that view will check for resize after being removed and re-added to view-tree
681
636
  this._oldLeft = 0;
682
637
  this._oldTop = 0;
@@ -686,20 +641,20 @@ var ViewBase = /** @class */ (function (_super) {
686
641
  eventName: ViewBase.disposeNativeViewEvent,
687
642
  object: this,
688
643
  });
689
- };
644
+ }
690
645
  /**
691
646
  * Initializes properties/listeners of the native view.
692
647
  */
693
- ViewBase.prototype.initNativeView = function () {
648
+ initNativeView() {
694
649
  //
695
- };
650
+ }
696
651
  /**
697
652
  * Resets properties/listeners set to the native view.
698
653
  */
699
- ViewBase.prototype.resetNativeView = function () {
654
+ resetNativeView() {
700
655
  //
701
- };
702
- ViewBase.prototype.resetNativeViewInternal = function () {
656
+ }
657
+ resetNativeViewInternal() {
703
658
  // const nativeView = this.nativeViewProtected;
704
659
  // if (nativeView && __ANDROID__) {
705
660
  // const recycle = this.recycleNativeView;
@@ -716,23 +671,23 @@ var ViewBase = /** @class */ (function (_super) {
716
671
  // if (this._cssState) {
717
672
  // this._cancelAllAnimations();
718
673
  // }
719
- };
720
- ViewBase.prototype._setupAsRootView = function (context) {
674
+ }
675
+ _setupAsRootView(context) {
721
676
  this.mIsRootView = true;
722
677
  this._setupUI(context);
723
678
  this.mIsRootView = false;
724
- };
679
+ }
725
680
  /**
726
681
  * Setups the UI for ViewBase and all its children recursively.
727
682
  * This method should *not* be overridden by derived views.
728
683
  */
729
- ViewBase.prototype._setupUI = function (context /* android.content.Context */, atIndex, parentIsLoaded) {
684
+ _setupUI(context /* android.content.Context */, atIndex, parentIsLoaded) {
730
685
  if (this._context === context) {
731
686
  // this check is unnecessary as this function should never be called when this._context === context as it means the view was somehow detached,
732
687
  // which is only possible by setting reusable = true. Adding it either way for feature flag safety
733
688
  if (this.reusable) {
734
689
  if (!this.mIsRootView && this.parent && !this._isAddedToNativeVisualTree) {
735
- var nativeIndex = this.parent._childIndexToNativeChildIndex(atIndex);
690
+ const nativeIndex = this.parent._childIndexToNativeChildIndex(atIndex);
736
691
  this._isAddedToNativeVisualTree = this.parent._addViewToNativeVisualTree(this, nativeIndex);
737
692
  }
738
693
  }
@@ -744,7 +699,7 @@ var ViewBase = /** @class */ (function (_super) {
744
699
  this._context = context;
745
700
  // This will account for nativeView that is created in createNativeView, recycled
746
701
  // or for backward compatibility - set before _setupUI in iOS constructor.
747
- var nativeView = this.nativeViewProtected;
702
+ let nativeView = this.nativeViewProtected;
748
703
  // if (__ANDROID__) {
749
704
  // const recycle = this.recycleNativeView;
750
705
  // if (recycle === "always" || (recycle === "auto" && !this._disableNativeViewRecycling)) {
@@ -760,11 +715,11 @@ var ViewBase = /** @class */ (function (_super) {
760
715
  if (this._androidView !== nativeView || !this.reusable) {
761
716
  this._androidView = nativeView;
762
717
  if (nativeView) {
763
- var className = this.constructor.name;
718
+ const className = this.constructor.name;
764
719
  if (this._isPaddingRelative === undefined) {
765
720
  this._isPaddingRelative = nativeView.isPaddingRelative();
766
721
  }
767
- var result /* android.graphics.Rect */ = DEFAULT_VIEW_PADDINGS.get(className) || nativeView.defaultPaddings;
722
+ let result /* android.graphics.Rect */ = DEFAULT_VIEW_PADDINGS.get(className) || nativeView.defaultPaddings;
768
723
  if (result === undefined) {
769
724
  DEFAULT_VIEW_PADDINGS.set(className, org.nativescript.widgets.ViewHelper.getPadding(nativeView));
770
725
  nativeView.defaultPaddings = DEFAULT_VIEW_PADDINGS.get(className);
@@ -777,7 +732,7 @@ var ViewBase = /** @class */ (function (_super) {
777
732
  this._defaultPaddingRight = result.right;
778
733
  this._defaultPaddingBottom = result.bottom;
779
734
  this._defaultPaddingLeft = result.left;
780
- var style = this.style;
735
+ const style = this.style;
781
736
  if (!paddingTopProperty.isSet(style)) {
782
737
  this.effectivePaddingTop = this._defaultPaddingTop;
783
738
  }
@@ -798,21 +753,21 @@ var ViewBase = /** @class */ (function (_super) {
798
753
  }
799
754
  this.setNativeView(nativeView);
800
755
  if (!this.mIsRootView && this.parent) {
801
- var nativeIndex = this.parent._childIndexToNativeChildIndex(atIndex);
756
+ const nativeIndex = this.parent._childIndexToNativeChildIndex(atIndex);
802
757
  this._isAddedToNativeVisualTree = this.parent._addViewToNativeVisualTree(this, nativeIndex);
803
758
  }
804
759
  this._resumeNativeUpdates(SuspendType.UISetup);
805
- this.eachChild(function (child) {
760
+ this.eachChild((child) => {
806
761
  child._setupUI(context);
807
762
  return true;
808
763
  });
809
- };
764
+ }
810
765
  /**
811
766
  * Set the nativeView field performing extra checks and updates to the native properties on the new view.
812
767
  * Use in cases where the createNativeView is not suitable.
813
768
  * As an example use in item controls where the native parent view will create the native views for child items.
814
769
  */
815
- ViewBase.prototype.setNativeView = function (value) {
770
+ setNativeView(value) {
816
771
  if (this.__nativeView === value) {
817
772
  return;
818
773
  }
@@ -826,30 +781,30 @@ var ViewBase = /** @class */ (function (_super) {
826
781
  this.initNativeView();
827
782
  this._resumeNativeUpdates(SuspendType.NativeView);
828
783
  }
829
- };
784
+ }
830
785
  /**
831
786
  * Tears down the UI of a reusable node by making it no longer reusable.
832
787
  * @see _tearDownUI
833
788
  * @param forceDestroyChildren Force destroy the children (even if they are reusable)
834
789
  */
835
- ViewBase.prototype.destroyNode = function (forceDestroyChildren) {
790
+ destroyNode(forceDestroyChildren) {
836
791
  this.reusable = false;
837
792
  this.callUnloaded();
838
793
  this._tearDownUI(forceDestroyChildren);
839
- };
794
+ }
840
795
  /**
841
796
  * Tears down the UI for ViewBase and all its children recursively.
842
797
  * This method should *not* be overridden by derived views.
843
798
  */
844
- ViewBase.prototype._tearDownUI = function (force) {
799
+ _tearDownUI(force) {
845
800
  // No context means we are already teared down.
846
801
  if (!this._context) {
847
802
  return;
848
803
  }
849
- var preserveNativeView = this.reusable && !force;
804
+ const preserveNativeView = this.reusable && !force;
850
805
  this.resetNativeViewInternal();
851
806
  if (!preserveNativeView) {
852
- this.eachChild(function (child) {
807
+ this.eachChild((child) => {
853
808
  child._tearDownUI(force);
854
809
  return true;
855
810
  });
@@ -886,50 +841,46 @@ var ViewBase = /** @class */ (function (_super) {
886
841
  this.domNode.dispose();
887
842
  this.domNode = undefined;
888
843
  }
889
- };
890
- ViewBase.prototype._childIndexToNativeChildIndex = function (index) {
844
+ }
845
+ _childIndexToNativeChildIndex(index) {
891
846
  return index;
892
- };
847
+ }
893
848
  /**
894
849
  * Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.
895
850
  * Method is intended to be overridden by inheritors and used as "protected".
896
851
  */
897
- ViewBase.prototype._addViewToNativeVisualTree = function (view, atIndex) {
852
+ _addViewToNativeVisualTree(view, atIndex) {
898
853
  if (view._isAddedToNativeVisualTree) {
899
854
  throw new Error('Child already added to the native visual tree.');
900
855
  }
901
856
  return true;
902
- };
857
+ }
903
858
  /**
904
859
  * Method is intended to be overridden by inheritors and used as "protected"
905
860
  */
906
- ViewBase.prototype._removeViewFromNativeVisualTree = function (view) {
861
+ _removeViewFromNativeVisualTree(view) {
907
862
  view._isAddedToNativeVisualTree = false;
908
- };
909
- Object.defineProperty(ViewBase.prototype, "visualState", {
910
- /**
911
- * @deprecated
912
- */
913
- get: function () {
914
- return this._visualState;
915
- },
916
- enumerable: false,
917
- configurable: true
918
- });
919
- ViewBase.prototype._addVisualState = function (state) {
863
+ }
864
+ /**
865
+ * @deprecated
866
+ */
867
+ get visualState() {
868
+ return this._visualState;
869
+ }
870
+ _addVisualState(state) {
920
871
  this.deletePseudoClass(this.defaultVisualState);
921
872
  this.addPseudoClass(state);
922
- };
923
- ViewBase.prototype._removeVisualState = function (state) {
873
+ }
874
+ _removeVisualState(state) {
924
875
  this.deletePseudoClass(state);
925
876
  if (!this.cssPseudoClasses.size) {
926
877
  this.addPseudoClass(this.defaultVisualState);
927
878
  }
928
- };
879
+ }
929
880
  /**
930
881
  * @deprecated Use View._addVisualState() and View._removeVisualState() instead.
931
882
  */
932
- ViewBase.prototype._goToVisualState = function (state) {
883
+ _goToVisualState(state) {
933
884
  console.log('_goToVisualState() is deprecated. Use View._addVisualState() and View._removeVisualState() instead.');
934
885
  if (Trace.isEnabled()) {
935
886
  Trace.write(this + ' going to state: ' + state, Trace.categories.Style);
@@ -940,30 +891,30 @@ var ViewBase = /** @class */ (function (_super) {
940
891
  this.deletePseudoClass(this._visualState);
941
892
  this._visualState = state;
942
893
  this.addPseudoClass(state);
943
- };
894
+ }
944
895
  /**
945
896
  * @deprecated
946
897
  *
947
898
  * This used to be the way to set attribute values in early {N} versions.
948
899
  * Now attributes are expected to be set as plain properties on the view instances.
949
900
  */
950
- ViewBase.prototype._applyXmlAttribute = function (attribute, value) {
901
+ _applyXmlAttribute(attribute, value) {
951
902
  console.log('ViewBase._applyXmlAttribute(...) is deprecated; set attributes as plain properties instead');
952
903
  if (attribute === 'style' || attribute === 'rows' || attribute === 'columns' || attribute === 'fontAttributes') {
953
904
  this[attribute] = value;
954
905
  return true;
955
906
  }
956
907
  return false;
957
- };
958
- ViewBase.prototype.setInlineStyle = function (style) {
908
+ }
909
+ setInlineStyle(style) {
959
910
  if (typeof style !== 'string') {
960
911
  throw new Error('Parameter should be valid CSS string!');
961
912
  }
962
913
  ensureStyleScopeModule();
963
914
  styleScopeModule.applyInlineStyle(this, style, undefined);
964
- };
965
- ViewBase.prototype._parentChanged = function (oldParent) {
966
- var newParent = this.parent;
915
+ }
916
+ _parentChanged(oldParent) {
917
+ const newParent = this.parent;
967
918
  //Overridden
968
919
  if (oldParent) {
969
920
  clearInheritedProperties(this);
@@ -975,38 +926,38 @@ var ViewBase = /** @class */ (function (_super) {
975
926
  newParent.on('bindingContextChange', this.bindingContextChanged, this);
976
927
  this.bindings.get('bindingContext').bind(newParent.bindingContext);
977
928
  }
978
- };
979
- ViewBase.prototype.onResumeNativeUpdates = function () {
929
+ }
930
+ onResumeNativeUpdates() {
980
931
  // Apply native setters...
981
932
  initNativeView(this, undefined, undefined);
982
- };
983
- ViewBase.prototype.toString = function () {
984
- var str = this.typeName;
933
+ }
934
+ toString() {
935
+ let str = this.typeName;
985
936
  if (this.id) {
986
- str += "<".concat(this.id, ">");
937
+ str += `<${this.id}>`;
987
938
  }
988
939
  else {
989
- str += "(".concat(this._domId, ")");
940
+ str += `(${this._domId})`;
990
941
  }
991
- var source = Source.get(this);
942
+ const source = Source.get(this);
992
943
  if (source) {
993
- str += "@".concat(source, ";");
944
+ str += `@${source};`;
994
945
  }
995
946
  return str;
996
- };
947
+ }
997
948
  /**
998
949
  * @private
999
950
  * Notifies each child's css state for change, recursively.
1000
951
  * Either the style scope, className or id properties were changed.
1001
952
  */
1002
- ViewBase.prototype._onCssStateChange = function () {
953
+ _onCssStateChange() {
1003
954
  this._cssState.onChange();
1004
- eachDescendant(this, function (child) {
955
+ eachDescendant(this, (child) => {
1005
956
  child._cssState.onChange();
1006
957
  return true;
1007
958
  });
1008
- };
1009
- ViewBase.prototype._inheritStyleScope = function (styleScope) {
959
+ }
960
+ _inheritStyleScope(styleScope) {
1010
961
  // If we are styleScope don't inherit parent stylescope.
1011
962
  // TODO: Consider adding parent scope and merge selectors.
1012
963
  if (this._isStyleScopeHost) {
@@ -1015,123 +966,117 @@ var ViewBase = /** @class */ (function (_super) {
1015
966
  if (this._styleScope !== styleScope) {
1016
967
  this._styleScope = styleScope;
1017
968
  this._onCssStateChange();
1018
- this.eachChild(function (child) {
969
+ this.eachChild((child) => {
1019
970
  child._inheritStyleScope(styleScope);
1020
971
  return true;
1021
972
  });
1022
973
  }
1023
- };
1024
- ViewBase.prototype.showModal = function (moduleOrView, modalOptions) {
1025
- var parent = this.parent;
974
+ }
975
+ showModal(moduleOrView, modalOptions) {
976
+ const parent = this.parent;
1026
977
  return parent && parent.showModal(moduleOrView, modalOptions);
1027
- };
978
+ }
1028
979
  /**
1029
980
  * Closes the current modal view that this page is showing.
1030
981
  * @param context - Any context you want to pass back to the host when closing the modal view.
1031
982
  */
1032
- ViewBase.prototype.closeModal = function () {
1033
- var args = [];
1034
- for (var _i = 0; _i < arguments.length; _i++) {
1035
- args[_i] = arguments[_i];
1036
- }
1037
- var parent = this.parent;
983
+ closeModal(...args) {
984
+ const parent = this.parent;
1038
985
  if (parent) {
1039
- parent.closeModal.apply(parent, args);
986
+ parent.closeModal(...args);
1040
987
  }
1041
- };
988
+ }
1042
989
  /**
1043
990
  * Method is intended to be overridden by inheritors and used as "protected"
1044
991
  */
1045
- ViewBase.prototype._dialogClosed = function () {
1046
- eachDescendant(this, function (child) {
992
+ _dialogClosed() {
993
+ eachDescendant(this, (child) => {
1047
994
  child._dialogClosed();
1048
995
  return true;
1049
996
  });
1050
- };
997
+ }
1051
998
  /**
1052
999
  * Method is intended to be overridden by inheritors and used as "protected"
1053
1000
  */
1054
- ViewBase.prototype._onRootViewReset = function () {
1055
- eachDescendant(this, function (child) {
1001
+ _onRootViewReset() {
1002
+ eachDescendant(this, (child) => {
1056
1003
  child._onRootViewReset();
1057
1004
  return true;
1058
1005
  });
1059
- };
1060
- /**
1061
- * String value used when hooking to loaded event.
1062
- *
1063
- * @nsEvent loaded
1064
- */
1065
- ViewBase.loadedEvent = 'loaded';
1066
- /**
1067
- * String value used when hooking to unloaded event.
1068
- *
1069
- * @nsEvent unloaded
1070
- */
1071
- ViewBase.unloadedEvent = 'unloaded';
1072
- /**
1073
- * String value used when hooking to creation event
1074
- *
1075
- * @nsEvent created
1076
- */
1077
- ViewBase.createdEvent = 'created';
1078
- /**
1079
- * String value used when hooking to disposeNativeView event
1080
- *
1081
- * @nsEvent disposeNativeView
1082
- */
1083
- ViewBase.disposeNativeViewEvent = 'disposeNativeView';
1084
- __decorate([
1085
- profile,
1086
- __metadata("design:type", Function),
1087
- __metadata("design:paramtypes", []),
1088
- __metadata("design:returntype", void 0)
1089
- ], ViewBase.prototype, "onLoaded", null);
1090
- __decorate([
1091
- profile,
1092
- __metadata("design:type", Function),
1093
- __metadata("design:paramtypes", []),
1094
- __metadata("design:returntype", void 0)
1095
- ], ViewBase.prototype, "onUnloaded", null);
1096
- __decorate([
1097
- profile,
1098
- __metadata("design:type", Function),
1099
- __metadata("design:paramtypes", [String]),
1100
- __metadata("design:returntype", void 0)
1101
- ], ViewBase.prototype, "addPseudoClass", null);
1102
- __decorate([
1103
- profile,
1104
- __metadata("design:type", Function),
1105
- __metadata("design:paramtypes", [String]),
1106
- __metadata("design:returntype", void 0)
1107
- ], ViewBase.prototype, "deletePseudoClass", null);
1108
- __decorate([
1109
- profile,
1110
- __metadata("design:type", Function),
1111
- __metadata("design:paramtypes", []),
1112
- __metadata("design:returntype", void 0)
1113
- ], ViewBase.prototype, "requestLayout", null);
1114
- __decorate([
1115
- profile,
1116
- __metadata("design:type", Function),
1117
- __metadata("design:paramtypes", [ViewBase, Number]),
1118
- __metadata("design:returntype", void 0)
1119
- ], ViewBase.prototype, "_addView", null);
1120
- __decorate([
1121
- profile,
1122
- __metadata("design:type", Function),
1123
- __metadata("design:paramtypes", [Object, Number, Boolean]),
1124
- __metadata("design:returntype", void 0)
1125
- ], ViewBase.prototype, "_setupUI", null);
1126
- __decorate([
1127
- profile,
1128
- __metadata("design:type", Function),
1129
- __metadata("design:paramtypes", [Boolean]),
1130
- __metadata("design:returntype", void 0)
1131
- ], ViewBase.prototype, "_tearDownUI", null);
1132
- return ViewBase;
1133
- }(Observable));
1134
- export { ViewBase };
1006
+ }
1007
+ }
1008
+ /**
1009
+ * String value used when hooking to loaded event.
1010
+ *
1011
+ * @nsEvent loaded
1012
+ */
1013
+ ViewBase.loadedEvent = 'loaded';
1014
+ /**
1015
+ * String value used when hooking to unloaded event.
1016
+ *
1017
+ * @nsEvent unloaded
1018
+ */
1019
+ ViewBase.unloadedEvent = 'unloaded';
1020
+ /**
1021
+ * String value used when hooking to creation event
1022
+ *
1023
+ * @nsEvent created
1024
+ */
1025
+ ViewBase.createdEvent = 'created';
1026
+ /**
1027
+ * String value used when hooking to disposeNativeView event
1028
+ *
1029
+ * @nsEvent disposeNativeView
1030
+ */
1031
+ ViewBase.disposeNativeViewEvent = 'disposeNativeView';
1032
+ __decorate([
1033
+ profile,
1034
+ __metadata("design:type", Function),
1035
+ __metadata("design:paramtypes", []),
1036
+ __metadata("design:returntype", void 0)
1037
+ ], ViewBase.prototype, "onLoaded", null);
1038
+ __decorate([
1039
+ profile,
1040
+ __metadata("design:type", Function),
1041
+ __metadata("design:paramtypes", []),
1042
+ __metadata("design:returntype", void 0)
1043
+ ], ViewBase.prototype, "onUnloaded", null);
1044
+ __decorate([
1045
+ profile,
1046
+ __metadata("design:type", Function),
1047
+ __metadata("design:paramtypes", [String]),
1048
+ __metadata("design:returntype", void 0)
1049
+ ], ViewBase.prototype, "addPseudoClass", null);
1050
+ __decorate([
1051
+ profile,
1052
+ __metadata("design:type", Function),
1053
+ __metadata("design:paramtypes", [String]),
1054
+ __metadata("design:returntype", void 0)
1055
+ ], ViewBase.prototype, "deletePseudoClass", null);
1056
+ __decorate([
1057
+ profile,
1058
+ __metadata("design:type", Function),
1059
+ __metadata("design:paramtypes", []),
1060
+ __metadata("design:returntype", void 0)
1061
+ ], ViewBase.prototype, "requestLayout", null);
1062
+ __decorate([
1063
+ profile,
1064
+ __metadata("design:type", Function),
1065
+ __metadata("design:paramtypes", [ViewBase, Number]),
1066
+ __metadata("design:returntype", void 0)
1067
+ ], ViewBase.prototype, "_addView", null);
1068
+ __decorate([
1069
+ profile,
1070
+ __metadata("design:type", Function),
1071
+ __metadata("design:paramtypes", [Object, Number, Boolean]),
1072
+ __metadata("design:returntype", void 0)
1073
+ ], ViewBase.prototype, "_setupUI", null);
1074
+ __decorate([
1075
+ profile,
1076
+ __metadata("design:type", Function),
1077
+ __metadata("design:paramtypes", [Boolean]),
1078
+ __metadata("design:returntype", void 0)
1079
+ ], ViewBase.prototype, "_tearDownUI", null);
1135
1080
  ViewBase.prototype.isCollapsed = false;
1136
1081
  ViewBase.prototype._oldLeft = 0;
1137
1082
  ViewBase.prototype._oldTop = 0;
@@ -1161,29 +1106,29 @@ ViewBase.prototype._isViewBase = true;
1161
1106
  ViewBase.prototype.recycleNativeView = 'never';
1162
1107
  ViewBase.prototype.reusable = false;
1163
1108
  ViewBase.prototype._suspendNativeUpdatesCount = SuspendType.Loaded | SuspendType.NativeView | SuspendType.UISetup;
1164
- export var bindingContextProperty = new InheritedProperty({
1109
+ export const bindingContextProperty = new InheritedProperty({
1165
1110
  name: 'bindingContext',
1166
1111
  });
1167
1112
  bindingContextProperty.register(ViewBase);
1168
- export var hiddenProperty = new Property({
1113
+ export const hiddenProperty = new Property({
1169
1114
  name: 'hidden',
1170
1115
  defaultValue: false,
1171
1116
  affectsLayout: __APPLE__,
1172
1117
  valueConverter: booleanConverter,
1173
- valueChanged: function (target, oldValue, newValue) {
1118
+ valueChanged: (target, oldValue, newValue) => {
1174
1119
  if (target) {
1175
1120
  target.isCollapsed = !!newValue;
1176
1121
  }
1177
1122
  },
1178
1123
  });
1179
1124
  hiddenProperty.register(ViewBase);
1180
- export var classNameProperty = new Property({
1125
+ export const classNameProperty = new Property({
1181
1126
  name: 'className',
1182
- valueChanged: function (view, oldValue, newValue) {
1183
- var cssClasses = view.cssClasses;
1184
- var rootViewsCssClasses = CSSUtils.getSystemCssClasses();
1185
- var shouldAddModalRootViewCssClasses = cssClasses.has(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
1186
- var shouldAddRootViewCssClasses = cssClasses.has(CSSUtils.ROOT_VIEW_CSS_CLASS);
1127
+ valueChanged(view, oldValue, newValue) {
1128
+ const cssClasses = view.cssClasses;
1129
+ const rootViewsCssClasses = CSSUtils.getSystemCssClasses();
1130
+ const shouldAddModalRootViewCssClasses = cssClasses.has(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
1131
+ const shouldAddRootViewCssClasses = cssClasses.has(CSSUtils.ROOT_VIEW_CSS_CLASS);
1187
1132
  cssClasses.clear();
1188
1133
  if (shouldAddModalRootViewCssClasses) {
1189
1134
  cssClasses.add(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
@@ -1191,24 +1136,24 @@ export var classNameProperty = new Property({
1191
1136
  else if (shouldAddRootViewCssClasses) {
1192
1137
  cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);
1193
1138
  }
1194
- rootViewsCssClasses.forEach(function (c) { return cssClasses.add(c); });
1139
+ rootViewsCssClasses.forEach((c) => cssClasses.add(c));
1195
1140
  if (typeof newValue === 'string' && newValue !== '') {
1196
- newValue.split(' ').forEach(function (c) { return cssClasses.add(c); });
1141
+ newValue.split(' ').forEach((c) => cssClasses.add(c));
1197
1142
  }
1198
1143
  view._onCssStateChange();
1199
1144
  },
1200
1145
  });
1201
1146
  classNameProperty.register(ViewBase);
1202
- export var idProperty = new Property({
1147
+ export const idProperty = new Property({
1203
1148
  name: 'id',
1204
- valueChanged: function (view, oldValue, newValue) { return view._onCssStateChange(); },
1149
+ valueChanged: (view, oldValue, newValue) => view._onCssStateChange(),
1205
1150
  });
1206
1151
  idProperty.register(ViewBase);
1207
- export var defaultVisualStateProperty = new Property({
1152
+ export const defaultVisualStateProperty = new Property({
1208
1153
  name: 'defaultVisualState',
1209
1154
  defaultValue: 'normal',
1210
- valueChanged: function (target, oldValue, newValue) {
1211
- var value = newValue || 'normal';
1155
+ valueChanged(target, oldValue, newValue) {
1156
+ const value = newValue || 'normal';
1212
1157
  // Append new default if old one is currently applied
1213
1158
  if (target.cssPseudoClasses && target.cssPseudoClasses.has(oldValue)) {
1214
1159
  target.deletePseudoClass(oldValue);
@@ -1218,13 +1163,13 @@ export var defaultVisualStateProperty = new Property({
1218
1163
  });
1219
1164
  defaultVisualStateProperty.register(ViewBase);
1220
1165
  export function booleanConverter(v) {
1221
- var lowercase = (v + '').toLowerCase();
1166
+ const lowercase = (v + '').toLowerCase();
1222
1167
  if (lowercase === 'true') {
1223
1168
  return true;
1224
1169
  }
1225
1170
  else if (lowercase === 'false') {
1226
1171
  return false;
1227
1172
  }
1228
- throw new Error("Invalid boolean: ".concat(v));
1173
+ throw new Error(`Invalid boolean: ${v}`);
1229
1174
  }
1230
1175
  //# sourceMappingURL=index.js.map