@akylas/nativescript 8.4.9 → 8.5.8

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 (330) hide show
  1. package/accessibility/accessibility-css-helper.js +7 -8
  2. package/accessibility/accessibility-css-helper.js.map +1 -1
  3. package/accessibility/accessibility-properties.d.ts +4 -1
  4. package/accessibility/accessibility-properties.js +21 -0
  5. package/accessibility/accessibility-properties.js.map +1 -1
  6. package/accessibility/accessibility-service.android.js +23 -23
  7. package/accessibility/accessibility-service.android.js.map +1 -1
  8. package/accessibility/accessibility-service.ios.js +1 -1
  9. package/accessibility/accessibility-service.ios.js.map +1 -1
  10. package/accessibility/font-scale.android.js +1 -1
  11. package/accessibility/font-scale.android.js.map +1 -1
  12. package/accessibility/font-scale.ios.js +1 -1
  13. package/accessibility/font-scale.ios.js.map +1 -1
  14. package/accessibility/index.android.js +85 -85
  15. package/accessibility/index.android.js.map +1 -1
  16. package/accessibility/index.ios.js +2 -2
  17. package/accessibility/index.ios.js.map +1 -1
  18. package/application/application-common.d.ts +202 -41
  19. package/application/application-common.js +411 -149
  20. package/application/application-common.js.map +1 -1
  21. package/application/application-interfaces.d.ts +122 -32
  22. package/application/application-shims.d.ts +351 -0
  23. package/application/application-shims.js +353 -0
  24. package/application/application-shims.js.map +1 -0
  25. package/application/application.android.d.ts +64 -0
  26. package/application/application.android.js +438 -0
  27. package/application/application.android.js.map +1 -0
  28. package/application/application.d.ts +186 -0
  29. package/application/application.ios.d.ts +77 -0
  30. package/application/application.ios.js +363 -0
  31. package/application/application.ios.js.map +1 -0
  32. package/application/index.android.d.ts +2 -77
  33. package/application/index.android.js +2 -460
  34. package/application/index.android.js.map +1 -1
  35. package/application/index.d.ts +2 -759
  36. package/application/index.ios.d.ts +2 -65
  37. package/application/index.ios.js +2 -506
  38. package/application/index.ios.js.map +1 -1
  39. package/application-settings/index.android.js +2 -2
  40. package/application-settings/index.android.js.map +1 -1
  41. package/config/config.interface.d.ts +10 -0
  42. package/connectivity/index.android.js +24 -28
  43. package/connectivity/index.android.js.map +1 -1
  44. package/data/observable/index.d.ts +19 -18
  45. package/data/observable/index.js +9 -0
  46. package/data/observable/index.js.map +1 -1
  47. package/file-system/file-system-access.android.d.ts +21 -0
  48. package/file-system/file-system-access.android.js +235 -4
  49. package/file-system/file-system-access.android.js.map +1 -1
  50. package/file-system/file-system-access.d.ts +99 -0
  51. package/file-system/file-system-access.ios.d.ts +12 -0
  52. package/file-system/file-system-access.ios.js +168 -0
  53. package/file-system/file-system-access.ios.js.map +1 -1
  54. package/file-system/index.d.ts +34 -1
  55. package/file-system/index.js +257 -2
  56. package/file-system/index.js.map +1 -1
  57. package/fps-meter/fps-native.ios.js +15 -17
  58. package/fps-meter/fps-native.ios.js.map +1 -1
  59. package/global-types.d.ts +13 -5
  60. package/globals/index.js +2 -0
  61. package/globals/index.js.map +1 -1
  62. package/http/http-request/index.ios.js +8 -10
  63. package/http/http-request/index.ios.js.map +1 -1
  64. package/image-source/index.android.js +2 -2
  65. package/image-source/index.android.js.map +1 -1
  66. package/index.d.ts +12 -139
  67. package/index.js +15 -155
  68. package/index.js.map +1 -1
  69. package/module-name-resolver/index.js +5 -5
  70. package/module-name-resolver/index.js.map +1 -1
  71. package/module-name-resolver/non-bundle-workflow-compat.js +2 -2
  72. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  73. package/package.json +1 -1
  74. package/platform/index.android.js +5 -5
  75. package/platform/index.android.js.map +1 -1
  76. package/platforms/android/native-api-usage.json +2 -0
  77. package/platforms/android/widgets-release.aar +0 -0
  78. package/platforms/ios/TNSWidgets.xcframework/Info.plist +7 -7
  79. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  80. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
  81. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
  82. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  83. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  84. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  85. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
  86. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +4 -4
  87. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
  88. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +22 -0
  89. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +1 -0
  90. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +4 -4
  91. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
  92. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  93. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  94. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  95. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
  96. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  97. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  98. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +14 -3
  99. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  100. package/timer/index.ios.js +17 -18
  101. package/timer/index.ios.js.map +1 -1
  102. package/ui/action-bar/index.android.js +16 -17
  103. package/ui/action-bar/index.android.js.map +1 -1
  104. package/ui/action-bar/index.ios.js +15 -17
  105. package/ui/action-bar/index.ios.js.map +1 -1
  106. package/ui/animation/animation-common.js +1 -0
  107. package/ui/animation/animation-common.js.map +1 -1
  108. package/ui/animation/animation-interfaces.d.ts +2 -0
  109. package/ui/animation/index.android.js +1 -1
  110. package/ui/animation/index.android.js.map +1 -1
  111. package/ui/animation/index.ios.d.ts +1 -3
  112. package/ui/animation/index.ios.js +113 -101
  113. package/ui/animation/index.ios.js.map +1 -1
  114. package/ui/builder/component-builder/index.js +1 -1
  115. package/ui/builder/component-builder/index.js.map +1 -1
  116. package/ui/builder/index.js +1 -1
  117. package/ui/builder/index.js.map +1 -1
  118. package/ui/button/index.android.js +12 -13
  119. package/ui/button/index.android.js.map +1 -1
  120. package/ui/core/control-state-change/index.ios.js +7 -9
  121. package/ui/core/control-state-change/index.ios.js.map +1 -1
  122. package/ui/core/view/index.android.js +157 -158
  123. package/ui/core/view/index.android.js.map +1 -1
  124. package/ui/core/view/index.d.ts +15 -0
  125. package/ui/core/view/index.ios.d.ts +1 -0
  126. package/ui/core/view/index.ios.js +96 -17
  127. package/ui/core/view/index.ios.js.map +1 -1
  128. package/ui/core/view/view-common.d.ts +10 -0
  129. package/ui/core/view/view-common.js +46 -6
  130. package/ui/core/view/view-common.js.map +1 -1
  131. package/ui/core/view/view-helper/index.ios.d.ts +0 -2
  132. package/ui/core/view/view-helper/index.ios.js +97 -165
  133. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  134. package/ui/core/view-base/index.d.ts +219 -1
  135. package/ui/core/view-base/index.js +170 -5
  136. package/ui/core/view-base/index.js.map +1 -1
  137. package/ui/date-picker/index.android.js +30 -31
  138. package/ui/date-picker/index.android.js.map +1 -1
  139. package/ui/date-picker/index.ios.js +17 -19
  140. package/ui/date-picker/index.ios.js.map +1 -1
  141. package/ui/dialogs/index.ios.js +10 -4
  142. package/ui/dialogs/index.ios.js.map +1 -1
  143. package/ui/editable-text-base/editable-text-base-common.d.ts +1 -0
  144. package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
  145. package/ui/editable-text-base/index.android.js +26 -28
  146. package/ui/editable-text-base/index.android.js.map +1 -1
  147. package/ui/editable-text-base/index.d.ts +7 -1
  148. package/ui/frame/activity.android.js +2 -2
  149. package/ui/frame/activity.android.js.map +1 -1
  150. package/ui/frame/fragment.transitions.android.js +110 -86
  151. package/ui/frame/fragment.transitions.android.js.map +1 -1
  152. package/ui/frame/fragment.transitions.d.ts +0 -4
  153. package/ui/frame/frame-common.d.ts +3 -3
  154. package/ui/frame/frame-common.js +14 -1
  155. package/ui/frame/frame-common.js.map +1 -1
  156. package/ui/frame/index.android.d.ts +4 -3
  157. package/ui/frame/index.android.js +67 -89
  158. package/ui/frame/index.android.js.map +1 -1
  159. package/ui/frame/index.ios.js +180 -151
  160. package/ui/frame/index.ios.js.map +1 -1
  161. package/ui/gestures/index.android.js +124 -121
  162. package/ui/gestures/index.android.js.map +1 -1
  163. package/ui/gestures/index.ios.js +47 -53
  164. package/ui/gestures/index.ios.js.map +1 -1
  165. package/ui/gestures/touch-manager.js +29 -32
  166. package/ui/gestures/touch-manager.js.map +1 -1
  167. package/ui/image/image-common.d.ts +2 -2
  168. package/ui/image/image-common.js.map +1 -1
  169. package/ui/image/index.android.js +12 -13
  170. package/ui/image/index.android.js.map +1 -1
  171. package/ui/image/index.d.ts +3 -2
  172. package/ui/image/index.ios.js.map +1 -1
  173. package/ui/image-cache/index.android.js +14 -13
  174. package/ui/image-cache/index.android.js.map +1 -1
  175. package/ui/image-cache/index.ios.js +17 -19
  176. package/ui/image-cache/index.ios.js.map +1 -1
  177. package/ui/index.d.ts +9 -2
  178. package/ui/index.js +8 -2
  179. package/ui/index.js.map +1 -1
  180. package/ui/layouts/layout-base.ios.js +4 -1
  181. package/ui/layouts/layout-base.ios.js.map +1 -1
  182. package/ui/layouts/root-layout/index.d.ts +1 -1
  183. package/ui/layouts/root-layout/root-layout-common.d.ts +16 -1
  184. package/ui/layouts/root-layout/root-layout-common.js +89 -62
  185. package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
  186. package/ui/list-picker/index.android.js +21 -23
  187. package/ui/list-picker/index.android.js.map +1 -1
  188. package/ui/list-picker/index.ios.js +32 -39
  189. package/ui/list-picker/index.ios.js.map +1 -1
  190. package/ui/list-view/index.android.js +105 -105
  191. package/ui/list-view/index.android.js.map +1 -1
  192. package/ui/list-view/index.ios.js +100 -116
  193. package/ui/list-view/index.ios.js.map +1 -1
  194. package/ui/page/index.ios.d.ts +0 -1
  195. package/ui/page/index.ios.js +150 -163
  196. package/ui/page/index.ios.js.map +1 -1
  197. package/ui/scroll-view/index.ios.js +20 -21
  198. package/ui/scroll-view/index.ios.js.map +1 -1
  199. package/ui/search-bar/index.android.js +38 -40
  200. package/ui/search-bar/index.android.js.map +1 -1
  201. package/ui/search-bar/index.ios.js +27 -33
  202. package/ui/search-bar/index.ios.js.map +1 -1
  203. package/ui/segmented-bar/index.android.js +40 -41
  204. package/ui/segmented-bar/index.android.js.map +1 -1
  205. package/ui/segmented-bar/index.ios.js +15 -17
  206. package/ui/segmented-bar/index.ios.js.map +1 -1
  207. package/ui/slider/index.android.js +23 -24
  208. package/ui/slider/index.android.js.map +1 -1
  209. package/ui/slider/index.ios.js +31 -37
  210. package/ui/slider/index.ios.js.map +1 -1
  211. package/ui/styling/background.android.js +3 -5
  212. package/ui/styling/background.android.js.map +1 -1
  213. package/ui/styling/style/index.d.ts +4 -1
  214. package/ui/styling/style/index.js.map +1 -1
  215. package/ui/styling/style-properties.d.ts +4 -4
  216. package/ui/styling/style-properties.js +7 -7
  217. package/ui/styling/style-properties.js.map +1 -1
  218. package/ui/styling/style-scope.js +6 -6
  219. package/ui/styling/style-scope.js.map +1 -1
  220. package/ui/switch/index.android.js +11 -12
  221. package/ui/switch/index.android.js.map +1 -1
  222. package/ui/switch/index.ios.js +15 -17
  223. package/ui/switch/index.ios.js.map +1 -1
  224. package/ui/tab-view/index.android.js +140 -137
  225. package/ui/tab-view/index.android.js.map +1 -1
  226. package/ui/tab-view/index.ios.js +68 -82
  227. package/ui/tab-view/index.ios.js.map +1 -1
  228. package/ui/text-base/formatted-string.d.ts +6 -0
  229. package/ui/text-base/formatted-string.js +27 -0
  230. package/ui/text-base/formatted-string.js.map +1 -1
  231. package/ui/text-base/index.android.js +59 -59
  232. package/ui/text-base/index.android.js.map +1 -1
  233. package/ui/text-base/index.ios.js +73 -51
  234. package/ui/text-base/index.ios.js.map +1 -1
  235. package/ui/text-base/span.d.ts +6 -0
  236. package/ui/text-base/span.js +18 -0
  237. package/ui/text-base/span.js.map +1 -1
  238. package/ui/text-field/index.ios.js +72 -66
  239. package/ui/text-field/index.ios.js.map +1 -1
  240. package/ui/text-view/index.ios.js +35 -45
  241. package/ui/text-view/index.ios.js.map +1 -1
  242. package/ui/time-picker/index.android.js +14 -15
  243. package/ui/time-picker/index.android.js.map +1 -1
  244. package/ui/time-picker/index.ios.js +17 -19
  245. package/ui/time-picker/index.ios.js.map +1 -1
  246. package/ui/transition/fade-transition.d.ts +1 -3
  247. package/ui/transition/fade-transition.ios.d.ts +14 -1
  248. package/ui/transition/fade-transition.ios.js +59 -24
  249. package/ui/transition/fade-transition.ios.js.map +1 -1
  250. package/ui/transition/index.android.d.ts +6 -4
  251. package/ui/transition/index.android.js +8 -5
  252. package/ui/transition/index.android.js.map +1 -1
  253. package/ui/transition/index.d.ts +58 -8
  254. package/ui/transition/index.ios.d.ts +6 -4
  255. package/ui/transition/index.ios.js +11 -6
  256. package/ui/transition/index.ios.js.map +1 -1
  257. package/ui/transition/modal-transition.android.d.ts +5 -0
  258. package/ui/transition/modal-transition.android.js +7 -0
  259. package/ui/transition/modal-transition.android.js.map +1 -0
  260. package/ui/transition/modal-transition.d.ts +2 -0
  261. package/ui/transition/modal-transition.ios.d.ts +34 -0
  262. package/ui/transition/modal-transition.ios.js +174 -0
  263. package/ui/transition/modal-transition.ios.js.map +1 -0
  264. package/ui/transition/page-transition.android.d.ts +7 -0
  265. package/ui/transition/page-transition.android.js +260 -0
  266. package/ui/transition/page-transition.android.js.map +1 -0
  267. package/ui/transition/page-transition.d.ts +2 -0
  268. package/ui/transition/page-transition.ios.d.ts +35 -0
  269. package/ui/transition/page-transition.ios.js +191 -0
  270. package/ui/transition/page-transition.ios.js.map +1 -0
  271. package/ui/transition/shared-transition-helper.android.d.ts +9 -0
  272. package/ui/transition/shared-transition-helper.android.js +10 -0
  273. package/ui/transition/shared-transition-helper.android.js.map +1 -0
  274. package/ui/transition/shared-transition-helper.d.ts +14 -0
  275. package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
  276. package/ui/transition/shared-transition-helper.ios.js +524 -0
  277. package/ui/transition/shared-transition-helper.ios.js.map +1 -0
  278. package/ui/transition/shared-transition.d.ts +267 -0
  279. package/ui/transition/shared-transition.js +214 -0
  280. package/ui/transition/shared-transition.js.map +1 -0
  281. package/ui/transition/slide-transition.android.d.ts +1 -1
  282. package/ui/transition/slide-transition.android.js +1 -1
  283. package/ui/transition/slide-transition.android.js.map +1 -1
  284. package/ui/transition/slide-transition.d.ts +1 -1
  285. package/ui/transition/slide-transition.ios.d.ts +15 -2
  286. package/ui/transition/slide-transition.ios.js +84 -49
  287. package/ui/transition/slide-transition.ios.js.map +1 -1
  288. package/ui/web-view/index.android.js +57 -60
  289. package/ui/web-view/index.android.js.map +1 -1
  290. package/ui/web-view/index.ios.js +64 -79
  291. package/ui/web-view/index.ios.js.map +1 -1
  292. package/utils/android/index.d.ts +21 -0
  293. package/utils/android/index.js +157 -0
  294. package/utils/android/index.js.map +1 -0
  295. package/utils/common.d.ts +33 -0
  296. package/utils/common.js +70 -1
  297. package/utils/common.js.map +1 -1
  298. package/utils/index.android.d.ts +8 -3
  299. package/utils/index.android.js +15 -10
  300. package/utils/index.android.js.map +1 -1
  301. package/utils/index.d.ts +7 -7
  302. package/utils/index.ios.d.ts +8 -3
  303. package/utils/index.ios.js +13 -8
  304. package/utils/index.ios.js.map +1 -1
  305. package/utils/ios/index.d.ts +36 -0
  306. package/utils/ios/index.js +277 -0
  307. package/utils/ios/index.js.map +1 -0
  308. package/utils/layout-helper/index.android.js +3 -3
  309. package/utils/layout-helper/index.android.js.map +1 -1
  310. package/utils/mainthread-helper.android.js +2 -2
  311. package/utils/mainthread-helper.android.js.map +1 -1
  312. package/utils/native-helper.android.d.ts +8 -23
  313. package/utils/native-helper.android.js +10 -169
  314. package/utils/native-helper.android.js.map +1 -1
  315. package/utils/native-helper.d.ts +272 -219
  316. package/utils/native-helper.ios.d.ts +8 -22
  317. package/utils/native-helper.ios.js +10 -238
  318. package/utils/native-helper.ios.js.map +1 -1
  319. package/utils/number-utils.d.ts +10 -0
  320. package/utils/number-utils.js +12 -0
  321. package/utils/number-utils.js.map +1 -1
  322. package/utils/platform-check.d.ts +4 -0
  323. package/utils/platform-check.js +21 -0
  324. package/utils/platform-check.js.map +1 -0
  325. package/ui/builder/module-name-sanitizer.d.ts +0 -6
  326. package/ui/builder/module-name-sanitizer.js +0 -24
  327. package/ui/builder/module-name-sanitizer.js.map +0 -1
  328. package/ui/frame/fragment.transitions.ios.d.ts +0 -2
  329. package/ui/frame/fragment.transitions.ios.js +0 -85
  330. package/ui/frame/fragment.transitions.ios.js.map +0 -1
@@ -5,9 +5,16 @@ import { Property, CssProperty, CssAnimationProperty, InheritedProperty } from '
5
5
  import { BindingOptions } from '../bindable';
6
6
  import { Observable } from '../../../data/observable';
7
7
  import { Style } from '../../styling/style';
8
+ import type { ModalTransition } from '../../transition/modal-transition';
8
9
  import type * as dnm from '../../../debugger/dom-node';
9
10
  import * as ssm from '../../styling/style-scope';
10
11
  import { ViewBase as ViewBaseDefinition } from '.';
12
+ export interface ModalTransitionType {
13
+ name?: string;
14
+ instance?: ModalTransition;
15
+ duration?: number;
16
+ curve?: any;
17
+ }
11
18
  export interface ShowModalOptions {
12
19
  /**
13
20
  * Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.
@@ -29,6 +36,10 @@ export interface ShowModalOptions {
29
36
  * An optional parameter specifying whether to stretch the modal view when not in full-screen mode.
30
37
  */
31
38
  stretched?: boolean;
39
+ /**
40
+ * An optional custom transition effect
41
+ */
42
+ transition?: ModalTransitionType;
32
43
  /**
33
44
  * An optional parameter that specify options specific to iOS as an object.
34
45
  */
@@ -63,11 +74,41 @@ export interface ShowModalOptions {
63
74
  */
64
75
  cancelable?: boolean;
65
76
  }
77
+ /**
78
+ * Gets an ancestor from a given type.
79
+ * @param view - Starting view (child view).
80
+ * @param criterion - The type of ancestor view we are looking for. Could be a string containing a class name or an actual type.
81
+ * Returns an instance of a view (if found), otherwise undefined.
82
+ */
66
83
  export declare function getAncestor(view: ViewBaseDefinition, criterion: string | {
67
84
  new (): any;
68
85
  }): ViewBaseDefinition;
86
+ /**
87
+ * Gets a child view by id.
88
+ * @param view - The parent (container) view of the view to look for.
89
+ * @param id - The id of the view to look for.
90
+ * Returns an instance of a view (if found), otherwise undefined.
91
+ */
69
92
  export declare function getViewById(view: ViewBaseDefinition, id: string): ViewBaseDefinition;
93
+ /**
94
+ * Gets a child view by domId.
95
+ * @param view - The parent (container) view of the view to look for.
96
+ * @param domId - The id of the view to look for.
97
+ * Returns an instance of a view (if found), otherwise undefined.
98
+ */
70
99
  export declare function getViewByDomId(view: ViewBaseDefinition, domId: number): ViewBaseDefinition;
100
+ /**
101
+ * Gets a child view by selector.
102
+ * @param view - The parent (container) view of the view to look for.
103
+ * @param selector - The selector of the view to look for.
104
+ * Returns an instance of a view (if found), otherwise undefined.
105
+ */
106
+ export declare function querySelectorAll(view: ViewBaseDefinition, selector: string): Array<ViewBaseDefinition>;
107
+ /**
108
+ * Iterates through all child views (via visual tree) and executes a function.
109
+ * @param view - Starting view (parent container).
110
+ * @param callback - A function to execute on every child. If function returns false it breaks the iteration.
111
+ */
71
112
  export declare function eachDescendant(view: ViewBaseDefinition, callback: (child: ViewBaseDefinition) => boolean): void;
72
113
  declare enum SuspendType {
73
114
  Incremental = 0,
@@ -80,9 +121,21 @@ declare namespace SuspendType {
80
121
  function toString(type: SuspendType): string;
81
122
  }
82
123
  export declare abstract class ViewBase extends Observable implements ViewBaseDefinition {
124
+ /**
125
+ * String value used when hooking to loaded event.
126
+ */
83
127
  static loadedEvent: string;
128
+ /**
129
+ * String value used when hooking to unloaded event.
130
+ */
84
131
  static unloadedEvent: string;
132
+ /**
133
+ * String value used when hooking to creation event
134
+ */
85
135
  static createdEvent: string;
136
+ /**
137
+ * String value used when hooking to disposeNativeView event
138
+ */
86
139
  static disposeNativeViewEvent: string;
87
140
  private _onLoadedCalled;
88
141
  private _onUnloadedCalled;
@@ -95,22 +148,64 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
95
148
  private __nativeView;
96
149
  domNode: dnm.DOMNode;
97
150
  recycleNativeView: 'always' | 'never' | 'auto';
151
+ /**
152
+ * returns the native UIViewController.
153
+ */
98
154
  viewController: any;
99
155
  bindingContext: any;
156
+ /**
157
+ * read-only. If you want to set out-of-band the nativeView use the setNativeView method.
158
+ */
100
159
  nativeViewProtected: any;
160
+ /**
161
+ * Gets the parent view. This property is read-only.
162
+ */
101
163
  parent: ViewBase;
164
+ /**
165
+ * Returns true if visibility is set to 'collapse'.
166
+ * Default(false) set in prototype
167
+ * Readonly property
168
+ */
102
169
  isCollapsed: any;
170
+ /**
171
+ * Gets or sets the id for this view.
172
+ */
103
173
  id: string;
174
+ /**
175
+ * Gets or sets the CSS class name for this view.
176
+ */
104
177
  className: string;
105
178
  disableCss: boolean;
179
+ /**
180
+ * Gets or sets the shared transition tag for animated view transitions
181
+ */
182
+ sharedTransitionTag: string;
183
+ /**
184
+ * Opt out of shared transition under different binding conditions
185
+ */
186
+ sharedTransitionIgnore: boolean;
106
187
  _domId: number;
107
188
  _context: any;
108
189
  _isAddedToNativeVisualTree: boolean;
109
190
  _cssState: ssm.CssState;
110
191
  _styleScope: ssm.StyleScope;
192
+ /**
193
+ * A property bag holding suspended native updates.
194
+ * Native setters that had to execute while there was no native view,
195
+ * or the view was detached from the visual tree etc. will accumulate in this object,
196
+ * and will be applied when all prerequisites are met.
197
+ * @private
198
+ */
111
199
  _suspendedUpdates: {
112
200
  [propertyName: string]: Property<ViewBase, any> | CssProperty<Style, any> | CssAnimationProperty<Style, any>;
113
201
  };
202
+ /**
203
+ * Determines the depth of suspended updates.
204
+ * When the value is 0 the current property updates are not batched nor scoped and must be immediately applied.
205
+ * If the value is 1 or greater, the current updates are batched and does not have to provide immediate update.
206
+ * Do not set this field, the _batchUpdate method is responsible to keep the count up to date,
207
+ * as well as adding/rmoving the view to/from the visual tree.
208
+ */
114
209
  _suspendNativeUpdatesCount: number;
115
210
  _isStyleScopeHost: boolean;
116
211
  _automaticallyAdjustsScrollViewInsets: boolean;
@@ -156,14 +251,31 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
156
251
  _defaultPaddingBottom: number;
157
252
  _defaultPaddingLeft: number;
158
253
  _isPaddingRelative: boolean;
254
+ /**
255
+ * @private
256
+ * Module name when the view is a module root. Otherwise, it is undefined.
257
+ */
159
258
  _moduleName: string;
259
+ /**
260
+ * Gets or sets if the view is reusable.
261
+ * Reusable views are not automatically destroyed when removed from the View tree.
262
+ */
160
263
  reusable: boolean;
161
264
  constructor();
265
+ /**
266
+ * Gets the template parent or the native parent. Sets the template parent.
267
+ */
162
268
  get parentNode(): ViewBase;
163
269
  set parentNode(node: ViewBase);
164
270
  get nativeView(): any;
165
271
  set nativeView(value: any);
272
+ /**
273
+ * Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
274
+ */
166
275
  get typeName(): string;
276
+ /**
277
+ * Gets the style object associated to this view.
278
+ */
167
279
  get style(): Style;
168
280
  set style(inlineStyle: Style);
169
281
  get android(): any;
@@ -171,9 +283,22 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
171
283
  get isLoaded(): boolean;
172
284
  get ['class'](): string;
173
285
  set ['class'](v: string);
286
+ /**
287
+ * Returns the child view with the specified id.
288
+ */
174
289
  getViewById<T extends ViewBaseDefinition>(id: string): T;
290
+ /**
291
+ * Returns the child view with the specified domId.
292
+ */
175
293
  getViewByDomId<T extends ViewBaseDefinition>(domId: number): T;
294
+ /**
295
+ * Gets owner page. This is a read-only property.
296
+ */
176
297
  get page(): Page;
298
+ /**
299
+ * @unstable
300
+ * Ensures a dom-node for this view.
301
+ */
177
302
  ensureDomNode(): void;
178
303
  set(name: string, value: any): void;
179
304
  onLoaded(): void;
@@ -181,6 +306,9 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
181
306
  _layoutParent(): void;
182
307
  _suspendNativeUpdates(type: SuspendType): void;
183
308
  _resumeNativeUpdates(type: SuspendType): void;
309
+ /**
310
+ * Allow multiple updates to be performed on the instance at once.
311
+ */
184
312
  _batchUpdate<T>(callback: () => T): T;
185
313
  private setFlag;
186
314
  private isFlagSet;
@@ -192,7 +320,17 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
192
320
  cssClasses: Set<string>;
193
321
  cssPseudoClasses: Set<string>;
194
322
  private getAllAliasedStates;
323
+ /**
324
+ * @protected
325
+ * @unstable
326
+ * A widget can call this method to add a matching css pseudo class.
327
+ */
195
328
  addPseudoClass(name: string): void;
329
+ /**
330
+ * @protected
331
+ * @unstable
332
+ * A widget can call this method to discard matching css pseudo class.
333
+ */
196
334
  deletePseudoClass(name: string): void;
197
335
  private bindingContextChanged;
198
336
  private bindings;
@@ -206,12 +344,34 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
206
344
  mSuspendRequestLayout: boolean;
207
345
  set suspendRequestLayout(value: boolean);
208
346
  get suspendRequestLayout(): boolean;
347
+ /**
348
+ * Invalidates the layout of the view and triggers a new layout pass.
349
+ */
209
350
  requestLayout(): void;
351
+ /**
352
+ * Iterates over children of type ViewBase.
353
+ * @param callback Called for each child of type ViewBase. Iteration stops if this method returns falsy value.
354
+ */
210
355
  eachChild(callback: (child: ViewBase) => boolean): void;
211
356
  _addView(view: ViewBase, atIndex?: number): void;
357
+ /**
358
+ * Method is intended to be overridden by inheritors and used as "protected"
359
+ */
212
360
  _addViewCore(view: ViewBase, atIndex?: number): void;
361
+ /**
362
+ * Load view.
363
+ * @param view to load.
364
+ */
213
365
  loadView(view: ViewBase): void;
366
+ /**
367
+ * When returning true the callLoaded method will be run in setTimeout
368
+ * Method is intended to be overridden by inheritors and used as "protected"
369
+ */
214
370
  _shouldDelayLayout(): boolean;
371
+ /**
372
+ * Unload view.
373
+ * @param view to unload.
374
+ */
215
375
  unloadView(view: ViewBase): void;
216
376
  /**
217
377
  * Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
@@ -221,18 +381,50 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
221
381
  * Method is intended to be overridden by inheritors and used as "protected"
222
382
  */
223
383
  _removeViewCore(view: ViewBase): void;
384
+ /**
385
+ * Creates a native view.
386
+ * Returns either android.view.View or UIView.
387
+ */
224
388
  createNativeView(): Object;
389
+ /**
390
+ * Clean up references to the native view.
391
+ */
225
392
  disposeNativeView(): void;
393
+ /**
394
+ * Initializes properties/listeners of the native view.
395
+ */
226
396
  initNativeView(): void;
397
+ /**
398
+ * Resets properties/listeners set to the native view.
399
+ */
227
400
  resetNativeView(): void;
228
401
  private resetNativeViewInternal;
229
402
  _setupAsRootView(context: any): void;
403
+ /**
404
+ * Setups the UI for ViewBase and all its children recursively.
405
+ * This method should *not* be overridden by derived views.
406
+ */
230
407
  _setupUI(context: any, atIndex?: number, parentIsLoaded?: boolean): void;
408
+ /**
409
+ * Set the nativeView field performing extra checks and updates to the native properties on the new view.
410
+ * Use in cases where the createNativeView is not suitable.
411
+ * As an example use in item controls where the native parent view will create the native views for child items.
412
+ */
231
413
  setNativeView(value: any): void;
414
+ /**
415
+ * Tears down the UI of a reusable node by making it no longer reusable.
416
+ * @see _tearDownUI
417
+ * @param forceDestroyChildren Force destroy the children (even if they are reusable)
418
+ */
232
419
  destroyNode(forceDestroyChildren?: boolean): void;
420
+ /**
421
+ * Tears down the UI for ViewBase and all its children recursively.
422
+ * This method should *not* be overridden by derived views.
423
+ */
233
424
  _tearDownUI(force?: boolean): void;
234
425
  _childIndexToNativeChildIndex(index?: number): number;
235
426
  /**
427
+ * Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.
236
428
  * Method is intended to be overridden by inheritors and used as "protected".
237
429
  */
238
430
  _addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean;
@@ -256,11 +448,37 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
256
448
  _parentChanged(oldParent: ViewBase): void;
257
449
  onResumeNativeUpdates(): void;
258
450
  toString(): string;
451
+ /**
452
+ * @private
453
+ * Notifies each child's css state for change, recursively.
454
+ * Either the style scope, className or id properties were changed.
455
+ */
259
456
  _onCssStateChange(): void;
260
457
  _inheritStyleScope(styleScope: ssm.StyleScope): void;
261
- showModal(...args: any[]): ViewBase;
458
+ /**
459
+ * Shows the view passed as parameter as a modal view.
460
+ * @param view - View instance to be shown modally.
461
+ * @param modalOptions - A ShowModalOptions instance
462
+ */
463
+ showModal(view: ViewBase, modalOptions?: ShowModalOptions): ViewBase;
464
+ /**
465
+ * Shows the View contained in moduleName as a modal view.
466
+ * @param moduleName - The name of the module to load starting from the application root.
467
+ * @param modalOptions - A ShowModalOptions instance
468
+ */
469
+ showModal(moduleName: string, modalOptions?: ShowModalOptions): ViewBase;
470
+ /**
471
+ * Closes the current modal view that this page is showing.
472
+ * @param context - Any context you want to pass back to the host when closing the modal view.
473
+ */
262
474
  closeModal(...args: any[]): void;
475
+ /**
476
+ * Method is intended to be overridden by inheritors and used as "protected"
477
+ */
263
478
  _dialogClosed(): void;
479
+ /**
480
+ * Method is intended to be overridden by inheritors and used as "protected"
481
+ */
264
482
  _onRootViewReset(): void;
265
483
  }
266
484
  export declare const bindingContextProperty: InheritedProperty<ViewBaseDefinition, any>;