@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
@@ -5,19 +5,18 @@ import { profile } from '../../../profiling';
5
5
  /**
6
6
  * Value specifying that Property should be set to its initial value.
7
7
  */
8
- export var unsetValue = new Object();
9
- var cssPropertyNames = [];
10
- var symbolPropertyMap = {};
11
- var cssSymbolPropertyMap = {};
12
- var inheritableProperties = new Array();
13
- var inheritableCssProperties = new Array();
8
+ export const unsetValue = new Object();
9
+ const cssPropertyNames = [];
10
+ const symbolPropertyMap = {};
11
+ const cssSymbolPropertyMap = {};
12
+ const inheritableProperties = new Array();
13
+ const inheritableCssProperties = new Array();
14
14
  function print(map) {
15
- var symbols = Object.getOwnPropertySymbols(map);
16
- for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
17
- var symbol = symbols_1[_i];
18
- var prop = map[symbol];
15
+ const symbols = Object.getOwnPropertySymbols(map);
16
+ for (const symbol of symbols) {
17
+ const prop = map[symbol];
19
18
  if (!prop.registered) {
20
- console.log("Property ".concat(prop.name, " not Registered!!!!!"));
19
+ console.log(`Property ${prop.name} not Registered!!!!!`);
21
20
  }
22
21
  }
23
22
  }
@@ -48,33 +47,33 @@ export function _evaluateCssVariableExpression(view, cssName, value) {
48
47
  // Value is not using css-variable(s)
49
48
  return value;
50
49
  }
51
- var output = value.trim();
50
+ let output = value.trim();
52
51
  // Evaluate every (and nested) css-variables in the value.
53
- var lastValue;
52
+ let lastValue;
54
53
  while (lastValue !== output) {
55
54
  lastValue = output;
56
- var idx = output.lastIndexOf('var(');
55
+ const idx = output.lastIndexOf('var(');
57
56
  if (idx === -1) {
58
57
  continue;
59
58
  }
60
- var endIdx = output.indexOf(')', idx);
59
+ const endIdx = output.indexOf(')', idx);
61
60
  if (endIdx === -1) {
62
61
  continue;
63
62
  }
64
- var matched = output
63
+ const matched = output
65
64
  .substring(idx + 4, endIdx)
66
65
  .split(',')
67
- .map(function (v) { return v.trim(); })
68
- .filter(function (v) { return !!v; });
69
- var cssVariableName = matched.shift();
70
- var cssVariableValue = view.style.getCssVariable(cssVariableName);
66
+ .map((v) => v.trim())
67
+ .filter((v) => !!v);
68
+ const cssVariableName = matched.shift();
69
+ let cssVariableValue = view.style.getCssVariable(cssVariableName);
71
70
  if (cssVariableValue === null && matched.length) {
72
71
  cssVariableValue = _evaluateCssVariableExpression(view, cssName, matched.join(', ')).split(',')[0];
73
72
  }
74
73
  if (!cssVariableValue) {
75
74
  cssVariableValue = 'unset';
76
75
  }
77
- output = "".concat(output.substring(0, idx)).concat(cssVariableValue).concat(output.substring(endIdx + 1));
76
+ output = `${output.substring(0, idx)}${cssVariableValue}${output.substring(endIdx + 1)}`;
78
77
  }
79
78
  return output;
80
79
  }
@@ -91,31 +90,31 @@ export function _evaluateCssCalcExpression(value) {
91
90
  }
92
91
  }
93
92
  function getPropertiesFromMap(map) {
94
- var props = [];
95
- Object.getOwnPropertySymbols(map).forEach(function (symbol) { return props.push(map[symbol]); });
93
+ const props = [];
94
+ Object.getOwnPropertySymbols(map).forEach((symbol) => props.push(map[symbol]));
96
95
  return props;
97
96
  }
98
- var Property = /** @class */ (function () {
99
- function Property(options) {
97
+ export class Property {
98
+ constructor(options) {
100
99
  this.enumerable = true;
101
100
  this.configurable = true;
102
- var propertyName = options.name;
101
+ const propertyName = options.name;
103
102
  this.name = propertyName;
104
- var key = Symbol(propertyName + ':propertyKey');
103
+ const key = Symbol(propertyName + ':propertyKey');
105
104
  this.key = key;
106
- var getDefault = Symbol(propertyName + ':getDefault');
105
+ const getDefault = Symbol(propertyName + ':getDefault');
107
106
  this.getDefault = getDefault;
108
- var setNative = Symbol(propertyName + ':setNative');
107
+ const setNative = Symbol(propertyName + ':setNative');
109
108
  this.setNative = setNative;
110
- var defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
109
+ const defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
111
110
  this.defaultValueKey = defaultValueKey;
112
- var defaultValue = options.defaultValue;
111
+ const defaultValue = options.defaultValue;
113
112
  this.defaultValue = defaultValue;
114
- var eventName = propertyName + 'Change';
115
- var equalityComparer = options.equalityComparer;
116
- var affectsLayout = options.affectsLayout;
117
- var valueChanged = options.valueChanged;
118
- var valueConverter = options.valueConverter;
113
+ const eventName = propertyName + 'Change';
114
+ let equalityComparer = options.equalityComparer;
115
+ let affectsLayout = options.affectsLayout;
116
+ let valueChanged = options.valueChanged;
117
+ let valueConverter = options.valueConverter;
119
118
  this.overrideHandlers = function (options) {
120
119
  if (typeof options.equalityComparer !== 'undefined') {
121
120
  equalityComparer = options.equalityComparer;
@@ -130,11 +129,11 @@ var Property = /** @class */ (function () {
130
129
  valueConverter = options.valueConverter;
131
130
  }
132
131
  };
133
- var property = this;
132
+ const property = this;
134
133
  this.set = function (boxedValue) {
135
- var reset = boxedValue === unsetValue;
136
- var value;
137
- var wrapped;
134
+ const reset = boxedValue === unsetValue;
135
+ let value;
136
+ let wrapped;
138
137
  if (reset) {
139
138
  value = defaultValue;
140
139
  }
@@ -145,8 +144,8 @@ var Property = /** @class */ (function () {
145
144
  value = valueConverter(value);
146
145
  }
147
146
  }
148
- var oldValue = (key in this ? this[key] : defaultValue);
149
- var changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
147
+ const oldValue = (key in this ? this[key] : defaultValue);
148
+ const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
150
149
  if (wrapped || changed) {
151
150
  if (affectsLayout) {
152
151
  this.requestLayout();
@@ -195,10 +194,10 @@ var Property = /** @class */ (function () {
195
194
  if (this.hasListeners(eventName)) {
196
195
  this.notify({
197
196
  object: this,
198
- eventName: eventName,
199
- propertyName: propertyName,
200
- value: value,
201
- oldValue: oldValue,
197
+ eventName,
198
+ propertyName,
199
+ value,
200
+ oldValue,
202
201
  });
203
202
  }
204
203
  if (this.domNode) {
@@ -215,8 +214,8 @@ var Property = /** @class */ (function () {
215
214
  return (key in this ? this[key] : defaultValue);
216
215
  };
217
216
  this.nativeValueChange = function (owner, value) {
218
- var oldValue = (key in owner ? owner[key] : defaultValue);
219
- var changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
217
+ const oldValue = (key in owner ? owner[key] : defaultValue);
218
+ const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
220
219
  if (changed) {
221
220
  owner[key] = value;
222
221
  if (valueChanged) {
@@ -228,10 +227,10 @@ var Property = /** @class */ (function () {
228
227
  if (owner.hasListeners(eventName)) {
229
228
  owner.notify({
230
229
  object: owner,
231
- eventName: eventName,
232
- propertyName: propertyName,
233
- value: value,
234
- oldValue: oldValue,
230
+ eventName,
231
+ propertyName,
232
+ value,
233
+ oldValue,
235
234
  });
236
235
  }
237
236
  if (affectsLayout) {
@@ -244,39 +243,36 @@ var Property = /** @class */ (function () {
244
243
  };
245
244
  symbolPropertyMap[key] = this;
246
245
  }
247
- Property.prototype.register = function (cls) {
246
+ register(cls) {
248
247
  if (this.registered) {
249
- throw new Error("Property ".concat(this.name, " already registered."));
248
+ throw new Error(`Property ${this.name} already registered.`);
250
249
  }
251
250
  this.registered = true;
252
251
  Object.defineProperty(cls.prototype, this.name, this);
253
- };
254
- Property.prototype.isSet = function (instance) {
252
+ }
253
+ isSet(instance) {
255
254
  return this.key in instance;
256
- };
257
- return Property;
258
- }());
259
- export { Property };
255
+ }
256
+ }
260
257
  Property.prototype.isStyleProperty = false;
261
- var CoercibleProperty = /** @class */ (function (_super) {
262
- __extends(CoercibleProperty, _super);
263
- function CoercibleProperty(options) {
264
- var _this = _super.call(this, options) || this;
265
- var propertyName = options.name;
266
- var key = _this.key;
267
- var getDefault = _this.getDefault;
268
- var setNative = _this.setNative;
269
- var defaultValueKey = _this.defaultValueKey;
270
- var defaultValue = _this.defaultValue;
271
- var coerceKey = Symbol(propertyName + ':coerceKey');
272
- var eventName = propertyName + 'Change';
273
- var affectsLayout = options.affectsLayout;
274
- var equalityComparer = options.equalityComparer;
275
- var valueChanged = options.valueChanged;
276
- var valueConverter = options.valueConverter;
277
- var coerceCallback = options.coerceValue;
278
- var property = _this;
279
- _this.overrideHandlers = function (options) {
258
+ export class CoercibleProperty extends Property {
259
+ constructor(options) {
260
+ super(options);
261
+ const propertyName = options.name;
262
+ const key = this.key;
263
+ const getDefault = this.getDefault;
264
+ const setNative = this.setNative;
265
+ const defaultValueKey = this.defaultValueKey;
266
+ const defaultValue = this.defaultValue;
267
+ const coerceKey = Symbol(propertyName + ':coerceKey');
268
+ const eventName = propertyName + 'Change';
269
+ let affectsLayout = options.affectsLayout;
270
+ let equalityComparer = options.equalityComparer;
271
+ let valueChanged = options.valueChanged;
272
+ let valueConverter = options.valueConverter;
273
+ let coerceCallback = options.coerceValue;
274
+ const property = this;
275
+ this.overrideHandlers = function (options) {
280
276
  if (typeof options.equalityComparer !== 'undefined') {
281
277
  equalityComparer = options.equalityComparer;
282
278
  }
@@ -293,15 +289,15 @@ var CoercibleProperty = /** @class */ (function (_super) {
293
289
  coerceCallback = options.coerceValue;
294
290
  }
295
291
  };
296
- _this.coerce = function (target) {
297
- var originalValue = (coerceKey in target ? target[coerceKey] : defaultValue);
292
+ this.coerce = function (target) {
293
+ const originalValue = (coerceKey in target ? target[coerceKey] : defaultValue);
298
294
  // need that to make coercing but also fire change events
299
295
  target[propertyName] = originalValue;
300
296
  };
301
- _this.set = function (boxedValue) {
302
- var reset = boxedValue === unsetValue;
303
- var value;
304
- var wrapped;
297
+ this.set = function (boxedValue) {
298
+ const reset = boxedValue === unsetValue;
299
+ let value;
300
+ let wrapped;
305
301
  if (reset) {
306
302
  value = defaultValue;
307
303
  delete this[coerceKey];
@@ -315,8 +311,8 @@ var CoercibleProperty = /** @class */ (function (_super) {
315
311
  this[coerceKey] = value;
316
312
  value = coerceCallback(this, value);
317
313
  }
318
- var oldValue = key in this ? this[key] : defaultValue;
319
- var changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
314
+ const oldValue = key in this ? this[key] : defaultValue;
315
+ const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
320
316
  if (wrapped || changed) {
321
317
  if (reset) {
322
318
  delete this[key];
@@ -362,10 +358,10 @@ var CoercibleProperty = /** @class */ (function (_super) {
362
358
  if (this.hasListeners(eventName)) {
363
359
  this.notify({
364
360
  object: this,
365
- eventName: eventName,
366
- propertyName: propertyName,
367
- value: value,
368
- oldValue: oldValue,
361
+ eventName,
362
+ propertyName,
363
+ value,
364
+ oldValue,
369
365
  });
370
366
  }
371
367
  if (affectsLayout) {
@@ -381,101 +377,92 @@ var CoercibleProperty = /** @class */ (function (_super) {
381
377
  }
382
378
  }
383
379
  };
384
- return _this;
385
380
  }
386
- return CoercibleProperty;
387
- }(Property));
388
- export { CoercibleProperty };
389
- var InheritedProperty = /** @class */ (function (_super) {
390
- __extends(InheritedProperty, _super);
391
- function InheritedProperty(options) {
392
- var _this = _super.call(this, options) || this;
393
- var name = options.name;
394
- var key = _this.key;
395
- var defaultValue = options.defaultValue;
396
- var sourceKey = Symbol(name + ':valueSourceKey');
397
- _this.sourceKey = sourceKey;
398
- var setBase = _this.set;
399
- var setFunc = function (valueSource) {
400
- return function (value) {
401
- var that = this;
402
- var unboxedValue;
403
- var newValueSource;
404
- if (value === unsetValue) {
405
- // If unsetValue - we want to reset the property.
406
- var parent_1 = that.parent;
407
- // If we have parent and it has non-default value we use as our inherited value.
408
- if (parent_1 && parent_1[sourceKey] !== 0 /* ValueSource.Default */) {
409
- unboxedValue = parent_1[name];
410
- newValueSource = 1 /* ValueSource.Inherited */;
411
- }
412
- else {
413
- unboxedValue = defaultValue;
414
- newValueSource = 0 /* ValueSource.Default */;
415
- }
381
+ }
382
+ export class InheritedProperty extends Property {
383
+ constructor(options) {
384
+ super(options);
385
+ const name = options.name;
386
+ const key = this.key;
387
+ const defaultValue = options.defaultValue;
388
+ const sourceKey = Symbol(name + ':valueSourceKey');
389
+ this.sourceKey = sourceKey;
390
+ const setBase = this.set;
391
+ const setFunc = (valueSource) => function (value) {
392
+ const that = this;
393
+ let unboxedValue;
394
+ let newValueSource;
395
+ if (value === unsetValue) {
396
+ // If unsetValue - we want to reset the property.
397
+ const parent = that.parent;
398
+ // If we have parent and it has non-default value we use as our inherited value.
399
+ if (parent && parent[sourceKey] !== 0 /* ValueSource.Default */) {
400
+ unboxedValue = parent[name];
401
+ newValueSource = 1 /* ValueSource.Inherited */;
416
402
  }
417
403
  else {
418
- // else we are set through property set.
419
- unboxedValue = value;
420
- newValueSource = valueSource;
404
+ unboxedValue = defaultValue;
405
+ newValueSource = 0 /* ValueSource.Default */;
421
406
  }
422
- // take currentValue before calling base - base may change it.
423
- var currentValue = that[key];
424
- setBase.call(that, unboxedValue);
425
- var newValue = that[key];
426
- that[sourceKey] = newValueSource;
427
- if (currentValue !== newValue) {
428
- var reset_1 = newValueSource === 0 /* ValueSource.Default */;
429
- that.eachChild(function (child) {
430
- var childValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
431
- if (reset_1) {
432
- if (childValueSource === 1 /* ValueSource.Inherited */) {
433
- setFunc.call(child, unsetValue);
434
- }
407
+ }
408
+ else {
409
+ // else we are set through property set.
410
+ unboxedValue = value;
411
+ newValueSource = valueSource;
412
+ }
413
+ // take currentValue before calling base - base may change it.
414
+ const currentValue = that[key];
415
+ setBase.call(that, unboxedValue);
416
+ const newValue = that[key];
417
+ that[sourceKey] = newValueSource;
418
+ if (currentValue !== newValue) {
419
+ const reset = newValueSource === 0 /* ValueSource.Default */;
420
+ that.eachChild((child) => {
421
+ const childValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
422
+ if (reset) {
423
+ if (childValueSource === 1 /* ValueSource.Inherited */) {
424
+ setFunc.call(child, unsetValue);
435
425
  }
436
- else {
437
- if (childValueSource <= 1 /* ValueSource.Inherited */) {
438
- setInheritedValue.call(child, newValue);
439
- }
426
+ }
427
+ else {
428
+ if (childValueSource <= 1 /* ValueSource.Inherited */) {
429
+ setInheritedValue.call(child, newValue);
440
430
  }
441
- return true;
442
- });
443
- }
444
- };
431
+ }
432
+ return true;
433
+ });
434
+ }
445
435
  };
446
- var setInheritedValue = setFunc(1 /* ValueSource.Inherited */);
447
- _this.setInheritedValue = setInheritedValue;
448
- _this.set = setFunc(3 /* ValueSource.Local */);
449
- inheritableProperties.push(_this);
450
- return _this;
436
+ const setInheritedValue = setFunc(1 /* ValueSource.Inherited */);
437
+ this.setInheritedValue = setInheritedValue;
438
+ this.set = setFunc(3 /* ValueSource.Local */);
439
+ inheritableProperties.push(this);
451
440
  }
452
- return InheritedProperty;
453
- }(Property));
454
- export { InheritedProperty };
455
- var CssProperty = /** @class */ (function () {
456
- function CssProperty(options) {
457
- var propertyName = options.name;
441
+ }
442
+ export class CssProperty {
443
+ constructor(options) {
444
+ const propertyName = options.name;
458
445
  this.name = propertyName;
459
446
  cssPropertyNames.push(options.cssName);
460
- this.cssName = "css:".concat(options.cssName);
447
+ this.cssName = `css:${options.cssName}`;
461
448
  this.cssLocalName = options.cssName;
462
- var key = Symbol(propertyName + ':propertyKey');
449
+ const key = Symbol(propertyName + ':propertyKey');
463
450
  this.key = key;
464
- var sourceKey = Symbol(propertyName + ':valueSourceKey');
451
+ const sourceKey = Symbol(propertyName + ':valueSourceKey');
465
452
  this.sourceKey = sourceKey;
466
- var getDefault = Symbol(propertyName + ':getDefault');
453
+ const getDefault = Symbol(propertyName + ':getDefault');
467
454
  this.getDefault = getDefault;
468
- var setNative = Symbol(propertyName + ':setNative');
455
+ const setNative = Symbol(propertyName + ':setNative');
469
456
  this.setNative = setNative;
470
- var defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
457
+ const defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
471
458
  this.defaultValueKey = defaultValueKey;
472
- var defaultValue = options.defaultValue;
459
+ const defaultValue = options.defaultValue;
473
460
  this.defaultValue = defaultValue;
474
- var eventName = propertyName + 'Change';
475
- var affectsLayout = options.affectsLayout;
476
- var equalityComparer = options.equalityComparer;
477
- var valueChanged = options.valueChanged;
478
- var valueConverter = options.valueConverter;
461
+ const eventName = propertyName + 'Change';
462
+ let affectsLayout = options.affectsLayout;
463
+ let equalityComparer = options.equalityComparer;
464
+ let valueChanged = options.valueChanged;
465
+ let valueConverter = options.valueConverter;
479
466
  this.overrideHandlers = function (options) {
480
467
  if (typeof options.equalityComparer !== 'undefined') {
481
468
  equalityComparer = options.equalityComparer;
@@ -490,15 +477,15 @@ var CssProperty = /** @class */ (function () {
490
477
  valueConverter = options.valueConverter;
491
478
  }
492
479
  };
493
- var property = this;
480
+ const property = this;
494
481
  function setLocalValue(newValue) {
495
- var view = this.viewRef.get();
482
+ const view = this.viewRef.get();
496
483
  if (!view) {
497
- Trace.write("".concat(newValue, " not set to view because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
484
+ Trace.write(`${newValue} not set to view because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
498
485
  return;
499
486
  }
500
- var reset = newValue === unsetValue || newValue === '';
501
- var value;
487
+ const reset = newValue === unsetValue || newValue === '';
488
+ let value;
502
489
  if (reset) {
503
490
  value = defaultValue;
504
491
  delete this[sourceKey];
@@ -507,8 +494,8 @@ var CssProperty = /** @class */ (function () {
507
494
  this[sourceKey] = 3 /* ValueSource.Local */;
508
495
  value = valueConverter && typeof newValue === 'string' ? valueConverter(newValue) : newValue;
509
496
  }
510
- var oldValue = (key in this ? this[key] : defaultValue);
511
- var changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
497
+ const oldValue = (key in this ? this[key] : defaultValue);
498
+ const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
512
499
  if (changed) {
513
500
  if (reset) {
514
501
  delete this[key];
@@ -554,10 +541,10 @@ var CssProperty = /** @class */ (function () {
554
541
  if (this.hasListeners(eventName)) {
555
542
  this.notify({
556
543
  object: this,
557
- eventName: eventName,
558
- propertyName: propertyName,
559
- value: value,
560
- oldValue: oldValue,
544
+ eventName,
545
+ propertyName,
546
+ value,
547
+ oldValue,
561
548
  });
562
549
  }
563
550
  if (affectsLayout) {
@@ -566,18 +553,18 @@ var CssProperty = /** @class */ (function () {
566
553
  }
567
554
  }
568
555
  function setCssValue(newValue) {
569
- var view = this.viewRef.get();
556
+ const view = this.viewRef.get();
570
557
  if (!view) {
571
- Trace.write("".concat(newValue, " not set to view because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
558
+ Trace.write(`${newValue} not set to view because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
572
559
  return;
573
560
  }
574
- var currentValueSource = this[sourceKey] || 0 /* ValueSource.Default */;
561
+ const currentValueSource = this[sourceKey] || 0 /* ValueSource.Default */;
575
562
  // We have localValueSource - NOOP.
576
563
  if (currentValueSource === 3 /* ValueSource.Local */) {
577
564
  return;
578
565
  }
579
- var reset = newValue === unsetValue || newValue === '';
580
- var value;
566
+ const reset = newValue === unsetValue || newValue === '';
567
+ let value;
581
568
  if (reset) {
582
569
  value = defaultValue;
583
570
  delete this[sourceKey];
@@ -586,8 +573,8 @@ var CssProperty = /** @class */ (function () {
586
573
  value = valueConverter && typeof newValue === 'string' ? valueConverter(newValue) : newValue;
587
574
  this[sourceKey] = 2 /* ValueSource.Css */;
588
575
  }
589
- var oldValue = (key in this ? this[key] : defaultValue);
590
- var changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
576
+ const oldValue = (key in this ? this[key] : defaultValue);
577
+ const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
591
578
  if (changed) {
592
579
  if (reset) {
593
580
  delete this[key];
@@ -633,10 +620,10 @@ var CssProperty = /** @class */ (function () {
633
620
  if (this.hasListeners(eventName)) {
634
621
  this.notify({
635
622
  object: this,
636
- eventName: eventName,
637
- propertyName: propertyName,
638
- value: value,
639
- oldValue: oldValue,
623
+ eventName,
624
+ propertyName,
625
+ value,
626
+ oldValue,
640
627
  });
641
628
  }
642
629
  if (affectsLayout) {
@@ -661,9 +648,9 @@ var CssProperty = /** @class */ (function () {
661
648
  };
662
649
  cssSymbolPropertyMap[key] = this;
663
650
  }
664
- CssProperty.prototype.register = function (cls) {
651
+ register(cls) {
665
652
  if (this.registered) {
666
- throw new Error("Property ".concat(this.name, " already registered."));
653
+ throw new Error(`Property ${this.name} already registered.`);
667
654
  }
668
655
  this.registered = true;
669
656
  Object.defineProperty(cls.prototype, this.name, this.localValueDescriptor);
@@ -671,17 +658,15 @@ var CssProperty = /** @class */ (function () {
671
658
  if (this.cssLocalName !== this.cssName) {
672
659
  Object.defineProperty(cls.prototype, this.cssLocalName, this.localValueDescriptor);
673
660
  }
674
- };
675
- CssProperty.prototype.isSet = function (instance) {
661
+ }
662
+ isSet(instance) {
676
663
  return this.key in instance;
677
- };
678
- return CssProperty;
679
- }());
680
- export { CssProperty };
664
+ }
665
+ }
681
666
  CssProperty.prototype.isStyleProperty = true;
682
- var CssAnimationProperty = /** @class */ (function () {
683
- function CssAnimationProperty(options) {
684
- var propertyName = options.name;
667
+ export class CssAnimationProperty {
668
+ constructor(options) {
669
+ const propertyName = options.name;
685
670
  this.name = propertyName;
686
671
  cssPropertyNames.push(options.cssName);
687
672
  CssAnimationProperty.properties[propertyName] = this;
@@ -689,32 +674,32 @@ var CssAnimationProperty = /** @class */ (function () {
689
674
  CssAnimationProperty.properties[options.cssName] = this;
690
675
  }
691
676
  this._valueConverter = options.valueConverter;
692
- var cssLocalName = options.cssName || propertyName;
677
+ const cssLocalName = options.cssName || propertyName;
693
678
  this.cssLocalName = cssLocalName;
694
- var cssName = 'css:' + cssLocalName;
679
+ const cssName = 'css:' + cssLocalName;
695
680
  this.cssName = cssName;
696
- var keyframeName = 'keyframe:' + propertyName;
681
+ const keyframeName = 'keyframe:' + propertyName;
697
682
  this.keyframe = keyframeName;
698
- var defaultName = 'default:' + propertyName;
699
- var defaultValueKey = Symbol(defaultName);
683
+ const defaultName = 'default:' + propertyName;
684
+ const defaultValueKey = Symbol(defaultName);
700
685
  this.defaultValueKey = defaultValueKey;
701
686
  this.defaultValue = options.defaultValue;
702
- var cssValue = Symbol(cssName);
703
- var styleValue = Symbol("local:".concat(propertyName));
704
- var keyframeValue = Symbol(keyframeName);
705
- var computedValue = Symbol('computed-value:' + propertyName);
687
+ const cssValue = Symbol(cssName);
688
+ const styleValue = Symbol(`local:${propertyName}`);
689
+ const keyframeValue = Symbol(keyframeName);
690
+ const computedValue = Symbol('computed-value:' + propertyName);
706
691
  this.key = computedValue;
707
- var computedSource = Symbol('computed-source:' + propertyName);
692
+ const computedSource = Symbol('computed-source:' + propertyName);
708
693
  this.source = computedSource;
709
694
  this.getDefault = Symbol(propertyName + ':getDefault');
710
- var getDefault = this.getDefault;
711
- var setNative = (this.setNative = Symbol(propertyName + ':setNative'));
712
- var eventName = propertyName + 'Change';
713
- var property = this;
695
+ const getDefault = this.getDefault;
696
+ const setNative = (this.setNative = Symbol(propertyName + ':setNative'));
697
+ const eventName = propertyName + 'Change';
698
+ const property = this;
714
699
  function descriptor(symbol, propertySource, enumerable, configurable, getsComputed) {
715
700
  return {
716
- enumerable: enumerable,
717
- configurable: configurable,
701
+ enumerable,
702
+ configurable,
718
703
  get: getsComputed
719
704
  ? function () {
720
705
  return this[computedValue];
@@ -722,16 +707,16 @@ var CssAnimationProperty = /** @class */ (function () {
722
707
  : function () {
723
708
  return this[symbol];
724
709
  },
725
- set: function (boxedValue) {
726
- var view = this.viewRef.get();
710
+ set(boxedValue) {
711
+ const view = this.viewRef.get();
727
712
  if (!view) {
728
- Trace.write("".concat(boxedValue, " not set to view because \".viewRef\" is cleared"), Trace.categories.Animation, Trace.messageType.warn);
713
+ Trace.write(`${boxedValue} not set to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
729
714
  return;
730
715
  }
731
- var oldValue = this[computedValue];
732
- var oldSource = this[computedSource];
733
- var wasSet = oldSource !== 0 /* ValueSource.Default */;
734
- var reset = boxedValue === unsetValue || boxedValue === '';
716
+ const oldValue = this[computedValue];
717
+ const oldSource = this[computedSource];
718
+ const wasSet = oldSource !== 0 /* ValueSource.Default */;
719
+ const reset = boxedValue === unsetValue || boxedValue === '';
735
720
  if (reset) {
736
721
  this[symbol] = unsetValue;
737
722
  if (this[computedSource] === propertySource) {
@@ -760,10 +745,10 @@ var CssAnimationProperty = /** @class */ (function () {
760
745
  this[computedValue] = boxedValue;
761
746
  }
762
747
  }
763
- var value = this[computedValue];
764
- var source = this[computedSource];
765
- var isSet = source !== 0 /* ValueSource.Default */;
766
- var computedValueChanged = oldValue !== value && (!options.equalityComparer || !options.equalityComparer(oldValue, value));
748
+ const value = this[computedValue];
749
+ const source = this[computedSource];
750
+ const isSet = source !== 0 /* ValueSource.Default */;
751
+ const computedValueChanged = oldValue !== value && (!options.equalityComparer || !options.equalityComparer(oldValue, value));
767
752
  if (computedValueChanged && options.valueChanged) {
768
753
  options.valueChanged(this, oldValue, value);
769
754
  }
@@ -793,22 +778,22 @@ var CssAnimationProperty = /** @class */ (function () {
793
778
  if (computedValueChanged && this.hasListeners(eventName)) {
794
779
  this.notify({
795
780
  object: this,
796
- eventName: eventName,
797
- propertyName: propertyName,
798
- value: value,
799
- oldValue: oldValue,
781
+ eventName,
782
+ propertyName,
783
+ value,
784
+ oldValue,
800
785
  });
801
786
  }
802
787
  },
803
788
  };
804
789
  }
805
- var defaultPropertyDescriptor = descriptor(defaultValueKey, 0 /* ValueSource.Default */, false, false, false);
806
- var cssPropertyDescriptor = descriptor(cssValue, 2 /* ValueSource.Css */, false, false, false);
807
- var stylePropertyDescriptor = descriptor(styleValue, 3 /* ValueSource.Local */, true, true, true);
808
- var keyframePropertyDescriptor = descriptor(keyframeValue, 4 /* ValueSource.Keyframe */, false, false, false);
790
+ const defaultPropertyDescriptor = descriptor(defaultValueKey, 0 /* ValueSource.Default */, false, false, false);
791
+ const cssPropertyDescriptor = descriptor(cssValue, 2 /* ValueSource.Css */, false, false, false);
792
+ const stylePropertyDescriptor = descriptor(styleValue, 3 /* ValueSource.Local */, true, true, true);
793
+ const keyframePropertyDescriptor = descriptor(keyframeValue, 4 /* ValueSource.Keyframe */, false, false, false);
809
794
  symbolPropertyMap[computedValue] = this;
810
795
  cssSymbolPropertyMap[computedValue] = this;
811
- this.register = function (cls) {
796
+ this.register = (cls) => {
812
797
  cls.prototype[computedValue] = options.defaultValue;
813
798
  cls.prototype[computedSource] = 0 /* ValueSource.Default */;
814
799
  cls.prototype[cssValue] = unsetValue;
@@ -823,50 +808,47 @@ var CssAnimationProperty = /** @class */ (function () {
823
808
  Object.defineProperty(cls.prototype, keyframeName, keyframePropertyDescriptor);
824
809
  };
825
810
  }
826
- CssAnimationProperty.prototype._initDefaultNativeValue = function (target) {
827
- var view = target.viewRef.get();
811
+ _initDefaultNativeValue(target) {
812
+ const view = target.viewRef.get();
828
813
  if (!view) {
829
- Trace.write("_initDefaultNativeValue not executed to view because \".viewRef\" is cleared", Trace.categories.Animation, Trace.messageType.warn);
814
+ Trace.write(`_initDefaultNativeValue not executed to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
830
815
  return;
831
816
  }
832
- var defaultValueKey = this.defaultValueKey;
817
+ const defaultValueKey = this.defaultValueKey;
833
818
  if (!(defaultValueKey in target)) {
834
- var getDefault = this.getDefault;
819
+ const getDefault = this.getDefault;
835
820
  target[defaultValueKey] = view[getDefault] ? view[getDefault]() : this.defaultValue;
836
821
  }
837
- };
838
- CssAnimationProperty._getByCssName = function (name) {
822
+ }
823
+ static _getByCssName(name) {
839
824
  return this.properties[name];
840
- };
841
- CssAnimationProperty._getPropertyNames = function () {
825
+ }
826
+ static _getPropertyNames() {
842
827
  return Object.keys(CssAnimationProperty.properties);
843
- };
844
- CssAnimationProperty.prototype.isSet = function (instance) {
828
+ }
829
+ isSet(instance) {
845
830
  return instance[this.source] !== 0 /* ValueSource.Default */;
846
- };
847
- CssAnimationProperty.properties = {};
848
- return CssAnimationProperty;
849
- }());
850
- export { CssAnimationProperty };
831
+ }
832
+ }
833
+ CssAnimationProperty.properties = {};
851
834
  CssAnimationProperty.prototype.isStyleProperty = true;
852
- var InheritedCssProperty = /** @class */ (function (_super) {
853
- __extends(InheritedCssProperty, _super);
854
- function InheritedCssProperty(options) {
855
- var _this = _super.call(this, options) || this;
856
- var propertyName = options.name;
857
- var key = _this.key;
858
- var sourceKey = _this.sourceKey;
859
- var getDefault = _this.getDefault;
860
- var setNative = _this.setNative;
861
- var defaultValueKey = _this.defaultValueKey;
862
- var eventName = propertyName + 'Change';
863
- var defaultValue = options.defaultValue;
864
- var affectsLayout = options.affectsLayout;
865
- var equalityComparer = options.equalityComparer;
866
- var valueChanged = options.valueChanged;
867
- var valueConverter = options.valueConverter;
868
- var property = _this;
869
- _this.overrideHandlers = function (options) {
835
+ export class InheritedCssProperty extends CssProperty {
836
+ constructor(options) {
837
+ super(options);
838
+ const propertyName = options.name;
839
+ const key = this.key;
840
+ const sourceKey = this.sourceKey;
841
+ const getDefault = this.getDefault;
842
+ const setNative = this.setNative;
843
+ const defaultValueKey = this.defaultValueKey;
844
+ const eventName = propertyName + 'Change';
845
+ let defaultValue = options.defaultValue;
846
+ let affectsLayout = options.affectsLayout;
847
+ let equalityComparer = options.equalityComparer;
848
+ let valueChanged = options.valueChanged;
849
+ let valueConverter = options.valueConverter;
850
+ const property = this;
851
+ this.overrideHandlers = function (options) {
870
852
  if (typeof options.equalityComparer !== 'undefined') {
871
853
  equalityComparer = options.equalityComparer;
872
854
  }
@@ -880,159 +862,150 @@ var InheritedCssProperty = /** @class */ (function (_super) {
880
862
  valueConverter = options.valueConverter;
881
863
  }
882
864
  };
883
- var setFunc = function (valueSource) {
884
- return function (boxedValue) {
885
- var view = this.viewRef.get();
886
- if (!view) {
887
- Trace.write("".concat(boxedValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
865
+ const setFunc = (valueSource) => function (boxedValue) {
866
+ const view = this.viewRef.get();
867
+ if (!view) {
868
+ Trace.write(`${boxedValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
869
+ return;
870
+ }
871
+ const reset = boxedValue === unsetValue || boxedValue === '';
872
+ const currentValueSource = this[sourceKey] || 0 /* ValueSource.Default */;
873
+ if (reset) {
874
+ // If we want to reset cssValue and we have localValue - return;
875
+ if (valueSource === 2 /* ValueSource.Css */ && currentValueSource === 3 /* ValueSource.Local */) {
888
876
  return;
889
877
  }
890
- var reset = boxedValue === unsetValue || boxedValue === '';
891
- var currentValueSource = this[sourceKey] || 0 /* ValueSource.Default */;
892
- if (reset) {
893
- // If we want to reset cssValue and we have localValue - return;
894
- if (valueSource === 2 /* ValueSource.Css */ && currentValueSource === 3 /* ValueSource.Local */) {
895
- return;
896
- }
878
+ }
879
+ else {
880
+ if (currentValueSource > valueSource) {
881
+ return;
882
+ }
883
+ }
884
+ const oldValue = key in this ? this[key] : defaultValue;
885
+ let value;
886
+ let unsetNativeValue = false;
887
+ if (reset) {
888
+ // If unsetValue - we want to reset this property.
889
+ const parent = view.parent;
890
+ const style = parent ? parent.style : null;
891
+ // If we have parent and it has non-default value we use as our inherited value.
892
+ if (style && style[sourceKey] > 0 /* ValueSource.Default */) {
893
+ value = style[propertyName];
894
+ this[sourceKey] = 1 /* ValueSource.Inherited */;
895
+ this[key] = value;
897
896
  }
898
897
  else {
899
- if (currentValueSource > valueSource) {
900
- return;
901
- }
898
+ value = defaultValue;
899
+ delete this[sourceKey];
900
+ delete this[key];
901
+ unsetNativeValue = true;
902
902
  }
903
- var oldValue = key in this ? this[key] : defaultValue;
904
- var value;
905
- var unsetNativeValue = false;
906
- if (reset) {
907
- // If unsetValue - we want to reset this property.
908
- var parent_2 = view.parent;
909
- var style = parent_2 ? parent_2.style : null;
910
- // If we have parent and it has non-default value we use as our inherited value.
911
- if (style && style[sourceKey] > 0 /* ValueSource.Default */) {
912
- value = style[propertyName];
913
- this[sourceKey] = 1 /* ValueSource.Inherited */;
914
- this[key] = value;
915
- }
916
- else {
917
- value = defaultValue;
918
- delete this[sourceKey];
919
- delete this[key];
920
- unsetNativeValue = true;
921
- }
903
+ }
904
+ else {
905
+ this[sourceKey] = valueSource;
906
+ if (valueConverter && typeof boxedValue === 'string') {
907
+ value = valueConverter(boxedValue);
922
908
  }
923
909
  else {
924
- this[sourceKey] = valueSource;
925
- if (valueConverter && typeof boxedValue === 'string') {
926
- value = valueConverter(boxedValue);
927
- }
928
- else {
929
- value = boxedValue;
930
- }
931
- this[key] = value;
910
+ value = boxedValue;
932
911
  }
933
- var changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
934
- if (changed) {
935
- if (valueChanged) {
936
- valueChanged(this, oldValue, value);
937
- }
938
- if (view[setNative]) {
939
- if (view._suspendNativeUpdatesCount) {
940
- if (view._suspendedUpdates) {
941
- view._suspendedUpdates[propertyName] = property;
942
- }
912
+ this[key] = value;
913
+ }
914
+ const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
915
+ if (changed) {
916
+ if (valueChanged) {
917
+ valueChanged(this, oldValue, value);
918
+ }
919
+ if (view[setNative]) {
920
+ if (view._suspendNativeUpdatesCount) {
921
+ if (view._suspendedUpdates) {
922
+ view._suspendedUpdates[propertyName] = property;
943
923
  }
944
- else {
945
- if (unsetNativeValue) {
946
- if (defaultValueKey in this) {
947
- view[setNative](this[defaultValueKey]);
948
- delete this[defaultValueKey];
949
- }
950
- else {
951
- view[setNative](defaultValue);
952
- }
924
+ }
925
+ else {
926
+ if (unsetNativeValue) {
927
+ if (defaultValueKey in this) {
928
+ view[setNative](this[defaultValueKey]);
929
+ delete this[defaultValueKey];
953
930
  }
954
931
  else {
955
- if (!(defaultValueKey in this)) {
956
- this[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue;
957
- }
958
- view[setNative](value);
959
- }
960
- }
961
- }
962
- if (this.hasListeners(eventName)) {
963
- this.notify({
964
- object: this,
965
- eventName: eventName,
966
- propertyName: propertyName,
967
- value: value,
968
- oldValue: oldValue,
969
- });
970
- }
971
- if (affectsLayout) {
972
- view.requestLayout();
973
- }
974
- view.eachChild(function (child) {
975
- var childStyle = child.style;
976
- var childValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
977
- if (reset) {
978
- if (childValueSource === 1 /* ValueSource.Inherited */) {
979
- setDefaultFunc.call(childStyle, unsetValue);
932
+ view[setNative](defaultValue);
980
933
  }
981
934
  }
982
935
  else {
983
- if (childValueSource <= 1 /* ValueSource.Inherited */) {
984
- setInheritedFunc.call(childStyle, value);
936
+ if (!(defaultValueKey in this)) {
937
+ this[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue;
985
938
  }
939
+ view[setNative](value);
986
940
  }
987
- return true;
941
+ }
942
+ }
943
+ if (this.hasListeners(eventName)) {
944
+ this.notify({
945
+ object: this,
946
+ eventName,
947
+ propertyName,
948
+ value,
949
+ oldValue,
988
950
  });
989
951
  }
990
- };
952
+ if (affectsLayout) {
953
+ view.requestLayout();
954
+ }
955
+ view.eachChild((child) => {
956
+ const childStyle = child.style;
957
+ const childValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
958
+ if (reset) {
959
+ if (childValueSource === 1 /* ValueSource.Inherited */) {
960
+ setDefaultFunc.call(childStyle, unsetValue);
961
+ }
962
+ }
963
+ else {
964
+ if (childValueSource <= 1 /* ValueSource.Inherited */) {
965
+ setInheritedFunc.call(childStyle, value);
966
+ }
967
+ }
968
+ return true;
969
+ });
970
+ }
991
971
  };
992
- var setDefaultFunc = setFunc(0 /* ValueSource.Default */);
993
- var setInheritedFunc = setFunc(1 /* ValueSource.Inherited */);
994
- _this.setInheritedValue = setInheritedFunc;
995
- _this.cssValueDescriptor.set = setFunc(2 /* ValueSource.Css */);
996
- _this.localValueDescriptor.set = setFunc(3 /* ValueSource.Local */);
997
- inheritableCssProperties.push(_this);
998
- return _this;
972
+ const setDefaultFunc = setFunc(0 /* ValueSource.Default */);
973
+ const setInheritedFunc = setFunc(1 /* ValueSource.Inherited */);
974
+ this.setInheritedValue = setInheritedFunc;
975
+ this.cssValueDescriptor.set = setFunc(2 /* ValueSource.Css */);
976
+ this.localValueDescriptor.set = setFunc(3 /* ValueSource.Local */);
977
+ inheritableCssProperties.push(this);
999
978
  }
1000
- return InheritedCssProperty;
1001
- }(CssProperty));
1002
- export { InheritedCssProperty };
1003
- var ShorthandProperty = /** @class */ (function () {
1004
- function ShorthandProperty(options) {
979
+ }
980
+ export class ShorthandProperty {
981
+ constructor(options) {
1005
982
  this.name = options.name;
1006
- var key = Symbol(this.name + ':propertyKey');
983
+ const key = Symbol(this.name + ':propertyKey');
1007
984
  this.key = key;
1008
- this.cssName = "css:".concat(options.cssName);
1009
- this.cssLocalName = "".concat(options.cssName);
1010
- var converter = options.converter;
985
+ this.cssName = `css:${options.cssName}`;
986
+ this.cssLocalName = `${options.cssName}`;
987
+ const converter = options.converter;
1011
988
  function setLocalValue(value) {
1012
- var _this = this;
1013
- var view = this.viewRef.get();
989
+ const view = this.viewRef.get();
1014
990
  if (!view) {
1015
- Trace.write("setLocalValue not executed to view because \".viewRef\" is cleared", Trace.categories.Animation, Trace.messageType.warn);
991
+ Trace.write(`setLocalValue not executed to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
1016
992
  return;
1017
993
  }
1018
- view._batchUpdate(function () {
1019
- for (var _i = 0, _a = converter(value); _i < _a.length; _i++) {
1020
- var _b = _a[_i], p = _b[0], v = _b[1];
1021
- _this[p.name] = v;
994
+ view._batchUpdate(() => {
995
+ for (const [p, v] of converter(value)) {
996
+ this[p.name] = v;
1022
997
  }
1023
998
  });
1024
999
  }
1025
1000
  function setCssValue(value) {
1026
- var _this = this;
1027
- var view = this.viewRef.get();
1001
+ const view = this.viewRef.get();
1028
1002
  if (!view) {
1029
- Trace.write("setCssValue not executed to view because \".viewRef\" is cleared", Trace.categories.Animation, Trace.messageType.warn);
1003
+ Trace.write(`setCssValue not executed to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
1030
1004
  return;
1031
1005
  }
1032
- view._batchUpdate(function () {
1033
- for (var _i = 0, _a = converter(value); _i < _a.length; _i++) {
1034
- var _b = _a[_i], p = _b[0], v = _b[1];
1035
- _this[p.cssName] = v;
1006
+ view._batchUpdate(() => {
1007
+ for (const [p, v] of converter(value)) {
1008
+ this[p.cssName] = v;
1036
1009
  }
1037
1010
  });
1038
1011
  }
@@ -1051,19 +1024,17 @@ var ShorthandProperty = /** @class */ (function () {
1051
1024
  this.propertyBagDescriptor = {
1052
1025
  enumerable: false,
1053
1026
  configurable: true,
1054
- set: function (value) {
1055
- var _this = this;
1056
- converter(value).forEach(function (_a) {
1057
- var property = _a[0], value = _a[1];
1058
- _this[property.cssLocalName] = value;
1027
+ set(value) {
1028
+ converter(value).forEach(([property, value]) => {
1029
+ this[property.cssLocalName] = value;
1059
1030
  });
1060
1031
  },
1061
1032
  };
1062
1033
  cssSymbolPropertyMap[key] = this;
1063
1034
  }
1064
- ShorthandProperty.prototype.register = function (cls) {
1035
+ register(cls) {
1065
1036
  if (this.registered) {
1066
- throw new Error("Property ".concat(this.name, " already registered."));
1037
+ throw new Error(`Property ${this.name} already registered.`);
1067
1038
  }
1068
1039
  this.registered = true;
1069
1040
  Object.defineProperty(cls.prototype, this.name, this.localValueDescriptor);
@@ -1072,16 +1043,13 @@ var ShorthandProperty = /** @class */ (function () {
1072
1043
  Object.defineProperty(cls.prototype, this.cssLocalName, this.localValueDescriptor);
1073
1044
  }
1074
1045
  Object.defineProperty(cls.prototype.PropertyBag, this.cssLocalName, this.propertyBagDescriptor);
1075
- };
1076
- return ShorthandProperty;
1077
- }());
1078
- export { ShorthandProperty };
1046
+ }
1047
+ }
1079
1048
  function inheritablePropertyValuesOn(view) {
1080
- var array = new Array();
1081
- for (var _i = 0, inheritableProperties_1 = inheritableProperties; _i < inheritableProperties_1.length; _i++) {
1082
- var prop = inheritableProperties_1[_i];
1083
- var sourceKey = prop.sourceKey;
1084
- var valueSource = view[sourceKey] || 0 /* ValueSource.Default */;
1049
+ const array = new Array();
1050
+ for (const prop of inheritableProperties) {
1051
+ const sourceKey = prop.sourceKey;
1052
+ const valueSource = view[sourceKey] || 0 /* ValueSource.Default */;
1085
1053
  if (valueSource !== 0 /* ValueSource.Default */) {
1086
1054
  // use prop.name as it will return value or default value.
1087
1055
  // prop.key will return undefined if property is set the same value as default one.
@@ -1091,11 +1059,10 @@ function inheritablePropertyValuesOn(view) {
1091
1059
  return array;
1092
1060
  }
1093
1061
  function inheritableCssPropertyValuesOn(style) {
1094
- var array = new Array();
1095
- for (var _i = 0, inheritableCssProperties_1 = inheritableCssProperties; _i < inheritableCssProperties_1.length; _i++) {
1096
- var prop = inheritableCssProperties_1[_i];
1097
- var sourceKey = prop.sourceKey;
1098
- var valueSource = style[sourceKey] || 0 /* ValueSource.Default */;
1062
+ const array = new Array();
1063
+ for (const prop of inheritableCssProperties) {
1064
+ const sourceKey = prop.sourceKey;
1065
+ const valueSource = style[sourceKey] || 0 /* ValueSource.Default */;
1099
1066
  if (valueSource !== 0 /* ValueSource.Default */) {
1100
1067
  // use prop.name as it will return value or default value.
1101
1068
  // prop.key will return undefined if property is set the same value as default one.
@@ -1104,7 +1071,7 @@ function inheritableCssPropertyValuesOn(style) {
1104
1071
  }
1105
1072
  return array;
1106
1073
  }
1107
- export var initNativeView = profile('"properties".initNativeView', function initNativeView(view) {
1074
+ export const initNativeView = profile('"properties".initNativeView', function initNativeView(view) {
1108
1075
  if (view._suspendedUpdates) {
1109
1076
  applyPendingNativeSetters(view);
1110
1077
  }
@@ -1116,15 +1083,15 @@ export var initNativeView = profile('"properties".initNativeView', function init
1116
1083
  });
1117
1084
  export function applyPendingNativeSetters(view) {
1118
1085
  // TODO: Check what happens if a view was suspended and its value was reset, or set back to default!
1119
- var suspendedUpdates = view._suspendedUpdates;
1120
- for (var propertyName in suspendedUpdates) {
1121
- var property = suspendedUpdates[propertyName];
1122
- var setNative = property.setNative;
1086
+ const suspendedUpdates = view._suspendedUpdates;
1087
+ for (const propertyName in suspendedUpdates) {
1088
+ const property = suspendedUpdates[propertyName];
1089
+ const setNative = property.setNative;
1123
1090
  if (view[setNative]) {
1124
- var getDefault = property.getDefault, isStyleProperty = property.isStyleProperty, defaultValueKey = property.defaultValueKey, defaultValue = property.defaultValue;
1125
- var value = void 0;
1091
+ const { getDefault, isStyleProperty, defaultValueKey, defaultValue } = property;
1092
+ let value;
1126
1093
  if (isStyleProperty) {
1127
- var style = view.style;
1094
+ const style = view.style;
1128
1095
  if (property.isSet(view.style)) {
1129
1096
  if (!(defaultValueKey in style)) {
1130
1097
  style[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue;
@@ -1152,47 +1119,44 @@ export function applyPendingNativeSetters(view) {
1152
1119
  }
1153
1120
  }
1154
1121
  export function applyAllNativeSetters(view) {
1155
- var symbols = Object.getOwnPropertySymbols(view);
1156
- for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
1157
- var symbol = symbols_2[_i];
1158
- var property = symbolPropertyMap[symbol];
1122
+ let symbols = Object.getOwnPropertySymbols(view);
1123
+ for (const symbol of symbols) {
1124
+ const property = symbolPropertyMap[symbol];
1159
1125
  if (!property) {
1160
1126
  continue;
1161
1127
  }
1162
- var setNative = property.setNative;
1163
- var getDefault = property.getDefault;
1128
+ const setNative = property.setNative;
1129
+ const getDefault = property.getDefault;
1164
1130
  if (setNative in view) {
1165
- var defaultValueKey = property.defaultValueKey;
1131
+ const defaultValueKey = property.defaultValueKey;
1166
1132
  if (!(defaultValueKey in view)) {
1167
1133
  view[defaultValueKey] = view[getDefault] ? view[getDefault]() : property.defaultValue;
1168
1134
  }
1169
- var value = view[symbol];
1135
+ const value = view[symbol];
1170
1136
  view[setNative](value);
1171
1137
  }
1172
1138
  }
1173
- var style = view.style;
1139
+ const style = view.style;
1174
1140
  symbols = Object.getOwnPropertySymbols(style);
1175
- for (var _a = 0, symbols_3 = symbols; _a < symbols_3.length; _a++) {
1176
- var symbol = symbols_3[_a];
1177
- var property = cssSymbolPropertyMap[symbol];
1141
+ for (const symbol of symbols) {
1142
+ const property = cssSymbolPropertyMap[symbol];
1178
1143
  if (!property) {
1179
1144
  continue;
1180
1145
  }
1181
1146
  if (view[property.setNative]) {
1182
- var defaultValueKey = property.defaultValueKey;
1147
+ const defaultValueKey = property.defaultValueKey;
1183
1148
  if (!(defaultValueKey in style)) {
1184
1149
  style[defaultValueKey] = view[property.getDefault] ? view[property.getDefault]() : property.defaultValue;
1185
1150
  }
1186
- var value = style[symbol];
1151
+ const value = style[symbol];
1187
1152
  view[property.setNative](value);
1188
1153
  }
1189
1154
  }
1190
1155
  }
1191
1156
  export function resetNativeView(view) {
1192
- var symbols = Object.getOwnPropertySymbols(view);
1193
- for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
1194
- var symbol = symbols_4[_i];
1195
- var property = symbolPropertyMap[symbol];
1157
+ let symbols = Object.getOwnPropertySymbols(view);
1158
+ for (const symbol of symbols) {
1159
+ const property = symbolPropertyMap[symbol];
1196
1160
  if (!property) {
1197
1161
  continue;
1198
1162
  }
@@ -1206,11 +1170,10 @@ export function resetNativeView(view) {
1206
1170
  }
1207
1171
  }
1208
1172
  }
1209
- var style = view.style;
1173
+ const style = view.style;
1210
1174
  symbols = Object.getOwnPropertySymbols(style);
1211
- for (var _a = 0, symbols_5 = symbols; _a < symbols_5.length; _a++) {
1212
- var symbol = symbols_5[_a];
1213
- var property = cssSymbolPropertyMap[symbol];
1175
+ for (const symbol of symbols) {
1176
+ const property = cssSymbolPropertyMap[symbol];
1214
1177
  if (!property) {
1215
1178
  continue;
1216
1179
  }
@@ -1226,27 +1189,24 @@ export function resetNativeView(view) {
1226
1189
  }
1227
1190
  }
1228
1191
  export function clearInheritedProperties(view) {
1229
- for (var _i = 0, inheritableProperties_2 = inheritableProperties; _i < inheritableProperties_2.length; _i++) {
1230
- var prop = inheritableProperties_2[_i];
1231
- var sourceKey = prop.sourceKey;
1192
+ for (const prop of inheritableProperties) {
1193
+ const sourceKey = prop.sourceKey;
1232
1194
  if (view[sourceKey] === 1 /* ValueSource.Inherited */) {
1233
1195
  prop.set.call(view, unsetValue);
1234
1196
  }
1235
1197
  }
1236
- var style = view.style;
1237
- for (var _a = 0, inheritableCssProperties_2 = inheritableCssProperties; _a < inheritableCssProperties_2.length; _a++) {
1238
- var prop = inheritableCssProperties_2[_a];
1239
- var sourceKey = prop.sourceKey;
1198
+ const style = view.style;
1199
+ for (const prop of inheritableCssProperties) {
1200
+ const sourceKey = prop.sourceKey;
1240
1201
  if (style[sourceKey] === 1 /* ValueSource.Inherited */) {
1241
1202
  prop.setInheritedValue.call(style, unsetValue);
1242
1203
  }
1243
1204
  }
1244
1205
  }
1245
1206
  export function resetCSSProperties(style) {
1246
- var symbols = Object.getOwnPropertySymbols(style);
1247
- for (var _i = 0, symbols_6 = symbols; _i < symbols_6.length; _i++) {
1248
- var symbol = symbols_6[_i];
1249
- var cssProperty = void 0;
1207
+ const symbols = Object.getOwnPropertySymbols(style);
1208
+ for (const symbol of symbols) {
1209
+ let cssProperty;
1250
1210
  if ((cssProperty = cssSymbolPropertyMap[symbol])) {
1251
1211
  style[cssProperty.cssName] = unsetValue;
1252
1212
  if (cssProperty instanceof CssAnimationProperty) {
@@ -1256,47 +1216,40 @@ export function resetCSSProperties(style) {
1256
1216
  }
1257
1217
  }
1258
1218
  export function propagateInheritableProperties(view, child) {
1259
- var inheritablePropertyValues = inheritablePropertyValuesOn(view);
1260
- for (var _i = 0, inheritablePropertyValues_1 = inheritablePropertyValues; _i < inheritablePropertyValues_1.length; _i++) {
1261
- var pair = inheritablePropertyValues_1[_i];
1262
- var prop = pair.property;
1263
- var sourceKey = prop.sourceKey;
1264
- var currentValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
1219
+ const inheritablePropertyValues = inheritablePropertyValuesOn(view);
1220
+ for (const pair of inheritablePropertyValues) {
1221
+ const prop = pair.property;
1222
+ const sourceKey = prop.sourceKey;
1223
+ const currentValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
1265
1224
  if (currentValueSource <= 1 /* ValueSource.Inherited */) {
1266
1225
  prop.setInheritedValue.call(child, pair.value);
1267
1226
  }
1268
1227
  }
1269
1228
  }
1270
1229
  export function propagateInheritableCssProperties(parentStyle, childStyle) {
1271
- var inheritableCssPropertyValues = inheritableCssPropertyValuesOn(parentStyle);
1272
- for (var _i = 0, inheritableCssPropertyValues_1 = inheritableCssPropertyValues; _i < inheritableCssPropertyValues_1.length; _i++) {
1273
- var pair = inheritableCssPropertyValues_1[_i];
1274
- var prop = pair.property;
1275
- var sourceKey = prop.sourceKey;
1276
- var currentValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
1230
+ const inheritableCssPropertyValues = inheritableCssPropertyValuesOn(parentStyle);
1231
+ for (const pair of inheritableCssPropertyValues) {
1232
+ const prop = pair.property;
1233
+ const sourceKey = prop.sourceKey;
1234
+ const currentValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
1277
1235
  if (currentValueSource <= 1 /* ValueSource.Inherited */) {
1278
1236
  prop.setInheritedValue.call(childStyle, pair.value, 1 /* ValueSource.Inherited */);
1279
1237
  }
1280
1238
  }
1281
1239
  }
1282
- export function makeValidator() {
1283
- var values = [];
1284
- for (var _i = 0; _i < arguments.length; _i++) {
1285
- values[_i] = arguments[_i];
1286
- }
1287
- var set = new Set(values);
1288
- return function (value) { return set.has(value); };
1240
+ export function makeValidator(...values) {
1241
+ const set = new Set(values);
1242
+ return (value) => set.has(value);
1289
1243
  }
1290
- export function makeParser(isValid, allowNumbers) {
1291
- if (allowNumbers === void 0) { allowNumbers = false; }
1292
- return function (value) {
1293
- var lower = value && value.toLowerCase();
1244
+ export function makeParser(isValid, allowNumbers = false) {
1245
+ return (value) => {
1246
+ const lower = value && value.toLowerCase();
1294
1247
  if (isValid(lower)) {
1295
1248
  return lower;
1296
1249
  }
1297
1250
  else {
1298
1251
  if (allowNumbers) {
1299
- var convNumber = +value;
1252
+ const convNumber = +value;
1300
1253
  if (!isNaN(convNumber)) {
1301
1254
  return value;
1302
1255
  }
@@ -1306,27 +1259,25 @@ export function makeParser(isValid, allowNumbers) {
1306
1259
  };
1307
1260
  }
1308
1261
  export function getSetProperties(view) {
1309
- var result = [];
1310
- Object.getOwnPropertyNames(view).forEach(function (prop) {
1262
+ const result = [];
1263
+ Object.getOwnPropertyNames(view).forEach((prop) => {
1311
1264
  result.push([prop, view[prop]]);
1312
1265
  });
1313
- var symbols = Object.getOwnPropertySymbols(view);
1314
- for (var _i = 0, symbols_7 = symbols; _i < symbols_7.length; _i++) {
1315
- var symbol = symbols_7[_i];
1316
- var property = symbolPropertyMap[symbol];
1266
+ const symbols = Object.getOwnPropertySymbols(view);
1267
+ for (const symbol of symbols) {
1268
+ const property = symbolPropertyMap[symbol];
1317
1269
  if (!property) {
1318
1270
  continue;
1319
1271
  }
1320
- var value = view[property.key];
1272
+ const value = view[property.key];
1321
1273
  result.push([property.name, value]);
1322
1274
  }
1323
1275
  return result;
1324
1276
  }
1325
1277
  export function getComputedCssValues(view) {
1326
- var result = [];
1327
- var style = view.style;
1328
- for (var _i = 0, cssPropertyNames_1 = cssPropertyNames; _i < cssPropertyNames_1.length; _i++) {
1329
- var prop = cssPropertyNames_1[_i];
1278
+ const result = [];
1279
+ const style = view.style;
1280
+ for (const prop of cssPropertyNames) {
1330
1281
  result.push([prop, style[prop]]);
1331
1282
  }
1332
1283
  // Add these to enable box model in chrome-devtools styles tab