@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
@@ -19,25 +19,25 @@ export * from './view-common';
19
19
  export * from './view-helper';
20
20
  // This one can eventually be cleaned up but causes issues with a lot of ui-suite plugins in particular if not exported here
21
21
  export * from '../properties';
22
- var DOMID = '_domId';
23
- var androidBackPressedEvent = 'androidBackPressed';
24
- var shortAnimTime = 17694720; // android.R.integer.config_shortAnimTime
25
- var statePressed = 16842919; // android.R.attr.state_pressed
26
- var stateEnabled = 16842910; // android.R.attr.state_enabled
27
- var styleAnimationDialog = 16973826; // android.R.style.Animation_Dialog
28
- var VERTICAL_GRAVITY_MASK = 112; // android.view.Gravity.VERTICAL_GRAVITY_MASK
29
- var HORIZONTAL_GRAVITY_MASK = 7; // android.view.Gravity.HORIZONTAL_GRAVITY_MASK
30
- var GRAVITY_LEFT = 3; // android.view.Gravity.LEFT
31
- var GRAVITY_RIGHT = 5; // android.view.Gravity.RIGHT
32
- var GRAVITY_TOP = 48; // android.view.Gravity.TOP
33
- var GRAVITY_BOTTOM = 80; // android.view.Gravity.BOTTOM
34
- var GRAVITY_CENTER_HORIZONTAL = 1; // android.view.Gravity.CENTER_HORIZONTAL
35
- var GRAVITY_FILL_HORIZONTAL = 7; // android.view.Gravity.FILL_HORIZONTAL
36
- var GRAVITY_CENTER_VERTICAL = 16; // android.view.Gravity.CENTER_VERTICAL
37
- var GRAVITY_FILL_VERTICAL = 112; // android.view.Gravity.FILL_VERTICAL
38
- var modalMap = new Map();
39
- var TouchListener;
40
- var DialogFragment;
22
+ const DOMID = '_domId';
23
+ const androidBackPressedEvent = 'androidBackPressed';
24
+ const shortAnimTime = 17694720; // android.R.integer.config_shortAnimTime
25
+ const statePressed = 16842919; // android.R.attr.state_pressed
26
+ const stateEnabled = 16842910; // android.R.attr.state_enabled
27
+ const styleAnimationDialog = 16973826; // android.R.style.Animation_Dialog
28
+ const VERTICAL_GRAVITY_MASK = 112; // android.view.Gravity.VERTICAL_GRAVITY_MASK
29
+ const HORIZONTAL_GRAVITY_MASK = 7; // android.view.Gravity.HORIZONTAL_GRAVITY_MASK
30
+ const GRAVITY_LEFT = 3; // android.view.Gravity.LEFT
31
+ const GRAVITY_RIGHT = 5; // android.view.Gravity.RIGHT
32
+ const GRAVITY_TOP = 48; // android.view.Gravity.TOP
33
+ const GRAVITY_BOTTOM = 80; // android.view.Gravity.BOTTOM
34
+ const GRAVITY_CENTER_HORIZONTAL = 1; // android.view.Gravity.CENTER_HORIZONTAL
35
+ const GRAVITY_FILL_HORIZONTAL = 7; // android.view.Gravity.FILL_HORIZONTAL
36
+ const GRAVITY_CENTER_VERTICAL = 16; // android.view.Gravity.CENTER_VERTICAL
37
+ const GRAVITY_FILL_VERTICAL = 112; // android.view.Gravity.FILL_VERTICAL
38
+ const modalMap = new Map();
39
+ let TouchListener;
40
+ let DialogFragment;
41
41
  function initializeTouchListener() {
42
42
  if (TouchListener) {
43
43
  return;
@@ -239,55 +239,51 @@ function removeModal(domId) {
239
239
  function getModalOptions(domId) {
240
240
  return modalMap.get(domId);
241
241
  }
242
- var View = /** @class */ (function (_super) {
243
- __extends(View, _super);
244
- function View() {
245
- return _super !== null && _super.apply(this, arguments) || this;
246
- }
242
+ export class View extends ViewCommon {
247
243
  // TODO: Implement unobserve that detach the touchListener.
248
- View.prototype._observe = function (type, callback, thisArg) {
249
- _super.prototype._observe.call(this, type, callback, thisArg);
244
+ _observe(type, callback, thisArg) {
245
+ super._observe(type, callback, thisArg);
250
246
  if (this.isLoaded && !this.touchListenerIsSet) {
251
247
  this.setOnTouchListener();
252
248
  }
253
- };
254
- View.prototype.addEventListener = function (eventNames, callback, thisArg) {
255
- _super.prototype.addEventListener.call(this, eventNames, callback, thisArg);
256
- var isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
249
+ }
250
+ addEventListener(eventNames, callback, thisArg) {
251
+ super.addEventListener(eventNames, callback, thisArg);
252
+ const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
257
253
  if (this.isLoaded && !this.layoutChangeListenerIsSet && isLayoutEvent) {
258
254
  this.setOnLayoutChangeListener();
259
255
  }
260
- };
261
- View.prototype.removeEventListener = function (eventNames, callback, thisArg) {
262
- _super.prototype.removeEventListener.call(this, eventNames, callback, thisArg);
263
- var isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
256
+ }
257
+ removeEventListener(eventNames, callback, thisArg) {
258
+ super.removeEventListener(eventNames, callback, thisArg);
259
+ const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
264
260
  // Remove native listener only if there are no more user listeners for LayoutChanged event
265
261
  if (this.isLoaded && this.layoutChangeListenerIsSet && isLayoutEvent && !this.needsOnLayoutChangeListener()) {
266
262
  this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
267
263
  this.layoutChangeListenerIsSet = false;
268
264
  }
269
- };
270
- View.prototype._getChildFragmentManager = function () {
265
+ }
266
+ _getChildFragmentManager() {
271
267
  return null;
272
- };
273
- View.prototype._getRootFragmentManager = function () {
268
+ }
269
+ _getRootFragmentManager() {
274
270
  if (!this._rootManager && this._context) {
275
271
  this._rootManager = this._context.getSupportFragmentManager();
276
272
  }
277
273
  return this._rootManager;
278
- };
279
- View.prototype._getFragmentManager = function () {
280
- var manager = this._manager;
274
+ }
275
+ _getFragmentManager() {
276
+ let manager = this._manager;
281
277
  if (!manager) {
282
- var view = this;
283
- var frameOrTabViewItemFound = false;
278
+ let view = this;
279
+ let frameOrTabViewItemFound = false;
284
280
  while (view) {
285
281
  // when interacting with nested fragments instead of using getSupportFragmentManager
286
282
  // we must always use getChildFragmentManager instead;
287
283
  // we have three sources of fragments -- Frame fragments, TabViewItem fragments, and
288
284
  // modal dialog fragments
289
285
  // modal -> frame / tabview (frame / tabview use modal CHILD fm)
290
- var dialogFragment = view._dialogFragment;
286
+ const dialogFragment = view._dialogFragment;
291
287
  if (dialogFragment) {
292
288
  manager = dialogFragment.getChildFragmentManager();
293
289
  break;
@@ -313,51 +309,51 @@ var View = /** @class */ (function (_super) {
313
309
  this._manager = manager;
314
310
  }
315
311
  return manager;
316
- };
317
- View.prototype.onLoaded = function () {
312
+ }
313
+ onLoaded() {
318
314
  this._manager = null;
319
315
  this._rootManager = null;
320
- _super.prototype.onLoaded.call(this);
316
+ super.onLoaded();
321
317
  this.setOnTouchListener();
322
- };
323
- View.prototype.onUnloaded = function () {
318
+ }
319
+ onUnloaded() {
324
320
  this._manager = null;
325
321
  this._rootManager = null;
326
- _super.prototype.onUnloaded.call(this);
327
- };
328
- View.prototype.onBackPressed = function () {
329
- var topmostFrame = topmost();
322
+ super.onUnloaded();
323
+ }
324
+ onBackPressed() {
325
+ const topmostFrame = topmost();
330
326
  // Delegate back navigation handling to the topmost Frame
331
327
  // when it's a child of the current View.
332
328
  if (topmostFrame && topmostFrame._hasAncestorView(this)) {
333
329
  return topmostFrame.onBackPressed();
334
330
  }
335
331
  return false;
336
- };
337
- View.prototype.handleGestureTouch = function (event) {
338
- for (var type in this._gestureObservers) {
339
- var list = this._gestureObservers[type];
340
- list.forEach(function (element) {
332
+ }
333
+ handleGestureTouch(event) {
334
+ for (const type in this._gestureObservers) {
335
+ const list = this._gestureObservers[type];
336
+ list.forEach((element) => {
341
337
  element.androidOnTouchEvent(event);
342
338
  });
343
339
  }
344
340
  if (this.parent instanceof View) {
345
341
  this.parent.handleGestureTouch(event);
346
342
  }
347
- };
348
- View.prototype.hasGestureObservers = function () {
343
+ }
344
+ hasGestureObservers() {
349
345
  return this._gestureObservers && Object.keys(this._gestureObservers).length > 0;
350
- };
351
- View.prototype.initNativeView = function () {
352
- _super.prototype.initNativeView.call(this);
346
+ }
347
+ initNativeView() {
348
+ super.initNativeView();
353
349
  if (this.needsOnLayoutChangeListener()) {
354
350
  this.setOnLayoutChangeListener();
355
351
  }
356
- };
357
- View.prototype.needsOnLayoutChangeListener = function () {
352
+ }
353
+ needsOnLayoutChangeListener() {
358
354
  return this.hasListeners(ViewCommon.layoutChangedEvent);
359
- };
360
- View.prototype.disposeNativeView = function () {
355
+ }
356
+ disposeNativeView() {
361
357
  if (this.touchListenerIsSet) {
362
358
  this.touchListenerIsSet = false;
363
359
  if (this.nativeViewProtected) {
@@ -371,9 +367,9 @@ var View = /** @class */ (function (_super) {
371
367
  this.layoutChangeListener = null;
372
368
  }
373
369
  }
374
- _super.prototype.disposeNativeView.call(this);
375
- };
376
- View.prototype.setOnTouchListener = function () {
370
+ super.disposeNativeView();
371
+ }
372
+ setOnTouchListener() {
377
373
  if (this.touchListenerIsSet || !this.nativeViewProtected || !this.hasGestureObservers()) {
378
374
  return;
379
375
  }
@@ -386,80 +382,68 @@ var View = /** @class */ (function (_super) {
386
382
  if (this.nativeViewProtected.setClickable) {
387
383
  this.nativeViewProtected.setClickable(this.isUserInteractionEnabled);
388
384
  }
389
- };
390
- View.prototype.setOnLayoutChangeListener = function () {
385
+ }
386
+ setOnLayoutChangeListener() {
391
387
  if (this.nativeViewProtected) {
392
- var owner_1 = this;
388
+ const owner = this;
393
389
  this.layoutChangeListenerIsSet = true;
394
390
  this.layoutChangeListener =
395
391
  this.layoutChangeListener ||
396
392
  new android.view.View.OnLayoutChangeListener({
397
- onLayoutChange: function (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) {
393
+ onLayoutChange(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) {
398
394
  if (left !== oldLeft || top !== oldTop || right !== oldRight || bottom !== oldBottom) {
399
- owner_1._raiseLayoutChangedEvent();
395
+ owner._raiseLayoutChangedEvent();
400
396
  }
401
397
  },
402
398
  });
403
399
  this.nativeViewProtected.addOnLayoutChangeListener(this.layoutChangeListener);
404
400
  }
405
- };
406
- Object.defineProperty(View.prototype, "isLayoutRequired", {
407
- get: function () {
408
- return !this.isLayoutValid;
409
- },
410
- enumerable: false,
411
- configurable: true
412
- });
413
- Object.defineProperty(View.prototype, "isLayoutValid", {
414
- get: function () {
415
- if (this.nativeViewProtected) {
416
- return !this.nativeViewProtected.isLayoutRequested();
417
- }
418
- return false;
419
- },
420
- enumerable: false,
421
- configurable: true
422
- });
423
- Object.defineProperty(View.prototype, "_hasFragments", {
424
- get: function () {
425
- return false;
426
- },
427
- enumerable: false,
428
- configurable: true
429
- });
430
- View.prototype.layoutNativeView = function (left, top, right, bottom) {
401
+ }
402
+ get isLayoutRequired() {
403
+ return !this.isLayoutValid;
404
+ }
405
+ get isLayoutValid() {
406
+ if (this.nativeViewProtected) {
407
+ return !this.nativeViewProtected.isLayoutRequested();
408
+ }
409
+ return false;
410
+ }
411
+ get _hasFragments() {
412
+ return false;
413
+ }
414
+ layoutNativeView(left, top, right, bottom) {
431
415
  if (this.nativeViewProtected) {
432
416
  this.nativeViewProtected.layout(left, top, right, bottom);
433
417
  }
434
- };
435
- View.prototype.requestLayout = function () {
436
- _super.prototype.requestLayout.call(this);
418
+ }
419
+ requestLayout() {
420
+ super.requestLayout();
437
421
  if (this.nativeViewProtected) {
438
422
  this.nativeViewProtected.requestLayout();
439
423
  }
440
- };
441
- View.prototype.measure = function (widthMeasureSpec, heightMeasureSpec) {
442
- _super.prototype.measure.call(this, widthMeasureSpec, heightMeasureSpec);
424
+ }
425
+ measure(widthMeasureSpec, heightMeasureSpec) {
426
+ super.measure(widthMeasureSpec, heightMeasureSpec);
443
427
  this.onMeasure(widthMeasureSpec, heightMeasureSpec);
444
- };
445
- View.prototype.layout = function (left, top, right, bottom) {
446
- _super.prototype.layout.call(this, left, top, right, bottom);
428
+ }
429
+ layout(left, top, right, bottom) {
430
+ super.layout(left, top, right, bottom);
447
431
  this.onLayout(left, top, right, bottom);
448
- };
449
- View.prototype.onMeasure = function (widthMeasureSpec, heightMeasureSpec) {
450
- var view = this.nativeViewProtected;
432
+ }
433
+ onMeasure(widthMeasureSpec, heightMeasureSpec) {
434
+ const view = this.nativeViewProtected;
451
435
  if (view) {
452
436
  view.measure(widthMeasureSpec, heightMeasureSpec);
453
437
  this.setMeasuredDimension(view.getMeasuredWidth(), view.getMeasuredHeight());
454
438
  }
455
- };
456
- View.prototype.onLayout = function (left, top, right, bottom) {
457
- var view = this.nativeViewProtected;
439
+ }
440
+ onLayout(left, top, right, bottom) {
441
+ const view = this.nativeViewProtected;
458
442
  if (view) {
459
443
  this.layoutNativeView(left, top, right, bottom);
460
444
  }
461
- };
462
- View.prototype._getCurrentLayoutBounds = function () {
445
+ }
446
+ _getCurrentLayoutBounds() {
463
447
  if (this.nativeViewProtected && !this.isCollapsed) {
464
448
  return {
465
449
  left: this.nativeViewProtected.getLeft(),
@@ -471,62 +455,62 @@ var View = /** @class */ (function (_super) {
471
455
  else {
472
456
  return { left: 0, top: 0, right: 0, bottom: 0 };
473
457
  }
474
- };
475
- View.prototype.getMeasuredWidth = function () {
458
+ }
459
+ getMeasuredWidth() {
476
460
  if (this.nativeViewProtected) {
477
461
  return this.nativeViewProtected.getMeasuredWidth();
478
462
  }
479
- return _super.prototype.getMeasuredWidth.call(this);
480
- };
481
- View.prototype.getMeasuredHeight = function () {
463
+ return super.getMeasuredWidth();
464
+ }
465
+ getMeasuredHeight() {
482
466
  if (this.nativeViewProtected) {
483
467
  return this.nativeViewProtected.getMeasuredHeight();
484
468
  }
485
- return _super.prototype.getMeasuredHeight.call(this);
486
- };
487
- View.prototype.focus = function () {
469
+ return super.getMeasuredHeight();
470
+ }
471
+ focus() {
488
472
  if (this.nativeViewProtected) {
489
473
  return this.nativeViewProtected.requestFocus();
490
474
  }
491
475
  return false;
492
- };
493
- View.prototype.getLocationInWindow = function () {
476
+ }
477
+ getLocationInWindow() {
494
478
  if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
495
479
  return undefined;
496
480
  }
497
- var nativeArray = Array.create('int', 2);
481
+ const nativeArray = Array.create('int', 2);
498
482
  this.nativeViewProtected.getLocationInWindow(nativeArray);
499
483
  return {
500
484
  x: layout.toDeviceIndependentPixels(nativeArray[0]),
501
485
  y: layout.toDeviceIndependentPixels(nativeArray[1]),
502
486
  };
503
- };
504
- View.prototype.getLocationOnScreen = function () {
487
+ }
488
+ getLocationOnScreen() {
505
489
  if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
506
490
  return undefined;
507
491
  }
508
- var nativeArray = Array.create('int', 2);
492
+ const nativeArray = Array.create('int', 2);
509
493
  this.nativeViewProtected.getLocationOnScreen(nativeArray);
510
494
  return {
511
495
  x: layout.toDeviceIndependentPixels(nativeArray[0]),
512
496
  y: layout.toDeviceIndependentPixels(nativeArray[1]),
513
497
  };
514
- };
515
- View.prototype.getLocationRelativeTo = function (otherView) {
498
+ }
499
+ getLocationRelativeTo(otherView) {
516
500
  if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken() || !otherView || !otherView.nativeViewProtected || !otherView.nativeViewProtected.getWindowToken() || this.nativeViewProtected.getWindowToken() !== otherView.nativeViewProtected.getWindowToken()) {
517
501
  return undefined;
518
502
  }
519
- var myArray = Array.create('int', 2);
503
+ const myArray = Array.create('int', 2);
520
504
  this.nativeViewProtected.getLocationOnScreen(myArray);
521
- var otherArray = Array.create('int', 2);
505
+ const otherArray = Array.create('int', 2);
522
506
  otherView.nativeViewProtected.getLocationOnScreen(otherArray);
523
507
  return {
524
508
  x: layout.toDeviceIndependentPixels(myArray[0] - otherArray[0]),
525
509
  y: layout.toDeviceIndependentPixels(myArray[1] - otherArray[1]),
526
510
  };
527
- };
528
- View.resolveSizeAndState = function (size, specSize, specMode, childMeasuredState) {
529
- var result = size;
511
+ }
512
+ static resolveSizeAndState(size, specSize, specMode, childMeasuredState) {
513
+ let result = size;
530
514
  switch (specMode) {
531
515
  case layout.UNSPECIFIED:
532
516
  result = size;
@@ -541,28 +525,27 @@ var View = /** @class */ (function (_super) {
541
525
  break;
542
526
  }
543
527
  return result | (childMeasuredState & layout.MEASURED_STATE_MASK);
544
- };
545
- View.prototype._showNativeModalView = function (parent, options) {
546
- var _this = this;
528
+ }
529
+ _showNativeModalView(parent, options) {
547
530
  // if the app is in background while triggering _showNativeModalView
548
531
  // then DialogFragment.show will trigger IllegalStateException: Can not perform this action after onSaveInstanceState
549
532
  // so if in background we create an event to call _showNativeModalView when loaded (going back in foreground)
550
533
  if (Application.inBackground && !parent.isLoaded) {
551
- var onLoaded_1 = function () {
552
- parent.off('loaded', onLoaded_1);
553
- _this._showNativeModalView(parent, options);
534
+ const onLoaded = () => {
535
+ parent.off('loaded', onLoaded);
536
+ this._showNativeModalView(parent, options);
554
537
  };
555
- parent.on('loaded', onLoaded_1);
538
+ parent.on('loaded', onLoaded);
556
539
  return;
557
540
  }
558
- _super.prototype._showNativeModalView.call(this, parent, options);
541
+ super._showNativeModalView(parent, options);
559
542
  initializeDialogFragment();
560
- var df = new DialogFragment();
561
- var args = new android.os.Bundle();
543
+ const df = new DialogFragment();
544
+ const args = new android.os.Bundle();
562
545
  args.putInt(DOMID, this._domId);
563
546
  df.setArguments(args);
564
- var cancelable = true;
565
- var windowSoftInputMode;
547
+ let cancelable = true;
548
+ let windowSoftInputMode;
566
549
  if (options.android) {
567
550
  if (options.android.cancelable !== undefined) {
568
551
  cancelable = !!options.android.cancelable;
@@ -571,58 +554,58 @@ var View = /** @class */ (function (_super) {
571
554
  windowSoftInputMode = options.android.windowSoftInputMode;
572
555
  }
573
556
  cancelable = options.cancelable !== undefined ? !!options.cancelable : cancelable;
574
- var dialogOptions = {
557
+ const dialogOptions = {
575
558
  owner: this,
576
559
  fullscreen: !!options.fullscreen,
577
560
  animated: !!options.animated,
578
561
  stretched: !!options.stretched,
579
562
  cancelable: cancelable,
580
563
  windowSoftInputMode: windowSoftInputMode,
581
- shownCallback: function () { return _this._raiseShownModallyEvent(); },
582
- dismissCallback: function () { return _this.closeModal(); },
564
+ shownCallback: () => this._raiseShownModallyEvent(),
565
+ dismissCallback: () => this.closeModal(),
583
566
  };
584
567
  saveModal(dialogOptions);
585
568
  this._dialogFragment = df;
586
569
  this._raiseShowingModallyEvent();
587
570
  this._dialogFragment.show(parent._getRootFragmentManager(), this._domId.toString());
588
- };
589
- View.prototype._hideNativeModalView = function (parent, whenClosedCallback) {
571
+ }
572
+ _hideNativeModalView(parent, whenClosedCallback) {
590
573
  if (this._dialogFragment) {
591
- var manager = this._dialogFragment.getFragmentManager();
574
+ const manager = this._dialogFragment.getFragmentManager();
592
575
  if (manager) {
593
576
  this._dialogFragment.dismissAllowingStateLoss();
594
577
  }
595
578
  }
596
579
  this._dialogFragment = null;
597
580
  whenClosedCallback();
598
- };
599
- View.prototype[isEnabledProperty.setNative] = function (value) {
581
+ }
582
+ [isEnabledProperty.setNative](value) {
600
583
  this.nativeViewProtected.setEnabled(value);
601
- };
602
- View.prototype[originXProperty.getDefault] = function () {
584
+ }
585
+ [originXProperty.getDefault]() {
603
586
  return this.nativeViewProtected.getPivotX();
604
- };
605
- View.prototype[originXProperty.setNative] = function (value) {
587
+ }
588
+ [originXProperty.setNative](value) {
606
589
  org.nativescript.widgets.OriginPoint.setX(this.nativeViewProtected, value);
607
- };
608
- View.prototype[originYProperty.getDefault] = function () {
590
+ }
591
+ [originYProperty.getDefault]() {
609
592
  return this.nativeViewProtected.getPivotY();
610
- };
611
- View.prototype[originYProperty.setNative] = function (value) {
593
+ }
594
+ [originYProperty.setNative](value) {
612
595
  org.nativescript.widgets.OriginPoint.setY(this.nativeViewProtected, value);
613
- };
614
- View.prototype[isUserInteractionEnabledProperty.setNative] = function (value) {
596
+ }
597
+ [isUserInteractionEnabledProperty.setNative](value) {
615
598
  this.nativeViewProtected.setClickable(value);
616
599
  this.nativeViewProtected.setFocusable(value);
617
- };
618
- View.prototype[hiddenProperty.getDefault] = function () {
600
+ }
601
+ [hiddenProperty.getDefault]() {
619
602
  return this.nativeViewProtected.getVisibility() === android.view.View.GONE;
620
- };
621
- View.prototype[hiddenProperty.setNative] = function (value) {
603
+ }
604
+ [hiddenProperty.setNative](value) {
622
605
  this.nativeViewProtected.setVisibility(value ? android.view.View.GONE : android.view.View.VISIBLE);
623
- };
624
- View.prototype[visibilityProperty.getDefault] = function () {
625
- var nativeVisibility = this.nativeViewProtected.getVisibility();
606
+ }
607
+ [visibilityProperty.getDefault]() {
608
+ const nativeVisibility = this.nativeViewProtected.getVisibility();
626
609
  switch (nativeVisibility) {
627
610
  case android.view.View.VISIBLE:
628
611
  return 'visible';
@@ -631,10 +614,10 @@ var View = /** @class */ (function (_super) {
631
614
  case android.view.View.GONE:
632
615
  return 'collapse';
633
616
  default:
634
- throw new Error("Unsupported android.view.View visibility: ".concat(nativeVisibility, ". Currently supported values are android.view.View.VISIBLE, android.view.View.INVISIBLE, android.view.View.GONE."));
617
+ throw new Error(`Unsupported android.view.View visibility: ${nativeVisibility}. Currently supported values are android.view.View.VISIBLE, android.view.View.INVISIBLE, android.view.View.GONE.`);
635
618
  }
636
- };
637
- View.prototype[visibilityProperty.setNative] = function (value) {
619
+ }
620
+ [visibilityProperty.setNative](value) {
638
621
  switch (value) {
639
622
  case 'visible':
640
623
  this.nativeViewProtected.setVisibility(android.view.View.VISIBLE);
@@ -646,20 +629,20 @@ var View = /** @class */ (function (_super) {
646
629
  this.nativeViewProtected.setVisibility(android.view.View.GONE);
647
630
  break;
648
631
  default:
649
- throw new Error("Invalid visibility value: ".concat(value, ". Valid values are: visible, hidden, collapse."));
632
+ throw new Error(`Invalid visibility value: ${value}. Valid values are: visible, hidden, collapse.`);
650
633
  }
651
- };
652
- View.prototype[opacityProperty.getDefault] = function () {
634
+ }
635
+ [opacityProperty.getDefault]() {
653
636
  return this.nativeViewProtected.getAlpha();
654
- };
655
- View.prototype[opacityProperty.setNative] = function (value) {
637
+ }
638
+ [opacityProperty.setNative](value) {
656
639
  this.nativeViewProtected.setAlpha(float(value));
657
- };
658
- View.prototype[testIDProperty.setNative] = function (value) {
640
+ }
641
+ [testIDProperty.setNative](value) {
659
642
  this.setAccessibilityIdentifier(this.nativeViewProtected, value);
660
- };
661
- View.prototype.setAccessibilityIdentifier = function (view, value) {
662
- var id = Utils.android.resources.getId(':id/nativescript_accessibility_id');
643
+ }
644
+ setAccessibilityIdentifier(view, value) {
645
+ const id = Utils.android.resources.getId(':id/nativescript_accessibility_id');
663
646
  if (id) {
664
647
  view.setTag(id, value);
665
648
  view.setTag(value);
@@ -668,43 +651,42 @@ var View = /** @class */ (function (_super) {
668
651
  this.testID = value;
669
652
  if (this.accessibilityIdentifier !== value)
670
653
  this.accessibilityIdentifier = value;
671
- };
672
- View.prototype[accessibilityEnabledProperty.setNative] = function (value) {
654
+ }
655
+ [accessibilityEnabledProperty.setNative](value) {
673
656
  this.nativeViewProtected.setFocusable(!!value);
674
657
  updateAccessibilityProperties(this);
675
- };
676
- View.prototype[accessibilityIdentifierProperty.setNative] = function (value) {
658
+ }
659
+ [accessibilityIdentifierProperty.setNative](value) {
677
660
  this.setAccessibilityIdentifier(this.nativeViewProtected, value);
678
- };
679
- View.prototype[accessibilityRoleProperty.setNative] = function (value) {
680
- var _a;
661
+ }
662
+ [accessibilityRoleProperty.setNative](value) {
681
663
  this.accessibilityRole = value;
682
664
  updateAccessibilityProperties(this);
683
665
  if (SDK_VERSION >= 28) {
684
- (_a = this.nativeViewProtected) === null || _a === void 0 ? void 0 : _a.setAccessibilityHeading(value === AccessibilityRole.Header);
666
+ this.nativeViewProtected?.setAccessibilityHeading(value === AccessibilityRole.Header);
685
667
  }
686
- };
687
- View.prototype[accessibilityValueProperty.setNative] = function () {
668
+ }
669
+ [accessibilityValueProperty.setNative]() {
688
670
  this._androidContentDescriptionUpdated = true;
689
671
  updateContentDescription(this);
690
- };
691
- View.prototype[accessibilityLabelProperty.setNative] = function () {
672
+ }
673
+ [accessibilityLabelProperty.setNative]() {
692
674
  this._androidContentDescriptionUpdated = true;
693
675
  updateContentDescription(this);
694
- };
695
- View.prototype[accessibilityHintProperty.setNative] = function () {
676
+ }
677
+ [accessibilityHintProperty.setNative]() {
696
678
  this._androidContentDescriptionUpdated = true;
697
679
  updateContentDescription(this);
698
- };
699
- View.prototype[accessibilityHiddenProperty.setNative] = function (value) {
680
+ }
681
+ [accessibilityHiddenProperty.setNative](value) {
700
682
  if (value) {
701
683
  this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
702
684
  }
703
685
  else {
704
686
  this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES);
705
687
  }
706
- };
707
- View.prototype[accessibilityLiveRegionProperty.setNative] = function (value) {
688
+ }
689
+ [accessibilityLiveRegionProperty.setNative](value) {
708
690
  switch (value) {
709
691
  case AccessibilityLiveRegion.Assertive: {
710
692
  this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_ASSERTIVE);
@@ -719,84 +701,84 @@ var View = /** @class */ (function (_super) {
719
701
  break;
720
702
  }
721
703
  }
722
- };
723
- View.prototype[accessibilityStateProperty.setNative] = function (value) {
704
+ }
705
+ [accessibilityStateProperty.setNative](value) {
724
706
  this.accessibilityState = value;
725
707
  updateAccessibilityProperties(this);
726
- };
727
- View.prototype[accessibilityMediaSessionProperty.setNative] = function () {
708
+ }
709
+ [accessibilityMediaSessionProperty.setNative]() {
728
710
  updateAccessibilityProperties(this);
729
- };
730
- View.prototype[androidElevationProperty.getDefault] = function () {
711
+ }
712
+ [androidElevationProperty.getDefault]() {
731
713
  return this.getDefaultElevation();
732
- };
733
- View.prototype[androidElevationProperty.setNative] = function (value) {
714
+ }
715
+ [androidElevationProperty.setNative](value) {
734
716
  if (SDK_VERSION < 21) {
735
717
  return;
736
718
  }
737
719
  this.refreshStateListAnimator();
738
- };
739
- View.prototype[androidDynamicElevationOffsetProperty.getDefault] = function () {
720
+ }
721
+ [androidDynamicElevationOffsetProperty.getDefault]() {
740
722
  return this.getDefaultDynamicElevationOffset();
741
- };
742
- View.prototype[androidDynamicElevationOffsetProperty.setNative] = function (value) {
723
+ }
724
+ [androidDynamicElevationOffsetProperty.setNative](value) {
743
725
  if (SDK_VERSION < 21) {
744
726
  return;
745
727
  }
746
728
  this.refreshStateListAnimator();
747
- };
748
- View.prototype.getDefaultElevation = function () {
729
+ }
730
+ getDefaultElevation() {
749
731
  if (SDK_VERSION < 21) {
750
732
  return 0;
751
733
  }
752
734
  // NOTE: overriden in Button implementation as for widgets with StateListAnimator (Button)
753
735
  // nativeView.getElevation() returns 0 at the time of the getDefault() query
754
736
  return layout.toDeviceIndependentPixels(this.nativeViewProtected.getElevation());
755
- };
756
- View.prototype.getDefaultDynamicElevationOffset = function () {
737
+ }
738
+ getDefaultDynamicElevationOffset() {
757
739
  // NOTE: overriden in Button implementation
758
740
  return 0;
759
- };
760
- View.prototype.refreshStateListAnimator = function () {
761
- var nativeView = this.nativeViewProtected;
762
- var ObjectAnimator = android.animation.ObjectAnimator;
763
- var AnimatorSet = android.animation.AnimatorSet;
764
- var duration = nativeView.getContext().getResources().getInteger(shortAnimTime) / 2;
765
- var elevation = this.androidElevation;
741
+ }
742
+ refreshStateListAnimator() {
743
+ const nativeView = this.nativeViewProtected;
744
+ const ObjectAnimator = android.animation.ObjectAnimator;
745
+ const AnimatorSet = android.animation.AnimatorSet;
746
+ const duration = nativeView.getContext().getResources().getInteger(shortAnimTime) / 2;
747
+ let elevation = this.androidElevation;
766
748
  if (typeof elevation === 'undefined' || elevation === null) {
767
749
  elevation = this.getDefaultElevation();
768
750
  }
769
751
  elevation = layout.toDevicePixels(elevation);
770
- var z = layout.toDevicePixels(0);
771
- var pressedZ = this.androidDynamicElevationOffset;
752
+ const z = layout.toDevicePixels(0);
753
+ let pressedZ = this.androidDynamicElevationOffset;
772
754
  if (typeof pressedZ === 'undefined' || pressedZ === null) {
773
755
  pressedZ = this.getDefaultDynamicElevationOffset();
774
756
  }
775
757
  pressedZ = layout.toDevicePixels(pressedZ);
776
- var pressedSet = new AnimatorSet();
758
+ const pressedSet = new AnimatorSet();
777
759
  pressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [pressedZ]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
778
- var notPressedSet = new AnimatorSet();
760
+ const notPressedSet = new AnimatorSet();
779
761
  notPressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [z]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
780
- var defaultSet = new AnimatorSet();
762
+ const defaultSet = new AnimatorSet();
781
763
  defaultSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [0]).setDuration(0), ObjectAnimator.ofFloat(nativeView, 'elevation', [0]).setDuration(0)]));
782
- var stateListAnimator = new android.animation.StateListAnimator();
764
+ const stateListAnimator = new android.animation.StateListAnimator();
783
765
  stateListAnimator.addState([statePressed, stateEnabled], pressedSet);
784
766
  stateListAnimator.addState([stateEnabled], notPressedSet);
785
767
  stateListAnimator.addState([], defaultSet);
786
- var currentAnimator = nativeView.getStateListAnimator();
768
+ const currentAnimator = nativeView.getStateListAnimator();
787
769
  if (currentAnimator) {
788
770
  currentAnimator.jumpToCurrentState();
789
771
  }
790
772
  nativeView.setStateListAnimator(stateListAnimator);
791
- };
792
- View.prototype[horizontalAlignmentProperty.getDefault] = function () {
773
+ }
774
+ [horizontalAlignmentProperty.getDefault]() {
793
775
  return org.nativescript.widgets.ViewHelper.getHorizontalAlignment(this.nativeViewProtected);
794
- };
795
- View.prototype[horizontalAlignmentProperty.setNative] = function (value) {
796
- var nativeView = this.nativeViewProtected;
797
- var lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
798
- var gravity = lp.gravity;
799
- var weight = lp.weight;
776
+ }
777
+ [horizontalAlignmentProperty.setNative](value) {
778
+ const nativeView = this.nativeViewProtected;
779
+ const lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
780
+ const gravity = lp.gravity;
781
+ const weight = lp.weight;
800
782
  // Set only if params gravity exists.
801
783
  if (gravity !== undefined) {
802
784
  switch (value) {
@@ -827,15 +809,15 @@ var View = /** @class */ (function (_super) {
827
809
  }
828
810
  nativeView.setLayoutParams(lp);
829
811
  }
830
- };
831
- View.prototype[verticalAlignmentProperty.getDefault] = function () {
812
+ }
813
+ [verticalAlignmentProperty.getDefault]() {
832
814
  return org.nativescript.widgets.ViewHelper.getVerticalAlignment(this.nativeViewProtected);
833
- };
834
- View.prototype[verticalAlignmentProperty.setNative] = function (value) {
835
- var nativeView = this.nativeViewProtected;
836
- var lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
837
- var gravity = lp.gravity;
838
- var height = lp.height;
815
+ }
816
+ [verticalAlignmentProperty.setNative](value) {
817
+ const nativeView = this.nativeViewProtected;
818
+ const lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
819
+ const gravity = lp.gravity;
820
+ const height = lp.height;
839
821
  // Set only if params gravity exists.
840
822
  if (gravity !== undefined) {
841
823
  switch (value) {
@@ -866,65 +848,64 @@ var View = /** @class */ (function (_super) {
866
848
  }
867
849
  nativeView.setLayoutParams(lp);
868
850
  }
869
- };
870
- View.prototype[rotateProperty.setNative] = function (value) {
851
+ }
852
+ [rotateProperty.setNative](value) {
871
853
  org.nativescript.widgets.ViewHelper.setRotate(this.nativeViewProtected, float(value));
872
- };
873
- View.prototype[rotateXProperty.setNative] = function (value) {
854
+ }
855
+ [rotateXProperty.setNative](value) {
874
856
  org.nativescript.widgets.ViewHelper.setRotateX(this.nativeViewProtected, float(value));
875
- };
876
- View.prototype[rotateYProperty.setNative] = function (value) {
857
+ }
858
+ [rotateYProperty.setNative](value) {
877
859
  org.nativescript.widgets.ViewHelper.setRotateY(this.nativeViewProtected, float(value));
878
- };
879
- View.prototype[perspectiveProperty.setNative] = function (value) {
860
+ }
861
+ [perspectiveProperty.setNative](value) {
880
862
  org.nativescript.widgets.ViewHelper.setPerspective(this.nativeViewProtected, float(value * Screen.mainScreen.scale));
881
- };
882
- View.prototype[scaleXProperty.setNative] = function (value) {
863
+ }
864
+ [scaleXProperty.setNative](value) {
883
865
  org.nativescript.widgets.ViewHelper.setScaleX(this.nativeViewProtected, float(value));
884
- };
885
- View.prototype[scaleYProperty.setNative] = function (value) {
866
+ }
867
+ [scaleYProperty.setNative](value) {
886
868
  org.nativescript.widgets.ViewHelper.setScaleY(this.nativeViewProtected, float(value));
887
- };
888
- View.prototype[translateXProperty.setNative] = function (value) {
869
+ }
870
+ [translateXProperty.setNative](value) {
889
871
  org.nativescript.widgets.ViewHelper.setTranslateX(this.nativeViewProtected, layout.toDevicePixels(value));
890
- };
891
- View.prototype[translateYProperty.setNative] = function (value) {
872
+ }
873
+ [translateYProperty.setNative](value) {
892
874
  org.nativescript.widgets.ViewHelper.setTranslateY(this.nativeViewProtected, layout.toDevicePixels(value));
893
- };
894
- View.prototype[zIndexProperty.getDefault] = function () {
875
+ }
876
+ [zIndexProperty.getDefault]() {
895
877
  return 0;
896
- };
897
- View.prototype[zIndexProperty.setNative] = function (value) {
878
+ }
879
+ [zIndexProperty.setNative](value) {
898
880
  org.nativescript.widgets.ViewHelper.setZIndex(this.nativeViewProtected, value);
899
- };
900
- View.prototype[backgroundInternalProperty.getDefault] = function () {
901
- var nativeView = this.nativeViewProtected;
881
+ }
882
+ [backgroundInternalProperty.getDefault]() {
883
+ const nativeView = this.nativeViewProtected;
902
884
  return AndroidHelper.getCopyOrDrawable(nativeView.getBackground(), nativeView.getResources());
903
- };
904
- View.prototype[backgroundInternalProperty.setNative] = function (value) {
885
+ }
886
+ [backgroundInternalProperty.setNative](value) {
905
887
  this._redrawNativeBackground(value);
906
- };
907
- View.prototype[minWidthProperty.setNative] = function (value) {
888
+ }
889
+ [minWidthProperty.setNative](value) {
908
890
  if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
909
891
  this.parent._setChildMinWidthNative(this, value);
910
892
  }
911
893
  else {
912
894
  this._setMinWidthNative(value);
913
895
  }
914
- };
915
- View.prototype[minHeightProperty.setNative] = function (value) {
896
+ }
897
+ [minHeightProperty.setNative](value) {
916
898
  if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
917
899
  this.parent._setChildMinHeightNative(this, value);
918
900
  }
919
901
  else {
920
902
  this._setMinHeightNative(value);
921
903
  }
922
- };
923
- View.prototype._applyBackground = function (background, isBorderDrawable, onlyColor, backgroundDrawable) {
924
- var _a;
925
- var nativeView = this.nativeViewProtected;
904
+ }
905
+ _applyBackground(background, isBorderDrawable, onlyColor, backgroundDrawable) {
906
+ const nativeView = this.nativeViewProtected;
926
907
  if (onlyColor) {
927
- var backgroundColor = background.color.android;
908
+ const backgroundColor = background.color.android;
928
909
  if (isBorderDrawable) {
929
910
  // We need to duplicate the drawable or we lose the "default" cached drawable
930
911
  backgroundDrawable = nativeView._cachedDrawable != null ? AndroidHelper.getCopyOrDrawable(nativeView._cachedDrawable, nativeView.getResources()) : null;
@@ -953,7 +934,7 @@ var View = /** @class */ (function (_super) {
953
934
  }
954
935
  if (background.isEmpty()) {
955
936
  // Reset background to default if not already set
956
- var defaultDrawable = (_a = nativeView._cachedDrawable) !== null && _a !== void 0 ? _a : null;
937
+ const defaultDrawable = nativeView._cachedDrawable ?? null;
957
938
  if (backgroundDrawable !== defaultDrawable) {
958
939
  nativeView.setBackground(defaultDrawable);
959
940
  }
@@ -964,16 +945,16 @@ var View = /** @class */ (function (_super) {
964
945
  refreshBorderDrawable(this, backgroundDrawable);
965
946
  }
966
947
  else {
967
- var borderDrawable = new org.nativescript.widgets.BorderDrawable(layout.getDisplayDensity(), this.toString());
948
+ const borderDrawable = new org.nativescript.widgets.BorderDrawable(layout.getDisplayDensity(), this.toString());
968
949
  refreshBorderDrawable(this, borderDrawable);
969
950
  nativeView.setBackground(borderDrawable);
970
951
  }
971
952
  }
972
953
  }
973
- };
974
- View.prototype._drawBoxShadow = function (boxShadow) {
975
- var nativeView = this.nativeViewProtected;
976
- var config = {
954
+ }
955
+ _drawBoxShadow(boxShadow) {
956
+ const nativeView = this.nativeViewProtected;
957
+ const config = {
977
958
  shadowColor: boxShadow.color.android,
978
959
  cornerRadius: Length.toDevicePixels(this.borderRadius, 0.0),
979
960
  spreadRadius: boxShadow.spreadRadius,
@@ -982,19 +963,19 @@ var View = /** @class */ (function (_super) {
982
963
  offsetY: boxShadow.offsetY,
983
964
  };
984
965
  org.nativescript.widgets.Utils.drawBoxShadow(nativeView, JSON.stringify(config));
985
- };
986
- View.prototype._redrawNativeBackground = function (value) {
966
+ }
967
+ _redrawNativeBackground(value) {
987
968
  if (value instanceof Background) {
988
969
  this.onBackgroundOrBorderPropertyChanged();
989
970
  }
990
971
  else {
991
- var nativeView = this.nativeViewProtected;
972
+ const nativeView = this.nativeViewProtected;
992
973
  nativeView.setBackground(value);
993
- var style = this.style;
994
- var paddingTop = paddingTopProperty.isSet(style) ? this.effectivePaddingTop : this._defaultPaddingTop;
995
- var paddingRight = paddingRightProperty.isSet(style) ? this.effectivePaddingRight : this._defaultPaddingRight;
996
- var paddingBottom = paddingBottomProperty.isSet(style) ? this.effectivePaddingBottom : this._defaultPaddingBottom;
997
- var paddingLeft = paddingLeftProperty.isSet(style) ? this.effectivePaddingLeft : this._defaultPaddingLeft;
974
+ const style = this.style;
975
+ const paddingTop = paddingTopProperty.isSet(style) ? this.effectivePaddingTop : this._defaultPaddingTop;
976
+ const paddingRight = paddingRightProperty.isSet(style) ? this.effectivePaddingRight : this._defaultPaddingRight;
977
+ const paddingBottom = paddingBottomProperty.isSet(style) ? this.effectivePaddingBottom : this._defaultPaddingBottom;
978
+ const paddingLeft = paddingLeftProperty.isSet(style) ? this.effectivePaddingLeft : this._defaultPaddingLeft;
998
979
  if (this._isPaddingRelative) {
999
980
  nativeView.setPaddingRelative(paddingLeft, paddingTop, paddingRight, paddingBottom);
1000
981
  }
@@ -1002,16 +983,15 @@ var View = /** @class */ (function (_super) {
1002
983
  nativeView.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
1003
984
  }
1004
985
  }
1005
- };
1006
- View.prototype.onBackgroundOrBorderPropertyChanged = function () {
1007
- var _a;
1008
- var nativeView = this.nativeViewProtected;
986
+ }
987
+ onBackgroundOrBorderPropertyChanged() {
988
+ const nativeView = this.nativeViewProtected;
1009
989
  if (!nativeView) {
1010
990
  return;
1011
991
  }
1012
- var background = this.style.backgroundInternal;
1013
- var drawable = nativeView.getBackground();
1014
- var isBorderDrawable = drawable instanceof org.nativescript.widgets.BorderDrawable;
992
+ const background = this.style.backgroundInternal;
993
+ const drawable = nativeView.getBackground();
994
+ const isBorderDrawable = drawable instanceof org.nativescript.widgets.BorderDrawable;
1015
995
  // Use undefined as not set. getBackground will never return undefined only Drawable or null;
1016
996
  if (nativeView._cachedDrawable === undefined) {
1017
997
  nativeView._cachedDrawable = drawable;
@@ -1019,11 +999,11 @@ var View = /** @class */ (function (_super) {
1019
999
  if (background.clearFlags & 2 /* BackgroundClearFlags.CLEAR_BOX_SHADOW */) {
1020
1000
  // Clear background if we're clearing the box shadow
1021
1001
  if (drawable instanceof org.nativescript.widgets.BoxShadowDrawable) {
1022
- nativeView.setBackground((_a = nativeView._cachedDrawable) !== null && _a !== void 0 ? _a : null);
1002
+ nativeView.setBackground(nativeView._cachedDrawable ?? null);
1023
1003
  }
1024
1004
  }
1025
1005
  // prettier-ignore
1026
- var onlyColor = !background.hasBorderWidth()
1006
+ const onlyColor = !background.hasBorderWidth()
1027
1007
  && !background.hasBorderRadius()
1028
1008
  && !background.hasBoxShadow()
1029
1009
  && !background.clipPath
@@ -1035,10 +1015,10 @@ var View = /** @class */ (function (_super) {
1035
1015
  }
1036
1016
  // TODO: Can we move BorderWidths as separate native setter?
1037
1017
  // This way we could skip setPadding if borderWidth is not changed.
1038
- var leftPadding = Math.ceil(this.effectiveBorderLeftWidth + this.effectivePaddingLeft);
1039
- var topPadding = Math.ceil(this.effectiveBorderTopWidth + this.effectivePaddingTop);
1040
- var rightPadding = Math.ceil(this.effectiveBorderRightWidth + this.effectivePaddingRight);
1041
- var bottomPadding = Math.ceil(this.effectiveBorderBottomWidth + this.effectivePaddingBottom);
1018
+ const leftPadding = Math.ceil(this.effectiveBorderLeftWidth + this.effectivePaddingLeft);
1019
+ const topPadding = Math.ceil(this.effectiveBorderTopWidth + this.effectivePaddingTop);
1020
+ const rightPadding = Math.ceil(this.effectiveBorderRightWidth + this.effectivePaddingRight);
1021
+ const bottomPadding = Math.ceil(this.effectiveBorderBottomWidth + this.effectivePaddingBottom);
1042
1022
  if (this._isPaddingRelative) {
1043
1023
  nativeView.setPaddingRelative(leftPadding, topPadding, rightPadding, bottomPadding);
1044
1024
  }
@@ -1047,63 +1027,49 @@ var View = /** @class */ (function (_super) {
1047
1027
  }
1048
1028
  // reset clear flags
1049
1029
  background.clearFlags = 0 /* BackgroundClearFlags.NONE */;
1050
- };
1051
- View.prototype.accessibilityAnnouncement = function (message) {
1052
- if (message === void 0) { message = this.accessibilityLabel; }
1030
+ }
1031
+ accessibilityAnnouncement(message = this.accessibilityLabel) {
1053
1032
  this.sendAccessibilityEvent({
1054
1033
  androidAccessibilityEvent: AndroidAccessibilityEvent.ANNOUNCEMENT,
1055
- message: message,
1034
+ message,
1056
1035
  });
1057
- };
1058
- View.prototype.accessibilityScreenChanged = function () {
1036
+ }
1037
+ accessibilityScreenChanged() {
1059
1038
  this.sendAccessibilityEvent({
1060
1039
  androidAccessibilityEvent: AndroidAccessibilityEvent.WINDOW_STATE_CHANGED,
1061
1040
  });
1062
- };
1063
- View.androidBackPressedEvent = androidBackPressedEvent;
1064
- __decorate([
1065
- profile,
1066
- __metadata("design:type", Function),
1067
- __metadata("design:paramtypes", []),
1068
- __metadata("design:returntype", void 0)
1069
- ], View.prototype, "onLoaded", null);
1070
- __decorate([
1071
- profile,
1072
- __metadata("design:type", Function),
1073
- __metadata("design:paramtypes", []),
1074
- __metadata("design:returntype", void 0)
1075
- ], View.prototype, "onUnloaded", null);
1076
- __decorate([
1077
- profile,
1078
- __metadata("design:type", Function),
1079
- __metadata("design:paramtypes", []),
1080
- __metadata("design:returntype", void 0)
1081
- ], View.prototype, "requestLayout", null);
1082
- return View;
1083
- }(ViewCommon));
1084
- export { View };
1085
- var ContainerView = /** @class */ (function (_super) {
1086
- __extends(ContainerView, _super);
1087
- function ContainerView() {
1088
- return _super !== null && _super.apply(this, arguments) || this;
1089
- }
1090
- return ContainerView;
1091
- }(View));
1092
- export { ContainerView };
1093
- var CustomLayoutView = /** @class */ (function (_super) {
1094
- __extends(CustomLayoutView, _super);
1095
- function CustomLayoutView() {
1096
- return _super !== null && _super.apply(this, arguments) || this;
1097
- }
1098
- CustomLayoutView.prototype.createNativeView = function () {
1041
+ }
1042
+ }
1043
+ View.androidBackPressedEvent = androidBackPressedEvent;
1044
+ __decorate([
1045
+ profile,
1046
+ __metadata("design:type", Function),
1047
+ __metadata("design:paramtypes", []),
1048
+ __metadata("design:returntype", void 0)
1049
+ ], View.prototype, "onLoaded", null);
1050
+ __decorate([
1051
+ profile,
1052
+ __metadata("design:type", Function),
1053
+ __metadata("design:paramtypes", []),
1054
+ __metadata("design:returntype", void 0)
1055
+ ], View.prototype, "onUnloaded", null);
1056
+ __decorate([
1057
+ profile,
1058
+ __metadata("design:type", Function),
1059
+ __metadata("design:paramtypes", []),
1060
+ __metadata("design:returntype", void 0)
1061
+ ], View.prototype, "requestLayout", null);
1062
+ export class ContainerView extends View {
1063
+ }
1064
+ export class CustomLayoutView extends ContainerView {
1065
+ createNativeView() {
1099
1066
  return new org.nativescript.widgets.ContentLayout(this._context);
1100
- };
1101
- CustomLayoutView.prototype._addViewToNativeVisualTree = function (child, atIndex) {
1102
- if (atIndex === void 0) { atIndex = Number.MAX_SAFE_INTEGER; }
1103
- _super.prototype._addViewToNativeVisualTree.call(this, child);
1067
+ }
1068
+ _addViewToNativeVisualTree(child, atIndex = Number.MAX_SAFE_INTEGER) {
1069
+ super._addViewToNativeVisualTree(child);
1104
1070
  if (this.nativeViewProtected && child.nativeViewProtected) {
1105
1071
  if (Trace.isEnabled()) {
1106
- Trace.write("".concat(this, ".nativeView.addView(").concat(child, ".nativeView, ").concat(atIndex, ")"), Trace.categories.VisualTreeEvents);
1072
+ Trace.write(`${this}.nativeView.addView(${child}.nativeView, ${atIndex})`, Trace.categories.VisualTreeEvents);
1107
1073
  }
1108
1074
  this.nativeViewProtected.addView(child.nativeViewProtected, atIndex);
1109
1075
  if (child instanceof View) {
@@ -1112,37 +1078,35 @@ var CustomLayoutView = /** @class */ (function (_super) {
1112
1078
  return true;
1113
1079
  }
1114
1080
  return false;
1115
- };
1116
- CustomLayoutView.prototype._updateNativeLayoutParams = function (child) {
1081
+ }
1082
+ _updateNativeLayoutParams(child) {
1117
1083
  // noop
1118
- };
1119
- CustomLayoutView.prototype._setChildMinWidthNative = function (child, value) {
1084
+ }
1085
+ _setChildMinWidthNative(child, value) {
1120
1086
  child._setMinWidthNative(value);
1121
- };
1122
- CustomLayoutView.prototype._setChildMinHeightNative = function (child, value) {
1087
+ }
1088
+ _setChildMinHeightNative(child, value) {
1123
1089
  child._setMinHeightNative(value);
1124
- };
1125
- CustomLayoutView.prototype._removeViewFromNativeVisualTree = function (child) {
1126
- _super.prototype._removeViewFromNativeVisualTree.call(this, child);
1127
- var nativeView = this.nativeViewProtected;
1128
- var childView = child.nativeViewProtected;
1090
+ }
1091
+ _removeViewFromNativeVisualTree(child) {
1092
+ super._removeViewFromNativeVisualTree(child);
1093
+ const nativeView = this.nativeViewProtected;
1094
+ const childView = child.nativeViewProtected;
1129
1095
  if (nativeView && childView) {
1130
1096
  nativeView.removeView(childView);
1131
1097
  if (Trace.isEnabled()) {
1132
- Trace.write("".concat(nativeView, ".removeView(").concat(childView, ")"), Trace.categories.VisualTreeEvents);
1098
+ Trace.write(`${nativeView}.removeView(${childView})`, Trace.categories.VisualTreeEvents);
1133
1099
  Trace.notifyEvent(child, 'childInLayoutRemovedFromNativeVisualTree');
1134
1100
  }
1135
1101
  }
1136
- };
1137
- return CustomLayoutView;
1138
- }(ContainerView));
1139
- export { CustomLayoutView };
1140
- var percentNotSupported = function (view, value) {
1102
+ }
1103
+ }
1104
+ const percentNotSupported = (view, value) => {
1141
1105
  throw new Error('PercentLength is not supported.');
1142
1106
  };
1143
1107
  function createNativePercentLengthProperty(options) {
1144
- var getter = options.getter, setter = options.setter, _a = options.auto, auto = _a === void 0 ? 0 : _a;
1145
- var setPixels, getPixels, setPercent;
1108
+ const { getter, setter, auto = 0 } = options;
1109
+ let setPixels, getPixels, setPercent;
1146
1110
  if (getter) {
1147
1111
  View.prototype[getter] = function () {
1148
1112
  if (options) {
@@ -1151,13 +1115,13 @@ function createNativePercentLengthProperty(options) {
1151
1115
  setPercent = options.setPercent || percentNotSupported;
1152
1116
  options = null;
1153
1117
  }
1154
- var value = getPixels(this.nativeViewProtected);
1118
+ const value = getPixels(this.nativeViewProtected);
1155
1119
  if (value == auto) {
1156
1120
  // tslint:disable-line
1157
1121
  return 'auto';
1158
1122
  }
1159
1123
  else {
1160
- return { value: value, unit: 'px' };
1124
+ return { value, unit: 'px' };
1161
1125
  }
1162
1126
  };
1163
1127
  }
@@ -1189,7 +1153,7 @@ function createNativePercentLengthProperty(options) {
1189
1153
  setPercent(this.nativeViewProtected, length.value);
1190
1154
  }
1191
1155
  else {
1192
- throw new Error("Unsupported PercentLength ".concat(length));
1156
+ throw new Error(`Unsupported PercentLength ${length}`);
1193
1157
  }
1194
1158
  };
1195
1159
  }