@nativescript/core 9.0.0-alpha.20 → 9.0.0-alpha.21

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 (1034) hide show
  1. package/css/package.json +36 -0
  2. package/css-value/package.json +23 -0
  3. package/package.json +86 -86
  4. package/platforms/android/widgets-release.aar +0 -0
  5. package/references.d.ts +1 -1
  6. package/ui/animation/index.d.ts +14 -1
  7. package/ui/button/index.d.ts +1 -1
  8. package/ui/core/view/index.d.ts +17 -5
  9. package/ui/search-bar/index.d.ts +7 -0
  10. package/ui/slider/index.d.ts +1 -1
  11. package/LICENSE +0 -19
  12. package/abortcontroller/abortsignal.d.ts +0 -23
  13. package/abortcontroller/abortsignal.js +0 -57
  14. package/abortcontroller/abortsignal.js.map +0 -1
  15. package/abortcontroller/index.d.ts +0 -20
  16. package/abortcontroller/index.js +0 -52
  17. package/abortcontroller/index.js.map +0 -1
  18. package/accessibility/accessibility-common.d.ts +0 -282
  19. package/accessibility/accessibility-common.js +0 -416
  20. package/accessibility/accessibility-common.js.map +0 -1
  21. package/accessibility/accessibility-properties.d.ts +0 -24
  22. package/accessibility/accessibility-properties.js +0 -118
  23. package/accessibility/accessibility-properties.js.map +0 -1
  24. package/accessibility/index.d.ts +0 -1
  25. package/accessibility/index.js +0 -2
  26. package/accessibility/index.js.map +0 -1
  27. package/animation-frame/animation-native.android.d.ts +0 -1
  28. package/animation-frame/animation-native.android.js +0 -4
  29. package/animation-frame/animation-native.android.js.map +0 -1
  30. package/animation-frame/animation-native.ios.d.ts +0 -1
  31. package/animation-frame/animation-native.ios.js +0 -3
  32. package/animation-frame/animation-native.ios.js.map +0 -1
  33. package/animation-frame/index.js +0 -81
  34. package/animation-frame/index.js.map +0 -1
  35. package/application/application-common.d.ts +0 -222
  36. package/application/application-common.js +0 -515
  37. package/application/application-common.js.map +0 -1
  38. package/application/application-interfaces.d.ts +0 -189
  39. package/application/application-interfaces.js +0 -2
  40. package/application/application-interfaces.js.map +0 -1
  41. package/application/application-shims.d.ts +0 -351
  42. package/application/application-shims.js +0 -353
  43. package/application/application-shims.js.map +0 -1
  44. package/application/application.android.d.ts +0 -71
  45. package/application/application.android.js +0 -1195
  46. package/application/application.android.js.map +0 -1
  47. package/application/application.ios.d.ts +0 -78
  48. package/application/application.ios.js +0 -871
  49. package/application/application.ios.js.map +0 -1
  50. package/application/helpers-common.d.ts +0 -50
  51. package/application/helpers-common.js +0 -153
  52. package/application/helpers-common.js.map +0 -1
  53. package/application/helpers.android.d.ts +0 -17
  54. package/application/helpers.android.js +0 -173
  55. package/application/helpers.android.js.map +0 -1
  56. package/application/helpers.ios.d.ts +0 -27
  57. package/application/helpers.ios.js +0 -62
  58. package/application/helpers.ios.js.map +0 -1
  59. package/application/index.android.d.ts +0 -2
  60. package/application/index.android.js +0 -3
  61. package/application/index.android.js.map +0 -1
  62. package/application/index.ios.d.ts +0 -2
  63. package/application/index.ios.js +0 -3
  64. package/application/index.ios.js.map +0 -1
  65. package/application-settings/application-settings-common.d.ts +0 -2
  66. package/application-settings/application-settings-common.js +0 -15
  67. package/application-settings/application-settings-common.js.map +0 -1
  68. package/application-settings/index.android.d.ts +0 -11
  69. package/application-settings/index.android.js +0 -124
  70. package/application-settings/index.android.js.map +0 -1
  71. package/application-settings/index.ios.d.ts +0 -11
  72. package/application-settings/index.ios.js +0 -81
  73. package/application-settings/index.ios.js.map +0 -1
  74. package/bundle-entry-points.d.ts +0 -1
  75. package/bundle-entry-points.js +0 -47
  76. package/bundle-entry-points.js.map +0 -1
  77. package/color/color-common.d.ts +0 -136
  78. package/color/color-common.js +0 -341
  79. package/color/color-common.js.map +0 -1
  80. package/color/color-types.d.ts +0 -49
  81. package/color/color-types.js +0 -3
  82. package/color/color-types.js.map +0 -1
  83. package/color/color-utils.d.ts +0 -38
  84. package/color/color-utils.js +0 -213
  85. package/color/color-utils.js.map +0 -1
  86. package/color/index.android.d.ts +0 -4
  87. package/color/index.android.js +0 -7
  88. package/color/index.android.js.map +0 -1
  89. package/color/index.ios.d.ts +0 -7
  90. package/color/index.ios.js +0 -19
  91. package/color/index.ios.js.map +0 -1
  92. package/color/known-colors.d.ts +0 -144
  93. package/color/known-colors.js +0 -165
  94. package/color/known-colors.js.map +0 -1
  95. package/config/config.interface.d.ts +0 -254
  96. package/config/config.interface.js +0 -2
  97. package/config/config.interface.js.map +0 -1
  98. package/config/index.d.ts +0 -1
  99. package/config/index.js +0 -2
  100. package/config/index.js.map +0 -1
  101. package/connectivity/index.android.d.ts +0 -11
  102. package/connectivity/index.android.js +0 -157
  103. package/connectivity/index.android.js.map +0 -1
  104. package/connectivity/index.ios.d.ts +0 -11
  105. package/connectivity/index.ios.js +0 -132
  106. package/connectivity/index.ios.js.map +0 -1
  107. package/console/index.d.ts +0 -14
  108. package/console/index.js +0 -33
  109. package/console/index.js.map +0 -1
  110. package/core-types/animation-types.d.ts +0 -11
  111. package/core-types/animation-types.js +0 -13
  112. package/core-types/animation-types.js.map +0 -1
  113. package/core-types/index.d.ts +0 -331
  114. package/core-types/index.js +0 -281
  115. package/core-types/index.js.map +0 -1
  116. package/core-types/validators.d.ts +0 -2
  117. package/core-types/validators.js +0 -18
  118. package/core-types/validators.js.map +0 -1
  119. package/css/CSS3Parser.d.ts +0 -184
  120. package/css/CSS3Parser.js +0 -534
  121. package/css/CSS3Parser.js.map +0 -1
  122. package/css/CSSNativeScript.d.ts +0 -14
  123. package/css/CSSNativeScript.js +0 -113
  124. package/css/CSSNativeScript.js.map +0 -1
  125. package/css/css-tree-parser.d.ts +0 -1
  126. package/css/css-tree-parser.js +0 -133
  127. package/css/css-tree-parser.js.map +0 -1
  128. package/css/lib/parse/index.d.ts +0 -1
  129. package/css/lib/parse/index.js +0 -500
  130. package/css/lib/parse/index.js.map +0 -1
  131. package/css/parser.d.ts +0 -70
  132. package/css/parser.js +0 -517
  133. package/css/parser.js.map +0 -1
  134. package/css/reworkcss.d.ts +0 -44
  135. package/css/reworkcss.js +0 -5
  136. package/css/reworkcss.js.map +0 -1
  137. package/css/system-classes.d.ts +0 -12
  138. package/css/system-classes.js +0 -47
  139. package/css/system-classes.js.map +0 -1
  140. package/css-mediaquery/index.d.ts +0 -27
  141. package/css-mediaquery/index.js +0 -118
  142. package/css-mediaquery/index.js.map +0 -1
  143. package/css-value/reworkcss-value.d.ts +0 -31
  144. package/css-value/reworkcss-value.js +0 -91
  145. package/css-value/reworkcss-value.js.map +0 -1
  146. package/data/observable/index.d.ts +0 -212
  147. package/data/observable/index.js +0 -440
  148. package/data/observable/index.js.map +0 -1
  149. package/data/observable-array/index.d.ts +0 -215
  150. package/data/observable-array/index.js +0 -325
  151. package/data/observable-array/index.js.map +0 -1
  152. package/data/virtual-array/index.d.ts +0 -72
  153. package/data/virtual-array/index.js +0 -133
  154. package/data/virtual-array/index.js.map +0 -1
  155. package/debugger/InspectorBackendCommands.d.ts +0 -1056
  156. package/debugger/InspectorBackendCommands.js +0 -578
  157. package/debugger/InspectorBackendCommands.js.map +0 -1
  158. package/debugger/devtools-elements-interfaces.d.ts +0 -16
  159. package/debugger/devtools-elements-interfaces.js +0 -2
  160. package/debugger/devtools-elements-interfaces.js.map +0 -1
  161. package/debugger/devtools-elements.common.d.ts +0 -7
  162. package/debugger/devtools-elements.common.js +0 -93
  163. package/debugger/devtools-elements.common.js.map +0 -1
  164. package/debugger/devtools-elements.js +0 -20
  165. package/debugger/devtools-elements.js.map +0 -1
  166. package/debugger/dom-types.d.ts +0 -24
  167. package/debugger/dom-types.js +0 -152
  168. package/debugger/dom-types.js.map +0 -1
  169. package/debugger/index.d.ts +0 -87
  170. package/debugger/index.js +0 -118
  171. package/debugger/index.js.map +0 -1
  172. package/debugger/webinspector-css.d.ts +0 -34
  173. package/debugger/webinspector-css.js +0 -72
  174. package/debugger/webinspector-css.js.map +0 -1
  175. package/debugger/webinspector-dom.d.ts +0 -33
  176. package/debugger/webinspector-dom.js +0 -75
  177. package/debugger/webinspector-dom.js.map +0 -1
  178. package/debugger/webinspector-network.android.d.ts +0 -79
  179. package/debugger/webinspector-network.android.js +0 -208
  180. package/debugger/webinspector-network.android.js.map +0 -1
  181. package/debugger/webinspector-network.ios.d.ts +0 -79
  182. package/debugger/webinspector-network.ios.js +0 -204
  183. package/debugger/webinspector-network.ios.js.map +0 -1
  184. package/fetch/index.d.ts +0 -72
  185. package/fetch/index.js +0 -529
  186. package/fetch/index.js.map +0 -1
  187. package/file-system/file-system-access.android.d.ts +0 -151
  188. package/file-system/file-system-access.android.js +0 -1162
  189. package/file-system/file-system-access.android.js.map +0 -1
  190. package/file-system/file-system-access.ios.d.ts +0 -85
  191. package/file-system/file-system-access.ios.js +0 -622
  192. package/file-system/file-system-access.ios.js.map +0 -1
  193. package/file-system/index.js +0 -873
  194. package/file-system/index.js.map +0 -1
  195. package/fps-meter/fps-native.android.d.ts +0 -11
  196. package/fps-meter/fps-native.android.js +0 -62
  197. package/fps-meter/fps-native.android.js.map +0 -1
  198. package/fps-meter/fps-native.ios.d.ts +0 -10
  199. package/fps-meter/fps-native.ios.js +0 -56
  200. package/fps-meter/fps-native.ios.js.map +0 -1
  201. package/fps-meter/index.js +0 -77
  202. package/fps-meter/index.js.map +0 -1
  203. package/globals/global-utils.d.ts +0 -27
  204. package/globals/global-utils.js +0 -67
  205. package/globals/global-utils.js.map +0 -1
  206. package/globals/index.d.ts +0 -3
  207. package/globals/index.js +0 -313
  208. package/globals/index.js.map +0 -1
  209. package/http/http-interfaces.d.ts +0 -84
  210. package/http/http-interfaces.js +0 -6
  211. package/http/http-interfaces.js.map +0 -1
  212. package/http/http-request/http-request-common.d.ts +0 -1
  213. package/http/http-request/http-request-common.js +0 -15
  214. package/http/http-request/http-request-common.js.map +0 -1
  215. package/http/http-request/index.android.d.ts +0 -3
  216. package/http/http-request/index.android.js +0 -274
  217. package/http/http-request/index.android.js.map +0 -1
  218. package/http/http-request/index.ios.d.ts +0 -3
  219. package/http/http-request/index.ios.js +0 -221
  220. package/http/http-request/index.ios.js.map +0 -1
  221. package/http/http-shared.d.ts +0 -5
  222. package/http/http-shared.js +0 -14
  223. package/http/http-shared.js.map +0 -1
  224. package/http/index.js +0 -72
  225. package/http/index.js.map +0 -1
  226. package/image-asset/image-asset-common.d.ts +0 -25
  227. package/image-asset/image-asset-common.js +0 -46
  228. package/image-asset/image-asset-common.js.map +0 -1
  229. package/image-asset/index.android.d.ts +0 -9
  230. package/image-asset/index.android.js +0 -33
  231. package/image-asset/index.android.js.map +0 -1
  232. package/image-asset/index.ios.d.ts +0 -10
  233. package/image-asset/index.ios.js +0 -57
  234. package/image-asset/index.ios.js.map +0 -1
  235. package/image-source/image-source-common.d.ts +0 -4
  236. package/image-source/image-source-common.js +0 -21
  237. package/image-source/image-source-common.js.map +0 -1
  238. package/image-source/index.android.d.ts +0 -58
  239. package/image-source/index.android.js +0 -370
  240. package/image-source/index.android.js.map +0 -1
  241. package/image-source/index.ios.d.ts +0 -59
  242. package/image-source/index.ios.js +0 -454
  243. package/image-source/index.ios.js.map +0 -1
  244. package/index.js +0 -39
  245. package/index.js.map +0 -1
  246. package/inspector_modules.d.ts +0 -7
  247. package/inspector_modules.js +0 -147
  248. package/inspector_modules.js.map +0 -1
  249. package/matrix/index.js +0 -45
  250. package/matrix/index.js.map +0 -1
  251. package/media-query-list/index.d.ts +0 -21
  252. package/media-query-list/index.js +0 -159
  253. package/media-query-list/index.js.map +0 -1
  254. package/module-name-resolver/helpers.d.ts +0 -14
  255. package/module-name-resolver/helpers.js +0 -27
  256. package/module-name-resolver/helpers.js.map +0 -1
  257. package/module-name-resolver/index.d.ts +0 -14
  258. package/module-name-resolver/index.js +0 -67
  259. package/module-name-resolver/index.js.map +0 -1
  260. package/module-name-resolver/non-bundle-workflow-compat.d.ts +0 -6
  261. package/module-name-resolver/non-bundle-workflow-compat.js +0 -128
  262. package/module-name-resolver/non-bundle-workflow-compat.js.map +0 -1
  263. package/module-name-resolver/qualifier-matcher/index.d.ts +0 -11
  264. package/module-name-resolver/qualifier-matcher/index.js +0 -141
  265. package/module-name-resolver/qualifier-matcher/index.js.map +0 -1
  266. package/platform/common.d.ts +0 -10
  267. package/platform/common.js +0 -14
  268. package/platform/common.js.map +0 -1
  269. package/platform/device/index.android.d.ts +0 -20
  270. package/platform/device/index.android.js +0 -78
  271. package/platform/device/index.android.js.map +0 -1
  272. package/platform/device/index.ios.d.ts +0 -19
  273. package/platform/device/index.ios.js +0 -69
  274. package/platform/device/index.ios.js.map +0 -1
  275. package/platform/index.js +0 -4
  276. package/platform/index.js.map +0 -1
  277. package/platform/screen/index.android.d.ts +0 -16
  278. package/platform/screen/index.android.js +0 -41
  279. package/platform/screen/index.android.js.map +0 -1
  280. package/platform/screen/index.ios.d.ts +0 -15
  281. package/platform/screen/index.ios.js +0 -35
  282. package/platform/screen/index.ios.js.map +0 -1
  283. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCCrypto.h +0 -79
  284. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +0 -20
  285. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h +0 -21
  286. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +0 -6
  287. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Resources/Info.plist +0 -52
  288. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCCrypto.h +0 -79
  289. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCWinterTC.h +0 -20
  290. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSString+WinterTC.h +0 -21
  291. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Modules/module.modulemap +0 -6
  292. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC +0 -0
  293. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Resources/Info.plist +0 -52
  294. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  295. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  296. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  297. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  298. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  299. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  300. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  301. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  302. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  303. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +0 -6
  304. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  305. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  306. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +0 -52
  307. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +0 -60
  308. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +0 -24
  309. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +0 -22
  310. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +0 -25
  311. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +0 -16
  312. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +0 -29
  313. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +0 -25
  314. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +0 -26
  315. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +0 -17
  316. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +0 -6
  317. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +0 -17
  318. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +0 -18
  319. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +0 -52
  320. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  321. package/profiling/index.js +0 -273
  322. package/profiling/index.js.map +0 -1
  323. package/text/formatted-string.js +0 -2
  324. package/text/formatted-string.js.map +0 -1
  325. package/text/index.android.d.ts +0 -9
  326. package/text/index.android.js +0 -11
  327. package/text/index.android.js.map +0 -1
  328. package/text/index.ios.d.ts +0 -9
  329. package/text/index.ios.js +0 -11
  330. package/text/index.ios.js.map +0 -1
  331. package/text/span.js +0 -2
  332. package/text/span.js.map +0 -1
  333. package/text/text-common.d.ts +0 -12
  334. package/text/text-common.js +0 -111
  335. package/text/text-common.js.map +0 -1
  336. package/timer/index.android.d.ts +0 -4
  337. package/timer/index.android.js +0 -83
  338. package/timer/index.android.js.map +0 -1
  339. package/timer/index.ios.d.ts +0 -4
  340. package/timer/index.ios.js +0 -68
  341. package/timer/index.ios.js.map +0 -1
  342. package/trace/index.js +0 -255
  343. package/trace/index.js.map +0 -1
  344. package/ui/action-bar/action-bar-common.d.ts +0 -85
  345. package/ui/action-bar/action-bar-common.js +0 -381
  346. package/ui/action-bar/action-bar-common.js.map +0 -1
  347. package/ui/action-bar/index.android.d.ts +0 -55
  348. package/ui/action-bar/index.android.js +0 -504
  349. package/ui/action-bar/index.android.js.map +0 -1
  350. package/ui/action-bar/index.ios.d.ts +0 -64
  351. package/ui/action-bar/index.ios.js +0 -616
  352. package/ui/action-bar/index.ios.js.map +0 -1
  353. package/ui/activity-indicator/activity-indicator-common.d.ts +0 -9
  354. package/ui/activity-indicator/activity-indicator-common.js +0 -22
  355. package/ui/activity-indicator/activity-indicator-common.js.map +0 -1
  356. package/ui/activity-indicator/index.android.d.ts +0 -15
  357. package/ui/activity-indicator/index.android.js +0 -54
  358. package/ui/activity-indicator/index.android.js.map +0 -1
  359. package/ui/activity-indicator/index.ios.d.ts +0 -16
  360. package/ui/activity-indicator/index.ios.js +0 -54
  361. package/ui/activity-indicator/index.ios.js.map +0 -1
  362. package/ui/animation/animation-common.d.ts +0 -30
  363. package/ui/animation/animation-common.js +0 -239
  364. package/ui/animation/animation-common.js.map +0 -1
  365. package/ui/animation/animation-shared.d.ts +0 -84
  366. package/ui/animation/animation-shared.js +0 -4
  367. package/ui/animation/animation-shared.js.map +0 -1
  368. package/ui/animation/animation-types.d.ts +0 -1
  369. package/ui/animation/animation-types.js +0 -3
  370. package/ui/animation/animation-types.js.map +0 -1
  371. package/ui/animation/index.android.d.ts +0 -23
  372. package/ui/animation/index.android.js +0 -432
  373. package/ui/animation/index.android.js.map +0 -1
  374. package/ui/animation/index.ios.d.ts +0 -28
  375. package/ui/animation/index.ios.js +0 -809
  376. package/ui/animation/index.ios.js.map +0 -1
  377. package/ui/animation/keyframe-animation.d.ts +0 -76
  378. package/ui/animation/keyframe-animation.js +0 -238
  379. package/ui/animation/keyframe-animation.js.map +0 -1
  380. package/ui/builder/binding-builder.d.ts +0 -13
  381. package/ui/builder/binding-builder.js +0 -171
  382. package/ui/builder/binding-builder.js.map +0 -1
  383. package/ui/builder/component-builder/index.d.ts +0 -7
  384. package/ui/builder/component-builder/index.js +0 -219
  385. package/ui/builder/component-builder/index.js.map +0 -1
  386. package/ui/builder/index.d.ts +0 -193
  387. package/ui/builder/index.js +0 -643
  388. package/ui/builder/index.js.map +0 -1
  389. package/ui/button/button-common.d.ts +0 -9
  390. package/ui/button/button-common.js +0 -26
  391. package/ui/button/button-common.js.map +0 -1
  392. package/ui/button/index.android.d.ts +0 -29
  393. package/ui/button/index.android.js +0 -168
  394. package/ui/button/index.android.js.map +0 -1
  395. package/ui/button/index.ios.d.ts +0 -36
  396. package/ui/button/index.ios.js +0 -298
  397. package/ui/button/index.ios.js.map +0 -1
  398. package/ui/content-view/index.js +0 -87
  399. package/ui/content-view/index.js.map +0 -1
  400. package/ui/core/bindable/bindable-expressions.d.ts +0 -7
  401. package/ui/core/bindable/bindable-expressions.js +0 -255
  402. package/ui/core/bindable/bindable-expressions.js.map +0 -1
  403. package/ui/core/bindable/bindable-resources.d.ts +0 -2
  404. package/ui/core/bindable/bindable-resources.js +0 -8
  405. package/ui/core/bindable/bindable-resources.js.map +0 -1
  406. package/ui/core/bindable/bindable-types.d.ts +0 -37
  407. package/ui/core/bindable/bindable-types.js +0 -3
  408. package/ui/core/bindable/bindable-types.js.map +0 -1
  409. package/ui/core/bindable/index.d.ts +0 -53
  410. package/ui/core/bindable/index.js +0 -555
  411. package/ui/core/bindable/index.js.map +0 -1
  412. package/ui/core/control-state-change/index.android.d.ts +0 -6
  413. package/ui/core/control-state-change/index.android.js +0 -8
  414. package/ui/core/control-state-change/index.android.js.map +0 -1
  415. package/ui/core/control-state-change/index.ios.d.ts +0 -10
  416. package/ui/core/control-state-change/index.ios.js +0 -43
  417. package/ui/core/control-state-change/index.ios.js.map +0 -1
  418. package/ui/core/properties/index.d.ts +0 -114
  419. package/ui/core/properties/index.js +0 -1290
  420. package/ui/core/properties/index.js.map +0 -1
  421. package/ui/core/properties/property-shared.d.ts +0 -35
  422. package/ui/core/properties/property-shared.js +0 -16
  423. package/ui/core/properties/property-shared.js.map +0 -1
  424. package/ui/core/view/index.android.d.ts +0 -134
  425. package/ui/core/view/index.android.js +0 -1613
  426. package/ui/core/view/index.android.js.map +0 -1
  427. package/ui/core/view/index.ios.d.ts +0 -140
  428. package/ui/core/view/index.ios.js +0 -1009
  429. package/ui/core/view/index.ios.js.map +0 -1
  430. package/ui/core/view/view-common.d.ts +0 -304
  431. package/ui/core/view/view-common.js +0 -1095
  432. package/ui/core/view/view-common.js.map +0 -1
  433. package/ui/core/view/view-helper/index.android.d.ts +0 -9
  434. package/ui/core/view/view-helper/index.android.js +0 -56
  435. package/ui/core/view/view-helper/index.android.js.map +0 -1
  436. package/ui/core/view/view-helper/index.ios.d.ts +0 -64
  437. package/ui/core/view/view-helper/index.ios.js +0 -363
  438. package/ui/core/view/view-helper/index.ios.js.map +0 -1
  439. package/ui/core/view/view-helper/view-helper-common.d.ts +0 -11
  440. package/ui/core/view/view-helper/view-helper-common.js +0 -159
  441. package/ui/core/view/view-helper/view-helper-common.js.map +0 -1
  442. package/ui/core/view/view-helper/view-helper-shared.d.ts +0 -5
  443. package/ui/core/view/view-helper/view-helper-shared.js +0 -6
  444. package/ui/core/view/view-helper/view-helper-shared.js.map +0 -1
  445. package/ui/core/view/view-interfaces.d.ts +0 -73
  446. package/ui/core/view/view-interfaces.js +0 -2
  447. package/ui/core/view/view-interfaces.js.map +0 -1
  448. package/ui/core/view-base/index.d.ts +0 -597
  449. package/ui/core/view-base/index.js +0 -1154
  450. package/ui/core/view-base/index.js.map +0 -1
  451. package/ui/core/view-base/utils.d.ts +0 -1
  452. package/ui/core/view-base/utils.js +0 -9
  453. package/ui/core/view-base/utils.js.map +0 -1
  454. package/ui/core/weak-event-listener/index.js +0 -123
  455. package/ui/core/weak-event-listener/index.js.map +0 -1
  456. package/ui/date-picker/date-picker-common.d.ts +0 -28
  457. package/ui/date-picker/date-picker-common.js +0 -82
  458. package/ui/date-picker/date-picker-common.js.map +0 -1
  459. package/ui/date-picker/index.android.d.ts +0 -19
  460. package/ui/date-picker/index.android.js +0 -133
  461. package/ui/date-picker/index.android.js.map +0 -1
  462. package/ui/date-picker/index.ios.d.ts +0 -27
  463. package/ui/date-picker/index.ios.js +0 -165
  464. package/ui/date-picker/index.ios.js.map +0 -1
  465. package/ui/dialogs/dialogs-common.d.ts +0 -211
  466. package/ui/dialogs/dialogs-common.js +0 -167
  467. package/ui/dialogs/dialogs-common.js.map +0 -1
  468. package/ui/dialogs/index.android.d.ts +0 -20
  469. package/ui/dialogs/index.android.js +0 -330
  470. package/ui/dialogs/index.android.js.map +0 -1
  471. package/ui/dialogs/index.ios.d.ts +0 -17
  472. package/ui/dialogs/index.ios.js +0 -293
  473. package/ui/dialogs/index.ios.js.map +0 -1
  474. package/ui/editable-text-base/editable-text-base-common.d.ts +0 -36
  475. package/ui/editable-text-base/editable-text-base-common.js +0 -91
  476. package/ui/editable-text-base/editable-text-base-common.js.map +0 -1
  477. package/ui/editable-text-base/index.android.d.ts +0 -48
  478. package/ui/editable-text-base/index.android.js +0 -499
  479. package/ui/editable-text-base/index.android.js.map +0 -1
  480. package/ui/editable-text-base/index.ios.d.ts +0 -20
  481. package/ui/editable-text-base/index.ios.js +0 -255
  482. package/ui/editable-text-base/index.ios.js.map +0 -1
  483. package/ui/embedding/index.android.d.ts +0 -4
  484. package/ui/embedding/index.android.js +0 -14
  485. package/ui/embedding/index.android.js.map +0 -1
  486. package/ui/embedding/index.ios.d.ts +0 -1
  487. package/ui/embedding/index.ios.js +0 -4
  488. package/ui/embedding/index.ios.js.map +0 -1
  489. package/ui/enums/enums.js +0 -6
  490. package/ui/enums/enums.js.map +0 -1
  491. package/ui/enums/index.js +0 -6
  492. package/ui/enums/index.js.map +0 -1
  493. package/ui/frame/activity.android.d.ts +0 -1
  494. package/ui/frame/activity.android.js +0 -113
  495. package/ui/frame/activity.android.js.map +0 -1
  496. package/ui/frame/fragment.android.d.ts +0 -3
  497. package/ui/frame/fragment.android.js +0 -90
  498. package/ui/frame/fragment.android.js.map +0 -1
  499. package/ui/frame/fragment.ios.d.ts +0 -3
  500. package/ui/frame/fragment.ios.js +0 -4
  501. package/ui/frame/fragment.ios.js.map +0 -1
  502. package/ui/frame/fragment.transitions.android.d.ts +0 -39
  503. package/ui/frame/fragment.transitions.android.js +0 -680
  504. package/ui/frame/fragment.transitions.android.js.map +0 -1
  505. package/ui/frame/fragment.transitions.types.d.ts +0 -6
  506. package/ui/frame/fragment.transitions.types.js +0 -2
  507. package/ui/frame/fragment.transitions.types.js.map +0 -1
  508. package/ui/frame/frame-common.d.ts +0 -101
  509. package/ui/frame/frame-common.js +0 -688
  510. package/ui/frame/frame-common.js.map +0 -1
  511. package/ui/frame/frame-helper-for-android.d.ts +0 -37
  512. package/ui/frame/frame-helper-for-android.js +0 -337
  513. package/ui/frame/frame-helper-for-android.js.map +0 -1
  514. package/ui/frame/frame-helpers.d.ts +0 -16
  515. package/ui/frame/frame-helpers.js +0 -19
  516. package/ui/frame/frame-helpers.js.map +0 -1
  517. package/ui/frame/frame-interfaces.d.ts +0 -130
  518. package/ui/frame/frame-interfaces.js +0 -7
  519. package/ui/frame/frame-interfaces.js.map +0 -1
  520. package/ui/frame/frame-stack.d.ts +0 -7
  521. package/ui/frame/frame-stack.js +0 -41
  522. package/ui/frame/frame-stack.js.map +0 -1
  523. package/ui/frame/index.android.d.ts +0 -93
  524. package/ui/frame/index.android.js +0 -919
  525. package/ui/frame/index.android.js.map +0 -1
  526. package/ui/frame/index.ios.d.ts +0 -56
  527. package/ui/frame/index.ios.js +0 -668
  528. package/ui/frame/index.ios.js.map +0 -1
  529. package/ui/gestures/gestures-common.d.ts +0 -32
  530. package/ui/gestures/gestures-common.js +0 -78
  531. package/ui/gestures/gestures-common.js.map +0 -1
  532. package/ui/gestures/gestures-types.d.ts +0 -108
  533. package/ui/gestures/gestures-types.js +0 -40
  534. package/ui/gestures/gestures-types.js.map +0 -1
  535. package/ui/gestures/index.android.d.ts +0 -49
  536. package/ui/gestures/index.android.js +0 -597
  537. package/ui/gestures/index.android.js.map +0 -1
  538. package/ui/gestures/index.ios.d.ts +0 -70
  539. package/ui/gestures/index.ios.js +0 -512
  540. package/ui/gestures/index.ios.js.map +0 -1
  541. package/ui/gestures/touch-manager.d.ts +0 -82
  542. package/ui/gestures/touch-manager.js +0 -268
  543. package/ui/gestures/touch-manager.js.map +0 -1
  544. package/ui/html-view/html-view-common.d.ts +0 -12
  545. package/ui/html-view/html-view-common.js +0 -31
  546. package/ui/html-view/html-view-common.js.map +0 -1
  547. package/ui/html-view/index.android.d.ts +0 -27
  548. package/ui/html-view/index.android.js +0 -90
  549. package/ui/html-view/index.android.js.map +0 -1
  550. package/ui/html-view/index.ios.d.ts +0 -22
  551. package/ui/html-view/index.ios.js +0 -101
  552. package/ui/html-view/index.ios.js.map +0 -1
  553. package/ui/image/image-common.d.ts +0 -45
  554. package/ui/image/image-common.js +0 -195
  555. package/ui/image/image-common.js.map +0 -1
  556. package/ui/image/index.android.d.ts +0 -23
  557. package/ui/image/index.android.js +0 -173
  558. package/ui/image/index.android.js.map +0 -1
  559. package/ui/image/index.ios.d.ts +0 -26
  560. package/ui/image/index.ios.js +0 -186
  561. package/ui/image/index.ios.js.map +0 -1
  562. package/ui/image/symbol-effects-common.d.ts +0 -36
  563. package/ui/image/symbol-effects-common.js +0 -35
  564. package/ui/image/symbol-effects-common.js.map +0 -1
  565. package/ui/image/symbol-effects.android.d.ts +0 -5
  566. package/ui/image/symbol-effects.android.js +0 -8
  567. package/ui/image/symbol-effects.android.js.map +0 -1
  568. package/ui/image/symbol-effects.ios.d.ts +0 -6
  569. package/ui/image/symbol-effects.ios.js +0 -79
  570. package/ui/image/symbol-effects.ios.js.map +0 -1
  571. package/ui/image-cache/image-cache-common.d.ts +0 -40
  572. package/ui/image-cache/image-cache-common.js +0 -176
  573. package/ui/image-cache/image-cache-common.js.map +0 -1
  574. package/ui/image-cache/index.android.d.ts +0 -11
  575. package/ui/image-cache/index.android.js +0 -76
  576. package/ui/image-cache/index.android.js.map +0 -1
  577. package/ui/image-cache/index.ios.d.ts +0 -11
  578. package/ui/image-cache/index.ios.js +0 -78
  579. package/ui/image-cache/index.ios.js.map +0 -1
  580. package/ui/index.d.ts +0 -90
  581. package/ui/index.js +0 -79
  582. package/ui/index.js.map +0 -1
  583. package/ui/label/index.android.d.ts +0 -13
  584. package/ui/label/index.android.js +0 -44
  585. package/ui/label/index.android.js.map +0 -1
  586. package/ui/label/index.ios.d.ts +0 -30
  587. package/ui/label/index.ios.js +0 -224
  588. package/ui/label/index.ios.js.map +0 -1
  589. package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +0 -16
  590. package/ui/layouts/absolute-layout/absolute-layout-common.js +0 -72
  591. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +0 -1
  592. package/ui/layouts/absolute-layout/index.android.d.ts +0 -6
  593. package/ui/layouts/absolute-layout/index.android.js +0 -26
  594. package/ui/layouts/absolute-layout/index.android.js.map +0 -1
  595. package/ui/layouts/absolute-layout/index.ios.d.ts +0 -10
  596. package/ui/layouts/absolute-layout/index.ios.js +0 -48
  597. package/ui/layouts/absolute-layout/index.ios.js.map +0 -1
  598. package/ui/layouts/dock-layout/dock-layout-common.d.ts +0 -14
  599. package/ui/layouts/dock-layout/dock-layout-common.js +0 -51
  600. package/ui/layouts/dock-layout/dock-layout-common.js.map +0 -1
  601. package/ui/layouts/dock-layout/index.android.d.ts +0 -8
  602. package/ui/layouts/dock-layout/index.android.js +0 -38
  603. package/ui/layouts/dock-layout/index.android.js.map +0 -1
  604. package/ui/layouts/dock-layout/index.ios.d.ts +0 -8
  605. package/ui/layouts/dock-layout/index.ios.js +0 -115
  606. package/ui/layouts/dock-layout/index.ios.js.map +0 -1
  607. package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +0 -126
  608. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +0 -403
  609. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +0 -1
  610. package/ui/layouts/flexbox-layout/index.android.d.ts +0 -23
  611. package/ui/layouts/flexbox-layout/index.android.js +0 -152
  612. package/ui/layouts/flexbox-layout/index.android.js.map +0 -1
  613. package/ui/layouts/flexbox-layout/index.ios.d.ts +0 -44
  614. package/ui/layouts/flexbox-layout/index.ios.js +0 -1244
  615. package/ui/layouts/flexbox-layout/index.ios.js.map +0 -1
  616. package/ui/layouts/grid-layout/grid-layout-common.d.ts +0 -72
  617. package/ui/layouts/grid-layout/grid-layout-common.js +0 -358
  618. package/ui/layouts/grid-layout/grid-layout-common.js.map +0 -1
  619. package/ui/layouts/grid-layout/index.android.d.ts +0 -23
  620. package/ui/layouts/grid-layout/index.android.js +0 -122
  621. package/ui/layouts/grid-layout/index.android.js.map +0 -1
  622. package/ui/layouts/grid-layout/index.ios.d.ts +0 -28
  623. package/ui/layouts/grid-layout/index.ios.js +0 -778
  624. package/ui/layouts/grid-layout/index.ios.js.map +0 -1
  625. package/ui/layouts/index.d.ts +0 -10
  626. package/ui/layouts/index.js +0 -9
  627. package/ui/layouts/index.js.map +0 -1
  628. package/ui/layouts/layout-base-common.d.ts +0 -36
  629. package/ui/layouts/layout-base-common.js +0 -141
  630. package/ui/layouts/layout-base-common.js.map +0 -1
  631. package/ui/layouts/layout-base.android.d.ts +0 -17
  632. package/ui/layouts/layout-base.android.js +0 -50
  633. package/ui/layouts/layout-base.android.js.map +0 -1
  634. package/ui/layouts/layout-base.ios.d.ts +0 -13
  635. package/ui/layouts/layout-base.ios.js +0 -40
  636. package/ui/layouts/layout-base.ios.js.map +0 -1
  637. package/ui/layouts/root-layout/index.android.d.ts +0 -15
  638. package/ui/layouts/root-layout/index.android.js +0 -126
  639. package/ui/layouts/root-layout/index.android.js.map +0 -1
  640. package/ui/layouts/root-layout/index.ios.d.ts +0 -17
  641. package/ui/layouts/root-layout/index.ios.js +0 -101
  642. package/ui/layouts/root-layout/index.ios.js.map +0 -1
  643. package/ui/layouts/root-layout/root-layout-common.d.ts +0 -61
  644. package/ui/layouts/root-layout/root-layout-common.js +0 -422
  645. package/ui/layouts/root-layout/root-layout-common.js.map +0 -1
  646. package/ui/layouts/root-layout/root-layout-stack.d.ts +0 -5
  647. package/ui/layouts/root-layout/root-layout-stack.js +0 -19
  648. package/ui/layouts/root-layout/root-layout-stack.js.map +0 -1
  649. package/ui/layouts/stack-layout/index.android.d.ts +0 -7
  650. package/ui/layouts/stack-layout/index.android.js +0 -11
  651. package/ui/layouts/stack-layout/index.android.js.map +0 -1
  652. package/ui/layouts/stack-layout/index.ios.d.ts +0 -10
  653. package/ui/layouts/stack-layout/index.ios.js +0 -149
  654. package/ui/layouts/stack-layout/index.ios.js.map +0 -1
  655. package/ui/layouts/stack-layout/stack-layout-common.d.ts +0 -8
  656. package/ui/layouts/stack-layout/stack-layout-common.js +0 -19
  657. package/ui/layouts/stack-layout/stack-layout-common.js.map +0 -1
  658. package/ui/layouts/wrap-layout/index.android.d.ts +0 -10
  659. package/ui/layouts/wrap-layout/index.android.js +0 -18
  660. package/ui/layouts/wrap-layout/index.android.js.map +0 -1
  661. package/ui/layouts/wrap-layout/index.ios.d.ts +0 -8
  662. package/ui/layouts/wrap-layout/index.ios.js +0 -170
  663. package/ui/layouts/wrap-layout/index.ios.js.map +0 -1
  664. package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +0 -15
  665. package/ui/layouts/wrap-layout/wrap-layout-common.js +0 -40
  666. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +0 -1
  667. package/ui/list-picker/index.android.d.ts +0 -18
  668. package/ui/list-picker/index.android.js +0 -181
  669. package/ui/list-picker/index.android.js.map +0 -1
  670. package/ui/list-picker/index.ios.d.ts +0 -19
  671. package/ui/list-picker/index.ios.js +0 -99
  672. package/ui/list-picker/index.ios.js.map +0 -1
  673. package/ui/list-picker/list-picker-common.d.ts +0 -23
  674. package/ui/list-picker/list-picker-common.js +0 -78
  675. package/ui/list-picker/list-picker-common.js.map +0 -1
  676. package/ui/list-view/index.android.d.ts +0 -43
  677. package/ui/list-view/index.android.js +0 -368
  678. package/ui/list-view/index.android.js.map +0 -1
  679. package/ui/list-view/index.ios.d.ts +0 -52
  680. package/ui/list-view/index.ios.js +0 -460
  681. package/ui/list-view/index.ios.js.map +0 -1
  682. package/ui/list-view/list-view-common.d.ts +0 -66
  683. package/ui/list-view/list-view-common.js +0 -211
  684. package/ui/list-view/list-view-common.js.map +0 -1
  685. package/ui/page/events.d.ts +0 -6
  686. package/ui/page/events.js +0 -7
  687. package/ui/page/events.js.map +0 -1
  688. package/ui/page/index.android.d.ts +0 -25
  689. package/ui/page/index.android.js +0 -150
  690. package/ui/page/index.android.js.map +0 -1
  691. package/ui/page/index.ios.d.ts +0 -54
  692. package/ui/page/index.ios.js +0 -569
  693. package/ui/page/index.ios.js.map +0 -1
  694. package/ui/page/page-common.d.ts +0 -77
  695. package/ui/page/page-common.js +0 -199
  696. package/ui/page/page-common.js.map +0 -1
  697. package/ui/placeholder/index.android.d.ts +0 -12
  698. package/ui/placeholder/index.android.js +0 -21
  699. package/ui/placeholder/index.android.js.map +0 -1
  700. package/ui/placeholder/index.js +0 -16
  701. package/ui/placeholder/index.js.map +0 -1
  702. package/ui/placeholder/placeholder-common.d.ts +0 -11
  703. package/ui/placeholder/placeholder-common.js +0 -2
  704. package/ui/placeholder/placeholder-common.js.map +0 -1
  705. package/ui/progress/index.android.d.ts +0 -18
  706. package/ui/progress/index.android.js +0 -65
  707. package/ui/progress/index.android.js.map +0 -1
  708. package/ui/progress/index.ios.d.ts +0 -19
  709. package/ui/progress/index.ios.js +0 -45
  710. package/ui/progress/index.ios.js.map +0 -1
  711. package/ui/progress/progress-common.d.ts +0 -15
  712. package/ui/progress/progress-common.js +0 -34
  713. package/ui/progress/progress-common.js.map +0 -1
  714. package/ui/proxy-view-container/index.d.ts +0 -33
  715. package/ui/proxy-view-container/index.js +0 -247
  716. package/ui/proxy-view-container/index.js.map +0 -1
  717. package/ui/repeater/index.d.ts +0 -67
  718. package/ui/repeater/index.js +0 -225
  719. package/ui/repeater/index.js.map +0 -1
  720. package/ui/scroll-view/index.android.d.ts +0 -27
  721. package/ui/scroll-view/index.android.js +0 -157
  722. package/ui/scroll-view/index.android.js.map +0 -1
  723. package/ui/scroll-view/index.ios.d.ts +0 -27
  724. package/ui/scroll-view/index.ios.js +0 -174
  725. package/ui/scroll-view/index.ios.js.map +0 -1
  726. package/ui/scroll-view/scroll-view-common.d.ts +0 -32
  727. package/ui/scroll-view/scroll-view-common.js +0 -93
  728. package/ui/scroll-view/scroll-view-common.js.map +0 -1
  729. package/ui/search-bar/index.android.d.ts +0 -43
  730. package/ui/search-bar/index.android.js +0 -249
  731. package/ui/search-bar/index.android.js.map +0 -1
  732. package/ui/search-bar/index.ios.d.ts +0 -35
  733. package/ui/search-bar/index.ios.js +0 -196
  734. package/ui/search-bar/index.ios.js.map +0 -1
  735. package/ui/search-bar/search-bar-common.d.ts +0 -17
  736. package/ui/search-bar/search-bar-common.js +0 -36
  737. package/ui/search-bar/search-bar-common.js.map +0 -1
  738. package/ui/segmented-bar/index.android.d.ts +0 -42
  739. package/ui/segmented-bar/index.android.js +0 -286
  740. package/ui/segmented-bar/index.android.js.map +0 -1
  741. package/ui/segmented-bar/index.ios.d.ts +0 -28
  742. package/ui/segmented-bar/index.ios.js +0 -140
  743. package/ui/segmented-bar/index.ios.js.map +0 -1
  744. package/ui/segmented-bar/segmented-bar-common.d.ts +0 -37
  745. package/ui/segmented-bar/segmented-bar-common.js +0 -146
  746. package/ui/segmented-bar/segmented-bar-common.js.map +0 -1
  747. package/ui/slider/index.android.d.ts +0 -32
  748. package/ui/slider/index.android.js +0 -126
  749. package/ui/slider/index.android.js.map +0 -1
  750. package/ui/slider/index.ios.d.ts +0 -34
  751. package/ui/slider/index.ios.js +0 -145
  752. package/ui/slider/index.ios.js.map +0 -1
  753. package/ui/slider/slider-common.d.ts +0 -27
  754. package/ui/slider/slider-common.js +0 -69
  755. package/ui/slider/slider-common.js.map +0 -1
  756. package/ui/styling/background-common.d.ts +0 -78
  757. package/ui/styling/background-common.js +0 -241
  758. package/ui/styling/background-common.js.map +0 -1
  759. package/ui/styling/background.android.d.ts +0 -3
  760. package/ui/styling/background.android.js +0 -82
  761. package/ui/styling/background.android.js.map +0 -1
  762. package/ui/styling/background.ios.d.ts +0 -20
  763. package/ui/styling/background.ios.js +0 -1096
  764. package/ui/styling/background.ios.js.map +0 -1
  765. package/ui/styling/box-shadow.d.ts +0 -9
  766. package/ui/styling/box-shadow.js +0 -3
  767. package/ui/styling/box-shadow.js.map +0 -1
  768. package/ui/styling/clip-path-function.d.ts +0 -16
  769. package/ui/styling/clip-path-function.js +0 -25
  770. package/ui/styling/clip-path-function.js.map +0 -1
  771. package/ui/styling/converters.d.ts +0 -2
  772. package/ui/styling/converters.js +0 -41
  773. package/ui/styling/converters.js.map +0 -1
  774. package/ui/styling/css-animation-parser.d.ts +0 -14
  775. package/ui/styling/css-animation-parser.js +0 -187
  776. package/ui/styling/css-animation-parser.js.map +0 -1
  777. package/ui/styling/css-selector.d.ts +0 -270
  778. package/ui/styling/css-selector.js +0 -934
  779. package/ui/styling/css-selector.js.map +0 -1
  780. package/ui/styling/css-shadow.d.ts +0 -19
  781. package/ui/styling/css-shadow.js +0 -26
  782. package/ui/styling/css-shadow.js.map +0 -1
  783. package/ui/styling/css-stroke.d.ts +0 -12
  784. package/ui/styling/css-stroke.js +0 -19
  785. package/ui/styling/css-stroke.js.map +0 -1
  786. package/ui/styling/css-transform.d.ts +0 -2
  787. package/ui/styling/css-transform.js +0 -110
  788. package/ui/styling/css-transform.js.map +0 -1
  789. package/ui/styling/css-utils.d.ts +0 -7
  790. package/ui/styling/css-utils.js +0 -62
  791. package/ui/styling/css-utils.js.map +0 -1
  792. package/ui/styling/font-common.d.ts +0 -62
  793. package/ui/styling/font-common.js +0 -195
  794. package/ui/styling/font-common.js.map +0 -1
  795. package/ui/styling/font-interfaces.d.ts +0 -16
  796. package/ui/styling/font-interfaces.js +0 -2
  797. package/ui/styling/font-interfaces.js.map +0 -1
  798. package/ui/styling/font.android.d.ts +0 -15
  799. package/ui/styling/font.android.js +0 -226
  800. package/ui/styling/font.android.js.map +0 -1
  801. package/ui/styling/font.ios.d.ts +0 -18
  802. package/ui/styling/font.ios.js +0 -159
  803. package/ui/styling/font.ios.js.map +0 -1
  804. package/ui/styling/length-shared.d.ts +0 -52
  805. package/ui/styling/length-shared.js +0 -173
  806. package/ui/styling/length-shared.js.map +0 -1
  807. package/ui/styling/linear-gradient.d.ts +0 -13
  808. package/ui/styling/linear-gradient.js +0 -48
  809. package/ui/styling/linear-gradient.js.map +0 -1
  810. package/ui/styling/style/index.d.ts +0 -164
  811. package/ui/styling/style/index.js +0 -67
  812. package/ui/styling/style/index.js.map +0 -1
  813. package/ui/styling/style-properties.d.ts +0 -62
  814. package/ui/styling/style-properties.js +0 -1132
  815. package/ui/styling/style-properties.js.map +0 -1
  816. package/ui/styling/style-scope.d.ts +0 -87
  817. package/ui/styling/style-scope.js +0 -1020
  818. package/ui/styling/style-scope.js.map +0 -1
  819. package/ui/styling/styling-profile.d.ts +0 -1
  820. package/ui/styling/styling-profile.js +0 -4
  821. package/ui/styling/styling-profile.js.map +0 -1
  822. package/ui/styling/styling-shared.d.ts +0 -3
  823. package/ui/styling/styling-shared.js +0 -6
  824. package/ui/styling/styling-shared.js.map +0 -1
  825. package/ui/switch/index.android.d.ts +0 -23
  826. package/ui/switch/index.android.js +0 -113
  827. package/ui/switch/index.android.js.map +0 -1
  828. package/ui/switch/index.ios.d.ts +0 -25
  829. package/ui/switch/index.ios.js +0 -135
  830. package/ui/switch/index.ios.js.map +0 -1
  831. package/ui/switch/switch-common.d.ts +0 -12
  832. package/ui/switch/switch-common.js +0 -37
  833. package/ui/switch/switch-common.js.map +0 -1
  834. package/ui/tab-view/index.android.d.ts +0 -73
  835. package/ui/tab-view/index.android.js +0 -648
  836. package/ui/tab-view/index.android.js.map +0 -1
  837. package/ui/tab-view/index.ios.d.ts +0 -72
  838. package/ui/tab-view/index.ios.js +0 -589
  839. package/ui/tab-view/index.ios.js.map +0 -1
  840. package/ui/tab-view/tab-view-common.d.ts +0 -71
  841. package/ui/tab-view/tab-view-common.js +0 -262
  842. package/ui/tab-view/tab-view-common.js.map +0 -1
  843. package/ui/text-base/formatted-string.js +0 -163
  844. package/ui/text-base/formatted-string.js.map +0 -1
  845. package/ui/text-base/index.android.d.ts +0 -78
  846. package/ui/text-base/index.android.js +0 -556
  847. package/ui/text-base/index.android.js.map +0 -1
  848. package/ui/text-base/index.ios.d.ts +0 -53
  849. package/ui/text-base/index.ios.js +0 -458
  850. package/ui/text-base/index.ios.js.map +0 -1
  851. package/ui/text-base/span.js +0 -113
  852. package/ui/text-base/span.js.map +0 -1
  853. package/ui/text-base/text-base-common.d.ts +0 -98
  854. package/ui/text-base/text-base-common.js +0 -323
  855. package/ui/text-base/text-base-common.js.map +0 -1
  856. package/ui/text-field/index.android.d.ts +0 -10
  857. package/ui/text-field/index.android.js +0 -92
  858. package/ui/text-field/index.android.js.map +0 -1
  859. package/ui/text-field/index.ios.d.ts +0 -55
  860. package/ui/text-field/index.ios.js +0 -311
  861. package/ui/text-field/index.ios.js.map +0 -1
  862. package/ui/text-field/text-field-common.d.ts +0 -11
  863. package/ui/text-field/text-field-common.js +0 -25
  864. package/ui/text-field/text-field-common.js.map +0 -1
  865. package/ui/text-view/index.android.d.ts +0 -8
  866. package/ui/text-view/index.android.js +0 -24
  867. package/ui/text-view/index.android.js.map +0 -1
  868. package/ui/text-view/index.ios.d.ts +0 -58
  869. package/ui/text-view/index.ios.js +0 -427
  870. package/ui/text-view/index.ios.js.map +0 -1
  871. package/ui/text-view/text-view-common.d.ts +0 -32
  872. package/ui/text-view/text-view-common.js +0 -39
  873. package/ui/text-view/text-view-common.js.map +0 -1
  874. package/ui/time-picker/index.android.d.ts +0 -10
  875. package/ui/time-picker/index.android.js +0 -81
  876. package/ui/time-picker/index.android.js.map +0 -1
  877. package/ui/time-picker/index.ios.d.ts +0 -31
  878. package/ui/time-picker/index.ios.js +0 -138
  879. package/ui/time-picker/index.ios.js.map +0 -1
  880. package/ui/time-picker/time-picker-common.d.ts +0 -31
  881. package/ui/time-picker/time-picker-common.js +0 -176
  882. package/ui/time-picker/time-picker-common.js.map +0 -1
  883. package/ui/transition/fade-transition.android.d.ts +0 -4
  884. package/ui/transition/fade-transition.android.js +0 -28
  885. package/ui/transition/fade-transition.android.js.map +0 -1
  886. package/ui/transition/fade-transition.ios.d.ts +0 -17
  887. package/ui/transition/fade-transition.ios.js +0 -65
  888. package/ui/transition/fade-transition.ios.js.map +0 -1
  889. package/ui/transition/flip-transition.android.d.ts +0 -6
  890. package/ui/transition/flip-transition.android.js +0 -90
  891. package/ui/transition/flip-transition.android.js.map +0 -1
  892. package/ui/transition/index.android.d.ts +0 -19
  893. package/ui/transition/index.android.js +0 -37
  894. package/ui/transition/index.android.js.map +0 -1
  895. package/ui/transition/index.ios.d.ts +0 -14
  896. package/ui/transition/index.ios.js +0 -30
  897. package/ui/transition/index.ios.js.map +0 -1
  898. package/ui/transition/modal-transition.android.d.ts +0 -5
  899. package/ui/transition/modal-transition.android.js +0 -7
  900. package/ui/transition/modal-transition.android.js.map +0 -1
  901. package/ui/transition/modal-transition.ios.d.ts +0 -34
  902. package/ui/transition/modal-transition.ios.js +0 -182
  903. package/ui/transition/modal-transition.ios.js.map +0 -1
  904. package/ui/transition/page-transition.android.d.ts +0 -9
  905. package/ui/transition/page-transition.android.js +0 -293
  906. package/ui/transition/page-transition.android.js.map +0 -1
  907. package/ui/transition/page-transition.ios.d.ts +0 -35
  908. package/ui/transition/page-transition.ios.js +0 -199
  909. package/ui/transition/page-transition.ios.js.map +0 -1
  910. package/ui/transition/shared-transition-helper.android.d.ts +0 -9
  911. package/ui/transition/shared-transition-helper.android.js +0 -10
  912. package/ui/transition/shared-transition-helper.android.js.map +0 -1
  913. package/ui/transition/shared-transition-helper.ios.d.ts +0 -14
  914. package/ui/transition/shared-transition-helper.ios.js +0 -539
  915. package/ui/transition/shared-transition-helper.ios.js.map +0 -1
  916. package/ui/transition/shared-transition.d.ts +0 -271
  917. package/ui/transition/shared-transition.js +0 -215
  918. package/ui/transition/shared-transition.js.map +0 -1
  919. package/ui/transition/slide-transition.android.d.ts +0 -7
  920. package/ui/transition/slide-transition.android.js +0 -116
  921. package/ui/transition/slide-transition.android.js.map +0 -1
  922. package/ui/transition/slide-transition.ios.d.ts +0 -19
  923. package/ui/transition/slide-transition.ios.js +0 -95
  924. package/ui/transition/slide-transition.ios.js.map +0 -1
  925. package/ui/utils.android.d.ts +0 -5
  926. package/ui/utils.android.js +0 -16
  927. package/ui/utils.android.js.map +0 -1
  928. package/ui/utils.ios.d.ts +0 -11
  929. package/ui/utils.ios.js +0 -66
  930. package/ui/utils.ios.js.map +0 -1
  931. package/ui/web-view/index.android.d.ts +0 -18
  932. package/ui/web-view/index.android.js +0 -177
  933. package/ui/web-view/index.android.js.map +0 -1
  934. package/ui/web-view/index.ios.d.ts +0 -27
  935. package/ui/web-view/index.ios.js +0 -246
  936. package/ui/web-view/index.ios.js.map +0 -1
  937. package/ui/web-view/web-view-common.d.ts +0 -30
  938. package/ui/web-view/web-view-common.js +0 -74
  939. package/ui/web-view/web-view-common.js.map +0 -1
  940. package/ui/web-view/web-view-interfaces.d.ts +0 -11
  941. package/ui/web-view/web-view-interfaces.js +0 -2
  942. package/ui/web-view/web-view-interfaces.js.map +0 -1
  943. package/utils/animation-helpers.d.ts +0 -27
  944. package/utils/animation-helpers.js +0 -48
  945. package/utils/animation-helpers.js.map +0 -1
  946. package/utils/common.d.ts +0 -26
  947. package/utils/common.js +0 -139
  948. package/utils/common.js.map +0 -1
  949. package/utils/constants.android.d.ts +0 -2
  950. package/utils/constants.android.js +0 -5
  951. package/utils/constants.android.js.map +0 -1
  952. package/utils/constants.ios.d.ts +0 -2
  953. package/utils/constants.ios.js +0 -5
  954. package/utils/constants.ios.js.map +0 -1
  955. package/utils/debug-source.d.ts +0 -19
  956. package/utils/debug-source.js +0 -78
  957. package/utils/debug-source.js.map +0 -1
  958. package/utils/debug.js +0 -3
  959. package/utils/debug.js.map +0 -1
  960. package/utils/index.android.d.ts +0 -26
  961. package/utils/index.android.js +0 -205
  962. package/utils/index.android.js.map +0 -1
  963. package/utils/index.ios.d.ts +0 -22
  964. package/utils/index.ios.js +0 -113
  965. package/utils/index.ios.js.map +0 -1
  966. package/utils/layout-helper/index.android.d.ts +0 -24
  967. package/utils/layout-helper/index.android.js +0 -77
  968. package/utils/layout-helper/index.android.js.map +0 -1
  969. package/utils/layout-helper/index.ios.d.ts +0 -24
  970. package/utils/layout-helper/index.ios.js +0 -64
  971. package/utils/layout-helper/index.ios.js.map +0 -1
  972. package/utils/layout-helper/layout-helper-common.d.ts +0 -5
  973. package/utils/layout-helper/layout-helper-common.js +0 -49
  974. package/utils/layout-helper/layout-helper-common.js.map +0 -1
  975. package/utils/layout-helper/layout-helper-shared.d.ts +0 -9
  976. package/utils/layout-helper/layout-helper-shared.js +0 -13
  977. package/utils/layout-helper/layout-helper-shared.js.map +0 -1
  978. package/utils/lazy.js +0 -5
  979. package/utils/lazy.js.map +0 -1
  980. package/utils/macrotask-scheduler.js +0 -26
  981. package/utils/macrotask-scheduler.js.map +0 -1
  982. package/utils/mainthread-helper.android.d.ts +0 -3
  983. package/utils/mainthread-helper.android.js +0 -28
  984. package/utils/mainthread-helper.android.js.map +0 -1
  985. package/utils/mainthread-helper.ios.d.ts +0 -3
  986. package/utils/mainthread-helper.ios.js +0 -17
  987. package/utils/mainthread-helper.ios.js.map +0 -1
  988. package/utils/module-merge.d.ts +0 -1
  989. package/utils/module-merge.js +0 -8
  990. package/utils/module-merge.js.map +0 -1
  991. package/utils/native-helper-for-android.d.ts +0 -34
  992. package/utils/native-helper-for-android.js +0 -373
  993. package/utils/native-helper-for-android.js.map +0 -1
  994. package/utils/native-helper.android.d.ts +0 -42
  995. package/utils/native-helper.android.js +0 -30
  996. package/utils/native-helper.android.js.map +0 -1
  997. package/utils/native-helper.ios.d.ts +0 -79
  998. package/utils/native-helper.ios.js +0 -339
  999. package/utils/native-helper.ios.js.map +0 -1
  1000. package/utils/number-utils.d.ts +0 -19
  1001. package/utils/number-utils.js +0 -37
  1002. package/utils/number-utils.js.map +0 -1
  1003. package/utils/platform-check.d.ts +0 -4
  1004. package/utils/platform-check.js +0 -21
  1005. package/utils/platform-check.js.map +0 -1
  1006. package/utils/shared.d.ts +0 -17
  1007. package/utils/shared.js +0 -40
  1008. package/utils/shared.js.map +0 -1
  1009. package/utils/types.js +0 -104
  1010. package/utils/types.js.map +0 -1
  1011. package/utils/utils-shared.d.ts +0 -1
  1012. package/utils/utils-shared.js +0 -8
  1013. package/utils/utils-shared.js.map +0 -1
  1014. package/wgc/atob.d.ts +0 -1
  1015. package/wgc/atob.js +0 -9
  1016. package/wgc/atob.js.map +0 -1
  1017. package/wgc/btoa.d.ts +0 -1
  1018. package/wgc/btoa.js +0 -9
  1019. package/wgc/btoa.js.map +0 -1
  1020. package/wgc/crypto/SubtleCrypto.d.ts +0 -63
  1021. package/wgc/crypto/SubtleCrypto.js +0 -551
  1022. package/wgc/crypto/SubtleCrypto.js.map +0 -1
  1023. package/wgc/crypto/index.d.ts +0 -8
  1024. package/wgc/crypto/index.js +0 -32
  1025. package/wgc/crypto/index.js.map +0 -1
  1026. package/wgc/index.d.ts +0 -2
  1027. package/wgc/index.js +0 -3
  1028. package/wgc/index.js.map +0 -1
  1029. package/xhr/index.d.ts +0 -113
  1030. package/xhr/index.js +0 -486
  1031. package/xhr/index.js.map +0 -1
  1032. package/xml/index.d.ts +0 -108
  1033. package/xml/index.js +0 -574
  1034. package/xml/index.js.map +0 -1
@@ -1,1195 +0,0 @@
1
- import { profile } from '../profiling';
2
- import { SDK_VERSION } from '../utils/constants';
3
- import { android as androidUtils } from '../utils';
4
- import { ApplicationCommon, initializeSdkVersionClass } from './application-common';
5
- import { Observable } from '../data/observable';
6
- import { Trace } from '../trace';
7
- import { CommonA11YServiceEnabledObservable, SharedA11YObservable, notifyAccessibilityFocusState, a11yServiceClasses, a11yServiceDisabledClass, a11yServiceEnabledClass, fontScaleCategoryClasses, fontScaleExtraLargeCategoryClass, fontScaleExtraSmallCategoryClass, fontScaleMediumCategoryClass, getCurrentA11YServiceClass, getCurrentFontScaleCategory, getCurrentFontScaleClass, getFontScaleCssClasses, setCurrentA11YServiceClass, setCurrentFontScaleCategory, setCurrentFontScaleClass, setFontScaleCssClasses, setFontScale, getFontScale, setInitFontScale, getFontScaleCategory, setInitAccessibilityCssHelper, FontScaleCategory, getClosestValidFontScale, VALID_FONT_SCALES, AccessibilityRole, AccessibilityState, AndroidAccessibilityEvent, isA11yEnabled, setA11yEnabled, } from '../accessibility/accessibility-common';
8
- import { androidGetForegroundActivity, androidGetStartActivity, androidPendingReceiverRegistrations, androidRegisterBroadcastReceiver, androidRegisteredReceivers, androidSetForegroundActivity, androidSetStartActivity, androidUnregisterBroadcastReceiver, applyContentDescription } from './helpers';
9
- import { getImageFetcher, getNativeApp, getRootView, initImageCache, setA11yUpdatePropertiesCallback, setApplicationPropertiesCallback, setAppMainEntry, setNativeApp, setRootView, setToggleApplicationEventListenersCallback } from './helpers-common';
10
- import { getNativeScriptGlobals } from '../globals/global-utils';
11
- let NativeScriptLifecycleCallbacks_;
12
- function initNativeScriptLifecycleCallbacks() {
13
- if (NativeScriptLifecycleCallbacks_) {
14
- return NativeScriptLifecycleCallbacks_;
15
- }
16
- var NativeScriptLifecycleCallbacksImpl = /** @class */ (function (_super) {
17
- __extends(NativeScriptLifecycleCallbacksImpl, _super);
18
- function NativeScriptLifecycleCallbacksImpl() {
19
- var _this = _super !== null && _super.apply(this, arguments) || this;
20
- _this.activitiesCount = 0;
21
- return _this;
22
- }
23
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityCreated = function (activity, savedInstanceState) {
24
- // console.log('NativeScriptLifecycleCallbacks onActivityCreated');
25
- this.setThemeOnLaunch(activity);
26
- if (!Application.android.startActivity) {
27
- Application.android.setStartActivity(activity);
28
- }
29
- if (!this.nativescriptActivity && 'isNativeScriptActivity' in activity) {
30
- this.nativescriptActivity = activity;
31
- }
32
- this.notifyActivityCreated(activity, savedInstanceState);
33
- if (Application.hasListeners(Application.displayedEvent)) {
34
- this.subscribeForGlobalLayout(activity);
35
- }
36
- };
37
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityDestroyed = function (activity) {
38
- // console.log('NativeScriptLifecycleCallbacks onActivityDestroyed');
39
- if (activity === Application.android.foregroundActivity) {
40
- Application.android.setForegroundActivity(undefined);
41
- }
42
- if (activity === this.nativescriptActivity) {
43
- this.nativescriptActivity = undefined;
44
- }
45
- if (activity === Application.android.startActivity) {
46
- Application.android.setStartActivity(undefined);
47
- // Fallback for start activity when it is destroyed but we have a known nativescript activity
48
- if (this.nativescriptActivity) {
49
- Application.android.setStartActivity(this.nativescriptActivity);
50
- }
51
- }
52
- Application.android.notify({
53
- eventName: Application.android.activityDestroyedEvent,
54
- object: Application.android,
55
- activity: activity,
56
- });
57
- // TODO: This is a temporary workaround to force the V8's Garbage Collector, which will force the related Java Object to be collected.
58
- gc();
59
- };
60
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
61
- // console.log('NativeScriptLifecycleCallbacks onActivityPaused');
62
- if ('isNativeScriptActivity' in activity) {
63
- Application.setSuspended(true, {
64
- // todo: deprecate event.android in favor of event.activity
65
- android: activity,
66
- activity: activity,
67
- });
68
- }
69
- Application.android.notify({
70
- eventName: Application.android.activityPausedEvent,
71
- object: Application.android,
72
- activity: activity,
73
- });
74
- };
75
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
76
- // console.log('NativeScriptLifecycleCallbacks onActivityResumed');
77
- Application.android.setForegroundActivity(activity);
78
- // NOTE: setSuspended(false) is called in frame/index.android.ts inside onPostResume
79
- // This is done to ensure proper timing for the event to be raised
80
- Application.android.notify({
81
- eventName: Application.android.activityResumedEvent,
82
- object: Application.android,
83
- activity: activity,
84
- });
85
- };
86
- NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
87
- // console.log('NativeScriptLifecycleCallbacks onActivitySaveInstanceState');
88
- Application.android.notify({
89
- eventName: Application.android.saveActivityStateEvent,
90
- object: Application.android,
91
- activity: activity,
92
- bundle: bundle,
93
- });
94
- };
95
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityStarted = function (activity) {
96
- // console.log('NativeScriptLifecycleCallbacks onActivityStarted');
97
- this.activitiesCount++;
98
- if (this.activitiesCount === 1) {
99
- Application.android.setInBackground(false, {
100
- // todo: deprecate event.android in favor of event.activity
101
- android: activity,
102
- activity: activity,
103
- });
104
- }
105
- Application.android.notify({
106
- eventName: Application.android.activityStartedEvent,
107
- object: Application.android,
108
- activity: activity,
109
- });
110
- };
111
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityStopped = function (activity) {
112
- // console.log('NativeScriptLifecycleCallbacks onActivityStopped');
113
- this.activitiesCount--;
114
- if (this.activitiesCount === 0) {
115
- Application.android.setInBackground(true, {
116
- // todo: deprecate event.android in favor of event.activity
117
- android: activity,
118
- activity: activity,
119
- });
120
- }
121
- Application.android.notify({
122
- eventName: Application.android.activityStoppedEvent,
123
- object: Application.android,
124
- activity: activity,
125
- });
126
- };
127
- NativeScriptLifecycleCallbacksImpl.prototype.setThemeOnLaunch = function (activity) {
128
- // Set app theme after launch screen was used during startup
129
- var activityInfo = activity.getPackageManager().getActivityInfo(activity.getComponentName(), android.content.pm.PackageManager.GET_META_DATA);
130
- if (activityInfo.metaData) {
131
- var setThemeOnLaunch = activityInfo.metaData.getInt('SET_THEME_ON_LAUNCH', -1);
132
- if (setThemeOnLaunch !== -1) {
133
- activity.setTheme(setThemeOnLaunch);
134
- }
135
- }
136
- };
137
- NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
138
- Application.android.notify({
139
- eventName: Application.android.activityCreatedEvent,
140
- object: Application.android,
141
- activity: activity,
142
- bundle: bundle,
143
- });
144
- };
145
- NativeScriptLifecycleCallbacksImpl.prototype.subscribeForGlobalLayout = function (activity) {
146
- var rootView = activity.getWindow().getDecorView().getRootView();
147
- // store the listener not to trigger GC collection before collecting the method
148
- global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
149
- onGlobalLayout: function () {
150
- Application.android.notify({
151
- eventName: Application.displayedEvent,
152
- object: Application,
153
- android: Application.android,
154
- activity: activity,
155
- });
156
- var viewTreeObserver = rootView.getViewTreeObserver();
157
- viewTreeObserver.removeOnGlobalLayoutListener(global.onGlobalLayoutListener);
158
- },
159
- });
160
- rootView.getViewTreeObserver().addOnGlobalLayoutListener(global.onGlobalLayoutListener);
161
- };
162
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
163
- __decorate([
164
- profile,
165
- __metadata("design:type", Function),
166
- __metadata("design:paramtypes", [typeof (_c = typeof androidx !== "undefined" && (_a = androidx.appcompat) !== void 0 && (_b = _a.app) !== void 0 && _b.AppCompatActivity) === "function" ? _c : Object, typeof (_e = typeof android !== "undefined" && (_d = android.os) !== void 0 && _d.Bundle) === "function" ? _e : Object]),
167
- __metadata("design:returntype", void 0)
168
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityCreated", null);
169
- __decorate([
170
- profile,
171
- __metadata("design:type", Function),
172
- __metadata("design:paramtypes", [typeof (_h = typeof androidx !== "undefined" && (_f = androidx.appcompat) !== void 0 && (_g = _f.app) !== void 0 && _g.AppCompatActivity) === "function" ? _h : Object]),
173
- __metadata("design:returntype", void 0)
174
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityDestroyed", null);
175
- __decorate([
176
- profile,
177
- __metadata("design:type", Function),
178
- __metadata("design:paramtypes", [typeof (_l = typeof androidx !== "undefined" && (_j = androidx.appcompat) !== void 0 && (_k = _j.app) !== void 0 && _k.AppCompatActivity) === "function" ? _l : Object]),
179
- __metadata("design:returntype", void 0)
180
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityPaused", null);
181
- __decorate([
182
- profile,
183
- __metadata("design:type", Function),
184
- __metadata("design:paramtypes", [typeof (_p = typeof androidx !== "undefined" && (_m = androidx.appcompat) !== void 0 && (_o = _m.app) !== void 0 && _o.AppCompatActivity) === "function" ? _p : Object]),
185
- __metadata("design:returntype", void 0)
186
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityResumed", null);
187
- __decorate([
188
- profile,
189
- __metadata("design:type", Function),
190
- __metadata("design:paramtypes", [typeof (_s = typeof androidx !== "undefined" && (_q = androidx.appcompat) !== void 0 && (_r = _q.app) !== void 0 && _r.AppCompatActivity) === "function" ? _s : Object, typeof (_u = typeof android !== "undefined" && (_t = android.os) !== void 0 && _t.Bundle) === "function" ? _u : Object]),
191
- __metadata("design:returntype", void 0)
192
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivitySaveInstanceState", null);
193
- __decorate([
194
- profile,
195
- __metadata("design:type", Function),
196
- __metadata("design:paramtypes", [typeof (_x = typeof androidx !== "undefined" && (_v = androidx.appcompat) !== void 0 && (_w = _v.app) !== void 0 && _w.AppCompatActivity) === "function" ? _x : Object]),
197
- __metadata("design:returntype", void 0)
198
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStarted", null);
199
- __decorate([
200
- profile,
201
- __metadata("design:type", Function),
202
- __metadata("design:paramtypes", [typeof (_0 = typeof androidx !== "undefined" && (_y = androidx.appcompat) !== void 0 && (_z = _y.app) !== void 0 && _z.AppCompatActivity) === "function" ? _0 : Object]),
203
- __metadata("design:returntype", void 0)
204
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStopped", null);
205
- __decorate([
206
- profile,
207
- __metadata("design:type", Function),
208
- __metadata("design:paramtypes", [typeof (_3 = typeof androidx !== "undefined" && (_1 = androidx.appcompat) !== void 0 && (_2 = _1.app) !== void 0 && _2.AppCompatActivity) === "function" ? _3 : Object]),
209
- __metadata("design:returntype", void 0)
210
- ], NativeScriptLifecycleCallbacksImpl.prototype, "setThemeOnLaunch", null);
211
- __decorate([
212
- profile,
213
- __metadata("design:type", Function),
214
- __metadata("design:paramtypes", [typeof (_6 = typeof androidx !== "undefined" && (_4 = androidx.appcompat) !== void 0 && (_5 = _4.app) !== void 0 && _5.AppCompatActivity) === "function" ? _6 : Object, typeof (_8 = typeof android !== "undefined" && (_7 = android.os) !== void 0 && _7.Bundle) === "function" ? _8 : Object]),
215
- __metadata("design:returntype", void 0)
216
- ], NativeScriptLifecycleCallbacksImpl.prototype, "notifyActivityCreated", null);
217
- __decorate([
218
- profile,
219
- __metadata("design:type", Function),
220
- __metadata("design:paramtypes", [typeof (_11 = typeof androidx !== "undefined" && (_9 = androidx.appcompat) !== void 0 && (_10 = _9.app) !== void 0 && _10.AppCompatActivity) === "function" ? _11 : Object]),
221
- __metadata("design:returntype", void 0)
222
- ], NativeScriptLifecycleCallbacksImpl.prototype, "subscribeForGlobalLayout", null);
223
- NativeScriptLifecycleCallbacksImpl = __decorate([
224
- JavaProxy('org.nativescript.NativeScriptLifecycleCallbacks')
225
- ], NativeScriptLifecycleCallbacksImpl);
226
- return NativeScriptLifecycleCallbacksImpl;
227
- }(android.app.Application.ActivityLifecycleCallbacks));
228
- NativeScriptLifecycleCallbacks_ = NativeScriptLifecycleCallbacksImpl;
229
- return NativeScriptLifecycleCallbacks_;
230
- }
231
- let NativeScriptComponentCallbacks_;
232
- function initNativeScriptComponentCallbacks() {
233
- if (NativeScriptComponentCallbacks_) {
234
- return NativeScriptComponentCallbacks_;
235
- }
236
- var NativeScriptComponentCallbacksImpl = /** @class */ (function (_super) {
237
- __extends(NativeScriptComponentCallbacksImpl, _super);
238
- function NativeScriptComponentCallbacksImpl() {
239
- return _super !== null && _super.apply(this, arguments) || this;
240
- }
241
- NativeScriptComponentCallbacksImpl.prototype.onLowMemory = function () {
242
- gc();
243
- java.lang.System.gc();
244
- Application.notify({
245
- eventName: Application.lowMemoryEvent,
246
- object: Application,
247
- android: this,
248
- });
249
- };
250
- NativeScriptComponentCallbacksImpl.prototype.onTrimMemory = function (level) {
251
- // TODO: This is skipped for now, test carefully for OutOfMemory exceptions
252
- };
253
- NativeScriptComponentCallbacksImpl.prototype.onConfigurationChanged = function (newConfiguration) {
254
- Application.android.onConfigurationChanged(newConfiguration);
255
- };
256
- var _a, _b, _c;
257
- __decorate([
258
- profile,
259
- __metadata("design:type", Function),
260
- __metadata("design:paramtypes", []),
261
- __metadata("design:returntype", void 0)
262
- ], NativeScriptComponentCallbacksImpl.prototype, "onLowMemory", null);
263
- __decorate([
264
- profile,
265
- __metadata("design:type", Function),
266
- __metadata("design:paramtypes", [Number]),
267
- __metadata("design:returntype", void 0)
268
- ], NativeScriptComponentCallbacksImpl.prototype, "onTrimMemory", null);
269
- __decorate([
270
- profile,
271
- __metadata("design:type", Function),
272
- __metadata("design:paramtypes", [typeof (_c = typeof android !== "undefined" && (_a = android.content) !== void 0 && (_b = _a.res) !== void 0 && _b.Configuration) === "function" ? _c : Object]),
273
- __metadata("design:returntype", void 0)
274
- ], NativeScriptComponentCallbacksImpl.prototype, "onConfigurationChanged", null);
275
- NativeScriptComponentCallbacksImpl = __decorate([
276
- JavaProxy('org.nativescript.NativeScriptComponentCallbacks')
277
- ], NativeScriptComponentCallbacksImpl);
278
- return NativeScriptComponentCallbacksImpl;
279
- }(android.content.ComponentCallbacks2));
280
- NativeScriptComponentCallbacks_ = NativeScriptComponentCallbacksImpl;
281
- return NativeScriptComponentCallbacks_;
282
- }
283
- export class AndroidApplication extends ApplicationCommon {
284
- constructor() {
285
- super(...arguments);
286
- this.activityCreatedEvent = AndroidApplication.activityCreatedEvent;
287
- this.activityDestroyedEvent = AndroidApplication.activityDestroyedEvent;
288
- this.activityStartedEvent = AndroidApplication.activityStartedEvent;
289
- this.activityPausedEvent = AndroidApplication.activityPausedEvent;
290
- this.activityResumedEvent = AndroidApplication.activityResumedEvent;
291
- this.activityStoppedEvent = AndroidApplication.activityStoppedEvent;
292
- this.saveActivityStateEvent = AndroidApplication.saveActivityStateEvent;
293
- this.activityResultEvent = AndroidApplication.activityResultEvent;
294
- this.activityBackPressedEvent = AndroidApplication.activityBackPressedEvent;
295
- this.activityNewIntentEvent = AndroidApplication.activityNewIntentEvent;
296
- this.activityRequestPermissionsEvent = AndroidApplication.activityRequestPermissionsEvent;
297
- }
298
- init(nativeApp) {
299
- if (this.nativeApp === nativeApp) {
300
- return;
301
- }
302
- if (this.nativeApp) {
303
- throw new Error('Application.android already initialized.');
304
- }
305
- this._nativeApp = nativeApp;
306
- setNativeApp(nativeApp);
307
- this._context = nativeApp.getApplicationContext();
308
- this._packageName = nativeApp.getPackageName();
309
- // we store those callbacks and add a function for clearing them later so that the objects will be eligable for GC
310
- this.lifecycleCallbacks = new (initNativeScriptLifecycleCallbacks())();
311
- this.nativeApp.registerActivityLifecycleCallbacks(this.lifecycleCallbacks);
312
- this.componentCallbacks = new (initNativeScriptComponentCallbacks())();
313
- this.nativeApp.registerComponentCallbacks(this.componentCallbacks);
314
- this._registerPendingReceivers();
315
- }
316
- _registerPendingReceivers() {
317
- androidPendingReceiverRegistrations.forEach((func) => func(this.context));
318
- androidPendingReceiverRegistrations.length = 0;
319
- }
320
- onConfigurationChanged(configuration) {
321
- this.setOrientation(this.getOrientationValue(configuration));
322
- this.setSystemAppearance(this.getSystemAppearanceValue(configuration));
323
- }
324
- getNativeApplication() {
325
- let nativeApp = this.nativeApp;
326
- if (nativeApp) {
327
- return nativeApp;
328
- }
329
- nativeApp = getNativeApp();
330
- // we cannot work without having the app instance
331
- if (!nativeApp) {
332
- throw new Error("Failed to retrieve native Android Application object. If you have a custom android.app.Application type implemented make sure that you've called the 'Application.android.init' method.");
333
- }
334
- return nativeApp;
335
- }
336
- get nativeApp() {
337
- return this._nativeApp;
338
- }
339
- run(entry) {
340
- if (this.started) {
341
- throw new Error('Application is already started.');
342
- }
343
- this.started = true;
344
- setAppMainEntry(typeof entry === 'string' ? { moduleName: entry } : entry);
345
- if (!this.nativeApp) {
346
- const nativeApp = this.getNativeApplication();
347
- this.init(nativeApp);
348
- }
349
- }
350
- get startActivity() {
351
- return androidGetStartActivity();
352
- }
353
- get foregroundActivity() {
354
- return androidGetForegroundActivity();
355
- }
356
- setStartActivity(value) {
357
- androidSetStartActivity(value);
358
- }
359
- setForegroundActivity(value) {
360
- androidSetForegroundActivity(value);
361
- }
362
- get paused() {
363
- return this.suspended;
364
- }
365
- get backgrounded() {
366
- return this.inBackground;
367
- }
368
- get context() {
369
- return this._context;
370
- }
371
- get packageName() {
372
- return this._packageName;
373
- }
374
- // Possible flags are:
375
- // RECEIVER_EXPORTED (2)
376
- // RECEIVER_NOT_EXPORTED (4)
377
- // RECEIVER_VISIBLE_TO_INSTANT_APPS (1)
378
- registerBroadcastReceiver(intentFilter, onReceiveCallback, flags = 2) {
379
- androidRegisterBroadcastReceiver(intentFilter, onReceiveCallback, flags);
380
- }
381
- unregisterBroadcastReceiver(intentFilter) {
382
- androidUnregisterBroadcastReceiver(intentFilter);
383
- }
384
- getRegisteredBroadcastReceiver(intentFilter) {
385
- return androidRegisteredReceivers[intentFilter];
386
- }
387
- getRootView() {
388
- const activity = this.foregroundActivity || this.startActivity;
389
- if (!activity) {
390
- return undefined;
391
- }
392
- const callbacks = activity['_callbacks'];
393
- setRootView(callbacks ? callbacks.getRootView() : undefined);
394
- return getRootView();
395
- }
396
- resetRootView(entry) {
397
- super.resetRootView(entry);
398
- const activity = this.foregroundActivity || this.startActivity;
399
- if (!activity) {
400
- throw new Error('Cannot find android activity.');
401
- }
402
- // this.mainEntry = typeof entry === 'string' ? { moduleName: entry } : entry;
403
- const callbacks = activity['_callbacks'];
404
- if (!callbacks) {
405
- throw new Error('Cannot find android activity callbacks.');
406
- }
407
- callbacks.resetActivityContent(activity);
408
- }
409
- getSystemAppearance() {
410
- const resources = this.context.getResources();
411
- const configuration = resources.getConfiguration();
412
- return this.getSystemAppearanceValue(configuration);
413
- }
414
- // https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes
415
- getSystemAppearanceValue(configuration) {
416
- const systemAppearance = configuration.uiMode & android.content.res.Configuration.UI_MODE_NIGHT_MASK;
417
- switch (systemAppearance) {
418
- case android.content.res.Configuration.UI_MODE_NIGHT_YES:
419
- return 'dark';
420
- case android.content.res.Configuration.UI_MODE_NIGHT_NO:
421
- case android.content.res.Configuration.UI_MODE_NIGHT_UNDEFINED:
422
- return 'light';
423
- }
424
- }
425
- getOrientation() {
426
- const resources = this.context.getResources();
427
- const configuration = resources.getConfiguration();
428
- return this.getOrientationValue(configuration);
429
- }
430
- getOrientationValue(configuration) {
431
- const orientation = configuration.orientation;
432
- switch (orientation) {
433
- case android.content.res.Configuration.ORIENTATION_LANDSCAPE:
434
- return 'landscape';
435
- case android.content.res.Configuration.ORIENTATION_PORTRAIT:
436
- return 'portrait';
437
- default:
438
- return 'unknown';
439
- }
440
- }
441
- get android() {
442
- // ensures Application.android is defined when running on Android
443
- return this;
444
- }
445
- }
446
- AndroidApplication.activityCreatedEvent = 'activityCreated';
447
- AndroidApplication.activityDestroyedEvent = 'activityDestroyed';
448
- AndroidApplication.activityStartedEvent = 'activityStarted';
449
- AndroidApplication.activityPausedEvent = 'activityPaused';
450
- AndroidApplication.activityResumedEvent = 'activityResumed';
451
- AndroidApplication.activityStoppedEvent = 'activityStopped';
452
- AndroidApplication.saveActivityStateEvent = 'saveActivityState';
453
- AndroidApplication.activityResultEvent = 'activityResult';
454
- AndroidApplication.activityBackPressedEvent = 'activityBackPressed';
455
- AndroidApplication.activityNewIntentEvent = 'activityNewIntent';
456
- AndroidApplication.activityRequestPermissionsEvent = 'activityRequestPermissions';
457
- export * from './application-common';
458
- export const Application = new AndroidApplication();
459
- export const iOSApplication = undefined;
460
- function fontScaleChanged(origFontScale) {
461
- const oldValue = getFontScale();
462
- setFontScale(getClosestValidFontScale(origFontScale));
463
- const currentFontScale = getFontScale();
464
- if (oldValue !== currentFontScale) {
465
- Application.notify({
466
- eventName: Application.fontScaleChangedEvent,
467
- object: Application,
468
- newValue: currentFontScale,
469
- });
470
- }
471
- }
472
- export function getCurrentFontScale() {
473
- setupConfigListener();
474
- return getFontScale();
475
- }
476
- function useAndroidFontScale() {
477
- fontScaleChanged(Number(Application.android.context.getResources().getConfiguration().fontScale));
478
- }
479
- let configChangedCallback;
480
- function setupConfigListener() {
481
- if (configChangedCallback) {
482
- return;
483
- }
484
- Application.off(Application.launchEvent, setupConfigListener);
485
- const context = Application.android?.context;
486
- if (!context) {
487
- Application.on(Application.launchEvent, setupConfigListener);
488
- return;
489
- }
490
- useAndroidFontScale();
491
- configChangedCallback = new android.content.ComponentCallbacks2({
492
- onLowMemory() {
493
- // Dummy
494
- },
495
- onTrimMemory() {
496
- // Dummy
497
- },
498
- onConfigurationChanged(newConfig) {
499
- fontScaleChanged(Number(newConfig.fontScale));
500
- },
501
- });
502
- context.registerComponentCallbacks(configChangedCallback);
503
- Application.on(Application.resumeEvent, useAndroidFontScale);
504
- }
505
- setInitFontScale(setupConfigListener);
506
- function applyRootCssClass(cssClasses, newCssClass) {
507
- const rootView = Application.getRootView();
508
- if (!rootView) {
509
- return;
510
- }
511
- Application.applyCssClass(rootView, cssClasses, newCssClass);
512
- const rootModalViews = rootView._getRootModalViews();
513
- rootModalViews.forEach((rootModalView) => Application.applyCssClass(rootModalView, cssClasses, newCssClass));
514
- }
515
- function applyFontScaleToRootViews() {
516
- const rootView = Application.getRootView();
517
- if (!rootView) {
518
- return;
519
- }
520
- const fontScale = getCurrentFontScale();
521
- rootView.style.fontScaleInternal = fontScale;
522
- const rootModalViews = rootView._getRootModalViews();
523
- rootModalViews.forEach((rootModalView) => (rootModalView.style.fontScaleInternal = fontScale));
524
- }
525
- export function getAndroidAccessibilityManager() {
526
- const context = getNativeApp().getApplicationContext();
527
- if (!context) {
528
- return null;
529
- }
530
- return context.getSystemService(android.content.Context.ACCESSIBILITY_SERVICE);
531
- }
532
- const accessibilityStateEnabledPropName = 'accessibilityStateEnabled';
533
- const touchExplorationStateEnabledPropName = 'touchExplorationStateEnabled';
534
- class AndroidSharedA11YObservable extends SharedA11YObservable {
535
- // @ts-ignore todo: fix
536
- get accessibilityServiceEnabled() {
537
- return !!this[accessibilityStateEnabledPropName] && !!this[touchExplorationStateEnabledPropName];
538
- }
539
- set accessibilityServiceEnabled(v) {
540
- return;
541
- }
542
- }
543
- let accessibilityStateChangeListener;
544
- let touchExplorationStateChangeListener;
545
- let sharedA11YObservable;
546
- function updateAccessibilityState() {
547
- const accessibilityManager = getAndroidAccessibilityManager();
548
- if (!accessibilityManager) {
549
- sharedA11YObservable.set(accessibilityStateEnabledPropName, false);
550
- sharedA11YObservable.set(touchExplorationStateEnabledPropName, false);
551
- return;
552
- }
553
- sharedA11YObservable.set(accessibilityStateEnabledPropName, !!accessibilityManager.isEnabled());
554
- sharedA11YObservable.set(touchExplorationStateEnabledPropName, !!accessibilityManager.isTouchExplorationEnabled());
555
- }
556
- function ensureStateListener() {
557
- if (sharedA11YObservable) {
558
- return sharedA11YObservable;
559
- }
560
- const accessibilityManager = getAndroidAccessibilityManager();
561
- sharedA11YObservable = new AndroidSharedA11YObservable();
562
- if (!accessibilityManager) {
563
- sharedA11YObservable.set(accessibilityStateEnabledPropName, false);
564
- sharedA11YObservable.set(touchExplorationStateEnabledPropName, false);
565
- return sharedA11YObservable;
566
- }
567
- accessibilityStateChangeListener = new android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener({
568
- onAccessibilityStateChanged(enabled) {
569
- updateAccessibilityState();
570
- if (Trace.isEnabled()) {
571
- Trace.write(`AccessibilityStateChangeListener state changed to: ${!!enabled}`, Trace.categories.Accessibility);
572
- }
573
- },
574
- });
575
- accessibilityManager.addAccessibilityStateChangeListener(accessibilityStateChangeListener);
576
- if (SDK_VERSION >= 19) {
577
- touchExplorationStateChangeListener = new android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener({
578
- onTouchExplorationStateChanged(enabled) {
579
- updateAccessibilityState();
580
- if (Trace.isEnabled()) {
581
- Trace.write(`TouchExplorationStateChangeListener state changed to: ${!!enabled}`, Trace.categories.Accessibility);
582
- }
583
- },
584
- });
585
- accessibilityManager.addTouchExplorationStateChangeListener(touchExplorationStateChangeListener);
586
- }
587
- updateAccessibilityState();
588
- Application.on(Application.resumeEvent, updateAccessibilityState);
589
- Application.on(Application.exitEvent, (args) => {
590
- const activity = args.android;
591
- if (activity && !activity.isFinishing()) {
592
- return;
593
- }
594
- const accessibilityManager = getAndroidAccessibilityManager();
595
- if (accessibilityManager) {
596
- if (accessibilityStateChangeListener) {
597
- accessibilityManager.removeAccessibilityStateChangeListener(accessibilityStateChangeListener);
598
- }
599
- if (touchExplorationStateChangeListener) {
600
- accessibilityManager.removeTouchExplorationStateChangeListener(touchExplorationStateChangeListener);
601
- }
602
- }
603
- accessibilityStateChangeListener = null;
604
- touchExplorationStateChangeListener = null;
605
- if (sharedA11YObservable) {
606
- sharedA11YObservable.removeEventListener(Observable.propertyChangeEvent);
607
- sharedA11YObservable = null;
608
- }
609
- Application.off(Application.resumeEvent, updateAccessibilityState);
610
- });
611
- return sharedA11YObservable;
612
- }
613
- export class AccessibilityServiceEnabledObservable extends CommonA11YServiceEnabledObservable {
614
- constructor() {
615
- super(ensureStateListener());
616
- }
617
- }
618
- let accessibilityServiceObservable;
619
- export function ensureClasses() {
620
- if (accessibilityServiceObservable) {
621
- return;
622
- }
623
- setFontScaleCssClasses(new Map(VALID_FONT_SCALES.map((fs) => [fs, `a11y-fontscale-${Number(fs * 100).toFixed(0)}`])));
624
- accessibilityServiceObservable = new AccessibilityServiceEnabledObservable();
625
- // Initialize SDK version CSS class once
626
- initializeSdkVersionClass(Application.getRootView());
627
- }
628
- export function updateCurrentHelperClasses(applyRootCssClass) {
629
- const fontScale = getFontScale();
630
- const fontScaleCategory = getFontScaleCategory();
631
- const fontScaleCssClasses = getFontScaleCssClasses();
632
- const oldFontScaleClass = getCurrentFontScaleClass();
633
- if (fontScaleCssClasses.has(fontScale)) {
634
- setCurrentFontScaleClass(fontScaleCssClasses.get(fontScale));
635
- }
636
- else {
637
- setCurrentFontScaleClass(fontScaleCssClasses.get(1));
638
- }
639
- if (oldFontScaleClass !== getCurrentFontScaleClass()) {
640
- applyRootCssClass([...fontScaleCssClasses.values()], getCurrentFontScaleClass());
641
- }
642
- const oldActiveFontScaleCategory = getCurrentFontScaleCategory();
643
- switch (fontScaleCategory) {
644
- case FontScaleCategory.ExtraSmall: {
645
- setCurrentFontScaleCategory(fontScaleExtraSmallCategoryClass);
646
- break;
647
- }
648
- case FontScaleCategory.Medium: {
649
- setCurrentFontScaleCategory(fontScaleMediumCategoryClass);
650
- break;
651
- }
652
- case FontScaleCategory.ExtraLarge: {
653
- setCurrentFontScaleCategory(fontScaleExtraLargeCategoryClass);
654
- break;
655
- }
656
- default: {
657
- setCurrentFontScaleCategory(fontScaleMediumCategoryClass);
658
- break;
659
- }
660
- }
661
- if (oldActiveFontScaleCategory !== getCurrentFontScaleCategory()) {
662
- applyRootCssClass(fontScaleCategoryClasses, getCurrentFontScaleCategory());
663
- }
664
- const oldA11YStatusClass = getCurrentA11YServiceClass();
665
- if (accessibilityServiceObservable.accessibilityServiceEnabled) {
666
- setCurrentA11YServiceClass(a11yServiceEnabledClass);
667
- }
668
- else {
669
- setCurrentA11YServiceClass(a11yServiceDisabledClass);
670
- }
671
- if (oldA11YStatusClass !== getCurrentA11YServiceClass()) {
672
- applyRootCssClass(a11yServiceClasses, getCurrentA11YServiceClass());
673
- }
674
- }
675
- export function initAccessibilityCssHelper() {
676
- ensureClasses();
677
- Application.on(Application.fontScaleChangedEvent, () => {
678
- updateCurrentHelperClasses(applyRootCssClass);
679
- applyFontScaleToRootViews();
680
- });
681
- accessibilityServiceObservable.on(AccessibilityServiceEnabledObservable.propertyChangeEvent, () => updateCurrentHelperClasses(applyRootCssClass));
682
- }
683
- setInitAccessibilityCssHelper(initAccessibilityCssHelper);
684
- let clickableRolesMap = new Set();
685
- let lastFocusedView;
686
- function accessibilityEventHelper(view, eventType) {
687
- const eventName = accessibilityEventTypeMap.get(eventType);
688
- if (!isAccessibilityServiceEnabled()) {
689
- if (Trace.isEnabled()) {
690
- Trace.write(`accessibilityEventHelper: Service not active`, Trace.categories.Accessibility);
691
- }
692
- return;
693
- }
694
- if (!eventName) {
695
- Trace.write(`accessibilityEventHelper: unknown eventType: ${eventType}`, Trace.categories.Accessibility, Trace.messageType.error);
696
- return;
697
- }
698
- if (!view) {
699
- if (Trace.isEnabled()) {
700
- Trace.write(`accessibilityEventHelper: no owner: ${eventName}`, Trace.categories.Accessibility);
701
- }
702
- return;
703
- }
704
- const androidView = view.nativeViewProtected;
705
- if (!androidView) {
706
- if (Trace.isEnabled()) {
707
- Trace.write(`accessibilityEventHelper: no nativeView`, Trace.categories.Accessibility);
708
- }
709
- return;
710
- }
711
- switch (eventType) {
712
- case android.view.accessibility.AccessibilityEvent.TYPE_VIEW_CLICKED: {
713
- /**
714
- * Android API >= 26 handles accessibility tap-events by converting them to TYPE_VIEW_CLICKED
715
- * These aren't triggered for custom tap events in NativeScript.
716
- */
717
- if (SDK_VERSION >= 26) {
718
- // Find all tap gestures and trigger them.
719
- for (const tapGesture of view.getGestureObservers(1) ?? []) {
720
- tapGesture.callback({
721
- android: view.android,
722
- eventName: 'tap',
723
- ios: null,
724
- object: view,
725
- type: 1,
726
- view: view,
727
- });
728
- }
729
- }
730
- return;
731
- }
732
- case android.view.accessibility.AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED: {
733
- const lastView = lastFocusedView?.get();
734
- if (lastView && view !== lastView) {
735
- const lastAndroidView = lastView.nativeViewProtected;
736
- if (lastAndroidView) {
737
- lastAndroidView.clearFocus();
738
- lastFocusedView = null;
739
- notifyAccessibilityFocusState(lastView, false, true);
740
- }
741
- }
742
- lastFocusedView = new WeakRef(view);
743
- notifyAccessibilityFocusState(view, true, false);
744
- return;
745
- }
746
- case android.view.accessibility.AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED: {
747
- const lastView = lastFocusedView?.get();
748
- if (lastView && view === lastView) {
749
- lastFocusedView = null;
750
- androidView.clearFocus();
751
- }
752
- notifyAccessibilityFocusState(view, false, true);
753
- return;
754
- }
755
- }
756
- }
757
- let TNSAccessibilityDelegate;
758
- const androidViewToTNSView = new WeakMap();
759
- let accessibilityEventMap;
760
- let accessibilityEventTypeMap;
761
- function ensureNativeClasses() {
762
- if (TNSAccessibilityDelegate) {
763
- return;
764
- }
765
- // WORKAROUND: Typing refers to android.view.View.androidviewViewAccessibilityDelegate but it is called android.view.View.AccessibilityDelegate at runtime
766
- const AccessibilityDelegate = android.view.View['AccessibilityDelegate'];
767
- const RoleTypeMap = new Map([
768
- [AccessibilityRole.Button, android.widget.Button.class.getName()],
769
- [AccessibilityRole.Search, android.widget.EditText.class.getName()],
770
- [AccessibilityRole.Image, android.widget.ImageView.class.getName()],
771
- [AccessibilityRole.ImageButton, android.widget.ImageButton.class.getName()],
772
- [AccessibilityRole.KeyboardKey, android.inputmethodservice.Keyboard.Key.class.getName()],
773
- [AccessibilityRole.StaticText, android.widget.TextView.class.getName()],
774
- [AccessibilityRole.Adjustable, android.widget.SeekBar.class.getName()],
775
- [AccessibilityRole.Checkbox, android.widget.CheckBox.class.getName()],
776
- [AccessibilityRole.RadioButton, android.widget.RadioButton.class.getName()],
777
- [AccessibilityRole.SpinButton, android.widget.Spinner.class.getName()],
778
- [AccessibilityRole.Switch, android.widget.Switch.class.getName()],
779
- [AccessibilityRole.ProgressBar, android.widget.ProgressBar.class.getName()],
780
- ]);
781
- clickableRolesMap = new Set([AccessibilityRole.Button, AccessibilityRole.ImageButton]);
782
- const ignoreRoleTypesForTrace = new Set([AccessibilityRole.Header, AccessibilityRole.Link, AccessibilityRole.None, AccessibilityRole.Summary]);
783
- var TNSAccessibilityDelegateImpl = /** @class */ (function (_super) {
784
- __extends(TNSAccessibilityDelegateImpl, _super);
785
- function TNSAccessibilityDelegateImpl() {
786
- var _this = _super.call(this) || this;
787
- return global.__native(_this);
788
- }
789
- TNSAccessibilityDelegateImpl.prototype.getTnsView = function (androidView) {
790
- var _a;
791
- var view = (_a = androidViewToTNSView.get(androidView)) === null || _a === void 0 ? void 0 : _a.get();
792
- if (!view) {
793
- androidViewToTNSView.delete(androidView);
794
- return null;
795
- }
796
- return view;
797
- };
798
- TNSAccessibilityDelegateImpl.prototype.onInitializeAccessibilityNodeInfo = function (host, info) {
799
- _super.prototype.onInitializeAccessibilityNodeInfo.call(this, host, info);
800
- var view = this.getTnsView(host);
801
- if (!view) {
802
- if (Trace.isEnabled()) {
803
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(host, " ").concat(info, " no tns-view"), Trace.categories.Accessibility);
804
- }
805
- return;
806
- }
807
- // Set resource id that can be used with test frameworks without polluting the content description.
808
- var id = host.getTag(androidUtils.resources.getId(":id/nativescript_accessibility_id"));
809
- if (id != null) {
810
- info.setViewIdResourceName(id);
811
- }
812
- var accessibilityRole = view.accessibilityRole;
813
- if (accessibilityRole) {
814
- var androidClassName = RoleTypeMap.get(accessibilityRole);
815
- if (androidClassName) {
816
- var oldClassName = info.getClassName() || (SDK_VERSION >= 28 && host.getAccessibilityClassName()) || null;
817
- info.setClassName(androidClassName);
818
- if (Trace.isEnabled()) {
819
- Trace.write("".concat(view, ".accessibilityRole = \"").concat(accessibilityRole, "\" is mapped to \"").concat(androidClassName, "\" (was ").concat(oldClassName, "). ").concat(info.getClassName()), Trace.categories.Accessibility);
820
- }
821
- }
822
- else if (!ignoreRoleTypesForTrace.has(accessibilityRole)) {
823
- if (Trace.isEnabled()) {
824
- Trace.write("".concat(view, ".accessibilityRole = \"").concat(accessibilityRole, "\" is unknown"), Trace.categories.Accessibility);
825
- }
826
- }
827
- if (clickableRolesMap.has(accessibilityRole)) {
828
- if (Trace.isEnabled()) {
829
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set clickable role=").concat(accessibilityRole), Trace.categories.Accessibility);
830
- }
831
- info.setClickable(true);
832
- }
833
- if (SDK_VERSION >= 28) {
834
- if (accessibilityRole === AccessibilityRole.Header) {
835
- if (Trace.isEnabled()) {
836
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set heading role=").concat(accessibilityRole), Trace.categories.Accessibility);
837
- }
838
- info.setHeading(true);
839
- }
840
- else if (host.isAccessibilityHeading()) {
841
- if (Trace.isEnabled()) {
842
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set heading from host"), Trace.categories.Accessibility);
843
- }
844
- info.setHeading(true);
845
- }
846
- else {
847
- if (Trace.isEnabled()) {
848
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set not heading"), Trace.categories.Accessibility);
849
- }
850
- info.setHeading(false);
851
- }
852
- }
853
- switch (accessibilityRole) {
854
- case AccessibilityRole.Switch:
855
- case AccessibilityRole.RadioButton:
856
- case AccessibilityRole.Checkbox: {
857
- if (Trace.isEnabled()) {
858
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set checkable and check=").concat(view.accessibilityState === AccessibilityState.Checked), Trace.categories.Accessibility);
859
- }
860
- info.setCheckable(true);
861
- info.setChecked(view.accessibilityState === AccessibilityState.Checked);
862
- break;
863
- }
864
- default: {
865
- if (Trace.isEnabled()) {
866
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set enabled=").concat(view.accessibilityState !== AccessibilityState.Disabled, " and selected=").concat(view.accessibilityState === AccessibilityState.Selected), Trace.categories.Accessibility);
867
- }
868
- info.setEnabled(view.accessibilityState !== AccessibilityState.Disabled);
869
- info.setSelected(view.accessibilityState === AccessibilityState.Selected);
870
- break;
871
- }
872
- }
873
- }
874
- if (view.accessible) {
875
- info.setFocusable(true);
876
- }
877
- };
878
- TNSAccessibilityDelegateImpl.prototype.sendAccessibilityEvent = function (host, eventType) {
879
- _super.prototype.sendAccessibilityEvent.call(this, host, eventType);
880
- var view = this.getTnsView(host);
881
- if (!view) {
882
- console.log("skip - ".concat(host, " - ").concat(accessibilityEventTypeMap.get(eventType)));
883
- return;
884
- }
885
- try {
886
- accessibilityEventHelper(view, eventType);
887
- }
888
- catch (err) {
889
- console.error(err);
890
- }
891
- };
892
- return TNSAccessibilityDelegateImpl;
893
- }(AccessibilityDelegate));
894
- TNSAccessibilityDelegate = new TNSAccessibilityDelegateImpl();
895
- accessibilityEventMap = new Map([
896
- /**
897
- * Invalid selection/focus position.
898
- */
899
- [AndroidAccessibilityEvent.INVALID_POSITION, android.view.accessibility.AccessibilityEvent.INVALID_POSITION],
900
- /**
901
- * Maximum length of the text fields.
902
- */
903
- [AndroidAccessibilityEvent.MAX_TEXT_LENGTH, android.view.accessibility.AccessibilityEvent.MAX_TEXT_LENGTH],
904
- /**
905
- * Represents the event of clicking on a android.view.View like android.widget.Button, android.widget.CompoundButton, etc.
906
- */
907
- [AndroidAccessibilityEvent.VIEW_CLICKED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_CLICKED],
908
- /**
909
- * Represents the event of long clicking on a android.view.View like android.widget.Button, android.widget.CompoundButton, etc.
910
- */
911
- [AndroidAccessibilityEvent.VIEW_LONG_CLICKED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_LONG_CLICKED],
912
- /**
913
- * Represents the event of selecting an item usually in the context of an android.widget.AdapterView.
914
- */
915
- [AndroidAccessibilityEvent.VIEW_SELECTED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_SELECTED],
916
- /**
917
- * Represents the event of setting input focus of a android.view.View.
918
- */
919
- [AndroidAccessibilityEvent.VIEW_FOCUSED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED],
920
- /**
921
- * Represents the event of changing the text of an android.widget.EditText.
922
- */
923
- [AndroidAccessibilityEvent.VIEW_TEXT_CHANGED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED],
924
- /**
925
- * Represents the event of opening a android.widget.PopupWindow, android.view.Menu, android.app.Dialog, etc.
926
- */
927
- [AndroidAccessibilityEvent.WINDOW_STATE_CHANGED, android.view.accessibility.AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED],
928
- /**
929
- * Represents the event showing a android.app.Notification.
930
- */
931
- [AndroidAccessibilityEvent.NOTIFICATION_STATE_CHANGED, android.view.accessibility.AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED],
932
- /**
933
- * Represents the event of a hover enter over a android.view.View.
934
- */
935
- [AndroidAccessibilityEvent.VIEW_HOVER_ENTER, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_HOVER_ENTER],
936
- /**
937
- * Represents the event of a hover exit over a android.view.View.
938
- */
939
- [AndroidAccessibilityEvent.VIEW_HOVER_EXIT, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_HOVER_EXIT],
940
- /**
941
- * Represents the event of starting a touch exploration gesture.
942
- */
943
- [AndroidAccessibilityEvent.TOUCH_EXPLORATION_GESTURE_START, android.view.accessibility.AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_START],
944
- /**
945
- * Represents the event of ending a touch exploration gesture.
946
- */
947
- [AndroidAccessibilityEvent.TOUCH_EXPLORATION_GESTURE_END, android.view.accessibility.AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END],
948
- /**
949
- * Represents the event of changing the content of a window and more specifically the sub-tree rooted at the event's source.
950
- */
951
- [AndroidAccessibilityEvent.WINDOW_CONTENT_CHANGED, android.view.accessibility.AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED],
952
- /**
953
- * Represents the event of scrolling a view.
954
- */
955
- [AndroidAccessibilityEvent.VIEW_SCROLLED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_SCROLLED],
956
- /**
957
- * Represents the event of changing the selection in an android.widget.EditText.
958
- */
959
- [AndroidAccessibilityEvent.VIEW_TEXT_SELECTION_CHANGED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED],
960
- /**
961
- * Represents the event of an application making an announcement.
962
- */
963
- [AndroidAccessibilityEvent.ANNOUNCEMENT, android.view.accessibility.AccessibilityEvent.TYPE_ANNOUNCEMENT],
964
- /**
965
- * Represents the event of gaining accessibility focus.
966
- */
967
- [AndroidAccessibilityEvent.VIEW_ACCESSIBILITY_FOCUSED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED],
968
- /**
969
- * Represents the event of clearing accessibility focus.
970
- */
971
- [AndroidAccessibilityEvent.VIEW_ACCESSIBILITY_FOCUS_CLEARED, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED],
972
- /**
973
- * Represents the event of traversing the text of a view at a given movement granularity.
974
- */
975
- [AndroidAccessibilityEvent.VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, android.view.accessibility.AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY],
976
- /**
977
- * Represents the event of beginning gesture detection.
978
- */
979
- [AndroidAccessibilityEvent.GESTURE_DETECTION_START, android.view.accessibility.AccessibilityEvent.TYPE_GESTURE_DETECTION_START],
980
- /**
981
- * Represents the event of ending gesture detection.
982
- */
983
- [AndroidAccessibilityEvent.GESTURE_DETECTION_END, android.view.accessibility.AccessibilityEvent.TYPE_GESTURE_DETECTION_END],
984
- /**
985
- * Represents the event of the user starting to touch the screen.
986
- */
987
- [AndroidAccessibilityEvent.TOUCH_INTERACTION_START, android.view.accessibility.AccessibilityEvent.TYPE_TOUCH_INTERACTION_START],
988
- /**
989
- * Represents the event of the user ending to touch the screen.
990
- */
991
- [AndroidAccessibilityEvent.TOUCH_INTERACTION_END, android.view.accessibility.AccessibilityEvent.TYPE_TOUCH_INTERACTION_END],
992
- /**
993
- * Mask for AccessibilityEvent all types.
994
- */
995
- [AndroidAccessibilityEvent.ALL_MASK, android.view.accessibility.AccessibilityEvent.TYPES_ALL_MASK],
996
- ]);
997
- accessibilityEventTypeMap = new Map([...accessibilityEventMap].map(([k, v]) => [v, k]));
998
- }
999
- function updateAccessibilityServiceState() {
1000
- const accessibilityManager = getAndroidAccessibilityManager();
1001
- if (!accessibilityManager) {
1002
- return;
1003
- }
1004
- setA11yEnabled(!!accessibilityManager.isEnabled() && !!accessibilityManager.isTouchExplorationEnabled());
1005
- }
1006
- export function isAccessibilityServiceEnabled() {
1007
- const accessibilityServiceEnabled = isA11yEnabled();
1008
- if (typeof accessibilityServiceEnabled === 'boolean') {
1009
- return accessibilityServiceEnabled;
1010
- }
1011
- const accessibilityManager = getAndroidAccessibilityManager();
1012
- accessibilityStateChangeListener = new androidx.core.view.accessibility.AccessibilityManagerCompat.AccessibilityStateChangeListener({
1013
- onAccessibilityStateChanged(enabled) {
1014
- updateAccessibilityServiceState();
1015
- if (Trace.isEnabled()) {
1016
- Trace.write(`AccessibilityStateChangeListener state changed to: ${!!enabled}`, Trace.categories.Accessibility);
1017
- }
1018
- },
1019
- });
1020
- touchExplorationStateChangeListener = new androidx.core.view.accessibility.AccessibilityManagerCompat.TouchExplorationStateChangeListener({
1021
- onTouchExplorationStateChanged(enabled) {
1022
- updateAccessibilityServiceState();
1023
- if (Trace.isEnabled()) {
1024
- Trace.write(`TouchExplorationStateChangeListener state changed to: ${!!enabled}`, Trace.categories.Accessibility);
1025
- }
1026
- },
1027
- });
1028
- androidx.core.view.accessibility.AccessibilityManagerCompat.addAccessibilityStateChangeListener(accessibilityManager, accessibilityStateChangeListener);
1029
- androidx.core.view.accessibility.AccessibilityManagerCompat.addTouchExplorationStateChangeListener(accessibilityManager, touchExplorationStateChangeListener);
1030
- updateAccessibilityServiceState();
1031
- Application.on(Application.exitEvent, (args) => {
1032
- const activity = args.android;
1033
- if (activity && !activity.isFinishing()) {
1034
- return;
1035
- }
1036
- const accessibilityManager = getAndroidAccessibilityManager();
1037
- if (accessibilityManager) {
1038
- if (accessibilityStateChangeListener) {
1039
- androidx.core.view.accessibility.AccessibilityManagerCompat.removeAccessibilityStateChangeListener(accessibilityManager, accessibilityStateChangeListener);
1040
- }
1041
- if (touchExplorationStateChangeListener) {
1042
- androidx.core.view.accessibility.AccessibilityManagerCompat.removeTouchExplorationStateChangeListener(accessibilityManager, touchExplorationStateChangeListener);
1043
- }
1044
- }
1045
- accessibilityStateChangeListener = null;
1046
- touchExplorationStateChangeListener = null;
1047
- Application.off(Application.resumeEvent, updateAccessibilityServiceState);
1048
- });
1049
- Application.on(Application.resumeEvent, updateAccessibilityServiceState);
1050
- return accessibilityServiceEnabled;
1051
- }
1052
- let updateAccessibilityPropertiesMicroTask;
1053
- let pendingViews = new Set();
1054
- export function updateAccessibilityProperties(view) {
1055
- if (!view.nativeViewProtected) {
1056
- return;
1057
- }
1058
- pendingViews.add(view);
1059
- if (updateAccessibilityPropertiesMicroTask)
1060
- return;
1061
- updateAccessibilityPropertiesMicroTask = true;
1062
- Promise.resolve().then(() => {
1063
- updateAccessibilityPropertiesMicroTask = false;
1064
- let _pendingViews = Array.from(pendingViews);
1065
- pendingViews = new Set();
1066
- for (const view of _pendingViews) {
1067
- if (!view.nativeViewProtected)
1068
- continue;
1069
- setAccessibilityDelegate(view);
1070
- applyContentDescription(view);
1071
- }
1072
- _pendingViews = [];
1073
- });
1074
- }
1075
- setA11yUpdatePropertiesCallback(updateAccessibilityProperties);
1076
- export function sendAccessibilityEvent(view, eventType, text) {
1077
- if (!isAccessibilityServiceEnabled()) {
1078
- return;
1079
- }
1080
- const cls = `sendAccessibilityEvent(${view}, ${eventType}, ${text})`;
1081
- const androidView = view.nativeViewProtected;
1082
- if (!androidView) {
1083
- if (Trace.isEnabled()) {
1084
- Trace.write(`${cls}: no nativeView`, Trace.categories.Accessibility);
1085
- }
1086
- return;
1087
- }
1088
- if (!eventType) {
1089
- if (Trace.isEnabled()) {
1090
- Trace.write(`${cls}: no eventName provided`, Trace.categories.Accessibility);
1091
- }
1092
- return;
1093
- }
1094
- if (!isAccessibilityServiceEnabled()) {
1095
- if (Trace.isEnabled()) {
1096
- Trace.write(`${cls} - TalkBack not enabled`, Trace.categories.Accessibility);
1097
- }
1098
- return;
1099
- }
1100
- const accessibilityManager = getAndroidAccessibilityManager();
1101
- if (!accessibilityManager?.isEnabled()) {
1102
- if (Trace.isEnabled()) {
1103
- Trace.write(`${cls} - accessibility service not enabled`, Trace.categories.Accessibility);
1104
- }
1105
- return;
1106
- }
1107
- if (!accessibilityEventMap.has(eventType)) {
1108
- if (Trace.isEnabled()) {
1109
- Trace.write(`${cls} - unknown event`, Trace.categories.Accessibility);
1110
- }
1111
- return;
1112
- }
1113
- const eventInt = accessibilityEventMap.get(eventType);
1114
- if (!text) {
1115
- return androidView.sendAccessibilityEvent(eventInt);
1116
- }
1117
- const accessibilityEvent = android.view.accessibility.AccessibilityEvent.obtain(eventInt);
1118
- accessibilityEvent.setSource(androidView);
1119
- accessibilityEvent.getText().clear();
1120
- if (!text) {
1121
- applyContentDescription(view);
1122
- text = androidView.getContentDescription() || view['title'];
1123
- if (Trace.isEnabled()) {
1124
- Trace.write(`${cls} - text not provided use androidView.getContentDescription() - ${text}`, Trace.categories.Accessibility);
1125
- }
1126
- }
1127
- if (Trace.isEnabled()) {
1128
- Trace.write(`${cls}: send event with text: '${JSON.stringify(text)}'`, Trace.categories.Accessibility);
1129
- }
1130
- if (text) {
1131
- accessibilityEvent.getText().add(text);
1132
- }
1133
- accessibilityManager.sendAccessibilityEvent(accessibilityEvent);
1134
- }
1135
- function setAccessibilityDelegate(view) {
1136
- if (!view.nativeViewProtected) {
1137
- return;
1138
- }
1139
- ensureNativeClasses();
1140
- const androidView = view.nativeViewProtected;
1141
- if (!androidView || !androidView.setAccessibilityDelegate) {
1142
- return;
1143
- }
1144
- androidViewToTNSView.set(androidView, new WeakRef(view));
1145
- let hasOldDelegate = false;
1146
- if (typeof androidView.getAccessibilityDelegate === 'function') {
1147
- hasOldDelegate = androidView.getAccessibilityDelegate() === TNSAccessibilityDelegate;
1148
- }
1149
- if (hasOldDelegate) {
1150
- return;
1151
- }
1152
- androidView.setAccessibilityDelegate(TNSAccessibilityDelegate);
1153
- }
1154
- const applicationEvents = [Application.orientationChangedEvent, Application.systemAppearanceChangedEvent];
1155
- function toggleApplicationEventListeners(toAdd, callback) {
1156
- for (const eventName of applicationEvents) {
1157
- if (toAdd) {
1158
- Application.on(eventName, callback);
1159
- }
1160
- else {
1161
- Application.off(eventName, callback);
1162
- }
1163
- }
1164
- }
1165
- setToggleApplicationEventListenersCallback(toggleApplicationEventListeners);
1166
- setApplicationPropertiesCallback(() => {
1167
- return {
1168
- orientation: Application.orientation(),
1169
- systemAppearance: Application.systemAppearance(),
1170
- };
1171
- });
1172
- function onLiveSync(args) {
1173
- if (getImageFetcher()) {
1174
- getImageFetcher().clearCache();
1175
- }
1176
- }
1177
- getNativeScriptGlobals().events.on('livesync', onLiveSync);
1178
- getNativeScriptGlobals().addEventWiring(() => {
1179
- Application.android.on('activityStarted', (args) => {
1180
- if (!getImageFetcher()) {
1181
- initImageCache(args.activity);
1182
- }
1183
- else {
1184
- getImageFetcher().initCache();
1185
- }
1186
- });
1187
- });
1188
- getNativeScriptGlobals().addEventWiring(() => {
1189
- Application.android.on('activityStopped', (args) => {
1190
- if (getImageFetcher()) {
1191
- getImageFetcher().closeCache();
1192
- }
1193
- });
1194
- });
1195
- //# sourceMappingURL=application.android.js.map