@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
@@ -8,7 +8,7 @@ var UNSPECIFIED = layout.UNSPECIFIED;
8
8
  var MEASURED_SIZE_MASK = layout.MEASURED_SIZE_MASK;
9
9
  var MEASURED_STATE_TOO_SMALL = layout.MEASURED_STATE_TOO_SMALL;
10
10
  function requestFlexboxLayout(value) {
11
- var flexbox = this.parent;
11
+ const flexbox = this.parent;
12
12
  if (flexbox instanceof FlexboxLayoutBase) {
13
13
  flexbox.requestLayout();
14
14
  }
@@ -18,40 +18,34 @@ View.prototype[flexGrowProperty.setNative] = requestFlexboxLayout;
18
18
  View.prototype[flexShrinkProperty.setNative] = requestFlexboxLayout;
19
19
  View.prototype[flexWrapBeforeProperty.setNative] = requestFlexboxLayout;
20
20
  View.prototype[alignSelfProperty.setNative] = requestFlexboxLayout;
21
- var MATCH_PARENT = -1;
22
- var WRAP_CONTENT = -2;
23
- var View_sUseZeroUnspecifiedMeasureSpec = true; // NOTE: android version < M
21
+ const MATCH_PARENT = -1;
22
+ const WRAP_CONTENT = -2;
23
+ const View_sUseZeroUnspecifiedMeasureSpec = true; // NOTE: android version < M
24
24
  // Long ints may not be safe in JavaScript
25
- var MAX_SIZE = 0x00ffffff & MEASURED_SIZE_MASK;
25
+ const MAX_SIZE = 0x00ffffff & MEASURED_SIZE_MASK;
26
26
  var makeMeasureSpec = layout.makeMeasureSpec;
27
27
  var getMeasureSpecMode = layout.getMeasureSpecMode;
28
28
  var getMeasureSpecSize = layout.getMeasureSpecSize;
29
29
  // `eachLayoutChild` iterates over children, and we need more - indexed access.
30
30
  // This class tries to accomodate that by collecting all children in an
31
31
  // array no more than once per measure.
32
- var MeasureContext = /** @class */ (function () {
33
- function MeasureContext(owner) {
34
- var _this = this;
32
+ class MeasureContext {
33
+ constructor(owner) {
35
34
  this.owner = owner;
36
35
  this.children = [];
37
- this.owner.eachLayoutChild(function (child) {
38
- _this.children.push(child);
36
+ this.owner.eachLayoutChild((child) => {
37
+ this.children.push(child);
39
38
  });
40
39
  }
41
- Object.defineProperty(MeasureContext.prototype, "childrenCount", {
42
- get: function () {
43
- return this.children.length;
44
- },
45
- enumerable: false,
46
- configurable: true
47
- });
48
- MeasureContext.prototype.childAt = function (index) {
40
+ get childrenCount() {
41
+ return this.children.length;
42
+ }
43
+ childAt(index) {
49
44
  return this.children[index];
50
- };
51
- return MeasureContext;
52
- }());
53
- var FlexLine = /** @class */ (function () {
54
- function FlexLine() {
45
+ }
46
+ }
47
+ class FlexLine {
48
+ constructor() {
55
49
  this._left = Number.MAX_VALUE;
56
50
  this._top = Number.MAX_VALUE;
57
51
  this._right = Number.MAX_VALUE;
@@ -65,91 +59,49 @@ var FlexLine = /** @class */ (function () {
65
59
  this._maxBaseline = 0;
66
60
  this._indicesAlignSelfStretch = [];
67
61
  }
68
- Object.defineProperty(FlexLine.prototype, "left", {
69
- get: function () {
70
- return this._left;
71
- },
72
- enumerable: false,
73
- configurable: true
74
- });
75
- Object.defineProperty(FlexLine.prototype, "top", {
76
- get: function () {
77
- return this._top;
78
- },
79
- enumerable: false,
80
- configurable: true
81
- });
82
- Object.defineProperty(FlexLine.prototype, "right", {
83
- get: function () {
84
- return this._right;
85
- },
86
- enumerable: false,
87
- configurable: true
88
- });
89
- Object.defineProperty(FlexLine.prototype, "bottom", {
90
- get: function () {
91
- return this._bottom;
92
- },
93
- enumerable: false,
94
- configurable: true
95
- });
96
- Object.defineProperty(FlexLine.prototype, "mainSize", {
97
- get: function () {
98
- return this._mainSize;
99
- },
100
- enumerable: false,
101
- configurable: true
102
- });
103
- Object.defineProperty(FlexLine.prototype, "crossSize", {
104
- get: function () {
105
- return this._crossSize;
106
- },
107
- enumerable: false,
108
- configurable: true
109
- });
110
- Object.defineProperty(FlexLine.prototype, "itemCount", {
111
- get: function () {
112
- return this._itemCount;
113
- },
114
- enumerable: false,
115
- configurable: true
116
- });
117
- Object.defineProperty(FlexLine.prototype, "totalFlexGrow", {
118
- get: function () {
119
- return this._totalFlexGrow;
120
- },
121
- enumerable: false,
122
- configurable: true
123
- });
124
- Object.defineProperty(FlexLine.prototype, "totalFlexShrink", {
125
- get: function () {
126
- return this._totalFlexShrink;
127
- },
128
- enumerable: false,
129
- configurable: true
130
- });
131
- return FlexLine;
132
- }());
133
- var Order = /** @class */ (function () {
134
- function Order() {
62
+ get left() {
63
+ return this._left;
64
+ }
65
+ get top() {
66
+ return this._top;
67
+ }
68
+ get right() {
69
+ return this._right;
70
+ }
71
+ get bottom() {
72
+ return this._bottom;
73
+ }
74
+ get mainSize() {
75
+ return this._mainSize;
76
+ }
77
+ get crossSize() {
78
+ return this._crossSize;
135
79
  }
136
- Order.prototype.compareTo = function (another) {
80
+ get itemCount() {
81
+ return this._itemCount;
82
+ }
83
+ get totalFlexGrow() {
84
+ return this._totalFlexGrow;
85
+ }
86
+ get totalFlexShrink() {
87
+ return this._totalFlexShrink;
88
+ }
89
+ }
90
+ class Order {
91
+ compareTo(another) {
137
92
  if (this.order !== another.order) {
138
93
  return this.order - another.order;
139
94
  }
140
95
  return this.index - another.index;
141
- };
142
- return Order;
143
- }());
144
- var FlexboxLayout = /** @class */ (function (_super) {
145
- __extends(FlexboxLayout, _super);
146
- function FlexboxLayout() {
96
+ }
97
+ }
98
+ export class FlexboxLayout extends FlexboxLayoutBase {
99
+ constructor() {
147
100
  // Omit divider
148
- var _this = _super !== null && _super.apply(this, arguments) || this;
149
- _this._flexLines = [];
150
- return _this;
101
+ super(...arguments);
102
+ this._flexLines = [];
151
103
  }
152
- FlexboxLayout.prototype.onMeasure = function (widthMeasureSpec, heightMeasureSpec) {
104
+ onMeasure(widthMeasureSpec, heightMeasureSpec) {
153
105
  this.measureContext = new MeasureContext(this);
154
106
  // Omit: super.onMeasure(widthMeasureSpec, heightMeasureSpec);
155
107
  if (this._isOrderChangedFromLastMeasurement) {
@@ -171,116 +123,110 @@ var FlexboxLayout = /** @class */ (function (_super) {
171
123
  throw new Error('Invalid value for the flex direction is set: ' + this.flexDirection);
172
124
  }
173
125
  this._childrenFrozen.length = 0;
174
- };
175
- FlexboxLayout.prototype._getReorderedChildAt = function (index) {
176
- var child;
126
+ }
127
+ _getReorderedChildAt(index) {
128
+ let child;
177
129
  if (index < 0 || index >= this._reorderedIndices.length) {
178
130
  child = null;
179
131
  }
180
132
  else {
181
- var reorderedIndex = this._reorderedIndices[index];
133
+ const reorderedIndex = this._reorderedIndices[index];
182
134
  child = this.measureContext.childAt(reorderedIndex);
183
135
  }
184
136
  return child;
185
- };
186
- FlexboxLayout.prototype._createReorderedIndices = function () {
187
- var childCount = this.measureContext.childrenCount;
188
- var orders = this._createOrders(childCount);
137
+ }
138
+ _createReorderedIndices() {
139
+ const childCount = this.measureContext.childrenCount;
140
+ const orders = this._createOrders(childCount);
189
141
  return this._sortOrdersIntoReorderedIndices(childCount, orders);
190
- };
191
- FlexboxLayout.prototype._sortOrdersIntoReorderedIndices = function (childCount, orders) {
192
- var _this = this;
193
- orders.sort(function (a, b) { return a.compareTo(b); });
142
+ }
143
+ _sortOrdersIntoReorderedIndices(childCount, orders) {
144
+ orders.sort((a, b) => a.compareTo(b));
194
145
  if (!this._orderCache) {
195
146
  this._orderCache = [];
196
147
  }
197
148
  this._orderCache.length = 0;
198
- var reorderedIndices = [];
199
- orders.forEach(function (order, i) {
149
+ const reorderedIndices = [];
150
+ orders.forEach((order, i) => {
200
151
  reorderedIndices[i] = order.index;
201
- _this._orderCache[i] = order.order;
152
+ this._orderCache[i] = order.order;
202
153
  });
203
154
  return reorderedIndices;
204
- };
205
- FlexboxLayout.prototype._createOrders = function (childCount) {
206
- var orders = [];
207
- for (var i = 0; i < childCount; i++) {
208
- var child = this.measureContext.childAt(i);
209
- var order = new Order();
155
+ }
156
+ _createOrders(childCount) {
157
+ const orders = [];
158
+ for (let i = 0; i < childCount; i++) {
159
+ const child = this.measureContext.childAt(i);
160
+ const order = new Order();
210
161
  order.order = FlexboxLayout.getOrder(child);
211
162
  order.index = i;
212
163
  orders.push(order);
213
164
  }
214
165
  return orders;
215
- };
216
- Object.defineProperty(FlexboxLayout.prototype, "_isOrderChangedFromLastMeasurement", {
217
- get: function () {
218
- var childCount = this.measureContext.childrenCount;
219
- if (!this._orderCache) {
220
- this._orderCache = [];
166
+ }
167
+ get _isOrderChangedFromLastMeasurement() {
168
+ const childCount = this.measureContext.childrenCount;
169
+ if (!this._orderCache) {
170
+ this._orderCache = [];
171
+ }
172
+ if (this._orderCache.length !== childCount) {
173
+ return true;
174
+ }
175
+ for (let i = 0; i < childCount; i++) {
176
+ const view = this.measureContext.childAt(i);
177
+ if (view === null) {
178
+ continue;
221
179
  }
222
- if (this._orderCache.length !== childCount) {
180
+ if (FlexboxLayout.getOrder(view) !== this._orderCache[i]) {
223
181
  return true;
224
182
  }
225
- for (var i = 0; i < childCount; i++) {
226
- var view = this.measureContext.childAt(i);
227
- if (view === null) {
228
- continue;
229
- }
230
- if (FlexboxLayout.getOrder(view) !== this._orderCache[i]) {
231
- return true;
232
- }
233
- }
234
- return false;
235
- },
236
- enumerable: false,
237
- configurable: true
238
- });
239
- FlexboxLayout.prototype._measureHorizontal = function (widthMeasureSpec, heightMeasureSpec) {
240
- var _this = this;
241
- var widthSize = getMeasureSpecSize(widthMeasureSpec);
242
- var widthMode = getMeasureSpecMode(widthMeasureSpec);
243
- var heightSize = getMeasureSpecSize(heightMeasureSpec);
244
- var heightMode = getMeasureSpecMode(heightMeasureSpec);
245
- var childState = 0;
183
+ }
184
+ return false;
185
+ }
186
+ _measureHorizontal(widthMeasureSpec, heightMeasureSpec) {
187
+ const widthSize = getMeasureSpecSize(widthMeasureSpec);
188
+ const widthMode = getMeasureSpecMode(widthMeasureSpec);
189
+ const heightSize = getMeasureSpecSize(heightMeasureSpec);
190
+ const heightMode = getMeasureSpecMode(heightMeasureSpec);
191
+ let childState = 0;
246
192
  this._flexLines.length = 0;
247
- (function () {
248
- var childCount = _this.measureContext.childrenCount;
249
- var paddingStart = FlexboxLayout.getPaddingStart(_this);
250
- var paddingEnd = FlexboxLayout.getPaddingEnd(_this);
251
- var largestHeightInRow = Number.MIN_VALUE;
252
- var flexLine = new FlexLine();
253
- var indexInFlexLine = 0;
193
+ (() => {
194
+ const childCount = this.measureContext.childrenCount;
195
+ const paddingStart = FlexboxLayout.getPaddingStart(this);
196
+ const paddingEnd = FlexboxLayout.getPaddingEnd(this);
197
+ let largestHeightInRow = Number.MIN_VALUE;
198
+ let flexLine = new FlexLine();
199
+ let indexInFlexLine = 0;
254
200
  flexLine._mainSize = paddingStart + paddingEnd;
255
- for (var i = 0; i < childCount; i++) {
256
- var child = _this._getReorderedChildAt(i);
201
+ for (let i = 0; i < childCount; i++) {
202
+ const child = this._getReorderedChildAt(i);
257
203
  if (child === null) {
258
- _this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
204
+ this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
259
205
  continue;
260
206
  }
261
207
  else if (child.isCollapsed) {
262
208
  flexLine._itemCount++;
263
- _this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
209
+ this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
264
210
  continue;
265
211
  }
266
212
  child._updateEffectiveLayoutValues(widthSize, widthMode, heightSize, heightMode);
267
- var lp = child; // child.style;
213
+ const lp = child; // child.style;
268
214
  if (FlexboxLayout.getAlignSelf(child) === 'stretch') {
269
215
  flexLine._indicesAlignSelfStretch.push(i);
270
216
  }
271
- var childWidth = lp.effectiveWidth;
217
+ let childWidth = lp.effectiveWidth;
272
218
  if (FlexBasisPercent.DEFAULT /*lp.flexBasisPercent*/ !== FlexBasisPercent.DEFAULT && widthMode === EXACTLY) {
273
219
  childWidth = Math.round(widthSize * FlexBasisPercent.DEFAULT /*lp.flexBasisPercent*/);
274
220
  }
275
- var childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(widthMeasureSpec, lp.effectivePaddingLeft + lp.effectivePaddingRight + lp.effectiveMarginLeft + lp.effectiveMarginRight, childWidth < 0 ? WRAP_CONTENT : childWidth);
276
- var childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(heightMeasureSpec, lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
221
+ const childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(widthMeasureSpec, lp.effectivePaddingLeft + lp.effectivePaddingRight + lp.effectiveMarginLeft + lp.effectiveMarginRight, childWidth < 0 ? WRAP_CONTENT : childWidth);
222
+ const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(heightMeasureSpec, lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
277
223
  child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
278
- _this._checkSizeConstraints(child);
224
+ this._checkSizeConstraints(child);
279
225
  childState = View.combineMeasuredStates(childState, child.getMeasuredState());
280
226
  largestHeightInRow = Math.max(largestHeightInRow, child.getMeasuredHeight() + lp.effectiveMarginTop + lp.effectiveMarginBottom);
281
- if (_this._isWrapRequired(child, widthMode, widthSize, flexLine._mainSize, child.getMeasuredWidth() + lp.effectiveMarginLeft + lp.effectiveMarginRight, i, indexInFlexLine)) {
227
+ if (this._isWrapRequired(child, widthMode, widthSize, flexLine._mainSize, child.getMeasuredWidth() + lp.effectiveMarginLeft + lp.effectiveMarginRight, i, indexInFlexLine)) {
282
228
  if (flexLine.itemCount > 0) {
283
- _this._addFlexLine(flexLine);
229
+ this._addFlexLine(flexLine);
284
230
  }
285
231
  flexLine = new FlexLine();
286
232
  flexLine._itemCount = 1;
@@ -297,58 +243,58 @@ var FlexboxLayout = /** @class */ (function (_super) {
297
243
  flexLine._totalFlexShrink += FlexboxLayout.getFlexShrink(child);
298
244
  flexLine._crossSize = Math.max(flexLine._crossSize, largestHeightInRow);
299
245
  // Omit divider
300
- if (_this.flexWrap !== FlexWrap.WRAP_REVERSE) {
246
+ if (this.flexWrap !== FlexWrap.WRAP_REVERSE) {
301
247
  flexLine._maxBaseline = Math.max(flexLine._maxBaseline, FlexboxLayout.getBaseline(child) + lp.effectiveMarginTop);
302
248
  }
303
249
  else {
304
250
  flexLine._maxBaseline = Math.max(flexLine._maxBaseline, child.getMeasuredHeight() - FlexboxLayout.getBaseline(child) + lp.effectiveMarginBottom);
305
251
  }
306
- _this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
252
+ this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
307
253
  }
308
254
  })();
309
255
  this._determineMainSize(this.flexDirection, widthMeasureSpec, heightMeasureSpec);
310
256
  if (this.alignItems === AlignItems.BASELINE) {
311
- var viewIndex_1 = 0;
312
- this._flexLines.forEach(function (flexLine) {
313
- var largestHeightInLine = Number.MIN_VALUE;
314
- for (var i = viewIndex_1; i < viewIndex_1 + flexLine._itemCount; i++) {
315
- var child = _this._getReorderedChildAt(i);
316
- var lp = child; // .style;
317
- if (_this.flexWrap !== FlexWrap.WRAP_REVERSE) {
318
- var marginTop = flexLine._maxBaseline - FlexboxLayout.getBaseline(child);
257
+ let viewIndex = 0;
258
+ this._flexLines.forEach((flexLine) => {
259
+ let largestHeightInLine = Number.MIN_VALUE;
260
+ for (let i = viewIndex; i < viewIndex + flexLine._itemCount; i++) {
261
+ const child = this._getReorderedChildAt(i);
262
+ const lp = child; // .style;
263
+ if (this.flexWrap !== FlexWrap.WRAP_REVERSE) {
264
+ let marginTop = flexLine._maxBaseline - FlexboxLayout.getBaseline(child);
319
265
  marginTop = Math.max(marginTop, lp.effectiveMarginTop);
320
266
  largestHeightInLine = Math.max(largestHeightInLine, child.getActualSize().height + marginTop + lp.effectiveMarginBottom);
321
267
  }
322
268
  else {
323
- var marginBottom = flexLine._maxBaseline - child.getMeasuredHeight() + FlexboxLayout.getBaseline(child);
269
+ let marginBottom = flexLine._maxBaseline - child.getMeasuredHeight() + FlexboxLayout.getBaseline(child);
324
270
  marginBottom = Math.max(marginBottom, lp.effectiveMarginBottom);
325
271
  largestHeightInLine = Math.max(largestHeightInLine, child.getActualSize().height + lp.effectiveMarginTop + marginBottom);
326
272
  }
327
273
  }
328
274
  flexLine._crossSize = largestHeightInLine;
329
- viewIndex_1 += flexLine.itemCount;
275
+ viewIndex += flexLine.itemCount;
330
276
  });
331
277
  }
332
278
  this._determineCrossSize(this.flexDirection, widthMeasureSpec, heightMeasureSpec, this.effectivePaddingTop + this.effectivePaddingBottom);
333
279
  this._stretchViews(this.flexDirection, this.alignItems);
334
280
  this._setMeasuredDimensionForFlex(this.flexDirection, widthMeasureSpec, heightMeasureSpec, childState);
335
- };
336
- FlexboxLayout.prototype._measureVertical = function (widthMeasureSpec, heightMeasureSpec) {
337
- var widthSize = getMeasureSpecSize(widthMeasureSpec);
338
- var widthMode = getMeasureSpecMode(widthMeasureSpec);
339
- var heightSize = getMeasureSpecSize(heightMeasureSpec);
340
- var heightMode = getMeasureSpecMode(heightMeasureSpec);
341
- var childState = 0;
281
+ }
282
+ _measureVertical(widthMeasureSpec, heightMeasureSpec) {
283
+ const widthSize = getMeasureSpecSize(widthMeasureSpec);
284
+ const widthMode = getMeasureSpecMode(widthMeasureSpec);
285
+ const heightSize = getMeasureSpecSize(heightMeasureSpec);
286
+ const heightMode = getMeasureSpecMode(heightMeasureSpec);
287
+ let childState = 0;
342
288
  this._flexLines.length = 0;
343
- var childCount = this.measureContext.childrenCount;
344
- var paddingTop = this.effectivePaddingTop;
345
- var paddingBottom = this.effectivePaddingBottom;
346
- var largestWidthInColumn = Number.MIN_VALUE;
347
- var flexLine = new FlexLine();
289
+ const childCount = this.measureContext.childrenCount;
290
+ const paddingTop = this.effectivePaddingTop;
291
+ const paddingBottom = this.effectivePaddingBottom;
292
+ let largestWidthInColumn = Number.MIN_VALUE;
293
+ let flexLine = new FlexLine();
348
294
  flexLine._mainSize = paddingTop + paddingBottom;
349
- var indexInFlexLine = 0;
350
- for (var i = 0; i < childCount; i++) {
351
- var child = this._getReorderedChildAt(i);
295
+ let indexInFlexLine = 0;
296
+ for (let i = 0; i < childCount; i++) {
297
+ const child = this._getReorderedChildAt(i);
352
298
  if (child === null) {
353
299
  this._addFlexLineIfLastFlexItem(i, childCount, flexLine);
354
300
  continue;
@@ -359,17 +305,17 @@ var FlexboxLayout = /** @class */ (function (_super) {
359
305
  continue;
360
306
  }
361
307
  child._updateEffectiveLayoutValues(widthSize, widthMode, heightSize, heightMode);
362
- var lp = child; // .style;
308
+ const lp = child; // .style;
363
309
  if (FlexboxLayout.getAlignSelf(child) === 'stretch') {
364
310
  flexLine._indicesAlignSelfStretch.push(i);
365
311
  }
366
- var childHeight = lp.effectiveHeight;
312
+ let childHeight = lp.effectiveHeight;
367
313
  // TODO: This should always be false
368
314
  if (FlexBasisPercent.DEFAULT /* lp.flexBasisPercent */ !== FlexBasisPercent.DEFAULT && heightMode === EXACTLY) {
369
315
  childHeight = Math.round(heightSize * FlexBasisPercent.DEFAULT /* lp.flexBasisPercent */);
370
316
  }
371
- var childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(widthMeasureSpec, this.effectivePaddingLeft + this.effectivePaddingRight + lp.effectiveMarginLeft + lp.effectiveMarginRight, lp.effectiveWidth < 0 ? WRAP_CONTENT : lp.effectiveWidth);
372
- var childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(heightMeasureSpec, this.effectivePaddingTop + this.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, childHeight < 0 ? WRAP_CONTENT : childHeight);
317
+ const childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(widthMeasureSpec, this.effectivePaddingLeft + this.effectivePaddingRight + lp.effectiveMarginLeft + lp.effectiveMarginRight, lp.effectiveWidth < 0 ? WRAP_CONTENT : lp.effectiveWidth);
318
+ const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(heightMeasureSpec, this.effectivePaddingTop + this.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, childHeight < 0 ? WRAP_CONTENT : childHeight);
373
319
  child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
374
320
  this._checkSizeConstraints(child);
375
321
  childState = View.combineMeasuredStates(childState, child.getMeasuredState());
@@ -399,12 +345,12 @@ var FlexboxLayout = /** @class */ (function (_super) {
399
345
  this._determineCrossSize(this.flexDirection, widthMeasureSpec, heightMeasureSpec, this.effectivePaddingLeft + this.effectivePaddingRight);
400
346
  this._stretchViews(this.flexDirection, this.alignItems);
401
347
  this._setMeasuredDimensionForFlex(this.flexDirection, widthMeasureSpec, heightMeasureSpec, childState);
402
- };
403
- FlexboxLayout.prototype._checkSizeConstraints = function (view) {
404
- var needsMeasure = false;
405
- var childWidth = view.getMeasuredWidth();
406
- var childHeight = view.getMeasuredHeight();
407
- var minWidth = view.effectiveMinWidth;
348
+ }
349
+ _checkSizeConstraints(view) {
350
+ let needsMeasure = false;
351
+ let childWidth = view.getMeasuredWidth();
352
+ let childHeight = view.getMeasuredHeight();
353
+ const minWidth = view.effectiveMinWidth;
408
354
  view.effectiveMinWidth = 0;
409
355
  if (view.getMeasuredWidth() < minWidth) {
410
356
  needsMeasure = true;
@@ -414,7 +360,7 @@ var FlexboxLayout = /** @class */ (function (_super) {
414
360
  needsMeasure = true;
415
361
  childWidth = MAX_SIZE /*lp.maxWidth*/;
416
362
  }
417
- var minHeight = view.effectiveMinHeight;
363
+ const minHeight = view.effectiveMinHeight;
418
364
  view.effectiveMinHeight = 0;
419
365
  if (childHeight < minHeight) {
420
366
  needsMeasure = true;
@@ -429,25 +375,24 @@ var FlexboxLayout = /** @class */ (function (_super) {
429
375
  }
430
376
  view.effectiveMinWidth = minWidth;
431
377
  view.effectiveMinHeight = minHeight;
432
- };
433
- FlexboxLayout.prototype._addFlexLineIfLastFlexItem = function (childIndex, childCount, flexLine) {
378
+ }
379
+ _addFlexLineIfLastFlexItem(childIndex, childCount, flexLine) {
434
380
  if (childIndex === childCount - 1 && flexLine.itemCount !== 0) {
435
381
  this._addFlexLine(flexLine);
436
382
  }
437
- };
438
- FlexboxLayout.prototype._addFlexLine = function (flexLine) {
383
+ }
384
+ _addFlexLine(flexLine) {
439
385
  // Omit divider
440
386
  this._flexLines.push(flexLine);
441
- };
442
- FlexboxLayout.prototype._determineMainSize = function (flexDirection, widthMeasureSpec, heightMeasureSpec) {
443
- var _this = this;
444
- var mainSize;
445
- var paddingAlongMainAxis;
387
+ }
388
+ _determineMainSize(flexDirection, widthMeasureSpec, heightMeasureSpec) {
389
+ let mainSize;
390
+ let paddingAlongMainAxis;
446
391
  switch (flexDirection) {
447
392
  case FlexDirection.ROW:
448
393
  case FlexDirection.ROW_REVERSE: {
449
- var widthMode = getMeasureSpecMode(widthMeasureSpec);
450
- var widthSize = getMeasureSpecSize(widthMeasureSpec);
394
+ const widthMode = getMeasureSpecMode(widthMeasureSpec);
395
+ const widthSize = getMeasureSpecSize(widthMeasureSpec);
451
396
  if (widthMode === EXACTLY) {
452
397
  mainSize = widthSize;
453
398
  }
@@ -459,8 +404,8 @@ var FlexboxLayout = /** @class */ (function (_super) {
459
404
  }
460
405
  case FlexDirection.COLUMN:
461
406
  case FlexDirection.COLUMN_REVERSE: {
462
- var heightMode = getMeasureSpecMode(heightMeasureSpec);
463
- var heightSize = getMeasureSpecSize(heightMeasureSpec);
407
+ const heightMode = getMeasureSpecMode(heightMeasureSpec);
408
+ const heightSize = getMeasureSpecSize(heightMeasureSpec);
464
409
  if (heightMode === EXACTLY) {
465
410
  mainSize = heightSize;
466
411
  }
@@ -473,30 +418,30 @@ var FlexboxLayout = /** @class */ (function (_super) {
473
418
  default:
474
419
  throw new Error('Invalid flex direction: ' + flexDirection);
475
420
  }
476
- var childIndex = 0;
477
- this._flexLines.forEach(function (flexLine) {
421
+ let childIndex = 0;
422
+ this._flexLines.forEach((flexLine) => {
478
423
  if (flexLine.mainSize < mainSize) {
479
- childIndex = _this._expandFlexItems(flexLine, flexDirection, mainSize, paddingAlongMainAxis, childIndex);
424
+ childIndex = this._expandFlexItems(flexLine, flexDirection, mainSize, paddingAlongMainAxis, childIndex);
480
425
  }
481
426
  else {
482
- childIndex = _this._shrinkFlexItems(flexLine, flexDirection, mainSize, paddingAlongMainAxis, childIndex);
427
+ childIndex = this._shrinkFlexItems(flexLine, flexDirection, mainSize, paddingAlongMainAxis, childIndex);
483
428
  }
484
429
  });
485
- };
486
- FlexboxLayout.prototype._expandFlexItems = function (flexLine, flexDirection, maxMainSize, paddingAlongMainAxis, startIndex) {
487
- var childIndex = startIndex;
430
+ }
431
+ _expandFlexItems(flexLine, flexDirection, maxMainSize, paddingAlongMainAxis, startIndex) {
432
+ let childIndex = startIndex;
488
433
  if (flexLine._totalFlexGrow <= 0 || maxMainSize < flexLine._mainSize) {
489
434
  childIndex += flexLine._itemCount;
490
435
  return childIndex;
491
436
  }
492
- var sizeBeforeExpand = flexLine._mainSize;
493
- var needsReexpand = false;
494
- var pendingSpace = maxMainSize - flexLine._mainSize;
495
- var unitSpace = pendingSpace / flexLine._totalFlexGrow;
437
+ const sizeBeforeExpand = flexLine._mainSize;
438
+ let needsReexpand = false;
439
+ const pendingSpace = maxMainSize - flexLine._mainSize;
440
+ const unitSpace = pendingSpace / flexLine._totalFlexGrow;
496
441
  flexLine._mainSize = paddingAlongMainAxis + flexLine._dividerLengthInMainSize;
497
- var accumulatedRoundError = 0;
498
- for (var i = 0; i < flexLine.itemCount; i++) {
499
- var child = this._getReorderedChildAt(childIndex);
442
+ let accumulatedRoundError = 0;
443
+ for (let i = 0; i < flexLine.itemCount; i++) {
444
+ const child = this._getReorderedChildAt(childIndex);
500
445
  if (child === null) {
501
446
  continue;
502
447
  }
@@ -504,12 +449,12 @@ var FlexboxLayout = /** @class */ (function (_super) {
504
449
  childIndex++;
505
450
  continue;
506
451
  }
507
- var lp = child; // .style;
452
+ const lp = child; // .style;
508
453
  if (this._isMainAxisDirectionHorizontal(flexDirection)) {
509
454
  if (!this._childrenFrozen[childIndex]) {
510
- var flexGrow = FlexboxLayout.getFlexGrow(child);
511
- var rawCalculatedWidth = child.getMeasuredWidth() + unitSpace * flexGrow + accumulatedRoundError;
512
- var roundedCalculatedWidth = Math.round(rawCalculatedWidth);
455
+ const flexGrow = FlexboxLayout.getFlexGrow(child);
456
+ const rawCalculatedWidth = child.getMeasuredWidth() + unitSpace * flexGrow + accumulatedRoundError;
457
+ let roundedCalculatedWidth = Math.round(rawCalculatedWidth);
513
458
  // TODO: MAX_SIZE is so big, this is always false:
514
459
  if (roundedCalculatedWidth > MAX_SIZE /* lp.maxWidth */) {
515
460
  needsReexpand = true;
@@ -526,9 +471,9 @@ var FlexboxLayout = /** @class */ (function (_super) {
526
471
  }
527
472
  else {
528
473
  if (!this._childrenFrozen[childIndex]) {
529
- var flexGrow = FlexboxLayout.getFlexGrow(child);
530
- var rawCalculatedHeight = child.getMeasuredHeight() + unitSpace * flexGrow + accumulatedRoundError;
531
- var roundedCalculatedHeight = Math.round(rawCalculatedHeight);
474
+ const flexGrow = FlexboxLayout.getFlexGrow(child);
475
+ const rawCalculatedHeight = child.getMeasuredHeight() + unitSpace * flexGrow + accumulatedRoundError;
476
+ let roundedCalculatedHeight = Math.round(rawCalculatedHeight);
532
477
  // TODO: MAX_SIZE is so big this is always false:
533
478
  if (roundedCalculatedHeight > MAX_SIZE /*lp.maxHeight*/) {
534
479
  needsReexpand = true;
@@ -549,20 +494,20 @@ var FlexboxLayout = /** @class */ (function (_super) {
549
494
  this._expandFlexItems(flexLine, flexDirection, maxMainSize, paddingAlongMainAxis, startIndex);
550
495
  }
551
496
  return childIndex;
552
- };
553
- FlexboxLayout.prototype._shrinkFlexItems = function (flexLine, flexDirection, maxMainSize, paddingAlongMainAxis, startIndex) {
554
- var childIndex = startIndex;
555
- var sizeBeforeShrink = flexLine._mainSize;
497
+ }
498
+ _shrinkFlexItems(flexLine, flexDirection, maxMainSize, paddingAlongMainAxis, startIndex) {
499
+ let childIndex = startIndex;
500
+ const sizeBeforeShrink = flexLine._mainSize;
556
501
  if (flexLine._totalFlexShrink <= 0 || maxMainSize > flexLine._mainSize) {
557
502
  childIndex += flexLine.itemCount;
558
503
  return childIndex;
559
504
  }
560
- var needsReshrink = false;
561
- var unitShrink = (flexLine._mainSize - maxMainSize) / flexLine._totalFlexShrink;
562
- var accumulatedRoundError = 0;
505
+ let needsReshrink = false;
506
+ const unitShrink = (flexLine._mainSize - maxMainSize) / flexLine._totalFlexShrink;
507
+ let accumulatedRoundError = 0;
563
508
  flexLine._mainSize = paddingAlongMainAxis + flexLine._dividerLengthInMainSize;
564
- for (var i = 0; i < flexLine.itemCount; i++) {
565
- var child = this._getReorderedChildAt(childIndex);
509
+ for (let i = 0; i < flexLine.itemCount; i++) {
510
+ const child = this._getReorderedChildAt(childIndex);
566
511
  if (child === null) {
567
512
  continue;
568
513
  }
@@ -570,14 +515,14 @@ var FlexboxLayout = /** @class */ (function (_super) {
570
515
  childIndex++;
571
516
  continue;
572
517
  }
573
- var lp = child; // .style;
518
+ const lp = child; // .style;
574
519
  if (this._isMainAxisDirectionHorizontal(flexDirection)) {
575
520
  // The direction of main axis is horizontal
576
521
  if (!this._childrenFrozen[childIndex]) {
577
- var flexShrink = FlexboxLayout.getFlexShrink(child);
578
- var rawCalculatedWidth = child.getMeasuredWidth() - unitShrink * flexShrink + accumulatedRoundError;
579
- var roundedCalculatedWidth = Math.round(rawCalculatedWidth);
580
- var minWidth = child.effectiveMinWidth;
522
+ const flexShrink = FlexboxLayout.getFlexShrink(child);
523
+ const rawCalculatedWidth = child.getMeasuredWidth() - unitShrink * flexShrink + accumulatedRoundError;
524
+ let roundedCalculatedWidth = Math.round(rawCalculatedWidth);
525
+ const minWidth = child.effectiveMinWidth;
581
526
  child.effectiveMinWidth = 0;
582
527
  if (roundedCalculatedWidth < minWidth) {
583
528
  needsReshrink = true;
@@ -588,12 +533,12 @@ var FlexboxLayout = /** @class */ (function (_super) {
588
533
  else {
589
534
  accumulatedRoundError = rawCalculatedWidth - roundedCalculatedWidth;
590
535
  }
591
- var childWidthMeasureSpec = makeMeasureSpec(roundedCalculatedWidth, EXACTLY);
536
+ const childWidthMeasureSpec = makeMeasureSpec(roundedCalculatedWidth, EXACTLY);
592
537
  // NOTE: for controls that support internal content wrapping (e.g. UILabel) reducing the width
593
538
  // might result in increased height e.g. text that could be shown on one line for larger
594
539
  // width needs to be wrapped in two when width is reduced.
595
540
  // As a result we cannot unconditionally measure with EXACTLY the current measured height
596
- var childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentHeightMeasureSpec, lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
541
+ const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentHeightMeasureSpec, lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
597
542
  child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
598
543
  child.effectiveMinWidth = minWidth;
599
544
  // make sure crossSize is up-to-date as child calculated height might have increased
@@ -603,10 +548,10 @@ var FlexboxLayout = /** @class */ (function (_super) {
603
548
  }
604
549
  else {
605
550
  if (!this._childrenFrozen[childIndex]) {
606
- var flexShrink = FlexboxLayout.getFlexShrink(child);
607
- var rawCalculatedHeight = child.getMeasuredHeight() - unitShrink * flexShrink + accumulatedRoundError;
608
- var roundedCalculatedHeight = Math.round(rawCalculatedHeight);
609
- var minHeight = child.effectiveMinHeight;
551
+ const flexShrink = FlexboxLayout.getFlexShrink(child);
552
+ const rawCalculatedHeight = child.getMeasuredHeight() - unitShrink * flexShrink + accumulatedRoundError;
553
+ let roundedCalculatedHeight = Math.round(rawCalculatedHeight);
554
+ const minHeight = child.effectiveMinHeight;
610
555
  child.effectiveMinHeight = 0;
611
556
  if (roundedCalculatedHeight < minHeight) {
612
557
  needsReshrink = true;
@@ -628,11 +573,10 @@ var FlexboxLayout = /** @class */ (function (_super) {
628
573
  this._shrinkFlexItems(flexLine, flexDirection, maxMainSize, paddingAlongMainAxis, startIndex);
629
574
  }
630
575
  return childIndex;
631
- };
632
- FlexboxLayout.prototype._determineCrossSize = function (flexDirection, widthMeasureSpec, heightMeasureSpec, paddingAlongCrossAxis) {
633
- var _this = this;
634
- var mode;
635
- var size;
576
+ }
577
+ _determineCrossSize(flexDirection, widthMeasureSpec, heightMeasureSpec, paddingAlongCrossAxis) {
578
+ let mode;
579
+ let size;
636
580
  switch (flexDirection) {
637
581
  case FlexDirection.ROW:
638
582
  case FlexDirection.ROW_REVERSE:
@@ -648,24 +592,24 @@ var FlexboxLayout = /** @class */ (function (_super) {
648
592
  throw new Error('Invalid flex direction: ' + flexDirection);
649
593
  }
650
594
  if (mode === EXACTLY) {
651
- var totalCrossSize_1 = this._getSumOfCrossSize() + paddingAlongCrossAxis;
595
+ const totalCrossSize = this._getSumOfCrossSize() + paddingAlongCrossAxis;
652
596
  if (this._flexLines.length === 1) {
653
597
  this._flexLines[0]._crossSize = size - paddingAlongCrossAxis;
654
598
  }
655
- else if (this._flexLines.length >= 2 && totalCrossSize_1 < size) {
599
+ else if (this._flexLines.length >= 2 && totalCrossSize < size) {
656
600
  switch (this.alignContent) {
657
601
  case AlignContent.STRETCH:
658
- (function () {
659
- var freeSpaceUnit = (size - totalCrossSize_1) / _this._flexLines.length;
660
- var accumulatedError = 0;
661
- for (var i = 0, flexLinesSize = _this._flexLines.length; i < flexLinesSize; i++) {
662
- var flexLine = _this._flexLines[i];
663
- var newCrossSizeAsFloat = flexLine._crossSize + freeSpaceUnit;
664
- if (i === _this._flexLines.length - 1) {
602
+ (() => {
603
+ const freeSpaceUnit = (size - totalCrossSize) / this._flexLines.length;
604
+ let accumulatedError = 0;
605
+ for (let i = 0, flexLinesSize = this._flexLines.length; i < flexLinesSize; i++) {
606
+ const flexLine = this._flexLines[i];
607
+ let newCrossSizeAsFloat = flexLine._crossSize + freeSpaceUnit;
608
+ if (i === this._flexLines.length - 1) {
665
609
  newCrossSizeAsFloat += accumulatedError;
666
610
  accumulatedError = 0;
667
611
  }
668
- var newCrossSize = Math.round(newCrossSizeAsFloat);
612
+ let newCrossSize = Math.round(newCrossSizeAsFloat);
669
613
  accumulatedError += newCrossSizeAsFloat - newCrossSize;
670
614
  if (accumulatedError > 1) {
671
615
  newCrossSize += 1;
@@ -680,34 +624,34 @@ var FlexboxLayout = /** @class */ (function (_super) {
680
624
  })();
681
625
  break;
682
626
  case AlignContent.SPACE_AROUND:
683
- (function () {
684
- var spaceTopAndBottom = size - totalCrossSize_1;
685
- var numberOfSpaces = _this._flexLines.length * 2;
627
+ (() => {
628
+ let spaceTopAndBottom = size - totalCrossSize;
629
+ const numberOfSpaces = this._flexLines.length * 2;
686
630
  spaceTopAndBottom = spaceTopAndBottom / numberOfSpaces;
687
- var newFlexLines = [];
688
- var dummySpaceFlexLine = new FlexLine();
631
+ const newFlexLines = [];
632
+ const dummySpaceFlexLine = new FlexLine();
689
633
  dummySpaceFlexLine._crossSize = spaceTopAndBottom;
690
- _this._flexLines.forEach(function (flexLine) {
634
+ this._flexLines.forEach((flexLine) => {
691
635
  newFlexLines.push(dummySpaceFlexLine);
692
636
  newFlexLines.push(flexLine);
693
637
  newFlexLines.push(dummySpaceFlexLine);
694
638
  });
695
- _this._flexLines = newFlexLines;
639
+ this._flexLines = newFlexLines;
696
640
  })();
697
641
  break;
698
642
  case AlignContent.SPACE_BETWEEN:
699
- (function () {
700
- var spaceBetweenFlexLine = size - totalCrossSize_1;
701
- var numberOfSpaces = _this._flexLines.length - 1;
643
+ (() => {
644
+ let spaceBetweenFlexLine = size - totalCrossSize;
645
+ const numberOfSpaces = this._flexLines.length - 1;
702
646
  spaceBetweenFlexLine = spaceBetweenFlexLine / numberOfSpaces;
703
- var accumulatedError = 0;
704
- var newFlexLines = [];
705
- for (var i = 0, flexLineSize = _this._flexLines.length; i < flexLineSize; i++) {
706
- var flexLine = _this._flexLines[i];
647
+ let accumulatedError = 0;
648
+ const newFlexLines = [];
649
+ for (let i = 0, flexLineSize = this._flexLines.length; i < flexLineSize; i++) {
650
+ const flexLine = this._flexLines[i];
707
651
  newFlexLines.push(flexLine);
708
- if (i !== _this._flexLines.length - 1) {
709
- var dummySpaceFlexLine = new FlexLine();
710
- if (i === _this._flexLines.length - 2) {
652
+ if (i !== this._flexLines.length - 1) {
653
+ const dummySpaceFlexLine = new FlexLine();
654
+ if (i === this._flexLines.length - 2) {
711
655
  dummySpaceFlexLine._crossSize = Math.round(spaceBetweenFlexLine + accumulatedError);
712
656
  accumulatedError = 0;
713
657
  }
@@ -726,20 +670,20 @@ var FlexboxLayout = /** @class */ (function (_super) {
726
670
  newFlexLines.push(dummySpaceFlexLine);
727
671
  }
728
672
  }
729
- _this._flexLines = newFlexLines;
673
+ this._flexLines = newFlexLines;
730
674
  })();
731
675
  break;
732
676
  case AlignContent.CENTER: {
733
- var spaceAboveAndBottom = size - totalCrossSize_1;
677
+ let spaceAboveAndBottom = size - totalCrossSize;
734
678
  spaceAboveAndBottom = spaceAboveAndBottom / 2;
735
- var newFlexLines = [];
736
- var dummySpaceFlexLine = new FlexLine();
679
+ const newFlexLines = [];
680
+ const dummySpaceFlexLine = new FlexLine();
737
681
  dummySpaceFlexLine._crossSize = spaceAboveAndBottom;
738
- for (var i = 0, flexLineSize = this._flexLines.length; i < flexLineSize; i++) {
682
+ for (let i = 0, flexLineSize = this._flexLines.length; i < flexLineSize; i++) {
739
683
  if (i === 0) {
740
684
  newFlexLines.push(dummySpaceFlexLine);
741
685
  }
742
- var flexLine = this._flexLines[i];
686
+ const flexLine = this._flexLines[i];
743
687
  newFlexLines.push(flexLine);
744
688
  if (i === this._flexLines.length - 1) {
745
689
  newFlexLines.push(dummySpaceFlexLine);
@@ -749,8 +693,8 @@ var FlexboxLayout = /** @class */ (function (_super) {
749
693
  break;
750
694
  }
751
695
  case AlignContent.FLEX_END: {
752
- var spaceTop = size - totalCrossSize_1;
753
- var dummySpaceFlexLine = new FlexLine();
696
+ const spaceTop = size - totalCrossSize;
697
+ const dummySpaceFlexLine = new FlexLine();
754
698
  dummySpaceFlexLine._crossSize = spaceTop;
755
699
  this._flexLines.unshift(dummySpaceFlexLine);
756
700
  break;
@@ -758,26 +702,25 @@ var FlexboxLayout = /** @class */ (function (_super) {
758
702
  }
759
703
  }
760
704
  }
761
- };
762
- FlexboxLayout.prototype._stretchViews = function (flexDirection, alignItems) {
763
- var _this = this;
705
+ }
706
+ _stretchViews(flexDirection, alignItems) {
764
707
  if (alignItems === AlignItems.STRETCH) {
765
- var viewIndex_2 = 0;
766
- this._flexLines.forEach(function (flexLine) {
767
- for (var i = 0; i < flexLine.itemCount; i++, viewIndex_2++) {
768
- var view = _this._getReorderedChildAt(viewIndex_2);
769
- var alignSelf = FlexboxLayout.getAlignSelf(view);
708
+ let viewIndex = 0;
709
+ this._flexLines.forEach((flexLine) => {
710
+ for (let i = 0; i < flexLine.itemCount; i++, viewIndex++) {
711
+ const view = this._getReorderedChildAt(viewIndex);
712
+ const alignSelf = FlexboxLayout.getAlignSelf(view);
770
713
  if (alignSelf !== 'auto' && alignSelf !== 'stretch') {
771
714
  continue;
772
715
  }
773
716
  switch (flexDirection) {
774
717
  case FlexDirection.ROW:
775
718
  case FlexDirection.ROW_REVERSE:
776
- _this._stretchViewVertically(view, flexLine._crossSize);
719
+ this._stretchViewVertically(view, flexLine._crossSize);
777
720
  break;
778
721
  case FlexDirection.COLUMN:
779
722
  case FlexDirection.COLUMN_REVERSE:
780
- _this._stretchViewHorizontally(view, flexLine._crossSize);
723
+ this._stretchViewHorizontally(view, flexLine._crossSize);
781
724
  break;
782
725
  default:
783
726
  throw new Error('Invalid flex direction: ' + flexDirection);
@@ -786,17 +729,17 @@ var FlexboxLayout = /** @class */ (function (_super) {
786
729
  });
787
730
  }
788
731
  else {
789
- this._flexLines.forEach(function (flexLine) {
790
- flexLine._indicesAlignSelfStretch.forEach(function (index) {
791
- var view = _this._getReorderedChildAt(index);
732
+ this._flexLines.forEach((flexLine) => {
733
+ flexLine._indicesAlignSelfStretch.forEach((index) => {
734
+ const view = this._getReorderedChildAt(index);
792
735
  switch (flexDirection) {
793
736
  case FlexDirection.ROW:
794
737
  case FlexDirection.ROW_REVERSE:
795
- _this._stretchViewVertically(view, flexLine._crossSize);
738
+ this._stretchViewVertically(view, flexLine._crossSize);
796
739
  break;
797
740
  case FlexDirection.COLUMN:
798
741
  case FlexDirection.COLUMN_REVERSE:
799
- _this._stretchViewHorizontally(view, flexLine._crossSize);
742
+ this._stretchViewHorizontally(view, flexLine._crossSize);
800
743
  break;
801
744
  default:
802
745
  throw new Error('Invalid flex direction: ' + flexDirection);
@@ -804,30 +747,30 @@ var FlexboxLayout = /** @class */ (function (_super) {
804
747
  });
805
748
  });
806
749
  }
807
- };
808
- FlexboxLayout.prototype._stretchViewVertically = function (view, crossSize) {
809
- var newHeight = crossSize - view.effectiveMarginTop - view.effectiveMarginBottom;
750
+ }
751
+ _stretchViewVertically(view, crossSize) {
752
+ let newHeight = crossSize - view.effectiveMarginTop - view.effectiveMarginBottom;
810
753
  newHeight = Math.max(newHeight, 0);
811
- var originalMeasuredWidth = view.getMeasuredWidth();
812
- var childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentWidthMeasureSpec, view.effectivePaddingLeft + view.effectivePaddingRight + view.effectiveMarginLeft + view.effectiveMarginRight, view.effectiveWidth < 0 ? WRAP_CONTENT : Math.min(view.effectiveWidth, originalMeasuredWidth));
754
+ const originalMeasuredWidth = view.getMeasuredWidth();
755
+ let childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentWidthMeasureSpec, view.effectivePaddingLeft + view.effectivePaddingRight + view.effectiveMarginLeft + view.effectiveMarginRight, view.effectiveWidth < 0 ? WRAP_CONTENT : Math.min(view.effectiveWidth, originalMeasuredWidth));
813
756
  view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY));
814
757
  if (originalMeasuredWidth > view.getMeasuredWidth()) {
815
758
  childWidthMeasureSpec = makeMeasureSpec(originalMeasuredWidth, EXACTLY);
816
759
  view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY));
817
760
  }
818
- };
819
- FlexboxLayout.prototype._stretchViewHorizontally = function (view, crossSize) {
820
- var newWidth = crossSize - view.effectiveMarginLeft - view.effectiveMarginRight;
761
+ }
762
+ _stretchViewHorizontally(view, crossSize) {
763
+ let newWidth = crossSize - view.effectiveMarginLeft - view.effectiveMarginRight;
821
764
  newWidth = Math.max(newWidth, 0);
822
765
  view.measure(makeMeasureSpec(newWidth, EXACTLY), makeMeasureSpec(view.getMeasuredHeight(), EXACTLY));
823
- };
824
- FlexboxLayout.prototype._setMeasuredDimensionForFlex = function (flexDirection, widthMeasureSpec, heightMeasureSpec, childState) {
825
- var widthMode = getMeasureSpecMode(widthMeasureSpec);
826
- var widthSize = getMeasureSpecSize(widthMeasureSpec);
827
- var heightMode = getMeasureSpecMode(heightMeasureSpec);
828
- var heightSize = getMeasureSpecSize(heightMeasureSpec);
829
- var calculatedMaxHeight;
830
- var calculatedMaxWidth;
766
+ }
767
+ _setMeasuredDimensionForFlex(flexDirection, widthMeasureSpec, heightMeasureSpec, childState) {
768
+ const widthMode = getMeasureSpecMode(widthMeasureSpec);
769
+ let widthSize = getMeasureSpecSize(widthMeasureSpec);
770
+ const heightMode = getMeasureSpecMode(heightMeasureSpec);
771
+ let heightSize = getMeasureSpecSize(heightMeasureSpec);
772
+ let calculatedMaxHeight;
773
+ let calculatedMaxWidth;
831
774
  switch (flexDirection) {
832
775
  case FlexDirection.ROW:
833
776
  case FlexDirection.ROW_REVERSE:
@@ -842,7 +785,7 @@ var FlexboxLayout = /** @class */ (function (_super) {
842
785
  default:
843
786
  throw new Error('Invalid flex direction: ' + flexDirection);
844
787
  }
845
- var widthSizeAndState;
788
+ let widthSizeAndState;
846
789
  switch (widthMode) {
847
790
  case EXACTLY:
848
791
  if (widthSize < calculatedMaxWidth) {
@@ -867,7 +810,7 @@ var FlexboxLayout = /** @class */ (function (_super) {
867
810
  default:
868
811
  throw new Error('Unknown width mode is set: ' + widthMode);
869
812
  }
870
- var heightSizeAndState;
813
+ let heightSizeAndState;
871
814
  switch (heightMode) {
872
815
  case EXACTLY:
873
816
  if (heightSize < calculatedMaxHeight) {
@@ -893,8 +836,8 @@ var FlexboxLayout = /** @class */ (function (_super) {
893
836
  throw new Error('Unknown height mode is set: ' + heightMode);
894
837
  }
895
838
  this.setMeasuredDimension(widthSizeAndState, heightSizeAndState);
896
- };
897
- FlexboxLayout.prototype._isWrapRequired = function (child, mode, maxSize, currentLength, childLength, childAbsoluteIndex, childRelativeIndexInFlexLine) {
839
+ }
840
+ _isWrapRequired(child, mode, maxSize, currentLength, childLength, childAbsoluteIndex, childRelativeIndexInFlexLine) {
898
841
  if (this.flexWrap === FlexWrap.NOWRAP) {
899
842
  return false;
900
843
  }
@@ -906,20 +849,20 @@ var FlexboxLayout = /** @class */ (function (_super) {
906
849
  }
907
850
  // Omit divider
908
851
  return maxSize < currentLength + childLength;
909
- };
910
- FlexboxLayout.prototype._getLargestMainSize = function () {
911
- return this._flexLines.reduce(function (max, flexLine) { return Math.max(max, flexLine.mainSize); }, Number.MIN_VALUE);
912
- };
913
- FlexboxLayout.prototype._getSumOfCrossSize = function () {
852
+ }
853
+ _getLargestMainSize() {
854
+ return this._flexLines.reduce((max, flexLine) => Math.max(max, flexLine.mainSize), Number.MIN_VALUE);
855
+ }
856
+ _getSumOfCrossSize() {
914
857
  // Omit divider
915
- return this._flexLines.reduce(function (sum, flexLine) { return sum + flexLine._crossSize; }, 0);
916
- };
917
- FlexboxLayout.prototype._isMainAxisDirectionHorizontal = function (flexDirection) {
858
+ return this._flexLines.reduce((sum, flexLine) => sum + flexLine._crossSize, 0);
859
+ }
860
+ _isMainAxisDirectionHorizontal(flexDirection) {
918
861
  return flexDirection === FlexDirection.ROW || flexDirection === FlexDirection.ROW_REVERSE;
919
- };
920
- FlexboxLayout.prototype.onLayout = function (left, top, right, bottom) {
921
- var insets = this.getSafeAreaInsets();
922
- var isRtl;
862
+ }
863
+ onLayout(left, top, right, bottom) {
864
+ const insets = this.getSafeAreaInsets();
865
+ let isRtl;
923
866
  switch (this.flexDirection) {
924
867
  case FlexDirection.ROW:
925
868
  isRtl = false;
@@ -946,26 +889,25 @@ var FlexboxLayout = /** @class */ (function (_super) {
946
889
  default:
947
890
  throw new Error('Invalid flex direction is set: ' + this.flexDirection);
948
891
  }
949
- };
950
- FlexboxLayout.prototype._layoutHorizontal = function (isRtl, left, top, right, bottom, insets) {
951
- var _this = this;
892
+ }
893
+ _layoutHorizontal(isRtl, left, top, right, bottom, insets) {
952
894
  // include insets
953
- var paddingLeft = this.effectivePaddingLeft + insets.left;
954
- var paddingTop = this.effectivePaddingTop + insets.top;
955
- var paddingRight = this.effectivePaddingRight + insets.right;
956
- var paddingBottom = this.effectivePaddingBottom + insets.bottom;
957
- var childLeft;
958
- var currentViewIndex = 0;
959
- var height = bottom - top;
960
- var width = right - left;
895
+ const paddingLeft = this.effectivePaddingLeft + insets.left;
896
+ const paddingTop = this.effectivePaddingTop + insets.top;
897
+ const paddingRight = this.effectivePaddingRight + insets.right;
898
+ const paddingBottom = this.effectivePaddingBottom + insets.bottom;
899
+ let childLeft;
900
+ let currentViewIndex = 0;
901
+ const height = bottom - top;
902
+ const width = right - left;
961
903
  // include insets
962
- var childBottom = height - paddingBottom;
963
- var childTop = paddingTop;
964
- var childRight;
965
- this._flexLines.forEach(function (flexLine, i) {
904
+ let childBottom = height - paddingBottom;
905
+ let childTop = paddingTop;
906
+ let childRight;
907
+ this._flexLines.forEach((flexLine, i) => {
966
908
  // Omit divider
967
- var spaceBetweenItem = 0.0;
968
- switch (_this.justifyContent) {
909
+ let spaceBetweenItem = 0.0;
910
+ switch (this.justifyContent) {
969
911
  case JustifyContent.FLEX_START:
970
912
  childLeft = paddingLeft;
971
913
  childRight = width - paddingRight;
@@ -987,17 +929,17 @@ var FlexboxLayout = /** @class */ (function (_super) {
987
929
  break;
988
930
  case JustifyContent.SPACE_BETWEEN: {
989
931
  childLeft = paddingLeft;
990
- var denominator = flexLine.itemCount !== 1 ? flexLine.itemCount - 1 : 1.0;
932
+ const denominator = flexLine.itemCount !== 1 ? flexLine.itemCount - 1 : 1.0;
991
933
  spaceBetweenItem = (width - insets.left - insets.right - flexLine.mainSize) / denominator;
992
934
  childRight = width - paddingRight;
993
935
  break;
994
936
  }
995
937
  default:
996
- throw new Error('Invalid justifyContent is set: ' + _this.justifyContent);
938
+ throw new Error('Invalid justifyContent is set: ' + this.justifyContent);
997
939
  }
998
940
  spaceBetweenItem = Math.max(spaceBetweenItem, 0);
999
- for (var j = 0; j < flexLine.itemCount; j++) {
1000
- var child = _this._getReorderedChildAt(currentViewIndex);
941
+ for (let j = 0; j < flexLine.itemCount; j++) {
942
+ const child = this._getReorderedChildAt(currentViewIndex);
1001
943
  if (child === null) {
1002
944
  continue;
1003
945
  }
@@ -1005,30 +947,30 @@ var FlexboxLayout = /** @class */ (function (_super) {
1005
947
  currentViewIndex++;
1006
948
  continue;
1007
949
  }
1008
- var lp = child; // .style;
950
+ const lp = child; // .style;
1009
951
  childLeft += lp.effectiveMarginLeft;
1010
952
  childRight -= lp.effectiveMarginRight;
1011
953
  // Omit divider
1012
- if (_this.flexWrap === FlexWrap.WRAP_REVERSE) {
954
+ if (this.flexWrap === FlexWrap.WRAP_REVERSE) {
1013
955
  if (isRtl) {
1014
- _this._layoutSingleChildHorizontal(child, flexLine, _this.flexWrap, _this.alignItems, Math.round(childRight) - child.getMeasuredWidth(), childBottom - child.getMeasuredHeight(), Math.round(childRight), childBottom);
956
+ this._layoutSingleChildHorizontal(child, flexLine, this.flexWrap, this.alignItems, Math.round(childRight) - child.getMeasuredWidth(), childBottom - child.getMeasuredHeight(), Math.round(childRight), childBottom);
1015
957
  }
1016
958
  else {
1017
- _this._layoutSingleChildHorizontal(child, flexLine, _this.flexWrap, _this.alignItems, Math.round(childLeft), childBottom - child.getMeasuredHeight(), Math.round(childLeft) + child.getMeasuredWidth(), childBottom);
959
+ this._layoutSingleChildHorizontal(child, flexLine, this.flexWrap, this.alignItems, Math.round(childLeft), childBottom - child.getMeasuredHeight(), Math.round(childLeft) + child.getMeasuredWidth(), childBottom);
1018
960
  }
1019
961
  }
1020
962
  else {
1021
963
  if (isRtl) {
1022
- _this._layoutSingleChildHorizontal(child, flexLine, _this.flexWrap, _this.alignItems, Math.round(childRight) - child.getMeasuredWidth(), childTop, Math.round(childRight), childTop + child.getMeasuredHeight());
964
+ this._layoutSingleChildHorizontal(child, flexLine, this.flexWrap, this.alignItems, Math.round(childRight) - child.getMeasuredWidth(), childTop, Math.round(childRight), childTop + child.getMeasuredHeight());
1023
965
  }
1024
966
  else {
1025
- _this._layoutSingleChildHorizontal(child, flexLine, _this.flexWrap, _this.alignItems, Math.round(childLeft), childTop, Math.round(childLeft) + child.getMeasuredWidth(), childTop + child.getMeasuredHeight());
967
+ this._layoutSingleChildHorizontal(child, flexLine, this.flexWrap, this.alignItems, Math.round(childLeft), childTop, Math.round(childLeft) + child.getMeasuredWidth(), childTop + child.getMeasuredHeight());
1026
968
  }
1027
969
  }
1028
970
  childLeft += child.getMeasuredWidth() + spaceBetweenItem + lp.effectiveMarginRight;
1029
971
  childRight -= child.getMeasuredWidth() + spaceBetweenItem + lp.effectiveMarginLeft;
1030
972
  currentViewIndex++;
1031
- var bounds = child._getCurrentLayoutBounds();
973
+ const bounds = child._getCurrentLayoutBounds();
1032
974
  flexLine._left = Math.min(flexLine._left, bounds.left - lp.effectiveMarginLeft);
1033
975
  flexLine._top = Math.min(flexLine._top, bounds.top - lp.effectiveMarginTop);
1034
976
  flexLine._right = Math.max(flexLine._right, bounds.right + lp.effectiveMarginRight);
@@ -1037,14 +979,14 @@ var FlexboxLayout = /** @class */ (function (_super) {
1037
979
  childTop += flexLine._crossSize;
1038
980
  childBottom -= flexLine._crossSize;
1039
981
  });
1040
- };
1041
- FlexboxLayout.prototype._layoutSingleChildHorizontal = function (view, flexLine, flexWrap, alignItems, left, top, right, bottom) {
1042
- var lp = view; // .style;
1043
- var alignSelf = FlexboxLayout.getAlignSelf(view);
982
+ }
983
+ _layoutSingleChildHorizontal(view, flexLine, flexWrap, alignItems, left, top, right, bottom) {
984
+ const lp = view; // .style;
985
+ const alignSelf = FlexboxLayout.getAlignSelf(view);
1044
986
  if (alignSelf !== 'auto') {
1045
987
  alignItems = alignSelf;
1046
988
  }
1047
- var crossSize = flexLine._crossSize;
989
+ const crossSize = flexLine._crossSize;
1048
990
  switch (alignItems) {
1049
991
  case AlignItems.FLEX_START:
1050
992
  case AlignItems.STRETCH:
@@ -1057,12 +999,12 @@ var FlexboxLayout = /** @class */ (function (_super) {
1057
999
  break;
1058
1000
  case AlignItems.BASELINE:
1059
1001
  if (flexWrap !== FlexWrap.WRAP_REVERSE) {
1060
- var marginTop = flexLine._maxBaseline - FlexboxLayout.getBaseline(view);
1002
+ let marginTop = flexLine._maxBaseline - FlexboxLayout.getBaseline(view);
1061
1003
  marginTop = Math.max(marginTop, lp.effectiveMarginTop);
1062
1004
  view.layout(left, top + marginTop, right, bottom + marginTop);
1063
1005
  }
1064
1006
  else {
1065
- var marginBottom = flexLine._maxBaseline - view.getMeasuredHeight() + FlexboxLayout.getBaseline(view);
1007
+ let marginBottom = flexLine._maxBaseline - view.getMeasuredHeight() + FlexboxLayout.getBaseline(view);
1066
1008
  marginBottom = Math.max(marginBottom, lp.effectiveMarginBottom);
1067
1009
  view.layout(left, top - marginBottom, right, bottom - marginBottom);
1068
1010
  }
@@ -1076,7 +1018,7 @@ var FlexboxLayout = /** @class */ (function (_super) {
1076
1018
  }
1077
1019
  break;
1078
1020
  case AlignItems.CENTER: {
1079
- var topFromCrossAxis = (crossSize - view.getMeasuredHeight()) / 2;
1021
+ const topFromCrossAxis = (crossSize - view.getMeasuredHeight()) / 2;
1080
1022
  if (flexWrap !== FlexWrap.WRAP_REVERSE) {
1081
1023
  view.layout(left, top + topFromCrossAxis + lp.effectiveMarginTop - lp.effectiveMarginBottom, right, top + topFromCrossAxis + view.getMeasuredHeight() + lp.effectiveMarginTop - lp.effectiveMarginBottom);
1082
1024
  }
@@ -1086,24 +1028,23 @@ var FlexboxLayout = /** @class */ (function (_super) {
1086
1028
  break;
1087
1029
  }
1088
1030
  }
1089
- };
1090
- FlexboxLayout.prototype._layoutVertical = function (isRtl, fromBottomToTop, left, top, right, bottom, insets) {
1091
- var _this = this;
1092
- var paddingLeft = this.effectivePaddingLeft + insets.left;
1093
- var paddingTop = this.effectivePaddingTop + insets.top;
1094
- var paddingRight = this.effectivePaddingRight + insets.right;
1095
- var paddingBottom = this.effectivePaddingBottom + insets.bottom;
1096
- var childLeft = paddingLeft;
1097
- var currentViewIndex = 0;
1098
- var width = right - left;
1099
- var height = bottom - top;
1100
- var childRight = width - paddingRight;
1101
- var childTop;
1102
- var childBottom;
1103
- this._flexLines.forEach(function (flexLine) {
1031
+ }
1032
+ _layoutVertical(isRtl, fromBottomToTop, left, top, right, bottom, insets) {
1033
+ const paddingLeft = this.effectivePaddingLeft + insets.left;
1034
+ const paddingTop = this.effectivePaddingTop + insets.top;
1035
+ const paddingRight = this.effectivePaddingRight + insets.right;
1036
+ const paddingBottom = this.effectivePaddingBottom + insets.bottom;
1037
+ let childLeft = paddingLeft;
1038
+ let currentViewIndex = 0;
1039
+ const width = right - left;
1040
+ const height = bottom - top;
1041
+ let childRight = width - paddingRight;
1042
+ let childTop;
1043
+ let childBottom;
1044
+ this._flexLines.forEach((flexLine) => {
1104
1045
  // Omit divider.
1105
- var spaceBetweenItem = 0.0;
1106
- switch (_this.justifyContent) {
1046
+ let spaceBetweenItem = 0.0;
1047
+ switch (this.justifyContent) {
1107
1048
  case JustifyContent.FLEX_START:
1108
1049
  childTop = paddingTop;
1109
1050
  childBottom = height - paddingBottom;
@@ -1125,17 +1066,17 @@ var FlexboxLayout = /** @class */ (function (_super) {
1125
1066
  break;
1126
1067
  case JustifyContent.SPACE_BETWEEN: {
1127
1068
  childTop = paddingTop;
1128
- var denominator = flexLine.itemCount !== 1 ? flexLine.itemCount - 1 : 1.0;
1069
+ const denominator = flexLine.itemCount !== 1 ? flexLine.itemCount - 1 : 1.0;
1129
1070
  spaceBetweenItem = (height - insets.top - insets.bottom - flexLine.mainSize) / denominator;
1130
1071
  childBottom = height - paddingBottom;
1131
1072
  break;
1132
1073
  }
1133
1074
  default:
1134
- throw new Error('Invalid justifyContent is set: ' + _this.justifyContent);
1075
+ throw new Error('Invalid justifyContent is set: ' + this.justifyContent);
1135
1076
  }
1136
1077
  spaceBetweenItem = Math.max(spaceBetweenItem, 0);
1137
- for (var j = 0; j < flexLine.itemCount; j++) {
1138
- var child = _this._getReorderedChildAt(currentViewIndex);
1078
+ for (let j = 0; j < flexLine.itemCount; j++) {
1079
+ const child = this._getReorderedChildAt(currentViewIndex);
1139
1080
  if (child === null) {
1140
1081
  continue;
1141
1082
  }
@@ -1143,30 +1084,30 @@ var FlexboxLayout = /** @class */ (function (_super) {
1143
1084
  currentViewIndex++;
1144
1085
  continue;
1145
1086
  }
1146
- var lp = child; // .style;
1087
+ const lp = child; // .style;
1147
1088
  childTop += lp.effectiveMarginTop;
1148
1089
  childBottom -= lp.effectiveMarginBottom;
1149
1090
  // Omit divider.
1150
1091
  if (isRtl) {
1151
1092
  if (fromBottomToTop) {
1152
- _this._layoutSingleChildVertical(child, flexLine, true, _this.alignItems, childRight - child.getMeasuredWidth(), Math.round(childBottom) - child.getMeasuredHeight(), childRight, Math.round(childBottom));
1093
+ this._layoutSingleChildVertical(child, flexLine, true, this.alignItems, childRight - child.getMeasuredWidth(), Math.round(childBottom) - child.getMeasuredHeight(), childRight, Math.round(childBottom));
1153
1094
  }
1154
1095
  else {
1155
- _this._layoutSingleChildVertical(child, flexLine, true, _this.alignItems, childRight - child.getMeasuredWidth(), Math.round(childTop), childRight, Math.round(childTop) + child.getMeasuredHeight());
1096
+ this._layoutSingleChildVertical(child, flexLine, true, this.alignItems, childRight - child.getMeasuredWidth(), Math.round(childTop), childRight, Math.round(childTop) + child.getMeasuredHeight());
1156
1097
  }
1157
1098
  }
1158
1099
  else {
1159
1100
  if (fromBottomToTop) {
1160
- _this._layoutSingleChildVertical(child, flexLine, false, _this.alignItems, childLeft, Math.round(childBottom) - child.getMeasuredHeight(), childLeft + child.getMeasuredWidth(), Math.round(childBottom));
1101
+ this._layoutSingleChildVertical(child, flexLine, false, this.alignItems, childLeft, Math.round(childBottom) - child.getMeasuredHeight(), childLeft + child.getMeasuredWidth(), Math.round(childBottom));
1161
1102
  }
1162
1103
  else {
1163
- _this._layoutSingleChildVertical(child, flexLine, false, _this.alignItems, childLeft, Math.round(childTop), childLeft + child.getMeasuredWidth(), Math.round(childTop) + child.getMeasuredHeight());
1104
+ this._layoutSingleChildVertical(child, flexLine, false, this.alignItems, childLeft, Math.round(childTop), childLeft + child.getMeasuredWidth(), Math.round(childTop) + child.getMeasuredHeight());
1164
1105
  }
1165
1106
  }
1166
1107
  childTop += child.getMeasuredHeight() + spaceBetweenItem + lp.effectiveMarginBottom;
1167
1108
  childBottom -= child.getMeasuredHeight() + spaceBetweenItem + lp.effectiveMarginTop;
1168
1109
  currentViewIndex++;
1169
- var bounds = child._getCurrentLayoutBounds();
1110
+ const bounds = child._getCurrentLayoutBounds();
1170
1111
  flexLine._left = Math.min(flexLine._left, bounds.left - lp.effectiveMarginLeft);
1171
1112
  flexLine._top = Math.min(flexLine._top, bounds.top - lp.effectiveMarginTop);
1172
1113
  flexLine._right = Math.max(flexLine._right, bounds.right + lp.effectiveMarginRight);
@@ -1175,14 +1116,14 @@ var FlexboxLayout = /** @class */ (function (_super) {
1175
1116
  childLeft += flexLine.crossSize;
1176
1117
  childRight -= flexLine.crossSize;
1177
1118
  });
1178
- };
1179
- FlexboxLayout.prototype._layoutSingleChildVertical = function (view, flexLine, isRtl, alignItems, left, top, right, bottom) {
1180
- var lp = view; // .style;
1181
- var alignSelf = FlexboxLayout.getAlignSelf(view);
1119
+ }
1120
+ _layoutSingleChildVertical(view, flexLine, isRtl, alignItems, left, top, right, bottom) {
1121
+ const lp = view; // .style;
1122
+ const alignSelf = FlexboxLayout.getAlignSelf(view);
1182
1123
  if (alignSelf !== 'auto') {
1183
1124
  alignItems = alignSelf;
1184
1125
  }
1185
- var crossSize = flexLine.crossSize;
1126
+ const crossSize = flexLine.crossSize;
1186
1127
  switch (alignItems) {
1187
1128
  case AlignItems.FLEX_START:
1188
1129
  case AlignItems.STRETCH:
@@ -1205,7 +1146,7 @@ var FlexboxLayout = /** @class */ (function (_super) {
1205
1146
  }
1206
1147
  break;
1207
1148
  case AlignItems.CENTER: {
1208
- var leftFromCrossAxis = (crossSize - view.getMeasuredWidth()) / 2;
1149
+ const leftFromCrossAxis = (crossSize - view.getMeasuredWidth()) / 2;
1209
1150
  if (!isRtl) {
1210
1151
  view.layout(left + leftFromCrossAxis + lp.effectiveMarginLeft - lp.effectiveMarginRight, top, right + leftFromCrossAxis + lp.effectiveMarginLeft - lp.effectiveMarginRight, bottom);
1211
1152
  }
@@ -1215,16 +1156,16 @@ var FlexboxLayout = /** @class */ (function (_super) {
1215
1156
  break;
1216
1157
  }
1217
1158
  }
1218
- };
1159
+ }
1219
1160
  // Omit divider in onDraw(), drawDividersHorizontal, drawDividersVertical, drawVerticalDivider
1220
1161
  // requestLayout on set flexDirection, set flexWrap, set justifyContent, set alignItems, set alignContent
1221
1162
  // NOTE Consider moving to View if frequently used
1222
- FlexboxLayout.getChildMeasureSpec = function (spec, padding, childDimension) {
1223
- var specMode = layout.getMeasureSpecMode(spec);
1224
- var specSize = layout.getMeasureSpecSize(spec);
1225
- var size = Math.max(0, specSize - padding);
1226
- var resultSize = 0;
1227
- var resultMode = 0;
1163
+ static getChildMeasureSpec(spec, padding, childDimension) {
1164
+ const specMode = layout.getMeasureSpecMode(spec);
1165
+ const specSize = layout.getMeasureSpecSize(spec);
1166
+ const size = Math.max(0, specSize - padding);
1167
+ let resultSize = 0;
1168
+ let resultMode = 0;
1228
1169
  switch (specMode) {
1229
1170
  // Parent has imposed an exact size on us
1230
1171
  case EXACTLY:
@@ -1271,10 +1212,8 @@ var FlexboxLayout = /** @class */ (function (_super) {
1271
1212
  break;
1272
1213
  }
1273
1214
  return layout.makeMeasureSpec(resultSize, resultMode);
1274
- };
1275
- return FlexboxLayout;
1276
- }(FlexboxLayoutBase));
1277
- export { FlexboxLayout };
1215
+ }
1216
+ }
1278
1217
  (function (FlexboxLayout) {
1279
1218
  function getBaseline(child) {
1280
1219
  // TODO: Check if we support baseline for iOS.