@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,23 +8,22 @@ import { Trace } from '../trace';
8
8
  import { Builder } from '../ui/builder';
9
9
  import * as bindableResources from '../ui/core/bindable/bindable-resources';
10
10
  // prettier-ignore
11
- var ORIENTATION_CSS_CLASSES = [
12
- "".concat(CSSUtils.CLASS_PREFIX).concat(CoreTypes.DeviceOrientation.portrait),
13
- "".concat(CSSUtils.CLASS_PREFIX).concat(CoreTypes.DeviceOrientation.landscape),
14
- "".concat(CSSUtils.CLASS_PREFIX).concat(CoreTypes.DeviceOrientation.unknown),
11
+ const ORIENTATION_CSS_CLASSES = [
12
+ `${CSSUtils.CLASS_PREFIX}${CoreTypes.DeviceOrientation.portrait}`,
13
+ `${CSSUtils.CLASS_PREFIX}${CoreTypes.DeviceOrientation.landscape}`,
14
+ `${CSSUtils.CLASS_PREFIX}${CoreTypes.DeviceOrientation.unknown}`,
15
15
  ];
16
16
  // prettier-ignore
17
- var SYSTEM_APPEARANCE_CSS_CLASSES = [
18
- "".concat(CSSUtils.CLASS_PREFIX).concat(CoreTypes.SystemAppearance.light),
19
- "".concat(CSSUtils.CLASS_PREFIX).concat(CoreTypes.SystemAppearance.dark),
17
+ const SYSTEM_APPEARANCE_CSS_CLASSES = [
18
+ `${CSSUtils.CLASS_PREFIX}${CoreTypes.SystemAppearance.light}`,
19
+ `${CSSUtils.CLASS_PREFIX}${CoreTypes.SystemAppearance.dark}`,
20
20
  ];
21
- var globalEvents = global.NativeScriptGlobals.events;
22
- var ApplicationCommon = /** @class */ (function () {
21
+ const globalEvents = global.NativeScriptGlobals.events;
22
+ export class ApplicationCommon {
23
23
  /**
24
24
  * @internal - should not be constructed by the user.
25
25
  */
26
- function ApplicationCommon() {
27
- var _this = this;
26
+ constructor() {
28
27
  this.launchEvent = 'launch';
29
28
  this.suspendEvent = 'suspend';
30
29
  this.displayedEvent = 'displayed';
@@ -57,43 +56,43 @@ var ApplicationCommon = /** @class */ (function () {
57
56
  this._suspended = false;
58
57
  this.started = false;
59
58
  global.NativeScriptGlobals.appInstanceReady = true;
60
- global.__onUncaughtError = function (error) {
61
- _this.notify({
62
- eventName: _this.uncaughtErrorEvent,
63
- object: _this,
59
+ global.__onUncaughtError = (error) => {
60
+ this.notify({
61
+ eventName: this.uncaughtErrorEvent,
62
+ object: this,
64
63
  android: error,
65
64
  ios: error,
66
65
  error: error,
67
66
  });
68
67
  };
69
- global.__onDiscardedError = function (error) {
70
- _this.notify({
71
- eventName: _this.discardedErrorEvent,
72
- object: _this,
68
+ global.__onDiscardedError = (error) => {
69
+ this.notify({
70
+ eventName: this.discardedErrorEvent,
71
+ object: this,
73
72
  error: error,
74
73
  });
75
74
  };
76
- global.__onLiveSync = function (context) {
77
- if (_this.suspended) {
75
+ global.__onLiveSync = (context) => {
76
+ if (this.suspended) {
78
77
  return;
79
78
  }
80
- var rootView = _this.getRootView();
81
- _this.livesync(rootView, context);
79
+ const rootView = this.getRootView();
80
+ this.livesync(rootView, context);
82
81
  };
83
82
  }
84
83
  /**
85
84
  * @internal
86
85
  */
87
- ApplicationCommon.prototype.livesync = function (rootView, context) {
86
+ livesync(rootView, context) {
88
87
  this.notify({ eventName: this.livesyncEvent, object: this });
89
- var liveSyncCore = global.__onLiveSyncCore;
90
- var reapplyAppStyles = false;
88
+ const liveSyncCore = global.__onLiveSyncCore;
89
+ let reapplyAppStyles = false;
91
90
  // ModuleContext is available only for Hot Module Replacement
92
91
  if (context && context.path) {
93
- var styleExtensions = ['css', 'scss'];
94
- var appStylesFullFileName = this.getCssFileName();
95
- var appStylesFileName_1 = appStylesFullFileName.substring(0, appStylesFullFileName.lastIndexOf('.') + 1);
96
- reapplyAppStyles = styleExtensions.some(function (ext) { return context.path === appStylesFileName_1.concat(ext); });
92
+ const styleExtensions = ['css', 'scss'];
93
+ const appStylesFullFileName = this.getCssFileName();
94
+ const appStylesFileName = appStylesFullFileName.substring(0, appStylesFullFileName.lastIndexOf('.') + 1);
95
+ reapplyAppStyles = styleExtensions.some((ext) => context.path === appStylesFileName.concat(ext));
97
96
  }
98
97
  // Handle application styles
99
98
  if (rootView && reapplyAppStyles) {
@@ -102,7 +101,7 @@ var ApplicationCommon = /** @class */ (function () {
102
101
  else if (liveSyncCore) {
103
102
  liveSyncCore(context);
104
103
  }
105
- };
104
+ }
106
105
  /**
107
106
  * Applies the the `newCssClass` to the `rootView` and removes all other css classes from `cssClasses`
108
107
  * previously applied to the `rootView`.
@@ -111,64 +110,61 @@ var ApplicationCommon = /** @class */ (function () {
111
110
  * @param newCssClass
112
111
  * @param skipCssUpdate
113
112
  */
114
- ApplicationCommon.prototype.applyCssClass = function (rootView, cssClasses, newCssClass, skipCssUpdate) {
115
- var _this = this;
116
- if (skipCssUpdate === void 0) { skipCssUpdate = false; }
113
+ applyCssClass(rootView, cssClasses, newCssClass, skipCssUpdate = false) {
117
114
  if (!rootView.cssClasses.has(newCssClass)) {
118
- cssClasses.forEach(function (cssClass) { return _this.removeCssClass(rootView, cssClass); });
115
+ cssClasses.forEach((cssClass) => this.removeCssClass(rootView, cssClass));
119
116
  this.addCssClass(rootView, newCssClass);
120
117
  this.increaseStyleScopeApplicationCssSelectorVersion(rootView);
121
118
  if (!skipCssUpdate) {
122
119
  rootView._onCssStateChange();
123
120
  }
124
121
  if (Trace.isEnabled()) {
125
- var rootCssClasses = Array.from(rootView.cssClasses);
126
- Trace.write("Applying root css class: ".concat(newCssClass, ". rootView css classes: ").concat(rootCssClasses.join(' ')), Trace.categories.Style);
122
+ const rootCssClasses = Array.from(rootView.cssClasses);
123
+ Trace.write(`Applying root css class: ${newCssClass}. rootView css classes: ${rootCssClasses.join(' ')}`, Trace.categories.Style);
127
124
  }
128
125
  }
129
- };
130
- ApplicationCommon.prototype.addCssClass = function (rootView, cssClass) {
126
+ }
127
+ addCssClass(rootView, cssClass) {
131
128
  CSSUtils.pushToSystemCssClasses(cssClass);
132
129
  rootView.cssClasses.add(cssClass);
133
- };
134
- ApplicationCommon.prototype.removeCssClass = function (rootView, cssClass) {
130
+ }
131
+ removeCssClass(rootView, cssClass) {
135
132
  CSSUtils.removeSystemCssClass(cssClass);
136
133
  rootView.cssClasses.delete(cssClass);
137
- };
138
- ApplicationCommon.prototype.increaseStyleScopeApplicationCssSelectorVersion = function (rootView) {
139
- var _a, _b;
140
- var styleScope = (_a = rootView._styleScope) !== null && _a !== void 0 ? _a : (_b = rootView === null || rootView === void 0 ? void 0 : rootView.currentPage) === null || _b === void 0 ? void 0 : _b._styleScope;
134
+ }
135
+ increaseStyleScopeApplicationCssSelectorVersion(rootView) {
136
+ const styleScope = rootView._styleScope ?? rootView?.currentPage?._styleScope;
141
137
  if (styleScope) {
142
138
  styleScope._increaseApplicationCssSelectorVersion();
143
139
  }
144
- };
145
- ApplicationCommon.prototype.setRootViewCSSClasses = function (rootView) {
146
- var platform = Device.os.toLowerCase();
147
- var deviceType = Device.deviceType.toLowerCase();
148
- var orientation = this.orientation();
149
- var systemAppearance = this.systemAppearance();
140
+ }
141
+ setRootViewCSSClasses(rootView) {
142
+ const platform = Device.os.toLowerCase();
143
+ const deviceType = Device.deviceType.toLowerCase();
144
+ const orientation = this.orientation();
145
+ const systemAppearance = this.systemAppearance();
150
146
  if (platform) {
151
- CSSUtils.pushToSystemCssClasses("".concat(CSSUtils.CLASS_PREFIX).concat(platform));
147
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${platform}`);
152
148
  }
153
149
  if (deviceType) {
154
- CSSUtils.pushToSystemCssClasses("".concat(CSSUtils.CLASS_PREFIX).concat(deviceType));
150
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${deviceType}`);
155
151
  }
156
152
  if (orientation) {
157
- CSSUtils.pushToSystemCssClasses("".concat(CSSUtils.CLASS_PREFIX).concat(orientation));
153
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${orientation}`);
158
154
  }
159
155
  if (systemAppearance) {
160
- CSSUtils.pushToSystemCssClasses("".concat(CSSUtils.CLASS_PREFIX).concat(systemAppearance));
156
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${systemAppearance}`);
161
157
  }
162
158
  rootView.cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);
163
- var rootViewCssClasses = CSSUtils.getSystemCssClasses();
164
- rootViewCssClasses.forEach(function (c) { return rootView.cssClasses.add(c); });
159
+ const rootViewCssClasses = CSSUtils.getSystemCssClasses();
160
+ rootViewCssClasses.forEach((c) => rootView.cssClasses.add(c));
165
161
  this.increaseStyleScopeApplicationCssSelectorVersion(rootView);
166
162
  rootView._onCssStateChange();
167
163
  if (Trace.isEnabled()) {
168
- var rootCssClasses = Array.from(rootView.cssClasses);
169
- Trace.write("Setting root css classes: ".concat(rootCssClasses.join(' ')), Trace.categories.Style);
164
+ const rootCssClasses = Array.from(rootView.cssClasses);
165
+ Trace.write(`Setting root css classes: ${rootCssClasses.join(' ')}`, Trace.categories.Style);
170
166
  }
171
- };
167
+ }
172
168
  /**
173
169
  * iOS Only
174
170
  * Dynamically change the preferred frame rate
@@ -182,24 +178,29 @@ var ApplicationCommon = /** @class */ (function () {
182
178
  * ```
183
179
  * @param options { min?: number; max?: number; preferred?: number }
184
180
  */
185
- ApplicationCommon.prototype.setMaxRefreshRate = function (options) {
181
+ setMaxRefreshRate(options) {
186
182
  // implement in platform specific files (iOS only for now)
187
- };
183
+ }
188
184
  /**
189
185
  * @returns The main entry of the application
190
186
  */
191
- ApplicationCommon.prototype.getMainEntry = function () {
187
+ getMainEntry() {
192
188
  return this.mainEntry;
193
- };
194
- ApplicationCommon.prototype.notifyLaunch = function (additionalLanchEventData) {
195
- var launchArgs = __assign({ eventName: this.launchEvent, object: this, ios: this.ios, android: this.android }, additionalLanchEventData);
189
+ }
190
+ notifyLaunch(additionalLanchEventData) {
191
+ const launchArgs = {
192
+ eventName: this.launchEvent,
193
+ object: this,
194
+ ios: this.ios,
195
+ android: this.android,
196
+ ...additionalLanchEventData,
197
+ };
196
198
  this.notify(launchArgs);
197
199
  this.loadAppCss();
198
200
  return launchArgs.root;
199
- };
200
- ApplicationCommon.prototype.createRootView = function (view, fireLaunchEvent, additionalLanchEventData) {
201
- if (fireLaunchEvent === void 0) { fireLaunchEvent = false; }
202
- var rootView = view;
201
+ }
202
+ createRootView(view, fireLaunchEvent = false, additionalLanchEventData) {
203
+ let rootView = view;
203
204
  if (!rootView) {
204
205
  if (fireLaunchEvent) {
205
206
  rootView = this.notifyLaunch(additionalLanchEventData);
@@ -217,56 +218,56 @@ var ApplicationCommon = /** @class */ (function () {
217
218
  }
218
219
  }
219
220
  return rootView;
220
- };
221
- ApplicationCommon.prototype.getRootView = function () {
221
+ }
222
+ getRootView() {
222
223
  throw new Error('getRootView() Not implemented.');
223
- };
224
- ApplicationCommon.prototype.resetRootView = function (entry) {
224
+ }
225
+ resetRootView(entry) {
225
226
  this.mainEntry = typeof entry === 'string' ? { moduleName: entry } : entry;
226
227
  // rest of implementation is platform specific
227
- };
228
- ApplicationCommon.prototype.initRootView = function (rootView) {
228
+ }
229
+ initRootView(rootView) {
229
230
  this.setRootViewCSSClasses(rootView);
230
231
  initAccessibilityCssHelper();
231
232
  initAccessibilityFontScale();
232
- this.notify({ eventName: this.initRootViewEvent, rootView: rootView });
233
- };
233
+ this.notify({ eventName: this.initRootViewEvent, rootView });
234
+ }
234
235
  /**
235
236
  * Get application level static resources.
236
237
  */
237
- ApplicationCommon.prototype.getResources = function () {
238
+ getResources() {
238
239
  return bindableResources.get();
239
- };
240
+ }
240
241
  /**
241
242
  * Set application level static resources.
242
243
  */
243
- ApplicationCommon.prototype.setResources = function (res) {
244
+ setResources(res) {
244
245
  bindableResources.set(res);
245
- };
246
+ }
246
247
  /**
247
248
  * Sets css file name for the application.
248
249
  */
249
- ApplicationCommon.prototype.setCssFileName = function (cssFileName) {
250
+ setCssFileName(cssFileName) {
250
251
  this.cssFile = cssFileName;
251
252
  this.notify({
252
253
  eventName: this.cssChangedEvent,
253
254
  object: this,
254
255
  cssFile: cssFileName,
255
256
  });
256
- };
257
+ }
257
258
  /**
258
259
  * Gets css file name for the application.
259
260
  */
260
- ApplicationCommon.prototype.getCssFileName = function () {
261
+ getCssFileName() {
261
262
  return this.cssFile;
262
- };
263
+ }
263
264
  /**
264
265
  * Loads immediately the app.css.
265
266
  * By default the app.css file is loaded shortly after "loaded".
266
267
  * For the Android snapshot the CSS can be parsed during the snapshot generation,
267
268
  * as the CSS does not depend on runtime APIs, and loadAppCss will be called explicitly.
268
269
  */
269
- ApplicationCommon.prototype.loadAppCss = function () {
270
+ loadAppCss() {
270
271
  try {
271
272
  this.notify({
272
273
  eventName: this.loadAppCssEvent,
@@ -278,31 +279,31 @@ var ApplicationCommon = /** @class */ (function () {
278
279
  }
279
280
  catch (e) {
280
281
  if (Trace.isEnabled()) {
281
- Trace.write("The app CSS file ".concat(this.getCssFileName(), " couldn't be loaded!"), Trace.categories.Style, Trace.messageType.warn);
282
+ Trace.write(`The app CSS file ${this.getCssFileName()} couldn't be loaded!`, Trace.categories.Style, Trace.messageType.warn);
282
283
  }
283
284
  }
284
- };
285
- ApplicationCommon.prototype.addCss = function (cssText, attributeScoped) {
285
+ }
286
+ addCss(cssText, attributeScoped) {
286
287
  this.notify({
287
288
  eventName: this.cssChangedEvent,
288
289
  object: this,
289
290
  cssText: cssText,
290
291
  });
291
292
  if (!attributeScoped) {
292
- var rootView = this.getRootView();
293
+ const rootView = this.getRootView();
293
294
  if (rootView) {
294
295
  rootView._onCssStateChange();
295
296
  }
296
297
  }
297
- };
298
- ApplicationCommon.prototype.run = function (entry) {
298
+ }
299
+ run(entry) {
299
300
  throw new Error('run() Not implemented.');
300
- };
301
- ApplicationCommon.prototype.getOrientation = function () {
301
+ }
302
+ getOrientation() {
302
303
  // override in platform specific Application class
303
304
  throw new Error('getOrientation() not implemented');
304
- };
305
- ApplicationCommon.prototype.setOrientation = function (value) {
305
+ }
306
+ setOrientation(value) {
306
307
  if (this._orientation === value) {
307
308
  return;
308
309
  }
@@ -318,39 +319,37 @@ var ApplicationCommon = /** @class */ (function () {
318
319
  newValue: value,
319
320
  object: this,
320
321
  });
321
- };
322
- ApplicationCommon.prototype.orientation = function () {
323
- var _a;
324
- return ((_a = this._orientation) !== null && _a !== void 0 ? _a : (this._orientation = this.getOrientation()));
325
- };
326
- ApplicationCommon.prototype.orientationChanged = function (rootView, newOrientation) {
327
- var _this = this;
322
+ }
323
+ orientation() {
324
+ return (this._orientation ?? (this._orientation = this.getOrientation()));
325
+ }
326
+ orientationChanged(rootView, newOrientation) {
328
327
  if (!rootView) {
329
328
  return;
330
329
  }
331
- var newOrientationCssClass = "".concat(CSSUtils.CLASS_PREFIX).concat(newOrientation);
330
+ const newOrientationCssClass = `${CSSUtils.CLASS_PREFIX}${newOrientation}`;
332
331
  this.applyCssClass(rootView, ORIENTATION_CSS_CLASSES, newOrientationCssClass, true);
333
- var rootModalViews = rootView._getRootModalViews();
334
- rootModalViews.forEach(function (rootModalView) {
335
- _this.applyCssClass(rootModalView, ORIENTATION_CSS_CLASSES, newOrientationCssClass, true);
332
+ const rootModalViews = rootView._getRootModalViews();
333
+ rootModalViews.forEach((rootModalView) => {
334
+ this.applyCssClass(rootModalView, ORIENTATION_CSS_CLASSES, newOrientationCssClass, true);
336
335
  // Trigger state change for root modal view classes and media queries
337
336
  rootModalView._onCssStateChange();
338
337
  });
339
338
  // Trigger state change for root view classes and media queries
340
339
  rootView._onCssStateChange();
341
- };
342
- ApplicationCommon.prototype.getNativeApplication = function () {
340
+ }
341
+ getNativeApplication() {
343
342
  // override in platform specific Application class
344
343
  throw new Error('getNativeApplication() not implemented');
345
- };
346
- ApplicationCommon.prototype.hasLaunched = function () {
344
+ }
345
+ hasLaunched() {
347
346
  return global.NativeScriptGlobals && global.NativeScriptGlobals.launched;
348
- };
349
- ApplicationCommon.prototype.getSystemAppearance = function () {
347
+ }
348
+ getSystemAppearance() {
350
349
  // override in platform specific Application class
351
350
  throw new Error('getSystemAppearance() not implemented');
352
- };
353
- ApplicationCommon.prototype.setSystemAppearance = function (value) {
351
+ }
352
+ setSystemAppearance(value) {
354
353
  if (this._systemAppearance === value) {
355
354
  return;
356
355
  }
@@ -363,123 +362,106 @@ var ApplicationCommon = /** @class */ (function () {
363
362
  newValue: value,
364
363
  object: this,
365
364
  });
366
- };
367
- ApplicationCommon.prototype.systemAppearance = function () {
368
- var _a;
365
+ }
366
+ systemAppearance() {
369
367
  // return cached value, or get it from the platform specific override
370
- return ((_a = this._systemAppearance) !== null && _a !== void 0 ? _a : (this._systemAppearance = this.getSystemAppearance()));
371
- };
368
+ return (this._systemAppearance ?? (this._systemAppearance = this.getSystemAppearance()));
369
+ }
372
370
  /**
373
371
  * enable/disable systemAppearanceChanged
374
372
  */
375
- ApplicationCommon.prototype.setAutoSystemAppearanceChanged = function (value) {
373
+ setAutoSystemAppearanceChanged(value) {
376
374
  this.autoSystemAppearanceChanged = value;
377
- };
375
+ }
378
376
  /**
379
377
  * Updates root view classes including those of modals
380
378
  * @param rootView the root view
381
379
  * @param newSystemAppearance the new appearance change
382
380
  */
383
- ApplicationCommon.prototype.systemAppearanceChanged = function (rootView, newSystemAppearance) {
384
- var _this = this;
381
+ systemAppearanceChanged(rootView, newSystemAppearance) {
385
382
  if (!rootView || !this.autoSystemAppearanceChanged) {
386
383
  return;
387
384
  }
388
- var newSystemAppearanceCssClass = "".concat(CSSUtils.CLASS_PREFIX).concat(newSystemAppearance);
385
+ const newSystemAppearanceCssClass = `${CSSUtils.CLASS_PREFIX}${newSystemAppearance}`;
389
386
  this.applyCssClass(rootView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass, true);
390
- var rootModalViews = rootView._getRootModalViews();
391
- rootModalViews.forEach(function (rootModalView) {
392
- _this.applyCssClass(rootModalView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass, true);
387
+ const rootModalViews = rootView._getRootModalViews();
388
+ rootModalViews.forEach((rootModalView) => {
389
+ this.applyCssClass(rootModalView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass, true);
393
390
  // Trigger state change for root modal view classes and media queries
394
391
  rootModalView._onCssStateChange();
395
392
  });
396
393
  // Trigger state change for root view classes and media queries
397
394
  rootView._onCssStateChange();
398
- };
399
- Object.defineProperty(ApplicationCommon.prototype, "inBackground", {
400
- get: function () {
401
- return this._inBackground;
402
- },
403
- enumerable: false,
404
- configurable: true
405
- });
406
- ApplicationCommon.prototype.setInBackground = function (value, additonalData) {
395
+ }
396
+ get inBackground() {
397
+ return this._inBackground;
398
+ }
399
+ setInBackground(value, additonalData) {
407
400
  this._inBackground = value;
408
- this.notify(__assign({ eventName: value ? this.backgroundEvent : this.foregroundEvent, object: this, ios: this.ios }, additonalData));
409
- };
410
- Object.defineProperty(ApplicationCommon.prototype, "suspended", {
411
- get: function () {
412
- return this._suspended;
413
- },
414
- enumerable: false,
415
- configurable: true
416
- });
417
- ApplicationCommon.prototype.setSuspended = function (value, additonalData) {
401
+ this.notify({
402
+ eventName: value ? this.backgroundEvent : this.foregroundEvent,
403
+ object: this,
404
+ ios: this.ios,
405
+ ...additonalData,
406
+ });
407
+ }
408
+ get suspended() {
409
+ return this._suspended;
410
+ }
411
+ setSuspended(value, additonalData) {
418
412
  this._suspended = value;
419
- this.notify(__assign({ eventName: value ? this.suspendEvent : this.resumeEvent, object: this, ios: this.ios, android: this.android }, additonalData));
420
- };
421
- Object.defineProperty(ApplicationCommon.prototype, "android", {
422
- get: function () {
423
- return undefined;
424
- },
425
- enumerable: false,
426
- configurable: true
427
- });
428
- Object.defineProperty(ApplicationCommon.prototype, "ios", {
429
- get: function () {
430
- return undefined;
431
- },
432
- enumerable: false,
433
- configurable: true
434
- });
435
- Object.defineProperty(ApplicationCommon.prototype, "AndroidApplication", {
436
- get: function () {
437
- return this.android;
438
- },
439
- enumerable: false,
440
- configurable: true
441
- });
442
- Object.defineProperty(ApplicationCommon.prototype, "iOSApplication", {
443
- get: function () {
444
- return this.ios;
445
- },
446
- enumerable: false,
447
- configurable: true
448
- });
449
- // Expose statically for backwards compat on AndroidApplication.on etc.
450
- /**
451
- * @deprecated Use `Application.android.on()` instead.
452
- */
453
- ApplicationCommon.on = globalEvents.on.bind(globalEvents);
454
- /**
455
- * @deprecated Use `Application.android.once()` instead.
456
- */
457
- ApplicationCommon.once = globalEvents.once.bind(globalEvents);
458
- /**
459
- * @deprecated Use `Application.android.off()` instead.
460
- */
461
- ApplicationCommon.off = globalEvents.off.bind(globalEvents);
462
- /**
463
- * @deprecated Use `Application.android.notify()` instead.
464
- */
465
- ApplicationCommon.notify = globalEvents.notify.bind(globalEvents);
466
- /**
467
- * @deprecated Use `Application.android.hasListeners()` instead.
468
- */
469
- ApplicationCommon.hasListeners = globalEvents.hasListeners.bind(globalEvents);
470
- __decorate([
471
- profile,
472
- __metadata("design:type", Function),
473
- __metadata("design:paramtypes", [Object]),
474
- __metadata("design:returntype", Function)
475
- ], ApplicationCommon.prototype, "notifyLaunch", null);
476
- __decorate([
477
- profile,
478
- __metadata("design:type", Function),
479
- __metadata("design:paramtypes", [Function, Object, Object]),
480
- __metadata("design:returntype", void 0)
481
- ], ApplicationCommon.prototype, "createRootView", null);
482
- return ApplicationCommon;
483
- }());
484
- export { ApplicationCommon };
413
+ this.notify({
414
+ eventName: value ? this.suspendEvent : this.resumeEvent,
415
+ object: this,
416
+ ios: this.ios,
417
+ android: this.android,
418
+ ...additonalData,
419
+ });
420
+ }
421
+ get android() {
422
+ return undefined;
423
+ }
424
+ get ios() {
425
+ return undefined;
426
+ }
427
+ get AndroidApplication() {
428
+ return this.android;
429
+ }
430
+ get iOSApplication() {
431
+ return this.ios;
432
+ }
433
+ }
434
+ // Expose statically for backwards compat on AndroidApplication.on etc.
435
+ /**
436
+ * @deprecated Use `Application.android.on()` instead.
437
+ */
438
+ ApplicationCommon.on = globalEvents.on.bind(globalEvents);
439
+ /**
440
+ * @deprecated Use `Application.android.once()` instead.
441
+ */
442
+ ApplicationCommon.once = globalEvents.once.bind(globalEvents);
443
+ /**
444
+ * @deprecated Use `Application.android.off()` instead.
445
+ */
446
+ ApplicationCommon.off = globalEvents.off.bind(globalEvents);
447
+ /**
448
+ * @deprecated Use `Application.android.notify()` instead.
449
+ */
450
+ ApplicationCommon.notify = globalEvents.notify.bind(globalEvents);
451
+ /**
452
+ * @deprecated Use `Application.android.hasListeners()` instead.
453
+ */
454
+ ApplicationCommon.hasListeners = globalEvents.hasListeners.bind(globalEvents);
455
+ __decorate([
456
+ profile,
457
+ __metadata("design:type", Function),
458
+ __metadata("design:paramtypes", [Object]),
459
+ __metadata("design:returntype", Function)
460
+ ], ApplicationCommon.prototype, "notifyLaunch", null);
461
+ __decorate([
462
+ profile,
463
+ __metadata("design:type", Function),
464
+ __metadata("design:paramtypes", [Function, Object, Object]),
465
+ __metadata("design:returntype", void 0)
466
+ ], ApplicationCommon.prototype, "createRootView", null);
485
467
  //# sourceMappingURL=application-common.js.map