@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,1613 +0,0 @@
1
- import { getNativeScriptGlobals } from '../../../globals/global-utils';
2
- import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, AndroidHelper } from './view-common';
3
- import { paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty } from '../../styling/style-properties';
4
- import { Length } from '../../styling/length-shared';
5
- import { layout } from '../../../utils';
6
- import { Trace } from '../../../trace';
7
- import { hiddenProperty } from '../view-base';
8
- import { isCssWideKeyword } from '../properties/property-shared';
9
- import { perspectiveProperty, visibilityProperty, opacityProperty, horizontalAlignmentProperty, verticalAlignmentProperty, minWidthProperty, minHeightProperty, widthProperty, heightProperty, marginLeftProperty, marginTopProperty, marginRightProperty, marginBottomProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, androidElevationProperty, androidDynamicElevationOffsetProperty } from '../../styling/style-properties';
10
- import { Background, refreshBorderDrawable } from '../../styling/background';
11
- import { profile } from '../../../profiling';
12
- import { topmost } from '../../frame/frame-stack';
13
- import { Screen } from '../../../platform';
14
- import { isAppInBackground, updateA11yPropertiesCallback } from '../../../application/helpers-common';
15
- import { updateContentDescription } from '../../../application/helpers';
16
- import { accessibilityEnabledProperty, accessibilityHiddenProperty, accessibilityHintProperty, accessibilityIdentifierProperty, accessibilityLabelProperty, accessibilityLiveRegionProperty, accessibilityMediaSessionProperty, accessibilityRoleProperty, accessibilityStateProperty, accessibilityValueProperty } from '../../../accessibility/accessibility-properties';
17
- import { AccessibilityLiveRegion, AccessibilityRole, AndroidAccessibilityEvent } from '../../../accessibility';
18
- import * as Utils from '../../../utils';
19
- import { SDK_VERSION } from '../../../utils/constants';
20
- export * from './view-common';
21
- // helpers (these are okay re-exported here)
22
- export * from './view-helper';
23
- // This one can eventually be cleaned up but causes issues with a lot of ui-suite plugins in particular if not exported here
24
- export * from '../properties';
25
- const DOMID = '_domId';
26
- const androidBackPressedEvent = 'androidBackPressed';
27
- const shortAnimTime = 17694720; // android.R.integer.config_shortAnimTime
28
- const statePressed = 16842919; // android.R.attr.state_pressed
29
- const stateEnabled = 16842910; // android.R.attr.state_enabled
30
- const styleAnimationDialog = 16973826; // android.R.style.Animation_Dialog
31
- const VERTICAL_GRAVITY_MASK = 112; // android.view.Gravity.VERTICAL_GRAVITY_MASK
32
- const HORIZONTAL_GRAVITY_MASK = 7; // android.view.Gravity.HORIZONTAL_GRAVITY_MASK
33
- const GRAVITY_LEFT = 3; // android.view.Gravity.LEFT
34
- const GRAVITY_RIGHT = 5; // android.view.Gravity.RIGHT
35
- const GRAVITY_TOP = 48; // android.view.Gravity.TOP
36
- const GRAVITY_BOTTOM = 80; // android.view.Gravity.BOTTOM
37
- const GRAVITY_CENTER_HORIZONTAL = 1; // android.view.Gravity.CENTER_HORIZONTAL
38
- const GRAVITY_FILL_HORIZONTAL = 7; // android.view.Gravity.FILL_HORIZONTAL
39
- const GRAVITY_CENTER_VERTICAL = 16; // android.view.Gravity.CENTER_VERTICAL
40
- const GRAVITY_FILL_VERTICAL = 112; // android.view.Gravity.FILL_VERTICAL
41
- const modalMap = new Map();
42
- let TouchListener;
43
- let DialogFragment;
44
- function initializeTouchListener() {
45
- if (TouchListener) {
46
- return;
47
- }
48
- var TouchListenerImpl = /** @class */ (function (_super) {
49
- __extends(TouchListenerImpl, _super);
50
- function TouchListenerImpl(owner) {
51
- var _this = _super.call(this) || this;
52
- _this.owner = new WeakRef(owner);
53
- return global.__native(_this);
54
- }
55
- TouchListenerImpl.prototype.onTouch = function (view, event) {
56
- var owner = this.owner.get();
57
- if (!owner) {
58
- return;
59
- }
60
- owner.handleGestureTouch(event);
61
- var nativeView = owner.nativeViewProtected;
62
- if (!nativeView || !nativeView.onTouchEvent) {
63
- return false;
64
- }
65
- return nativeView.onTouchEvent(event);
66
- };
67
- var _a;
68
- TouchListenerImpl = __decorate([
69
- Interfaces([android.view.View.OnTouchListener]),
70
- __metadata("design:paramtypes", [typeof (_a = typeof View !== "undefined" && View) === "function" ? _a : Object])
71
- ], TouchListenerImpl);
72
- return TouchListenerImpl;
73
- }(java.lang.Object));
74
- TouchListener = TouchListenerImpl;
75
- }
76
- function initializeDialogFragment() {
77
- if (DialogFragment) {
78
- return;
79
- }
80
- var DialogImpl = /** @class */ (function (_super) {
81
- __extends(DialogImpl, _super);
82
- function DialogImpl(fragment, context, themeResId) {
83
- var _this = _super.call(this, context, themeResId) || this;
84
- _this.fragment = fragment;
85
- return global.__native(_this);
86
- }
87
- DialogImpl.prototype.onDetachedFromWindow = function () {
88
- _super.prototype.onDetachedFromWindow.call(this);
89
- this.fragment = null;
90
- };
91
- DialogImpl.prototype.onBackPressed = function () {
92
- var view = this.fragment.owner;
93
- var args = {
94
- eventName: 'activityBackPressed',
95
- object: view,
96
- activity: view._context,
97
- cancel: false,
98
- };
99
- // Fist fire application.android global event
100
- getNativeScriptGlobals().events.notify(args);
101
- if (args.cancel) {
102
- return;
103
- }
104
- view.notify(args);
105
- if (!args.cancel && !view.onBackPressed()) {
106
- _super.prototype.onBackPressed.call(this);
107
- }
108
- };
109
- return DialogImpl;
110
- }(android.app.Dialog));
111
- var DialogFragmentImpl = /** @class */ (function (_super) {
112
- __extends(DialogFragmentImpl, _super);
113
- function DialogFragmentImpl() {
114
- var _this = _super.call(this) || this;
115
- return global.__native(_this);
116
- }
117
- DialogFragmentImpl.prototype.onCreate = function (savedInstanceState) {
118
- var _a;
119
- _super.prototype.onCreate.call(this, savedInstanceState);
120
- var ownerId = (_a = this.getArguments()) === null || _a === void 0 ? void 0 : _a.getInt(DOMID);
121
- var options = getModalOptions(ownerId);
122
- // The teardown when the activity is destroyed happens after the state is saved, but is not recoverable,
123
- // Cancel the native dialog in this case or the app will crash with subsequent errors.
124
- if (savedInstanceState != null && options === undefined) {
125
- this.dismissAllowingStateLoss();
126
- }
127
- };
128
- DialogFragmentImpl.prototype.onCreateDialog = function (savedInstanceState) {
129
- var ownerId = this.getArguments().getInt(DOMID);
130
- var options = getModalOptions(ownerId);
131
- this.owner = options.owner;
132
- // Set owner._dialogFragment to this in case the DialogFragment was recreated after app suspend
133
- this.owner._dialogFragment = this;
134
- this._fullscreen = options.fullscreen;
135
- this._animated = options.animated;
136
- this._cancelable = options.cancelable;
137
- this._stretched = options.stretched;
138
- this._dismissCallback = options.dismissCallback;
139
- this._shownCallback = options.shownCallback;
140
- this._windowSoftInputMode = options.windowSoftInputMode;
141
- this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
142
- var theme = this.getTheme();
143
- if (this._fullscreen) {
144
- // In fullscreen mode, get the application's theme.
145
- theme = this.getActivity().getApplicationInfo().theme;
146
- }
147
- var dialog = new DialogImpl(this, this.getActivity(), theme);
148
- // do not override alignment unless fullscreen modal will be shown;
149
- // otherwise we might break component-level layout:
150
- // https://github.com/NativeScript/NativeScript/issues/5392
151
- if (!this._fullscreen && !this._stretched) {
152
- this.owner.horizontalAlignment = 'center';
153
- this.owner.verticalAlignment = 'middle';
154
- }
155
- else {
156
- this.owner.horizontalAlignment = 'stretch';
157
- this.owner.verticalAlignment = 'stretch';
158
- }
159
- // set the modal window animation
160
- // https://github.com/NativeScript/NativeScript/issues/5989
161
- if (this._animated) {
162
- dialog.getWindow().setWindowAnimations(styleAnimationDialog);
163
- }
164
- dialog.setCanceledOnTouchOutside(this._cancelable);
165
- return dialog;
166
- };
167
- DialogFragmentImpl.prototype.onCreateView = function (inflater, container, savedInstanceState) {
168
- var owner = this.owner;
169
- this.activity = new WeakRef(this.getActivity());
170
- owner._setupAsRootView(this.getActivity());
171
- owner._isAddedToNativeVisualTree = true;
172
- // we need to set the window SoftInputMode here.
173
- // it wont work is set in onStart
174
- var window = this.getDialog().getWindow();
175
- if (this._windowSoftInputMode !== undefined) {
176
- window.setSoftInputMode(this._windowSoftInputMode);
177
- }
178
- else {
179
- // the dialog seems to not follow the default activity softInputMode,
180
- // thus set we set it here.
181
- window.setSoftInputMode(owner._context.getWindow().getAttributes().softInputMode);
182
- }
183
- return owner.nativeViewProtected;
184
- };
185
- DialogFragmentImpl.prototype.onStart = function () {
186
- _super.prototype.onStart.call(this);
187
- if (this._fullscreen) {
188
- var window = this.getDialog().getWindow();
189
- var length = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
190
- window.setLayout(length, length);
191
- // This removes the default backgroundDrawable so there are no margins.
192
- window.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
193
- }
194
- var owner = this.owner;
195
- if (owner && !owner.isLoaded) {
196
- owner.callLoaded();
197
- }
198
- this._shownCallback();
199
- };
200
- DialogFragmentImpl.prototype.onDismiss = function (dialog) {
201
- var _a;
202
- _super.prototype.onDismiss.call(this, dialog);
203
- var manager = this.getFragmentManager();
204
- var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
205
- if (manager && !(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
206
- removeModal(this.owner._domId);
207
- this._dismissCallback();
208
- }
209
- var owner = this.owner;
210
- if (owner && owner.isLoaded) {
211
- owner.callUnloaded();
212
- }
213
- };
214
- DialogFragmentImpl.prototype.onDestroy = function () {
215
- var _a;
216
- _super.prototype.onDestroy.call(this);
217
- var owner = this.owner;
218
- var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
219
- if (!(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
220
- this.activity = null;
221
- }
222
- if (owner) {
223
- // Android calls onDestroy before onDismiss.
224
- // Make sure we unload first and then call _tearDownUI.
225
- if (owner.isLoaded) {
226
- owner.callUnloaded();
227
- }
228
- owner._isAddedToNativeVisualTree = false;
229
- owner._tearDownUI(true);
230
- }
231
- };
232
- return DialogFragmentImpl;
233
- }(androidx.fragment.app.DialogFragment));
234
- DialogFragment = DialogFragmentImpl;
235
- }
236
- function saveModal(options) {
237
- modalMap.set(options.owner._domId, options);
238
- }
239
- function removeModal(domId) {
240
- modalMap.delete(domId);
241
- }
242
- function getModalOptions(domId) {
243
- return modalMap.get(domId);
244
- }
245
- const INSET_LEFT = 0;
246
- const INSET_TOP = 4;
247
- const INSET_RIGHT = 8;
248
- const INSET_BOTTOM = 12;
249
- const INSET_LEFT_CONSUMED = 16;
250
- const INSET_TOP_CONSUMED = 20;
251
- const INSET_RIGHT_CONSUMED = 24;
252
- const INSET_BOTTOM_CONSUMED = 28;
253
- const OverflowEdgeNone = 0;
254
- const OverflowEdgeLeft = 1;
255
- const OverflowEdgeTop = 1 << 1;
256
- const OverflowEdgeRight = 1 << 2;
257
- const OverflowEdgeBottom = 1 << 3;
258
- const OverflowEdgeDontApply = 1 << 4;
259
- const OverflowEdgeLeftDontConsume = 1 << 5;
260
- const OverflowEdgeTopDontConsume = 1 << 6;
261
- const OverflowEdgeRightDontConsume = 1 << 7;
262
- const OverflowEdgeBottomDontConsume = 1 << 8;
263
- const OverflowEdgeAllButLeft = 1 << 9;
264
- const OverflowEdgeAllButTop = 1 << 10;
265
- const OverflowEdgeAllButRight = 1 << 11;
266
- const OverflowEdgeAllButBottom = 1 << 12;
267
- class Inset {
268
- constructor(data) {
269
- this.data = ArrayBuffer.from(data);
270
- this.view = new DataView(this.data);
271
- }
272
- get left() {
273
- return this.view.getInt32(INSET_LEFT, true);
274
- }
275
- set left(value) {
276
- this.view.setInt32(INSET_LEFT, value, true);
277
- }
278
- get top() {
279
- return this.view.getInt32(INSET_TOP, true);
280
- }
281
- set top(value) {
282
- this.view.setInt32(INSET_TOP, value, true);
283
- }
284
- get right() {
285
- return this.view.getInt32(INSET_RIGHT, true);
286
- }
287
- set right(value) {
288
- this.view.setInt32(INSET_RIGHT, value, true);
289
- }
290
- get bottom() {
291
- return this.view.getInt32(INSET_BOTTOM, true);
292
- }
293
- set bottom(value) {
294
- this.view.setInt32(INSET_BOTTOM, value, true);
295
- }
296
- get leftConsumed() {
297
- return this.view.getInt32(INSET_LEFT_CONSUMED, true) > 0;
298
- }
299
- set leftConsumed(value) {
300
- this.view.setInt32(INSET_LEFT_CONSUMED, value ? 1 : 0, true);
301
- }
302
- get topConsumed() {
303
- return this.view.getInt32(INSET_TOP_CONSUMED, true) > 0;
304
- }
305
- set topConsumed(value) {
306
- this.view.setInt32(INSET_TOP_CONSUMED, value ? 1 : 0, true);
307
- }
308
- get rightConsumed() {
309
- return this.view.getInt32(INSET_RIGHT_CONSUMED, true) > 0;
310
- }
311
- set rightConsumed(value) {
312
- this.view.setInt32(INSET_RIGHT_CONSUMED, value ? 1 : 0, true);
313
- }
314
- get bottomConsumed() {
315
- return this.view.getInt32(INSET_BOTTOM_CONSUMED, true) > 0;
316
- }
317
- set bottomConsumed(value) {
318
- this.view.setInt32(INSET_BOTTOM_CONSUMED, value ? 1 : 0, true);
319
- }
320
- toString() {
321
- return `Inset: left=${this.left}, top=${this.top}, right=${this.right}, bottom=${this.bottom}, ` + `leftConsumed=${this.leftConsumed}, topConsumed=${this.topConsumed}, ` + `rightConsumed=${this.rightConsumed}, bottomConsumed=${this.bottomConsumed}`;
322
- }
323
- toJSON() {
324
- return {
325
- left: this.left,
326
- top: this.top,
327
- right: this.right,
328
- bottom: this.bottom,
329
- leftConsumed: this.leftConsumed,
330
- topConsumed: this.topConsumed,
331
- rightConsumed: this.rightConsumed,
332
- bottomConsumed: this.bottomConsumed,
333
- };
334
- }
335
- }
336
- export class View extends ViewCommon {
337
- constructor() {
338
- super(...arguments);
339
- this._defaultOverflowEdge = OverflowEdgeNone;
340
- this._defaultOverflowEdgeValue = 'none';
341
- }
342
- // TODO: Implement unobserve that detach the touchListener.
343
- _observe(type, callback, thisArg) {
344
- super._observe(type, callback, thisArg);
345
- if (this.isLoaded && !this.touchListenerIsSet) {
346
- this.setOnTouchListener();
347
- }
348
- }
349
- addEventListener(eventNames, callback, thisArg, once) {
350
- super.addEventListener(eventNames, callback, thisArg, once);
351
- const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
352
- if (this.isLoaded && !this.layoutChangeListenerIsSet && isLayoutEvent) {
353
- this.setOnLayoutChangeListener();
354
- }
355
- const isInsetEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.androidOverflowInsetEvent) !== -1 : false;
356
- // only avaiable on LayoutBase
357
- if (!this.insetListenerIsSet && isInsetEvent) {
358
- this.setInsetListener();
359
- }
360
- }
361
- removeEventListener(eventNames, callback, thisArg) {
362
- super.removeEventListener(eventNames, callback, thisArg);
363
- const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
364
- // Remove native listener only if there are no more user listeners for LayoutChanged event
365
- if (this.isLoaded && this.layoutChangeListenerIsSet && isLayoutEvent && !this.needsOnLayoutChangeListener()) {
366
- this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
367
- this.layoutChangeListenerIsSet = false;
368
- }
369
- const isInsetEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.androidOverflowInsetEvent) !== -1 : false;
370
- if (this.insetListenerIsSet && isInsetEvent && this.nativeViewProtected && this.nativeViewProtected.setInsetListener) {
371
- this.nativeViewProtected.setInsetListener(null);
372
- this.insetListenerIsSet = false;
373
- }
374
- }
375
- setInsetListener() {
376
- if (this.nativeViewProtected) {
377
- if (this.nativeViewProtected.setInsetListener) {
378
- const ref = new WeakRef(this);
379
- this.nativeViewProtected.setInsetListener(new org.nativescript.widgets.LayoutBase.WindowInsetListener({
380
- onApplyWindowInsets(param0) {
381
- const owner = ref.get();
382
- if (!owner) {
383
- return;
384
- }
385
- const inset = new Inset(param0);
386
- const args = {
387
- eventName: ViewCommon.androidOverflowInsetEvent,
388
- object: this,
389
- inset,
390
- };
391
- owner.notify(args);
392
- },
393
- }));
394
- this.insetListenerIsSet = true;
395
- }
396
- this.needsInsetListener = false;
397
- }
398
- else {
399
- this.needsInsetListener = true;
400
- }
401
- }
402
- _getChildFragmentManager() {
403
- return null;
404
- }
405
- _getRootFragmentManager() {
406
- if (!this._rootManager && this._context) {
407
- this._rootManager = this._context.getSupportFragmentManager();
408
- }
409
- return this._rootManager;
410
- }
411
- _getFragmentManager() {
412
- let manager = this._manager;
413
- if (!manager) {
414
- let view = this;
415
- let frameOrTabViewItemFound = false;
416
- while (view) {
417
- // when interacting with nested fragments instead of using getSupportFragmentManager
418
- // we must always use getChildFragmentManager instead;
419
- // we have three sources of fragments -- Frame fragments, TabViewItem fragments, and
420
- // modal dialog fragments
421
- // modal -> frame / tabview (frame / tabview use modal CHILD fm)
422
- const dialogFragment = view._dialogFragment;
423
- if (dialogFragment) {
424
- manager = dialogFragment.getChildFragmentManager();
425
- break;
426
- }
427
- // - frame1 -> frame2 (frame2 uses frame1 CHILD fm)
428
- // - tabview -> frame1 (frame1 uses tabview item CHILD fm)
429
- // - frame1 -> tabview (tabview uses frame1 CHILD fm)
430
- // - frame1 -> tabview -> frame2 (tabview uses frame1 CHILD fm; frame2 uses tabview item CHILD fm)
431
- if (view._hasFragments) {
432
- if (frameOrTabViewItemFound) {
433
- manager = view._getChildFragmentManager();
434
- break;
435
- }
436
- frameOrTabViewItemFound = true;
437
- }
438
- // the case is needed because _dialogFragment is on View
439
- // but parent may be ViewBase.
440
- view = view.parent;
441
- }
442
- if (!manager) {
443
- manager = this._getRootFragmentManager();
444
- }
445
- this._manager = manager;
446
- }
447
- return manager;
448
- }
449
- // @ts-ignore
450
- set androidOverflowEdge(value) {
451
- if (typeof value !== 'string') {
452
- return;
453
- }
454
- const nativeView = this.nativeViewProtected;
455
- if (nativeView && nativeView.setOverflowEdge) {
456
- if (value === 'none') {
457
- nativeView.setOverflowEdge(OverflowEdgeNone);
458
- }
459
- else {
460
- const newValue = parseEdges(value);
461
- if (newValue !== null) {
462
- nativeView.setOverflowEdge(newValue);
463
- }
464
- }
465
- }
466
- else {
467
- const edge = parseEdges(value);
468
- if (edge === null) {
469
- return;
470
- }
471
- this._defaultOverflowEdgeValue = value;
472
- this._defaultOverflowEdge = edge;
473
- }
474
- }
475
- get androidOverflowEdge() {
476
- const nativeView = this.nativeViewProtected;
477
- if (nativeView && nativeView.getOverflowEdge) {
478
- const overflowEdge = nativeView.getOverflowEdge();
479
- switch (overflowEdge) {
480
- case OverflowEdgeNone:
481
- return 'none';
482
- case OverflowEdgeLeft:
483
- return 'left';
484
- case OverflowEdgeTop:
485
- return 'top';
486
- case OverflowEdgeRight:
487
- return 'right';
488
- case OverflowEdgeBottom:
489
- return 'bottom';
490
- case OverflowEdgeDontApply:
491
- return 'dont-apply';
492
- case OverflowEdgeLeftDontConsume:
493
- return 'left-dont-consume';
494
- case OverflowEdgeTopDontConsume:
495
- return 'top-dont-consume';
496
- case OverflowEdgeRightDontConsume:
497
- return 'right-dont-consume';
498
- case OverflowEdgeBottomDontConsume:
499
- return 'bottom-dont-consume';
500
- case OverflowEdgeAllButLeft:
501
- return 'all-but-left';
502
- case OverflowEdgeAllButTop:
503
- return 'all-but-top';
504
- case OverflowEdgeAllButRight:
505
- return 'all-but-right';
506
- case OverflowEdgeAllButBottom:
507
- return 'all-but-bottom';
508
- default:
509
- {
510
- let value = '';
511
- const overflowLeftConsume = (overflowEdge & OverflowEdgeLeft) == OverflowEdgeLeft;
512
- const overflowTopConsume = (overflowEdge & OverflowEdgeTop) == OverflowEdgeTop;
513
- const overflowRightConsume = (overflowEdge & OverflowEdgeRight) == OverflowEdgeRight;
514
- const overflowBottomConsume = (overflowEdge & OverflowEdgeBottom) == OverflowEdgeBottom;
515
- const overflowLeft = (overflowEdge & OverflowEdgeLeftDontConsume) == OverflowEdgeLeftDontConsume;
516
- const overflowTop = (overflowEdge & OverflowEdgeTopDontConsume) == OverflowEdgeTopDontConsume;
517
- const overflowRight = (overflowEdge & OverflowEdgeRightDontConsume) == OverflowEdgeRightDontConsume;
518
- const overflowBottom = (overflowEdge & OverflowEdgeBottomDontConsume) == OverflowEdgeBottomDontConsume;
519
- if (overflowLeftConsume) {
520
- value += 'left';
521
- }
522
- if (overflowTopConsume) {
523
- if (value.length > 0) {
524
- value += ',';
525
- }
526
- value += 'top';
527
- }
528
- if (overflowRightConsume) {
529
- if (value.length > 0) {
530
- value += ',';
531
- }
532
- value += 'right';
533
- }
534
- if (overflowBottomConsume) {
535
- if (value.length > 0) {
536
- value += ',';
537
- }
538
- value += 'bottom';
539
- }
540
- if (overflowLeft) {
541
- value += 'left-dont-consume';
542
- }
543
- if (overflowTop) {
544
- if (value.length > 0) {
545
- value += ',';
546
- }
547
- value += 'top-dont-consume';
548
- }
549
- if (overflowRight) {
550
- if (value.length > 0) {
551
- value += ',';
552
- }
553
- value += 'right-dont-consume';
554
- }
555
- if (overflowBottom) {
556
- if (value.length > 0) {
557
- value += ',';
558
- }
559
- value += 'bottom-dont-consume';
560
- }
561
- }
562
- break;
563
- }
564
- }
565
- else {
566
- if (this._defaultOverflowEdgeValue) {
567
- return this._defaultOverflowEdgeValue;
568
- }
569
- }
570
- return 'none';
571
- }
572
- onLoaded() {
573
- this._manager = null;
574
- this._rootManager = null;
575
- super.onLoaded();
576
- this.setOnTouchListener();
577
- }
578
- onUnloaded() {
579
- this._manager = null;
580
- this._rootManager = null;
581
- super.onUnloaded();
582
- }
583
- onBackPressed() {
584
- const topmostFrame = topmost();
585
- // Delegate back navigation handling to the topmost Frame
586
- // when it's a child of the current View.
587
- if (topmostFrame && topmostFrame._hasAncestorView(this)) {
588
- return topmostFrame.onBackPressed();
589
- }
590
- return false;
591
- }
592
- handleGestureTouch(event) {
593
- for (const type in this._gestureObservers) {
594
- const list = this._gestureObservers[type];
595
- list.forEach((element) => {
596
- element.androidOnTouchEvent(event);
597
- });
598
- }
599
- if (this.parent instanceof View) {
600
- this.parent.handleGestureTouch(event);
601
- }
602
- }
603
- hasGestureObservers() {
604
- return this._gestureObservers && Object.keys(this._gestureObservers).length > 0;
605
- }
606
- initNativeView() {
607
- super.initNativeView();
608
- if (this.needsOnLayoutChangeListener()) {
609
- this.setOnLayoutChangeListener();
610
- }
611
- if (!this.insetListenerIsSet && this.needsInsetListener) {
612
- this.setInsetListener();
613
- }
614
- const nativeView = this.nativeViewProtected;
615
- if (typeof this._defaultOverflowEdge === 'number') {
616
- if (nativeView && nativeView.setOverflowEdge) {
617
- nativeView.setOverflowEdge(this._defaultOverflowEdge);
618
- }
619
- }
620
- }
621
- needsOnLayoutChangeListener() {
622
- return this.hasListeners(ViewCommon.layoutChangedEvent);
623
- }
624
- disposeNativeView() {
625
- if (this.touchListenerIsSet) {
626
- this.touchListenerIsSet = false;
627
- if (this.nativeViewProtected) {
628
- this.nativeViewProtected.setOnTouchListener(null);
629
- }
630
- }
631
- if (this.layoutChangeListenerIsSet) {
632
- this.layoutChangeListenerIsSet = false;
633
- if (this.nativeViewProtected) {
634
- this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
635
- this.layoutChangeListener = null;
636
- }
637
- }
638
- super.disposeNativeView();
639
- }
640
- setOnTouchListener() {
641
- if (this.touchListenerIsSet || !this.nativeViewProtected || !this.hasGestureObservers()) {
642
- return;
643
- }
644
- // do not set noop listener that handles the event (disabled listener) if IsUserInteractionEnabled is
645
- // false as we might need the ability for the event to pass through to a parent view
646
- initializeTouchListener();
647
- this.touchListener = this.touchListener || new TouchListener(this);
648
- this.nativeViewProtected.setOnTouchListener(this.touchListener);
649
- this.touchListenerIsSet = true;
650
- if (this.nativeViewProtected.setClickable) {
651
- this.nativeViewProtected.setClickable(this.isUserInteractionEnabled);
652
- }
653
- }
654
- setOnLayoutChangeListener() {
655
- if (this.nativeViewProtected) {
656
- const owner = this;
657
- this.layoutChangeListenerIsSet = true;
658
- this.layoutChangeListener =
659
- this.layoutChangeListener ||
660
- new android.view.View.OnLayoutChangeListener({
661
- onLayoutChange(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) {
662
- if (left !== oldLeft || top !== oldTop || right !== oldRight || bottom !== oldBottom) {
663
- owner._raiseLayoutChangedEvent();
664
- }
665
- },
666
- });
667
- this.nativeViewProtected.addOnLayoutChangeListener(this.layoutChangeListener);
668
- }
669
- }
670
- get isLayoutRequired() {
671
- return !this.isLayoutValid;
672
- }
673
- get isLayoutValid() {
674
- if (this.nativeViewProtected) {
675
- return !this.nativeViewProtected.isLayoutRequested();
676
- }
677
- return false;
678
- }
679
- get _hasFragments() {
680
- return false;
681
- }
682
- layoutNativeView(left, top, right, bottom) {
683
- if (this.nativeViewProtected) {
684
- this.nativeViewProtected.layout(left, top, right, bottom);
685
- }
686
- }
687
- requestLayout() {
688
- super.requestLayout();
689
- if (this.nativeViewProtected) {
690
- this.nativeViewProtected.requestLayout();
691
- }
692
- }
693
- measure(widthMeasureSpec, heightMeasureSpec) {
694
- super.measure(widthMeasureSpec, heightMeasureSpec);
695
- this.onMeasure(widthMeasureSpec, heightMeasureSpec);
696
- }
697
- layout(left, top, right, bottom) {
698
- super.layout(left, top, right, bottom);
699
- this.onLayout(left, top, right, bottom);
700
- }
701
- onMeasure(widthMeasureSpec, heightMeasureSpec) {
702
- const view = this.nativeViewProtected;
703
- if (view) {
704
- view.measure(widthMeasureSpec, heightMeasureSpec);
705
- this.setMeasuredDimension(view.getMeasuredWidth(), view.getMeasuredHeight());
706
- }
707
- }
708
- onLayout(left, top, right, bottom) {
709
- const view = this.nativeViewProtected;
710
- if (view) {
711
- this.layoutNativeView(left, top, right, bottom);
712
- }
713
- }
714
- _getCurrentLayoutBounds() {
715
- if (this.nativeViewProtected && !this.isCollapsed) {
716
- return {
717
- left: this.nativeViewProtected.getLeft(),
718
- top: this.nativeViewProtected.getTop(),
719
- right: this.nativeViewProtected.getRight(),
720
- bottom: this.nativeViewProtected.getBottom(),
721
- };
722
- }
723
- else {
724
- return { left: 0, top: 0, right: 0, bottom: 0 };
725
- }
726
- }
727
- getMeasuredWidth() {
728
- if (this.nativeViewProtected) {
729
- return this.nativeViewProtected.getMeasuredWidth();
730
- }
731
- return super.getMeasuredWidth();
732
- }
733
- getMeasuredHeight() {
734
- if (this.nativeViewProtected) {
735
- return this.nativeViewProtected.getMeasuredHeight();
736
- }
737
- return super.getMeasuredHeight();
738
- }
739
- focus() {
740
- if (this.nativeViewProtected) {
741
- return this.nativeViewProtected.requestFocus();
742
- }
743
- return false;
744
- }
745
- getLocationInWindow() {
746
- if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
747
- return undefined;
748
- }
749
- const nativeArray = Array.create('int', 2);
750
- this.nativeViewProtected.getLocationInWindow(nativeArray);
751
- return {
752
- x: layout.toDeviceIndependentPixels(nativeArray[0]),
753
- y: layout.toDeviceIndependentPixels(nativeArray[1]),
754
- };
755
- }
756
- getLocationOnScreen() {
757
- if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
758
- return undefined;
759
- }
760
- const nativeArray = Array.create('int', 2);
761
- this.nativeViewProtected.getLocationOnScreen(nativeArray);
762
- return {
763
- x: layout.toDeviceIndependentPixels(nativeArray[0]),
764
- y: layout.toDeviceIndependentPixels(nativeArray[1]),
765
- };
766
- }
767
- getLocationRelativeTo(otherView) {
768
- if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken() || !otherView || !otherView.nativeViewProtected || !otherView.nativeViewProtected.getWindowToken() || this.nativeViewProtected.getWindowToken() !== otherView.nativeViewProtected.getWindowToken()) {
769
- return undefined;
770
- }
771
- const myArray = Array.create('int', 2);
772
- this.nativeViewProtected.getLocationOnScreen(myArray);
773
- const otherArray = Array.create('int', 2);
774
- otherView.nativeViewProtected.getLocationOnScreen(otherArray);
775
- return {
776
- x: layout.toDeviceIndependentPixels(myArray[0] - otherArray[0]),
777
- y: layout.toDeviceIndependentPixels(myArray[1] - otherArray[1]),
778
- };
779
- }
780
- static resolveSizeAndState(size, specSize, specMode, childMeasuredState) {
781
- let result = size;
782
- switch (specMode) {
783
- case layout.UNSPECIFIED:
784
- result = size;
785
- break;
786
- case layout.AT_MOST:
787
- if (specSize < size) {
788
- result = specSize | layout.MEASURED_STATE_TOO_SMALL;
789
- }
790
- break;
791
- case layout.EXACTLY:
792
- result = specSize;
793
- break;
794
- }
795
- return result | (childMeasuredState & layout.MEASURED_STATE_MASK);
796
- }
797
- _showNativeModalView(parent, options) {
798
- // if the app is in background while triggering _showNativeModalView
799
- // then DialogFragment.show will trigger IllegalStateException: Can not perform this action after onSaveInstanceState
800
- // so if in background we create an event to call _showNativeModalView when loaded (going back in foreground)
801
- if (isAppInBackground() && !parent.isLoaded) {
802
- const onLoaded = () => {
803
- parent.off('loaded', onLoaded);
804
- this._showNativeModalView(parent, options);
805
- };
806
- parent.on('loaded', onLoaded);
807
- return;
808
- }
809
- super._showNativeModalView(parent, options);
810
- initializeDialogFragment();
811
- const df = new DialogFragment();
812
- const args = new android.os.Bundle();
813
- args.putInt(DOMID, this._domId);
814
- df.setArguments(args);
815
- let cancelable = true;
816
- let windowSoftInputMode;
817
- if (options.android) {
818
- if (options.android.cancelable !== undefined) {
819
- cancelable = !!options.android.cancelable;
820
- console.log('ShowModalOptions.android.cancelable is deprecated. Use ShowModalOptions.cancelable instead.');
821
- }
822
- windowSoftInputMode = options.android.windowSoftInputMode;
823
- }
824
- cancelable = options.cancelable !== undefined ? !!options.cancelable : cancelable;
825
- const dialogOptions = {
826
- owner: this,
827
- fullscreen: !!options.fullscreen,
828
- animated: !!options.animated,
829
- stretched: !!options.stretched,
830
- cancelable: cancelable,
831
- windowSoftInputMode: windowSoftInputMode,
832
- shownCallback: () => this._raiseShownModallyEvent(),
833
- dismissCallback: () => this.closeModal(),
834
- };
835
- saveModal(dialogOptions);
836
- this._dialogFragment = df;
837
- this._raiseShowingModallyEvent();
838
- this._dialogFragment.show(parent._getRootFragmentManager(), this._domId.toString());
839
- }
840
- _hideNativeModalView(parent, whenClosedCallback) {
841
- if (this._dialogFragment) {
842
- const manager = this._dialogFragment.getFragmentManager();
843
- if (manager) {
844
- this._dialogFragment.dismissAllowingStateLoss();
845
- }
846
- }
847
- this._dialogFragment = null;
848
- whenClosedCallback();
849
- }
850
- [isEnabledProperty.setNative](value) {
851
- this.nativeViewProtected.setEnabled(value);
852
- }
853
- [originXProperty.getDefault]() {
854
- return this.nativeViewProtected.getPivotX();
855
- }
856
- [originXProperty.setNative](value) {
857
- org.nativescript.widgets.OriginPoint.setX(this.nativeViewProtected, value);
858
- }
859
- [originYProperty.getDefault]() {
860
- return this.nativeViewProtected.getPivotY();
861
- }
862
- [originYProperty.setNative](value) {
863
- org.nativescript.widgets.OriginPoint.setY(this.nativeViewProtected, value);
864
- }
865
- [isUserInteractionEnabledProperty.setNative](value) {
866
- this.nativeViewProtected.setClickable(value);
867
- this.nativeViewProtected.setFocusable(value);
868
- }
869
- [hiddenProperty.getDefault]() {
870
- return this.nativeViewProtected.getVisibility() === android.view.View.GONE;
871
- }
872
- [hiddenProperty.setNative](value) {
873
- this.nativeViewProtected.setVisibility(value ? android.view.View.GONE : android.view.View.VISIBLE);
874
- }
875
- [visibilityProperty.getDefault]() {
876
- const nativeVisibility = this.nativeViewProtected.getVisibility();
877
- switch (nativeVisibility) {
878
- case android.view.View.VISIBLE:
879
- return 'visible';
880
- case android.view.View.INVISIBLE:
881
- return 'hidden';
882
- case android.view.View.GONE:
883
- return 'collapse';
884
- default:
885
- throw new Error(`Unsupported android.view.View visibility: ${nativeVisibility}. Currently supported values are android.view.View.VISIBLE, android.view.View.INVISIBLE, android.view.View.GONE.`);
886
- }
887
- }
888
- [visibilityProperty.setNative](value) {
889
- switch (value) {
890
- case 'visible':
891
- this.nativeViewProtected.setVisibility(android.view.View.VISIBLE);
892
- break;
893
- case 'hidden':
894
- this.nativeViewProtected.setVisibility(android.view.View.INVISIBLE);
895
- break;
896
- case 'collapse':
897
- this.nativeViewProtected.setVisibility(android.view.View.GONE);
898
- break;
899
- default:
900
- throw new Error(`Invalid visibility value: ${value}. Valid values are: visible, hidden, collapse.`);
901
- }
902
- }
903
- [opacityProperty.getDefault]() {
904
- return this.nativeViewProtected.getAlpha();
905
- }
906
- [opacityProperty.setNative](value) {
907
- this.nativeViewProtected.setAlpha(float(value));
908
- }
909
- [accessibilityRoleProperty.setNative](value) {
910
- this.accessibilityRole = value;
911
- updateA11yPropertiesCallback(this);
912
- if (SDK_VERSION >= 28) {
913
- this.nativeViewProtected?.setAccessibilityHeading(value === AccessibilityRole.Header);
914
- }
915
- }
916
- [accessibilityLiveRegionProperty.setNative](value) {
917
- switch (value) {
918
- case AccessibilityLiveRegion.Assertive: {
919
- this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_ASSERTIVE);
920
- break;
921
- }
922
- case AccessibilityLiveRegion.Polite: {
923
- this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_POLITE);
924
- break;
925
- }
926
- default: {
927
- this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_NONE);
928
- break;
929
- }
930
- }
931
- }
932
- [accessibilityStateProperty.setNative](value) {
933
- this.accessibilityState = value;
934
- updateA11yPropertiesCallback(this);
935
- }
936
- [horizontalAlignmentProperty.getDefault]() {
937
- return org.nativescript.widgets.ViewHelper.getHorizontalAlignment(this.nativeViewProtected);
938
- }
939
- [horizontalAlignmentProperty.setNative](value) {
940
- const nativeView = this.nativeViewProtected;
941
- const lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
942
- const gravity = lp.gravity;
943
- const weight = lp.weight;
944
- // Set only if params gravity exists.
945
- if (gravity !== undefined) {
946
- switch (value) {
947
- case 'left':
948
- lp.gravity = GRAVITY_LEFT | (gravity & VERTICAL_GRAVITY_MASK);
949
- if (weight < 0) {
950
- lp.weight = -2;
951
- }
952
- break;
953
- case 'center':
954
- lp.gravity = GRAVITY_CENTER_HORIZONTAL | (gravity & VERTICAL_GRAVITY_MASK);
955
- if (weight < 0) {
956
- lp.weight = -2;
957
- }
958
- break;
959
- case 'right':
960
- lp.gravity = GRAVITY_RIGHT | (gravity & VERTICAL_GRAVITY_MASK);
961
- if (weight < 0) {
962
- lp.weight = -2;
963
- }
964
- break;
965
- case 'stretch':
966
- lp.gravity = GRAVITY_FILL_HORIZONTAL | (gravity & VERTICAL_GRAVITY_MASK);
967
- if (weight < 0) {
968
- lp.weight = -1;
969
- }
970
- break;
971
- }
972
- nativeView.setLayoutParams(lp);
973
- }
974
- }
975
- [verticalAlignmentProperty.getDefault]() {
976
- return org.nativescript.widgets.ViewHelper.getVerticalAlignment(this.nativeViewProtected);
977
- }
978
- [verticalAlignmentProperty.setNative](value) {
979
- const nativeView = this.nativeViewProtected;
980
- const lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
981
- const gravity = lp.gravity;
982
- const height = lp.height;
983
- // Set only if params gravity exists.
984
- if (gravity !== undefined) {
985
- switch (value) {
986
- case 'top':
987
- lp.gravity = GRAVITY_TOP | (gravity & HORIZONTAL_GRAVITY_MASK);
988
- if (height < 0) {
989
- lp.height = -2;
990
- }
991
- break;
992
- case 'middle':
993
- lp.gravity = GRAVITY_CENTER_VERTICAL | (gravity & HORIZONTAL_GRAVITY_MASK);
994
- if (height < 0) {
995
- lp.height = -2;
996
- }
997
- break;
998
- case 'bottom':
999
- lp.gravity = GRAVITY_BOTTOM | (gravity & HORIZONTAL_GRAVITY_MASK);
1000
- if (height < 0) {
1001
- lp.height = -2;
1002
- }
1003
- break;
1004
- case 'stretch':
1005
- lp.gravity = GRAVITY_FILL_VERTICAL | (gravity & HORIZONTAL_GRAVITY_MASK);
1006
- if (height < 0) {
1007
- lp.height = -1;
1008
- }
1009
- break;
1010
- }
1011
- nativeView.setLayoutParams(lp);
1012
- }
1013
- }
1014
- [testIDProperty.setNative](value) {
1015
- this.setAccessibilityIdentifier(this.nativeViewProtected, value);
1016
- }
1017
- setAccessibilityIdentifier(view, value) {
1018
- const id = Utils.android.resources.getId(':id/nativescript_accessibility_id');
1019
- if (id) {
1020
- view.setTag(id, value);
1021
- view.setTag(value);
1022
- }
1023
- if (this.testID && this.testID !== value)
1024
- this.testID = value;
1025
- if (this.accessibilityIdentifier !== value)
1026
- this.accessibilityIdentifier = value;
1027
- }
1028
- [accessibilityEnabledProperty.setNative](value) {
1029
- this.nativeViewProtected.setFocusable(!!value);
1030
- updateA11yPropertiesCallback(this);
1031
- }
1032
- [accessibilityIdentifierProperty.setNative](value) {
1033
- this.setAccessibilityIdentifier(this.nativeViewProtected, value);
1034
- }
1035
- [accessibilityValueProperty.setNative](value) {
1036
- this._androidContentDescriptionUpdated = true;
1037
- updateContentDescription(this);
1038
- }
1039
- [accessibilityLabelProperty.setNative](value) {
1040
- this._androidContentDescriptionUpdated = true;
1041
- updateContentDescription(this);
1042
- }
1043
- [accessibilityHintProperty.setNative](value) {
1044
- this._androidContentDescriptionUpdated = true;
1045
- updateContentDescription(this);
1046
- }
1047
- [accessibilityHiddenProperty.setNative](value) {
1048
- if (value) {
1049
- this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
1050
- }
1051
- else {
1052
- this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES);
1053
- }
1054
- }
1055
- [accessibilityMediaSessionProperty.setNative](value) {
1056
- updateA11yPropertiesCallback(this);
1057
- }
1058
- [androidElevationProperty.getDefault]() {
1059
- return this.getDefaultElevation();
1060
- }
1061
- [androidElevationProperty.setNative](value) {
1062
- if (SDK_VERSION < 21) {
1063
- return;
1064
- }
1065
- this.refreshStateListAnimator();
1066
- }
1067
- [androidDynamicElevationOffsetProperty.getDefault]() {
1068
- return this.getDefaultDynamicElevationOffset();
1069
- }
1070
- [androidDynamicElevationOffsetProperty.setNative](value) {
1071
- if (SDK_VERSION < 21) {
1072
- return;
1073
- }
1074
- this.refreshStateListAnimator();
1075
- }
1076
- getDefaultElevation() {
1077
- if (SDK_VERSION < 21) {
1078
- return 0;
1079
- }
1080
- // NOTE: overriden in Button implementation as for widgets with StateListAnimator (Button)
1081
- // nativeView.getElevation() returns 0 at the time of the getDefault() query
1082
- return layout.toDeviceIndependentPixels(this.nativeViewProtected.getElevation());
1083
- }
1084
- getDefaultDynamicElevationOffset() {
1085
- // NOTE: overriden in Button implementation
1086
- return 0;
1087
- }
1088
- refreshStateListAnimator() {
1089
- const nativeView = this.nativeViewProtected;
1090
- const ObjectAnimator = android.animation.ObjectAnimator;
1091
- const AnimatorSet = android.animation.AnimatorSet;
1092
- const duration = nativeView.getContext().getResources().getInteger(shortAnimTime) / 2;
1093
- let elevation = this.androidElevation;
1094
- if (typeof elevation === 'undefined' || elevation === null) {
1095
- elevation = this.getDefaultElevation();
1096
- }
1097
- elevation = layout.toDevicePixels(elevation);
1098
- const z = layout.toDevicePixels(0);
1099
- let pressedZ = this.androidDynamicElevationOffset;
1100
- if (typeof pressedZ === 'undefined' || pressedZ === null) {
1101
- pressedZ = this.getDefaultDynamicElevationOffset();
1102
- }
1103
- pressedZ = layout.toDevicePixels(pressedZ);
1104
- const pressedSet = new AnimatorSet();
1105
- pressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [pressedZ]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
1106
- const notPressedSet = new AnimatorSet();
1107
- notPressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [z]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
1108
- const defaultSet = new AnimatorSet();
1109
- defaultSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [0]).setDuration(0), ObjectAnimator.ofFloat(nativeView, 'elevation', [0]).setDuration(0)]));
1110
- const stateListAnimator = new android.animation.StateListAnimator();
1111
- stateListAnimator.addState([statePressed, stateEnabled], pressedSet);
1112
- stateListAnimator.addState([stateEnabled], notPressedSet);
1113
- stateListAnimator.addState([], defaultSet);
1114
- const currentAnimator = nativeView.getStateListAnimator();
1115
- if (currentAnimator) {
1116
- currentAnimator.jumpToCurrentState();
1117
- }
1118
- nativeView.setStateListAnimator(stateListAnimator);
1119
- }
1120
- [rotateProperty.setNative](value) {
1121
- org.nativescript.widgets.ViewHelper.setRotate(this.nativeViewProtected, float(value));
1122
- }
1123
- [rotateXProperty.setNative](value) {
1124
- org.nativescript.widgets.ViewHelper.setRotateX(this.nativeViewProtected, float(value));
1125
- }
1126
- [rotateYProperty.setNative](value) {
1127
- org.nativescript.widgets.ViewHelper.setRotateY(this.nativeViewProtected, float(value));
1128
- }
1129
- [perspectiveProperty.setNative](value) {
1130
- org.nativescript.widgets.ViewHelper.setPerspective(this.nativeViewProtected, float(value * Screen.mainScreen.scale));
1131
- }
1132
- [scaleXProperty.setNative](value) {
1133
- org.nativescript.widgets.ViewHelper.setScaleX(this.nativeViewProtected, float(value));
1134
- }
1135
- [scaleYProperty.setNative](value) {
1136
- org.nativescript.widgets.ViewHelper.setScaleY(this.nativeViewProtected, float(value));
1137
- }
1138
- [translateXProperty.setNative](value) {
1139
- org.nativescript.widgets.ViewHelper.setTranslateX(this.nativeViewProtected, layout.toDevicePixels(value));
1140
- }
1141
- [translateYProperty.setNative](value) {
1142
- org.nativescript.widgets.ViewHelper.setTranslateY(this.nativeViewProtected, layout.toDevicePixels(value));
1143
- }
1144
- [zIndexProperty.getDefault]() {
1145
- return 0;
1146
- }
1147
- [zIndexProperty.setNative](value) {
1148
- org.nativescript.widgets.ViewHelper.setZIndex(this.nativeViewProtected, value);
1149
- }
1150
- [backgroundInternalProperty.getDefault]() {
1151
- const nativeView = this.nativeViewProtected;
1152
- return AndroidHelper.getCopyOrDrawable(nativeView.getBackground(), nativeView.getResources());
1153
- }
1154
- [backgroundInternalProperty.setNative](value) {
1155
- this._redrawNativeBackground(value);
1156
- }
1157
- [minWidthProperty.setNative](value) {
1158
- if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
1159
- this.parent._setChildMinWidthNative(this, value);
1160
- }
1161
- else {
1162
- this._setMinWidthNative(value);
1163
- }
1164
- }
1165
- [minHeightProperty.setNative](value) {
1166
- if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
1167
- this.parent._setChildMinHeightNative(this, value);
1168
- }
1169
- else {
1170
- this._setMinHeightNative(value);
1171
- }
1172
- }
1173
- _applyBackground(background, isBorderDrawable, onlyColor, backgroundDrawable) {
1174
- const nativeView = this.nativeViewProtected;
1175
- if (onlyColor) {
1176
- const backgroundColor = background.color.android;
1177
- if (isBorderDrawable) {
1178
- // We need to duplicate the drawable or we lose the "default" cached drawable
1179
- backgroundDrawable = nativeView._cachedDrawable != null ? AndroidHelper.getCopyOrDrawable(nativeView._cachedDrawable, nativeView.getResources()) : null;
1180
- nativeView.setBackground(backgroundDrawable);
1181
- }
1182
- // Apply color to drawables when there is the need to maintain visual things like button ripple effect
1183
- if (this.needsNativeDrawableFill && backgroundDrawable) {
1184
- backgroundDrawable.mutate();
1185
- AndroidHelper.setDrawableColor(backgroundColor, backgroundDrawable);
1186
- backgroundDrawable.invalidateSelf();
1187
- }
1188
- else {
1189
- nativeView.setBackgroundColor(backgroundColor);
1190
- }
1191
- }
1192
- else {
1193
- if (background.clearFlags & 1 /* BackgroundClearFlags.CLEAR_BACKGROUND_COLOR */) {
1194
- if (backgroundDrawable) {
1195
- backgroundDrawable.mutate();
1196
- AndroidHelper.clearDrawableColor(backgroundDrawable);
1197
- backgroundDrawable.invalidateSelf();
1198
- }
1199
- else {
1200
- nativeView.setBackgroundColor(-1);
1201
- }
1202
- }
1203
- if (background.isEmpty()) {
1204
- // Reset background to default if not already set
1205
- const defaultDrawable = nativeView._cachedDrawable ?? null;
1206
- if (backgroundDrawable !== defaultDrawable) {
1207
- nativeView.setBackground(defaultDrawable);
1208
- }
1209
- }
1210
- else {
1211
- if (isBorderDrawable) {
1212
- // org.nativescript.widgets.BorderDrawable
1213
- refreshBorderDrawable(this, backgroundDrawable);
1214
- }
1215
- else {
1216
- const borderDrawable = new org.nativescript.widgets.BorderDrawable(layout.getDisplayDensity(), this.toString());
1217
- refreshBorderDrawable(this, borderDrawable);
1218
- nativeView.setBackground(borderDrawable);
1219
- }
1220
- }
1221
- }
1222
- }
1223
- _drawBoxShadow(boxShadow) {
1224
- const nativeView = this.nativeViewProtected;
1225
- const config = {
1226
- shadowColor: boxShadow.color.android,
1227
- cornerRadius: Length.toDevicePixels(this.borderRadius, 0.0),
1228
- spreadRadius: boxShadow.spreadRadius,
1229
- blurRadius: boxShadow.blurRadius,
1230
- offsetX: boxShadow.offsetX,
1231
- offsetY: boxShadow.offsetY,
1232
- };
1233
- org.nativescript.widgets.Utils.drawBoxShadow(nativeView, JSON.stringify(config));
1234
- }
1235
- _redrawNativeBackground(value) {
1236
- if (value instanceof Background) {
1237
- this.onBackgroundOrBorderPropertyChanged();
1238
- }
1239
- else {
1240
- const nativeView = this.nativeViewProtected;
1241
- nativeView.setBackground(value);
1242
- const style = this.style;
1243
- const paddingTop = paddingTopProperty.isSet(style) ? this.effectivePaddingTop : this._defaultPaddingTop;
1244
- const paddingRight = paddingRightProperty.isSet(style) ? this.effectivePaddingRight : this._defaultPaddingRight;
1245
- const paddingBottom = paddingBottomProperty.isSet(style) ? this.effectivePaddingBottom : this._defaultPaddingBottom;
1246
- const paddingLeft = paddingLeftProperty.isSet(style) ? this.effectivePaddingLeft : this._defaultPaddingLeft;
1247
- if (this._isPaddingRelative) {
1248
- nativeView.setPaddingRelative(paddingLeft, paddingTop, paddingRight, paddingBottom);
1249
- }
1250
- else {
1251
- nativeView.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
1252
- }
1253
- }
1254
- }
1255
- onBackgroundOrBorderPropertyChanged() {
1256
- const nativeView = this.nativeViewProtected;
1257
- if (!nativeView) {
1258
- return;
1259
- }
1260
- const background = this.style.backgroundInternal;
1261
- const drawable = nativeView.getBackground();
1262
- const isBorderDrawable = drawable instanceof org.nativescript.widgets.BorderDrawable;
1263
- // Use undefined as not set. getBackground will never return undefined only Drawable or null;
1264
- if (nativeView._cachedDrawable === undefined) {
1265
- nativeView._cachedDrawable = drawable;
1266
- }
1267
- if (background.clearFlags & 2 /* BackgroundClearFlags.CLEAR_BOX_SHADOW */) {
1268
- // Clear background if we're clearing the box shadow
1269
- if (drawable instanceof org.nativescript.widgets.BoxShadowDrawable) {
1270
- nativeView.setBackground(nativeView._cachedDrawable ?? null);
1271
- }
1272
- }
1273
- // prettier-ignore
1274
- const onlyColor = !background.hasBorderWidth()
1275
- && !background.hasBorderRadius()
1276
- && !background.hasBoxShadow()
1277
- && !background.clipPath
1278
- && !background.image
1279
- && !!background.color;
1280
- this._applyBackground(background, isBorderDrawable, onlyColor, drawable);
1281
- if (background.hasBoxShadow()) {
1282
- this._drawBoxShadow(background.getBoxShadow());
1283
- }
1284
- // TODO: Can we move BorderWidths as separate native setter?
1285
- // This way we could skip setPadding if borderWidth is not changed.
1286
- const leftPadding = Math.ceil(this.effectiveBorderLeftWidth + this.effectivePaddingLeft);
1287
- const topPadding = Math.ceil(this.effectiveBorderTopWidth + this.effectivePaddingTop);
1288
- const rightPadding = Math.ceil(this.effectiveBorderRightWidth + this.effectivePaddingRight);
1289
- const bottomPadding = Math.ceil(this.effectiveBorderBottomWidth + this.effectivePaddingBottom);
1290
- if (this._isPaddingRelative) {
1291
- nativeView.setPaddingRelative(leftPadding, topPadding, rightPadding, bottomPadding);
1292
- }
1293
- else {
1294
- nativeView.setPadding(leftPadding, topPadding, rightPadding, bottomPadding);
1295
- }
1296
- // reset clear flags
1297
- background.clearFlags = 0 /* BackgroundClearFlags.NONE */;
1298
- }
1299
- accessibilityAnnouncement(message = this.accessibilityLabel) {
1300
- this.sendAccessibilityEvent({
1301
- androidAccessibilityEvent: AndroidAccessibilityEvent.ANNOUNCEMENT,
1302
- message,
1303
- });
1304
- }
1305
- accessibilityScreenChanged() {
1306
- this.sendAccessibilityEvent({
1307
- androidAccessibilityEvent: AndroidAccessibilityEvent.WINDOW_STATE_CHANGED,
1308
- });
1309
- }
1310
- }
1311
- View.androidBackPressedEvent = androidBackPressedEvent;
1312
- __decorate([
1313
- profile,
1314
- __metadata("design:type", Function),
1315
- __metadata("design:paramtypes", []),
1316
- __metadata("design:returntype", void 0)
1317
- ], View.prototype, "onLoaded", null);
1318
- __decorate([
1319
- profile,
1320
- __metadata("design:type", Function),
1321
- __metadata("design:paramtypes", []),
1322
- __metadata("design:returntype", void 0)
1323
- ], View.prototype, "onUnloaded", null);
1324
- __decorate([
1325
- profile,
1326
- __metadata("design:type", Function),
1327
- __metadata("design:paramtypes", []),
1328
- __metadata("design:returntype", void 0)
1329
- ], View.prototype, "requestLayout", null);
1330
- function parseEdges(edges) {
1331
- const values = edges.trim().split(',');
1332
- let newValue = -1;
1333
- for (let value of values) {
1334
- const trimmedValue = value.trim();
1335
- switch (trimmedValue) {
1336
- case 'none':
1337
- if (newValue === -1) {
1338
- newValue = OverflowEdgeNone;
1339
- }
1340
- else {
1341
- newValue |= OverflowEdgeNone;
1342
- }
1343
- break;
1344
- case 'left':
1345
- if (newValue === -1) {
1346
- newValue = OverflowEdgeLeft;
1347
- }
1348
- else {
1349
- newValue |= OverflowEdgeLeft;
1350
- }
1351
- break;
1352
- case 'top':
1353
- if (newValue === -1) {
1354
- newValue = OverflowEdgeTop;
1355
- }
1356
- else {
1357
- newValue |= OverflowEdgeTop;
1358
- }
1359
- break;
1360
- case 'right':
1361
- if (newValue === -1) {
1362
- newValue = OverflowEdgeRight;
1363
- }
1364
- else {
1365
- newValue |= OverflowEdgeRight;
1366
- }
1367
- break;
1368
- case 'bottom':
1369
- if (newValue === -1) {
1370
- newValue = OverflowEdgeBottom;
1371
- }
1372
- else {
1373
- newValue |= OverflowEdgeBottom;
1374
- }
1375
- break;
1376
- case 'dont-apply':
1377
- newValue = OverflowEdgeDontApply;
1378
- break;
1379
- case 'left-dont-consume':
1380
- if (newValue === -1) {
1381
- newValue = OverflowEdgeLeftDontConsume;
1382
- }
1383
- else {
1384
- newValue |= OverflowEdgeLeftDontConsume;
1385
- }
1386
- break;
1387
- case 'top-dont-consume':
1388
- if (newValue === -1) {
1389
- newValue = OverflowEdgeTopDontConsume;
1390
- }
1391
- else {
1392
- newValue |= OverflowEdgeTopDontConsume;
1393
- }
1394
- break;
1395
- case 'right-dont-consume':
1396
- if (newValue === -1) {
1397
- newValue = OverflowEdgeRightDontConsume;
1398
- }
1399
- else {
1400
- newValue |= OverflowEdgeRightDontConsume;
1401
- }
1402
- break;
1403
- case 'bottom-dont-consume':
1404
- if (newValue === -1) {
1405
- newValue = OverflowEdgeBottomDontConsume;
1406
- }
1407
- else {
1408
- newValue |= OverflowEdgeBottomDontConsume;
1409
- }
1410
- case 'all-but-left':
1411
- if (newValue === -1) {
1412
- newValue = OverflowEdgeAllButLeft;
1413
- }
1414
- else {
1415
- newValue |= OverflowEdgeAllButLeft;
1416
- }
1417
- case 'all-but-top':
1418
- if (newValue === -1) {
1419
- newValue = OverflowEdgeAllButTop;
1420
- }
1421
- else {
1422
- newValue |= OverflowEdgeAllButTop;
1423
- }
1424
- case 'all-but-right':
1425
- if (newValue === -1) {
1426
- newValue = OverflowEdgeAllButRight;
1427
- }
1428
- else {
1429
- newValue |= OverflowEdgeAllButRight;
1430
- }
1431
- case 'all-but-bottom':
1432
- if (newValue === -1) {
1433
- newValue = OverflowEdgeAllButBottom;
1434
- }
1435
- else {
1436
- newValue |= OverflowEdgeAllButBottom;
1437
- }
1438
- break;
1439
- }
1440
- }
1441
- if (newValue === -1) {
1442
- return null;
1443
- }
1444
- return newValue;
1445
- }
1446
- export class ContainerView extends View {
1447
- }
1448
- export class CustomLayoutView extends ContainerView {
1449
- createNativeView() {
1450
- return new org.nativescript.widgets.ContentLayout(this._context);
1451
- }
1452
- _addViewToNativeVisualTree(child, atIndex = Number.MAX_SAFE_INTEGER) {
1453
- super._addViewToNativeVisualTree(child);
1454
- if (this.nativeViewProtected && child.nativeViewProtected) {
1455
- if (Trace.isEnabled()) {
1456
- Trace.write(`${this}.nativeView.addView(${child}.nativeView, ${atIndex})`, Trace.categories.VisualTreeEvents);
1457
- }
1458
- this.nativeViewProtected.addView(child.nativeViewProtected, atIndex);
1459
- if (child instanceof View) {
1460
- this._updateNativeLayoutParams(child);
1461
- }
1462
- return true;
1463
- }
1464
- return false;
1465
- }
1466
- _updateNativeLayoutParams(child) {
1467
- // noop
1468
- }
1469
- _setChildMinWidthNative(child, value) {
1470
- child._setMinWidthNative(value);
1471
- }
1472
- _setChildMinHeightNative(child, value) {
1473
- child._setMinHeightNative(value);
1474
- }
1475
- _removeViewFromNativeVisualTree(child) {
1476
- super._removeViewFromNativeVisualTree(child);
1477
- const nativeView = this.nativeViewProtected;
1478
- const childView = child.nativeViewProtected;
1479
- if (nativeView && childView) {
1480
- nativeView.removeView(childView);
1481
- if (Trace.isEnabled()) {
1482
- Trace.write(`${nativeView}.removeView(${childView})`, Trace.categories.VisualTreeEvents);
1483
- Trace.notifyEvent(child, 'childInLayoutRemovedFromNativeVisualTree');
1484
- }
1485
- }
1486
- }
1487
- }
1488
- const percentNotSupported = (view, value) => {
1489
- throw new Error('PercentLength is not supported.');
1490
- };
1491
- function createNativePercentLengthProperty(options) {
1492
- const { getter, setter, auto = 0 } = options;
1493
- let setPixels, getPixels, setPercent;
1494
- if (getter) {
1495
- View.prototype[getter] = function () {
1496
- if (options) {
1497
- setPixels = options.setPixels;
1498
- getPixels = options.getPixels;
1499
- setPercent = options.setPercent || percentNotSupported;
1500
- options = null;
1501
- }
1502
- const value = getPixels(this.nativeViewProtected);
1503
- if (value == auto) {
1504
- // tslint:disable-line
1505
- return 'auto';
1506
- }
1507
- else {
1508
- return { value, unit: 'px' };
1509
- }
1510
- };
1511
- }
1512
- if (setter) {
1513
- View.prototype[setter] = function (length) {
1514
- if (options) {
1515
- setPixels = options.setPixels;
1516
- getPixels = options.getPixels;
1517
- setPercent = options.setPercent || percentNotSupported;
1518
- options = null;
1519
- }
1520
- if (length == 'auto' || length == null || isCssWideKeyword(length)) {
1521
- // tslint:disable-line
1522
- setPixels(this.nativeViewProtected, auto);
1523
- }
1524
- else if (typeof length === 'number') {
1525
- setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length)));
1526
- }
1527
- else if (length.unit == 'dip') {
1528
- // tslint:disable-line
1529
- setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length.value)));
1530
- }
1531
- else if (length.unit == 'px') {
1532
- // tslint:disable-line
1533
- setPixels(this.nativeViewProtected, layout.round(length.value));
1534
- }
1535
- else if (length.unit == '%') {
1536
- // tslint:disable-line
1537
- setPercent(this.nativeViewProtected, length.value);
1538
- }
1539
- else {
1540
- throw new Error(`Unsupported PercentLength ${length}`);
1541
- }
1542
- };
1543
- }
1544
- }
1545
- createNativePercentLengthProperty({
1546
- setter: marginTopProperty.setNative,
1547
- get setPixels() {
1548
- return org.nativescript.widgets.ViewHelper.setMarginTop;
1549
- },
1550
- get setPercent() {
1551
- return org.nativescript.widgets.ViewHelper.setMarginTopPercent;
1552
- },
1553
- });
1554
- createNativePercentLengthProperty({
1555
- setter: marginRightProperty.setNative,
1556
- get setPixels() {
1557
- return org.nativescript.widgets.ViewHelper.setMarginRight;
1558
- },
1559
- get setPercent() {
1560
- return org.nativescript.widgets.ViewHelper.setMarginRightPercent;
1561
- },
1562
- });
1563
- createNativePercentLengthProperty({
1564
- setter: marginBottomProperty.setNative,
1565
- get setPixels() {
1566
- return org.nativescript.widgets.ViewHelper.setMarginBottom;
1567
- },
1568
- get setPercent() {
1569
- return org.nativescript.widgets.ViewHelper.setMarginBottomPercent;
1570
- },
1571
- });
1572
- createNativePercentLengthProperty({
1573
- setter: marginLeftProperty.setNative,
1574
- get setPixels() {
1575
- return org.nativescript.widgets.ViewHelper.setMarginLeft;
1576
- },
1577
- get setPercent() {
1578
- return org.nativescript.widgets.ViewHelper.setMarginLeftPercent;
1579
- },
1580
- });
1581
- createNativePercentLengthProperty({
1582
- setter: widthProperty.setNative,
1583
- auto: -1, //android.view.ViewGroup.LayoutParams.MATCH_PARENT,
1584
- get setPixels() {
1585
- return org.nativescript.widgets.ViewHelper.setWidth;
1586
- },
1587
- get setPercent() {
1588
- return org.nativescript.widgets.ViewHelper.setWidthPercent;
1589
- },
1590
- });
1591
- createNativePercentLengthProperty({
1592
- setter: heightProperty.setNative,
1593
- auto: -1, //android.view.ViewGroup.LayoutParams.MATCH_PARENT,
1594
- get setPixels() {
1595
- return org.nativescript.widgets.ViewHelper.setHeight;
1596
- },
1597
- get setPercent() {
1598
- return org.nativescript.widgets.ViewHelper.setHeightPercent;
1599
- },
1600
- });
1601
- createNativePercentLengthProperty({
1602
- setter: '_setMinWidthNative',
1603
- get setPixels() {
1604
- return org.nativescript.widgets.ViewHelper.setMinWidth;
1605
- },
1606
- });
1607
- createNativePercentLengthProperty({
1608
- setter: '_setMinHeightNative',
1609
- get setPixels() {
1610
- return org.nativescript.widgets.ViewHelper.setMinHeight;
1611
- },
1612
- });
1613
- //# sourceMappingURL=index.android.js.map