@nativescript/core 9.0.0-next-07-26-2025-16544379102 → 9.0.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/accessibility/accessibility-common.d.ts +264 -0
  2. package/accessibility/accessibility-common.js +352 -0
  3. package/accessibility/accessibility-common.js.map +1 -1
  4. package/accessibility/accessibility-properties.d.ts +1 -1
  5. package/accessibility/accessibility-properties.js +2 -2
  6. package/accessibility/accessibility-properties.js.map +1 -1
  7. package/accessibility/index.d.ts +0 -36
  8. package/accessibility/index.js +2 -0
  9. package/accessibility/index.js.map +1 -0
  10. package/application/application-common.d.ts +6 -8
  11. package/application/application-common.js +21 -14
  12. package/application/application-common.js.map +1 -1
  13. package/application/application-interfaces.d.ts +2 -3
  14. package/application/application.android.d.ts +14 -7
  15. package/application/application.android.js +754 -75
  16. package/application/application.android.js.map +1 -1
  17. package/application/application.d.ts +25 -0
  18. package/application/application.ios.d.ts +16 -18
  19. package/application/application.ios.js +455 -45
  20. package/application/application.ios.js.map +1 -1
  21. package/application/helpers-common.d.ts +50 -0
  22. package/application/helpers-common.js +153 -0
  23. package/application/helpers-common.js.map +1 -0
  24. package/application/helpers.android.d.ts +17 -0
  25. package/application/helpers.android.js +173 -0
  26. package/application/helpers.android.js.map +1 -0
  27. package/application/helpers.d.ts +25 -0
  28. package/application/helpers.ios.d.ts +27 -0
  29. package/application/helpers.ios.js +62 -0
  30. package/application/helpers.ios.js.map +1 -0
  31. package/application-settings/index.android.js +2 -2
  32. package/application-settings/index.android.js.map +1 -1
  33. package/color/color-common.d.ts +18 -19
  34. package/color/color-common.js +13 -14
  35. package/color/color-common.js.map +1 -1
  36. package/color/color-types.d.ts +49 -0
  37. package/color/color-types.js +3 -0
  38. package/color/color-types.js.map +1 -0
  39. package/color/index.ios.d.ts +2 -1
  40. package/color/index.ios.js.map +1 -1
  41. package/connectivity/index.android.js +5 -4
  42. package/connectivity/index.android.js.map +1 -1
  43. package/core-types/animation-types.d.ts +11 -0
  44. package/{ui/animation/animation-interfaces.js → core-types/animation-types.js} +1 -1
  45. package/core-types/animation-types.js.map +1 -0
  46. package/core-types/index.d.ts +1 -1
  47. package/core-types/index.js +2 -2
  48. package/core-types/index.js.map +1 -1
  49. package/core-types/validators.d.ts +2 -0
  50. package/core-types/validators.js +18 -0
  51. package/core-types/validators.js.map +1 -0
  52. package/css/css-tree-parser.js +17 -21
  53. package/css/css-tree-parser.js.map +1 -1
  54. package/css/lib/parse/index.d.ts +1 -0
  55. package/css/lib/parse/index.js +475 -577
  56. package/css/lib/parse/index.js.map +1 -0
  57. package/css/reworkcss.d.ts +25 -28
  58. package/css/reworkcss.js +5 -1
  59. package/css/reworkcss.js.map +1 -0
  60. package/css-mediaquery/index.js +1 -1
  61. package/css-mediaquery/index.js.map +1 -1
  62. package/css-value/reworkcss-value.d.ts +31 -8
  63. package/css-value/reworkcss-value.js +89 -111
  64. package/css-value/reworkcss-value.js.map +1 -0
  65. package/debugger/devtools-elements-interfaces.d.ts +1 -1
  66. package/debugger/devtools-elements.common.js +17 -8
  67. package/debugger/devtools-elements.common.js.map +1 -1
  68. package/debugger/devtools-elements.js +1 -1
  69. package/debugger/devtools-elements.js.map +1 -1
  70. package/debugger/dom-types.d.ts +24 -0
  71. package/debugger/{dom-node.js → dom-types.js} +11 -9
  72. package/debugger/dom-types.js.map +1 -0
  73. package/debugger/webinspector-css.d.ts +18 -18
  74. package/debugger/webinspector-css.js +1 -1
  75. package/debugger/webinspector-css.js.map +1 -1
  76. package/debugger/webinspector-dom.d.ts +15 -15
  77. package/debugger/webinspector-dom.js +1 -1
  78. package/debugger/webinspector-dom.js.map +1 -1
  79. package/debugger/webinspector-network.android.d.ts +9 -9
  80. package/debugger/webinspector-network.android.js +3 -3
  81. package/debugger/webinspector-network.android.js.map +1 -1
  82. package/debugger/webinspector-network.ios.d.ts +9 -9
  83. package/debugger/webinspector-network.ios.js +1 -1
  84. package/debugger/webinspector-network.ios.js.map +1 -1
  85. package/fetch/index.d.ts +72 -0
  86. package/fetch/index.js +448 -458
  87. package/fetch/index.js.map +1 -0
  88. package/file-system/file-system-access.android.js +32 -39
  89. package/file-system/file-system-access.android.js.map +1 -1
  90. package/file-system/file-system-access.ios.js +2 -15
  91. package/file-system/file-system-access.ios.js.map +1 -1
  92. package/file-system/index.d.ts +2 -2
  93. package/file-system/index.js +4 -11
  94. package/file-system/index.js.map +1 -1
  95. package/fps-meter/fps-native.android.d.ts +1 -2
  96. package/fps-meter/fps-native.android.js.map +1 -1
  97. package/fps-meter/fps-native.ios.d.ts +1 -2
  98. package/fps-meter/fps-native.ios.js.map +1 -1
  99. package/global-types.d.ts +7 -8
  100. package/globals/global-utils.d.ts +27 -0
  101. package/globals/global-utils.js +67 -0
  102. package/globals/global-utils.js.map +1 -0
  103. package/globals/index.d.ts +3 -7
  104. package/globals/index.js +276 -281
  105. package/globals/index.js.map +1 -1
  106. package/http/http-interfaces.d.ts +84 -0
  107. package/http/http-interfaces.js +6 -0
  108. package/http/http-interfaces.js.map +1 -0
  109. package/http/http-request/http-request-common.js +2 -2
  110. package/http/http-request/http-request-common.js.map +1 -1
  111. package/http/http-request/index.android.d.ts +3 -7
  112. package/http/http-request/index.android.js +6 -22
  113. package/http/http-request/index.android.js.map +1 -1
  114. package/http/http-request/index.d.ts +5 -1
  115. package/http/http-request/index.ios.d.ts +3 -7
  116. package/http/http-request/index.ios.js +6 -22
  117. package/http/http-request/index.ios.js.map +1 -1
  118. package/http/http-shared.d.ts +5 -0
  119. package/http/http-shared.js +14 -0
  120. package/http/http-shared.js.map +1 -0
  121. package/http/index.d.ts +6 -105
  122. package/http/index.js +10 -12
  123. package/http/index.js.map +1 -1
  124. package/image-asset/index.android.js +3 -3
  125. package/image-asset/index.android.js.map +1 -1
  126. package/image-source/index.android.d.ts +1 -1
  127. package/image-source/index.android.js +5 -23
  128. package/image-source/index.android.js.map +1 -1
  129. package/image-source/index.ios.js +2 -9
  130. package/image-source/index.ios.js.map +1 -1
  131. package/index.d.ts +12 -8
  132. package/index.js +6 -3
  133. package/index.js.map +1 -1
  134. package/inspector_modules.d.ts +11 -0
  135. package/inspector_modules.js +111 -3
  136. package/inspector_modules.js.map +1 -1
  137. package/js-libs/easysax/easysax.js +5 -3
  138. package/media-query-list/index.js +7 -17
  139. package/media-query-list/index.js.map +1 -1
  140. package/module-name-resolver/helpers.d.ts +14 -0
  141. package/module-name-resolver/helpers.js +27 -0
  142. package/module-name-resolver/helpers.js.map +1 -0
  143. package/module-name-resolver/index.d.ts +12 -22
  144. package/module-name-resolver/index.js +6 -18
  145. package/module-name-resolver/index.js.map +1 -1
  146. package/module-name-resolver/non-bundle-workflow-compat.js +32 -23
  147. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  148. package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
  149. package/module-name-resolver/qualifier-matcher/index.js +5 -5
  150. package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
  151. package/package.json +5 -2
  152. package/platform/device/index.android.js +2 -2
  153. package/platform/device/index.android.js.map +1 -1
  154. package/platform/screen/index.android.js +2 -2
  155. package/platform/screen/index.android.js.map +1 -1
  156. package/platform/screen/index.ios.js +2 -2
  157. package/platform/screen/index.ios.js.map +1 -1
  158. package/profiling/index.js +2 -1
  159. package/profiling/index.js.map +1 -1
  160. package/ui/action-bar/action-bar-common.js +4 -2
  161. package/ui/action-bar/action-bar-common.js.map +1 -1
  162. package/ui/action-bar/index.android.js +7 -6
  163. package/ui/action-bar/index.android.js.map +1 -1
  164. package/ui/action-bar/index.ios.js +10 -11
  165. package/ui/action-bar/index.ios.js.map +1 -1
  166. package/ui/activity-indicator/index.ios.js +3 -4
  167. package/ui/activity-indicator/index.ios.js.map +1 -1
  168. package/ui/animation/animation-common.d.ts +4 -4
  169. package/ui/animation/animation-common.js +2 -3
  170. package/ui/animation/animation-common.js.map +1 -1
  171. package/ui/animation/{animation-interfaces.d.ts → animation-shared.d.ts} +39 -31
  172. package/ui/animation/animation-shared.js +4 -0
  173. package/ui/animation/animation-shared.js.map +1 -0
  174. package/ui/animation/animation-types.d.ts +1 -0
  175. package/ui/animation/animation-types.js +3 -0
  176. package/ui/animation/animation-types.js.map +1 -0
  177. package/ui/animation/index.android.d.ts +1 -2
  178. package/ui/animation/index.android.js +5 -5
  179. package/ui/animation/index.android.js.map +1 -1
  180. package/ui/animation/index.d.ts +2 -138
  181. package/ui/animation/index.ios.d.ts +1 -2
  182. package/ui/animation/index.ios.js +3 -3
  183. package/ui/animation/index.ios.js.map +1 -1
  184. package/ui/animation/keyframe-animation.d.ts +67 -118
  185. package/ui/animation/keyframe-animation.js +2 -2
  186. package/ui/animation/keyframe-animation.js.map +1 -1
  187. package/ui/builder/binding-builder.d.ts +12 -15
  188. package/ui/builder/component-builder/index.js +5 -5
  189. package/ui/builder/component-builder/index.js.map +1 -1
  190. package/ui/builder/index.d.ts +179 -59
  191. package/ui/builder/index.js +450 -10
  192. package/ui/builder/index.js.map +1 -1
  193. package/ui/button/index.android.js +2 -1
  194. package/ui/button/index.android.js.map +1 -1
  195. package/ui/core/bindable/bindable-types.d.ts +37 -0
  196. package/ui/core/bindable/bindable-types.js +3 -0
  197. package/ui/core/bindable/bindable-types.js.map +1 -0
  198. package/ui/core/bindable/index.d.ts +2 -38
  199. package/ui/core/bindable/index.js +1 -2
  200. package/ui/core/bindable/index.js.map +1 -1
  201. package/ui/core/properties/index.d.ts +4 -37
  202. package/ui/core/properties/index.js +6 -35
  203. package/ui/core/properties/index.js.map +1 -1
  204. package/ui/core/properties/property-shared.d.ts +35 -0
  205. package/ui/core/properties/property-shared.js +16 -0
  206. package/ui/core/properties/property-shared.js.map +1 -0
  207. package/ui/core/view/index.android.d.ts +2 -2
  208. package/ui/core/view/index.android.js +13 -10
  209. package/ui/core/view/index.android.js.map +1 -1
  210. package/ui/core/view/index.d.ts +1 -61
  211. package/ui/core/view/index.ios.d.ts +3 -3
  212. package/ui/core/view/index.ios.js +11 -11
  213. package/ui/core/view/index.ios.js.map +1 -1
  214. package/ui/core/view/view-common.d.ts +19 -16
  215. package/ui/core/view/view-common.js +12 -14
  216. package/ui/core/view/view-common.js.map +1 -1
  217. package/ui/core/view/view-helper/index.ios.d.ts +2 -1
  218. package/ui/core/view/view-helper/index.ios.js +3 -4
  219. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  220. package/ui/core/view/view-helper/view-helper-common.js +1 -3
  221. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  222. package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
  223. package/ui/core/view/view-helper/view-helper-shared.js +6 -0
  224. package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
  225. package/ui/core/view/view-interfaces.d.ts +54 -0
  226. package/ui/core/view/view-interfaces.js +2 -0
  227. package/ui/core/view/view-interfaces.js.map +1 -0
  228. package/ui/core/view-base/index.d.ts +22 -24
  229. package/ui/core/view-base/index.js +9 -30
  230. package/ui/core/view-base/index.js.map +1 -1
  231. package/ui/core/view-base/utils.d.ts +1 -0
  232. package/ui/core/view-base/utils.js +9 -0
  233. package/ui/core/view-base/utils.js.map +1 -0
  234. package/ui/dialogs/dialogs-common.js +3 -3
  235. package/ui/dialogs/dialogs-common.js.map +1 -1
  236. package/ui/dialogs/index.android.js +8 -7
  237. package/ui/dialogs/index.android.js.map +1 -1
  238. package/ui/dialogs/index.ios.js +2 -2
  239. package/ui/dialogs/index.ios.js.map +1 -1
  240. package/ui/embedding/index.android.d.ts +1 -1
  241. package/ui/embedding/index.d.ts +1 -1
  242. package/ui/frame/fragment.android.js +3 -2
  243. package/ui/frame/fragment.android.js.map +1 -1
  244. package/ui/frame/fragment.transitions.android.js.map +1 -1
  245. package/ui/frame/frame-common.d.ts +3 -3
  246. package/ui/frame/frame-common.js.map +1 -1
  247. package/ui/frame/{callbacks/fragment-callbacks.d.ts → frame-helper-for-android.d.ts} +20 -1
  248. package/ui/frame/{callbacks/fragment-callbacks.js → frame-helper-for-android.js} +52 -38
  249. package/ui/frame/frame-helper-for-android.js.map +1 -0
  250. package/ui/frame/frame-interfaces.d.ts +30 -4
  251. package/ui/frame/frame-interfaces.js.map +1 -1
  252. package/ui/frame/frame-stack.js.map +1 -1
  253. package/ui/frame/index.android.d.ts +21 -5
  254. package/ui/frame/index.android.js +296 -19
  255. package/ui/frame/index.android.js.map +1 -1
  256. package/ui/frame/index.d.ts +19 -60
  257. package/ui/frame/index.ios.d.ts +3 -2
  258. package/ui/frame/index.ios.js +5 -4
  259. package/ui/frame/index.ios.js.map +1 -1
  260. package/ui/gestures/gestures-common.d.ts +4 -273
  261. package/ui/gestures/gestures-common.js +3 -146
  262. package/ui/gestures/gestures-common.js.map +1 -1
  263. package/ui/gestures/gestures-types.d.ts +108 -0
  264. package/ui/gestures/gestures-types.js +40 -0
  265. package/ui/gestures/gestures-types.js.map +1 -0
  266. package/ui/gestures/index.android.d.ts +29 -1
  267. package/ui/gestures/index.android.js +4 -2
  268. package/ui/gestures/index.android.js.map +1 -1
  269. package/ui/gestures/index.d.ts +35 -0
  270. package/ui/gestures/index.ios.d.ts +35 -1
  271. package/ui/gestures/index.ios.js +3 -3
  272. package/ui/gestures/index.ios.js.map +1 -1
  273. package/ui/gestures/touch-manager.d.ts +1 -1
  274. package/ui/html-view/index.ios.js +3 -3
  275. package/ui/html-view/index.ios.js.map +1 -1
  276. package/ui/image/image-common.js +1 -1
  277. package/ui/image/image-common.js.map +1 -1
  278. package/ui/image/index.android.js +1 -1
  279. package/ui/image/index.android.js.map +1 -1
  280. package/ui/image-cache/index.ios.js +5 -11
  281. package/ui/image-cache/index.ios.js.map +1 -1
  282. package/ui/index.d.ts +10 -5
  283. package/ui/index.js +18 -3
  284. package/ui/index.js.map +1 -1
  285. package/ui/label/index.ios.js.map +1 -1
  286. package/ui/layouts/absolute-layout/absolute-layout-common.js +1 -1
  287. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  288. package/ui/layouts/absolute-layout/index.android.js +1 -1
  289. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  290. package/ui/layouts/absolute-layout/index.d.ts +1 -1
  291. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  292. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +2 -1
  293. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  294. package/ui/layouts/flexbox-layout/index.android.js +1 -1
  295. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  296. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  297. package/ui/layouts/layout-base.android.js +2 -1
  298. package/ui/layouts/layout-base.android.js.map +1 -1
  299. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  300. package/ui/layouts/wrap-layout/index.android.js +1 -1
  301. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  302. package/ui/layouts/wrap-layout/index.d.ts +1 -1
  303. package/ui/layouts/wrap-layout/wrap-layout-common.js +1 -1
  304. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  305. package/ui/list-view/index.android.d.ts +17 -1
  306. package/ui/list-view/index.android.js +402 -32
  307. package/ui/list-view/index.android.js.map +1 -1
  308. package/ui/list-view/index.d.ts +66 -1
  309. package/ui/list-view/index.ios.d.ts +24 -2
  310. package/ui/list-view/index.ios.js +385 -10
  311. package/ui/list-view/index.ios.js.map +1 -1
  312. package/ui/list-view/list-view-common.d.ts +15 -0
  313. package/ui/list-view/list-view-common.js +73 -1
  314. package/ui/list-view/list-view-common.js.map +1 -1
  315. package/ui/page/events.d.ts +6 -0
  316. package/ui/page/events.js +7 -0
  317. package/ui/page/events.js.map +1 -0
  318. package/ui/page/index.android.js +2 -1
  319. package/ui/page/index.android.js.map +1 -1
  320. package/ui/page/index.d.ts +1 -1
  321. package/ui/page/index.ios.js +4 -5
  322. package/ui/page/index.ios.js.map +1 -1
  323. package/ui/page/page-common.d.ts +3 -2
  324. package/ui/page/page-common.js +5 -4
  325. package/ui/page/page-common.js.map +1 -1
  326. package/ui/scroll-view/index.ios.js +3 -3
  327. package/ui/scroll-view/index.ios.js.map +1 -1
  328. package/ui/styling/background-common.js +0 -1
  329. package/ui/styling/background-common.js.map +1 -1
  330. package/ui/styling/background.android.d.ts +0 -6
  331. package/ui/styling/background.android.js +1 -53
  332. package/ui/styling/background.android.js.map +1 -1
  333. package/ui/styling/background.ios.js +2 -1
  334. package/ui/styling/background.ios.js.map +1 -1
  335. package/ui/styling/converters.d.ts +2 -2
  336. package/ui/styling/css-shadow.js.map +1 -1
  337. package/ui/styling/css-stroke.js.map +1 -1
  338. package/ui/styling/css-transform.d.ts +1 -1
  339. package/ui/styling/css-utils.js +1 -1
  340. package/ui/styling/css-utils.js.map +1 -1
  341. package/ui/styling/font.android.js +2 -2
  342. package/ui/styling/font.android.js.map +1 -1
  343. package/ui/styling/font.ios.js +10 -10
  344. package/ui/styling/font.ios.js.map +1 -1
  345. package/ui/styling/length-shared.d.ts +52 -0
  346. package/ui/styling/length-shared.js +173 -0
  347. package/ui/styling/length-shared.js.map +1 -0
  348. package/ui/styling/style/index.d.ts +1 -1
  349. package/ui/styling/style-properties.d.ts +58 -112
  350. package/ui/styling/style-properties.js +7 -93
  351. package/ui/styling/style-properties.js.map +1 -1
  352. package/ui/styling/style-scope.d.ts +85 -48
  353. package/ui/styling/style-scope.js +30 -36
  354. package/ui/styling/style-scope.js.map +1 -1
  355. package/ui/styling/styling-profile.d.ts +1 -0
  356. package/ui/styling/styling-profile.js +4 -0
  357. package/ui/styling/styling-profile.js.map +1 -0
  358. package/ui/styling/styling-shared.d.ts +3 -0
  359. package/ui/styling/styling-shared.js +6 -0
  360. package/ui/styling/styling-shared.js.map +1 -0
  361. package/ui/switch/index.ios.js +5 -5
  362. package/ui/switch/index.ios.js.map +1 -1
  363. package/ui/tab-view/index.android.js +6 -6
  364. package/ui/tab-view/index.android.js.map +1 -1
  365. package/ui/text-base/index.android.d.ts +1 -1
  366. package/ui/text-base/index.android.js +4 -4
  367. package/ui/text-base/index.android.js.map +1 -1
  368. package/ui/text-base/index.d.ts +1 -1
  369. package/ui/text-base/index.ios.js +5 -4
  370. package/ui/text-base/index.ios.js.map +1 -1
  371. package/ui/text-view/index.ios.js.map +1 -1
  372. package/ui/transition/fade-transition.ios.js +1 -1
  373. package/ui/transition/fade-transition.ios.js.map +1 -1
  374. package/ui/transition/index.ios.js +1 -1
  375. package/ui/transition/index.ios.js.map +1 -1
  376. package/ui/transition/modal-transition.ios.js +1 -1
  377. package/ui/transition/modal-transition.ios.js.map +1 -1
  378. package/ui/transition/page-transition.android.d.ts +1 -1
  379. package/ui/transition/page-transition.android.js +4 -4
  380. package/ui/transition/page-transition.android.js.map +1 -1
  381. package/ui/transition/page-transition.ios.js +1 -1
  382. package/ui/transition/page-transition.ios.js.map +1 -1
  383. package/ui/transition/shared-transition-helper.ios.js +1 -1
  384. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  385. package/ui/transition/shared-transition.js +2 -1
  386. package/ui/transition/shared-transition.js.map +1 -1
  387. package/ui/transition/slide-transition.ios.js +2 -2
  388. package/ui/transition/slide-transition.ios.js.map +1 -1
  389. package/utils/animation-helpers.d.ts +27 -0
  390. package/utils/animation-helpers.js +48 -0
  391. package/utils/animation-helpers.js.map +1 -0
  392. package/utils/common.d.ts +1 -38
  393. package/utils/common.js +2 -112
  394. package/utils/common.js.map +1 -1
  395. package/utils/debug-source.d.ts +19 -0
  396. package/utils/debug-source.js +78 -0
  397. package/utils/debug-source.js.map +1 -0
  398. package/utils/debug.js +1 -59
  399. package/utils/debug.js.map +1 -1
  400. package/utils/index.android.d.ts +3 -1
  401. package/utils/index.android.js +37 -11
  402. package/utils/index.android.js.map +1 -1
  403. package/utils/index.d.ts +2 -14
  404. package/utils/index.ios.d.ts +4 -1
  405. package/utils/index.ios.js +32 -5
  406. package/utils/index.ios.js.map +1 -1
  407. package/utils/layout-helper/index.android.js +4 -4
  408. package/utils/layout-helper/index.android.js.map +1 -1
  409. package/utils/layout-helper/index.d.ts +6 -4
  410. package/utils/layout-helper/index.ios.js +5 -5
  411. package/utils/layout-helper/index.ios.js.map +1 -1
  412. package/utils/layout-helper/layout-helper-common.d.ts +0 -9
  413. package/utils/layout-helper/layout-helper-common.js +1 -9
  414. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  415. package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
  416. package/utils/layout-helper/layout-helper-shared.js +13 -0
  417. package/utils/layout-helper/layout-helper-shared.js.map +1 -0
  418. package/utils/{android/index.d.ts → native-helper-for-android.d.ts} +4 -2
  419. package/utils/native-helper-for-android.js +273 -0
  420. package/utils/native-helper-for-android.js.map +1 -0
  421. package/utils/native-helper.android.d.ts +29 -5
  422. package/utils/native-helper.android.js +18 -131
  423. package/utils/native-helper.android.js.map +1 -1
  424. package/utils/native-helper.d.ts +206 -258
  425. package/utils/native-helper.ios.d.ts +72 -3
  426. package/utils/native-helper.ios.js +250 -3
  427. package/utils/native-helper.ios.js.map +1 -1
  428. package/utils/shared.d.ts +17 -0
  429. package/utils/shared.js +40 -0
  430. package/utils/shared.js.map +1 -0
  431. package/utils/utils-shared.d.ts +1 -0
  432. package/utils/utils-shared.js +8 -0
  433. package/utils/utils-shared.js.map +1 -0
  434. package/xhr/index.js +12 -13
  435. package/xhr/index.js.map +1 -1
  436. package/xml/index.d.ts +94 -98
  437. package/xml/index.js +58 -2
  438. package/xml/index.js.map +1 -1
  439. package/accessibility/accessibility-css-helper.d.ts +0 -1
  440. package/accessibility/accessibility-css-helper.js +0 -101
  441. package/accessibility/accessibility-css-helper.js.map +0 -1
  442. package/accessibility/accessibility-service-common.d.ts +0 -8
  443. package/accessibility/accessibility-service-common.js +0 -26
  444. package/accessibility/accessibility-service-common.js.map +0 -1
  445. package/accessibility/accessibility-service.android.d.ts +0 -6
  446. package/accessibility/accessibility-service.android.js +0 -103
  447. package/accessibility/accessibility-service.android.js.map +0 -1
  448. package/accessibility/accessibility-service.d.ts +0 -10
  449. package/accessibility/accessibility-service.ios.d.ts +0 -6
  450. package/accessibility/accessibility-service.ios.js +0 -61
  451. package/accessibility/accessibility-service.ios.js.map +0 -1
  452. package/accessibility/accessibility-types.d.ts +0 -224
  453. package/accessibility/accessibility-types.js +0 -222
  454. package/accessibility/accessibility-types.js.map +0 -1
  455. package/accessibility/font-scale-common.d.ts +0 -7
  456. package/accessibility/font-scale-common.js +0 -14
  457. package/accessibility/font-scale-common.js.map +0 -1
  458. package/accessibility/font-scale.android.d.ts +0 -5
  459. package/accessibility/font-scale.android.js +0 -55
  460. package/accessibility/font-scale.android.js.map +0 -1
  461. package/accessibility/font-scale.d.ts +0 -9
  462. package/accessibility/font-scale.ios.d.ts +0 -5
  463. package/accessibility/font-scale.ios.js +0 -89
  464. package/accessibility/font-scale.ios.js.map +0 -1
  465. package/accessibility/index.android.d.ts +0 -10
  466. package/accessibility/index.android.js +0 -577
  467. package/accessibility/index.android.js.map +0 -1
  468. package/accessibility/index.ios.d.ts +0 -9
  469. package/accessibility/index.ios.js +0 -229
  470. package/accessibility/index.ios.js.map +0 -1
  471. package/css/package.json +0 -36
  472. package/css-value/package.json +0 -23
  473. package/debugger/dom-node.d.ts +0 -27
  474. package/debugger/dom-node.js.map +0 -1
  475. package/ui/animation/animation-interfaces.js.map +0 -1
  476. package/ui/builder/xml2ui.d.ts +0 -134
  477. package/ui/builder/xml2ui.js +0 -397
  478. package/ui/builder/xml2ui.js.map +0 -1
  479. package/ui/frame/callbacks/activity-callbacks.d.ts +0 -19
  480. package/ui/frame/callbacks/activity-callbacks.js +0 -301
  481. package/ui/frame/callbacks/activity-callbacks.js.map +0 -1
  482. package/ui/frame/callbacks/fragment-callbacks.js.map +0 -1
  483. package/utils/android/index.js +0 -160
  484. package/utils/android/index.js.map +0 -1
  485. package/utils/ios/index.d.ts +0 -39
  486. package/utils/ios/index.js +0 -229
  487. package/utils/ios/index.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  import { Color } from '../../color';
3
3
  import { CoreTypes } from '../../core-types';
4
4
  import { EventData } from '../../data/observable';
5
- import { Length } from '../styling/style-properties';
5
+ import { Length } from '../styling/length-shared';
6
6
  import { Style } from '../styling/style';
7
7
  import { Property, CssProperty } from '../core/properties';
8
8
 
@@ -99,6 +99,46 @@ export class ListView extends View {
99
99
  */
100
100
  iosEstimatedRowHeight: CoreTypes.LengthType;
101
101
 
102
+ /**
103
+ * Gets or sets a value indicating whether the ListView should display sticky headers.
104
+ * When enabled, headers will remain visible at the top while scrolling through sections.
105
+ *
106
+ * @nsProperty
107
+ */
108
+ stickyHeader: boolean;
109
+
110
+ /**
111
+ * Gets or sets the template for sticky headers.
112
+ *
113
+ * @nsProperty
114
+ */
115
+ stickyHeaderTemplate: string | Template;
116
+
117
+ /**
118
+ * Gets or sets the height of sticky headers.
119
+ *
120
+ * @nsProperty
121
+ */
122
+ stickyHeaderHeight: CoreTypes.LengthType;
123
+
124
+ /**
125
+ * Gets or sets a value indicating whether the ListView should show default top padding above section headers.
126
+ * When set to false (default), removes iOS default spacing for a tighter layout.
127
+ * When set to true, preserves iOS default ~4-5px spacing above section headers.
128
+ *
129
+ * @nsProperty
130
+ */
131
+ stickyHeaderTopPadding: boolean;
132
+
133
+ /**
134
+ * Gets or sets a value indicating whether the ListView should treat items as sectioned data.
135
+ * When enabled, items array should contain objects with 'items' property for section content.
136
+ * Each section will have its own sticky header.
137
+ *
138
+ * @nsProperty
139
+ */
140
+ sectioned: boolean;
141
+
102
142
  /**
103
143
  * Forces the ListView to reload all its items.
104
144
  */
@@ -230,3 +270,28 @@ export const iosEstimatedRowHeightProperty: Property<ListView, CoreTypes.LengthT
230
270
  * Backing property for separator color property.
231
271
  */
232
272
  export const separatorColorProperty: CssProperty<Style, Color>;
273
+
274
+ /**
275
+ * Represents the observable property backing the stickyHeader property of each ListView instance.
276
+ */
277
+ export const stickyHeaderProperty: Property<ListView, boolean>;
278
+
279
+ /**
280
+ * Represents the sticky header template property of each ListView instance.
281
+ */
282
+ export const stickyHeaderTemplateProperty: Property<ListView, string | Template>;
283
+
284
+ /**
285
+ * Represents the observable property backing the stickyHeaderHeight property of each ListView instance.
286
+ */
287
+ export const stickyHeaderHeightProperty: Property<ListView, CoreTypes.LengthType>;
288
+
289
+ /**
290
+ * Represents the observable property backing the stickyHeaderTopPadding property of each ListView instance.
291
+ */
292
+ export const stickyHeaderTopPaddingProperty: Property<ListView, boolean>;
293
+
294
+ /**
295
+ * Represents the observable property backing the sectioned property of each ListView instance.
296
+ */
297
+ export const sectionedProperty: Property<ListView, boolean>;
@@ -1,6 +1,6 @@
1
- import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty } from './list-view-common';
1
+ import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty, stickyHeaderProperty, stickyHeaderTemplateProperty, stickyHeaderHeightProperty, sectionedProperty } from './list-view-common';
2
2
  import { CoreTypes } from '../../core-types';
3
- import { View, KeyedTemplate } from '../core/view';
3
+ import { View, KeyedTemplate, Template } from '../core/view';
4
4
  import { Color } from '../../color';
5
5
  export * from './list-view-common';
6
6
  declare class ListViewCell extends UITableViewCell {
@@ -10,6 +10,13 @@ declare class ListViewCell extends UITableViewCell {
10
10
  get view(): View;
11
11
  owner: WeakRef<View>;
12
12
  }
13
+ declare class ListViewHeaderCell extends UITableViewHeaderFooterView {
14
+ static initWithEmptyBackground(): ListViewHeaderCell;
15
+ initWithReuseIdentifier(reuseIdentifier: string): this;
16
+ willMoveToSuperview(newSuperview: UIView): void;
17
+ get view(): View;
18
+ owner: WeakRef<View>;
19
+ }
13
20
  export declare class ListView extends ListViewBase {
14
21
  [separatorColorProperty.getDefault]: () => UIColor;
15
22
  [separatorColorProperty.setNative]: (value: Color | UIColor) => void;
@@ -17,6 +24,14 @@ export declare class ListView extends ListViewBase {
17
24
  [itemTemplatesProperty.setNative]: (value: KeyedTemplate[]) => void;
18
25
  [iosEstimatedRowHeightProperty.getDefault]: () => CoreTypes.LengthType;
19
26
  [iosEstimatedRowHeightProperty.setNative]: (value: CoreTypes.LengthType) => void;
27
+ [stickyHeaderProperty.getDefault]: () => boolean;
28
+ [stickyHeaderProperty.setNative]: (value: boolean) => void;
29
+ [stickyHeaderTemplateProperty.getDefault]: () => string | Template;
30
+ [stickyHeaderTemplateProperty.setNative]: (value: string | Template) => void;
31
+ [stickyHeaderHeightProperty.getDefault]: () => CoreTypes.LengthType;
32
+ [stickyHeaderHeightProperty.setNative]: (value: CoreTypes.LengthType) => void;
33
+ [sectionedProperty.getDefault]: () => boolean;
34
+ [sectionedProperty.setNative]: (value: boolean) => void;
20
35
  nativeViewProtected: UITableView;
21
36
  private _dataSource;
22
37
  private _delegate;
@@ -24,6 +39,9 @@ export declare class ListView extends ListViewBase {
24
39
  private _preparingCell;
25
40
  private _isDataDirty;
26
41
  private _map;
42
+ private _headerMap;
43
+ private _preparingHeader;
44
+ private _headerTemplateCache;
27
45
  widthMeasureSpec: number;
28
46
  constructor();
29
47
  createNativeView(): UITableView;
@@ -49,4 +67,8 @@ export declare class ListView extends ListViewBase {
49
67
  private _layoutCell;
50
68
  _prepareCell(cell: ListViewCell, indexPath: NSIndexPath): number;
51
69
  _removeContainer(cell: ListViewCell): void;
70
+ _prepareHeader(headerCell: ListViewHeaderCell, section: number): number;
71
+ private _layoutHeader;
72
+ private _getHeaderTemplate;
73
+ _removeHeaderContainer(headerCell: ListViewHeaderCell): void;
52
74
  }
@@ -1,6 +1,6 @@
1
- import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty } from './list-view-common';
1
+ import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty, stickyHeaderProperty, stickyHeaderTemplateProperty, stickyHeaderHeightProperty, sectionedProperty } from './list-view-common';
2
2
  import { View } from '../core/view';
3
- import { Length } from '../styling/style-properties';
3
+ import { Length } from '../styling/length-shared';
4
4
  import { Observable } from '../../data/observable';
5
5
  import { Color } from '../../color';
6
6
  import { layout } from '../../utils';
@@ -8,6 +8,9 @@ import { StackLayout } from '../layouts/stack-layout';
8
8
  import { ProxyViewContainer } from '../proxy-view-container';
9
9
  import { profile } from '../../profiling';
10
10
  import { Trace } from '../../trace';
11
+ import { Builder } from '../builder';
12
+ import { Label } from '../label';
13
+ import { isFunction } from '../../utils/types';
11
14
  export * from './list-view-common';
12
15
  const ITEMLOADING = ListViewBase.itemLoadingEvent;
13
16
  const LOADMOREITEMS = ListViewBase.loadMoreItemsEvent;
@@ -48,6 +51,40 @@ var ListViewCell = /** @class */ (function (_super) {
48
51
  });
49
52
  return ListViewCell;
50
53
  }(UITableViewCell));
54
+ var ListViewHeaderCell = /** @class */ (function (_super) {
55
+ __extends(ListViewHeaderCell, _super);
56
+ function ListViewHeaderCell() {
57
+ return _super !== null && _super.apply(this, arguments) || this;
58
+ }
59
+ ListViewHeaderCell.initWithEmptyBackground = function () {
60
+ var cell = ListViewHeaderCell.new();
61
+ // Clear background by default - this will make headers transparent
62
+ cell.backgroundColor = UIColor.clearColor;
63
+ return cell;
64
+ };
65
+ ListViewHeaderCell.prototype.initWithReuseIdentifier = function (reuseIdentifier) {
66
+ var cell = _super.prototype.initWithReuseIdentifier.call(this, reuseIdentifier);
67
+ // Clear background by default - this will make headers transparent
68
+ cell.backgroundColor = UIColor.clearColor;
69
+ return cell;
70
+ };
71
+ ListViewHeaderCell.prototype.willMoveToSuperview = function (newSuperview) {
72
+ var parent = (this.view ? this.view.parent : null);
73
+ // When inside ListView and there is no newSuperview this header is
74
+ // removed from native visual tree so we remove it from our tree too.
75
+ if (parent && !newSuperview) {
76
+ parent._removeHeaderContainer(this);
77
+ }
78
+ };
79
+ Object.defineProperty(ListViewHeaderCell.prototype, "view", {
80
+ get: function () {
81
+ return this.owner ? this.owner.deref() : null;
82
+ },
83
+ enumerable: true,
84
+ configurable: true
85
+ });
86
+ return ListViewHeaderCell;
87
+ }(UITableViewHeaderFooterView));
51
88
  function notifyForItemAtIndex(listView, cell, view, eventName, indexPath) {
52
89
  const args = {
53
90
  eventName: eventName,
@@ -70,10 +107,30 @@ var DataSource = /** @class */ (function (_super) {
70
107
  dataSource._owner = owner;
71
108
  return dataSource;
72
109
  };
110
+ DataSource.prototype.numberOfSectionsInTableView = function (tableView) {
111
+ var _a;
112
+ var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
113
+ if (!owner) {
114
+ return 1;
115
+ }
116
+ var sections = owner._getSectionCount();
117
+ if (Trace.isEnabled()) {
118
+ Trace.write("ListView: numberOfSections = ".concat(sections, " (sectioned: ").concat(owner.sectioned, ")"), Trace.categories.Debug);
119
+ }
120
+ return sections;
121
+ };
73
122
  DataSource.prototype.tableViewNumberOfRowsInSection = function (tableView, section) {
74
123
  var _a;
75
124
  var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
76
- return owner && owner.items ? owner.items.length : 0;
125
+ if (!owner) {
126
+ return 0;
127
+ }
128
+ var sectionItems = owner._getItemsInSection(section);
129
+ var rowCount = sectionItems ? sectionItems.length : 0;
130
+ if (Trace.isEnabled()) {
131
+ Trace.write("ListView: numberOfRows in section ".concat(section, " = ").concat(rowCount), Trace.categories.Debug);
132
+ }
133
+ return rowCount;
77
134
  };
78
135
  DataSource.prototype.tableViewCellForRowAtIndexPath = function (tableView, indexPath) {
79
136
  var _a;
@@ -156,6 +213,46 @@ var UITableViewDelegateImpl = /** @class */ (function (_super) {
156
213
  }
157
214
  return layout.toDeviceIndependentPixels(height);
158
215
  };
216
+ UITableViewDelegateImpl.prototype.tableViewViewForHeaderInSection = function (tableView, section) {
217
+ var _a;
218
+ var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
219
+ if (!owner || !owner.stickyHeader || !owner.stickyHeaderTemplate) {
220
+ if (Trace.isEnabled()) {
221
+ Trace.write("ListView: No sticky header (stickyHeader: ".concat(owner === null || owner === void 0 ? void 0 : owner.stickyHeader, ", hasTemplate: ").concat(!!(owner === null || owner === void 0 ? void 0 : owner.stickyHeaderTemplate), ")"), Trace.categories.Debug);
222
+ }
223
+ return null;
224
+ }
225
+ if (Trace.isEnabled()) {
226
+ Trace.write("ListView: Creating sticky header", Trace.categories.Debug);
227
+ }
228
+ var headerReuseIdentifier = 'stickyHeader';
229
+ var headerCell = tableView.dequeueReusableHeaderFooterViewWithIdentifier(headerReuseIdentifier);
230
+ if (!headerCell) {
231
+ // Use proper iOS initialization for registered header cells
232
+ headerCell = ListViewHeaderCell.alloc().initWithReuseIdentifier(headerReuseIdentifier);
233
+ headerCell.backgroundColor = UIColor.clearColor;
234
+ }
235
+ owner._prepareHeader(headerCell, section);
236
+ return headerCell;
237
+ };
238
+ UITableViewDelegateImpl.prototype.tableViewHeightForHeaderInSection = function (tableView, section) {
239
+ var _a;
240
+ var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
241
+ if (!owner || !owner.stickyHeader) {
242
+ return 0;
243
+ }
244
+ var height;
245
+ if (owner.stickyHeaderHeight === 'auto') {
246
+ height = 44;
247
+ }
248
+ else {
249
+ height = layout.toDeviceIndependentPixels(Length.toDevicePixels(owner.stickyHeaderHeight, 44));
250
+ }
251
+ if (Trace.isEnabled()) {
252
+ Trace.write("ListView: Sticky header height: ".concat(height), Trace.categories.Debug);
253
+ }
254
+ return height;
255
+ };
159
256
  UITableViewDelegateImpl.ObjCProtocols = [UITableViewDelegate];
160
257
  return UITableViewDelegateImpl;
161
258
  }(NSObject));
@@ -200,6 +297,45 @@ var UITableViewRowHeightDelegateImpl = /** @class */ (function (_super) {
200
297
  }
201
298
  return layout.toDeviceIndependentPixels(owner._effectiveRowHeight);
202
299
  };
300
+ UITableViewRowHeightDelegateImpl.prototype.tableViewViewForHeaderInSection = function (tableView, section) {
301
+ var _a;
302
+ var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
303
+ if (!owner || !owner.stickyHeader || !owner.stickyHeaderTemplate) {
304
+ if (Trace.isEnabled()) {
305
+ Trace.write("ListView: No sticky header (stickyHeader: ".concat(owner === null || owner === void 0 ? void 0 : owner.stickyHeader, ", hasTemplate: ").concat(!!(owner === null || owner === void 0 ? void 0 : owner.stickyHeaderTemplate), ")"), Trace.categories.Debug);
306
+ }
307
+ return null;
308
+ }
309
+ if (Trace.isEnabled()) {
310
+ Trace.write("ListView: Creating sticky header", Trace.categories.Debug);
311
+ }
312
+ var headerReuseIdentifier = 'stickyHeader';
313
+ var headerCell = tableView.dequeueReusableHeaderFooterViewWithIdentifier(headerReuseIdentifier);
314
+ if (!headerCell) {
315
+ headerCell = ListViewHeaderCell.alloc().initWithReuseIdentifier(headerReuseIdentifier);
316
+ headerCell.backgroundColor = UIColor.clearColor;
317
+ }
318
+ owner._prepareHeader(headerCell, section);
319
+ return headerCell;
320
+ };
321
+ UITableViewRowHeightDelegateImpl.prototype.tableViewHeightForHeaderInSection = function (tableView, section) {
322
+ var _a;
323
+ var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
324
+ if (!owner || !owner.stickyHeader) {
325
+ return 0;
326
+ }
327
+ var height;
328
+ if (owner.stickyHeaderHeight === 'auto') {
329
+ height = 44;
330
+ }
331
+ else {
332
+ height = layout.toDeviceIndependentPixels(Length.toDevicePixels(owner.stickyHeaderHeight, 44));
333
+ }
334
+ if (Trace.isEnabled()) {
335
+ Trace.write("ListView: Sticky header height: ".concat(height), Trace.categories.Debug);
336
+ }
337
+ return height;
338
+ };
203
339
  UITableViewRowHeightDelegateImpl.ObjCProtocols = [UITableViewDelegate];
204
340
  return UITableViewRowHeightDelegateImpl;
205
341
  }(NSObject));
@@ -208,6 +344,7 @@ export class ListView extends ListViewBase {
208
344
  super();
209
345
  this.widthMeasureSpec = 0;
210
346
  this._map = new Map();
347
+ this._headerMap = new Map();
211
348
  this._heights = new Array();
212
349
  }
213
350
  createNativeView() {
@@ -217,10 +354,18 @@ export class ListView extends ListViewBase {
217
354
  super.initNativeView();
218
355
  const nativeView = this.nativeViewProtected;
219
356
  nativeView.registerClassForCellReuseIdentifier(ListViewCell.class(), this._defaultTemplate.key);
357
+ nativeView.registerClassForHeaderFooterViewReuseIdentifier(ListViewHeaderCell.class(), 'stickyHeader');
220
358
  nativeView.estimatedRowHeight = DEFAULT_HEIGHT;
221
359
  nativeView.rowHeight = UITableViewAutomaticDimension;
222
360
  nativeView.dataSource = this._dataSource = DataSource.initWithOwner(new WeakRef(this));
223
361
  this._delegate = UITableViewDelegateImpl.initWithOwner(new WeakRef(this));
362
+ // Control section header top padding (iOS 15+)
363
+ if (nativeView.respondsToSelector('setSectionHeaderTopPadding:')) {
364
+ if (!this.stickyHeaderTopPadding) {
365
+ nativeView.sectionHeaderTopPadding = 0;
366
+ }
367
+ // When stickyHeaderTopPadding is true, don't set the property to use iOS default
368
+ }
224
369
  this._setNativeClipToBounds();
225
370
  }
226
371
  disposeNativeView() {
@@ -247,12 +392,15 @@ export class ListView extends ListViewBase {
247
392
  return this.nativeViewProtected;
248
393
  }
249
394
  get _childrenCount() {
250
- return this._map.size;
395
+ return this._map.size + this._headerMap.size;
251
396
  }
252
397
  eachChildView(callback) {
253
398
  this._map.forEach((view, key) => {
254
399
  callback(view);
255
400
  });
401
+ this._headerMap.forEach((view, key) => {
402
+ callback(view);
403
+ });
256
404
  }
257
405
  scrollToIndex(index) {
258
406
  this._scrollToIndex(index, false);
@@ -286,6 +434,11 @@ export class ListView extends ListViewBase {
286
434
  view.bindingContext = null;
287
435
  }
288
436
  });
437
+ this._headerMap.forEach((view, nativeView, map) => {
438
+ if (!(view.bindingContext instanceof Observable)) {
439
+ view.bindingContext = null;
440
+ }
441
+ });
289
442
  if (this.isLoaded) {
290
443
  this.nativeViewProtected.reloadData();
291
444
  this.requestLayout();
@@ -324,8 +477,8 @@ export class ListView extends ListViewBase {
324
477
  super._onRowHeightPropertyChanged(oldValue, newValue);
325
478
  }
326
479
  requestLayout() {
327
- // When preparing cell don't call super - no need to invalidate our measure when cell desiredSize is changed.
328
- if (!this._preparingCell) {
480
+ // When preparing cell or header don't call super - no need to invalidate our measure when cell/header desiredSize is changed.
481
+ if (!this._preparingCell && !this._preparingHeader) {
329
482
  super.requestLayout();
330
483
  }
331
484
  }
@@ -343,6 +496,9 @@ export class ListView extends ListViewBase {
343
496
  this._map.forEach((childView, listViewCell) => {
344
497
  View.measureChild(this, childView, childView._currentWidthMeasureSpec, childView._currentHeightMeasureSpec);
345
498
  });
499
+ this._headerMap.forEach((childView, listViewHeaderCell) => {
500
+ View.measureChild(this, childView, childView._currentWidthMeasureSpec, childView._currentHeightMeasureSpec);
501
+ });
346
502
  }
347
503
  onLayout(left, top, right, bottom) {
348
504
  super.onLayout(left, top, right, bottom);
@@ -355,6 +511,12 @@ export class ListView extends ListViewBase {
355
511
  View.layoutChild(this, childView, 0, 0, width, cellHeight);
356
512
  }
357
513
  });
514
+ this._headerMap.forEach((childView, listViewHeaderCell) => {
515
+ const headerHeight = this.stickyHeaderHeight === 'auto' ? 44 : Length.toDevicePixels(this.stickyHeaderHeight, 44);
516
+ const width = layout.getMeasureSpecSize(this.widthMeasureSpec);
517
+ childView.iosOverflowSafeAreaEnabled = false;
518
+ View.layoutChild(this, childView, 0, 0, width, headerHeight);
519
+ });
358
520
  }
359
521
  _layoutCell(cellView, indexPath) {
360
522
  if (cellView) {
@@ -373,10 +535,21 @@ export class ListView extends ListViewBase {
373
535
  this._preparingCell = true;
374
536
  let view = cell.view;
375
537
  if (!view) {
376
- view = this._getItemTemplate(indexPath.row).createView();
538
+ if (this.sectioned) {
539
+ // For sectioned data, we need to calculate the absolute index for template selection
540
+ let absoluteIndex = 0;
541
+ for (let i = 0; i < indexPath.section; i++) {
542
+ absoluteIndex += this._getItemsInSection(i).length;
543
+ }
544
+ absoluteIndex += indexPath.row;
545
+ view = this._getItemTemplate(absoluteIndex).createView();
546
+ }
547
+ else {
548
+ view = this._getItemTemplate(indexPath.row).createView();
549
+ }
377
550
  }
378
551
  const args = notifyForItemAtIndex(this, cell, view, ITEMLOADING, indexPath);
379
- view = args.view || this._getDefaultItemContent(indexPath.row);
552
+ view = args.view || this._getDefaultItemContent(this.sectioned ? indexPath.row : indexPath.row);
380
553
  // Proxy containers should not get treated as layouts.
381
554
  // Wrap them in a real layout as well.
382
555
  if (view instanceof ProxyViewContainer) {
@@ -394,8 +567,15 @@ export class ListView extends ListViewBase {
394
567
  this._removeContainer(cell);
395
568
  cell.owner = new WeakRef(view);
396
569
  }
397
- this._prepareItem(view, indexPath.row);
398
- view._listViewItemIndex = indexPath.row;
570
+ if (this.sectioned) {
571
+ this._prepareItemInSection(view, indexPath.section, indexPath.row);
572
+ view._listViewItemIndex = indexPath.row; // Keep row index for compatibility
573
+ view._listViewSectionIndex = indexPath.section;
574
+ }
575
+ else {
576
+ this._prepareItem(view, indexPath.row);
577
+ view._listViewItemIndex = indexPath.row;
578
+ }
399
579
  this._map.set(cell, view);
400
580
  // We expect that views returned from itemLoading are new (e.g. not reused).
401
581
  if (view && !view.parent) {
@@ -423,6 +603,151 @@ export class ListView extends ListViewBase {
423
603
  this._preparingCell = preparing;
424
604
  this._map.delete(cell);
425
605
  }
606
+ _prepareHeader(headerCell, section) {
607
+ let headerHeight;
608
+ try {
609
+ this._preparingHeader = true;
610
+ let view = headerCell.view;
611
+ if (!view) {
612
+ view = this._getHeaderTemplate();
613
+ if (!view) {
614
+ if (Trace.isEnabled()) {
615
+ Trace.write(`ListView: Failed to create header view for section ${section}`, Trace.categories.Debug);
616
+ }
617
+ // Create a fallback view
618
+ const lbl = new Label();
619
+ lbl.text = `Section ${section}`;
620
+ view = lbl;
621
+ }
622
+ }
623
+ // Handle header cell reuse
624
+ if (!headerCell.view) {
625
+ headerCell.owner = new WeakRef(view);
626
+ }
627
+ else if (headerCell.view !== view) {
628
+ // Remove old view and set new one
629
+ headerCell.view.nativeViewProtected?.removeFromSuperview();
630
+ this._removeHeaderContainer(headerCell);
631
+ headerCell.owner = new WeakRef(view);
632
+ }
633
+ // Clear existing binding context and set new one
634
+ if (view.bindingContext) {
635
+ view.bindingContext = null;
636
+ }
637
+ if (this.sectioned) {
638
+ const sectionData = this._getSectionData(section);
639
+ if (sectionData) {
640
+ view.bindingContext = sectionData;
641
+ }
642
+ else {
643
+ // Fallback if section data is missing
644
+ view.bindingContext = { title: `Section ${section}`, section: section };
645
+ }
646
+ }
647
+ else {
648
+ view.bindingContext = this.bindingContext;
649
+ }
650
+ // Force immediate binding context evaluation
651
+ if (view && typeof view._onBindingContextChanged === 'function') {
652
+ view._onBindingContextChanged(null, view.bindingContext);
653
+ // Also trigger for child views
654
+ // @ts-ignore
655
+ if (view._childrenCount) {
656
+ view.eachChildView((child) => {
657
+ if (typeof child._onBindingContextChanged === 'function') {
658
+ child._onBindingContextChanged(null, view.bindingContext);
659
+ }
660
+ return true;
661
+ });
662
+ }
663
+ }
664
+ this._headerMap.set(headerCell, view);
665
+ // Add new header view to the cell
666
+ if (view && !view.parent) {
667
+ this._addView(view);
668
+ headerCell.contentView.addSubview(view.nativeViewProtected);
669
+ }
670
+ // Request layout and measure/layout the header
671
+ if (view && view.bindingContext) {
672
+ view.requestLayout();
673
+ }
674
+ headerHeight = this._layoutHeader(view);
675
+ }
676
+ finally {
677
+ this._preparingHeader = false;
678
+ }
679
+ return headerHeight;
680
+ }
681
+ _layoutHeader(headerView) {
682
+ if (headerView) {
683
+ const headerHeight = this.stickyHeaderHeight === 'auto' ? 44 : Length.toDevicePixels(this.stickyHeaderHeight, 44);
684
+ const heightMeasureSpec = layout.makeMeasureSpec(headerHeight, layout.EXACTLY);
685
+ const measuredSize = View.measureChild(this, headerView, this.widthMeasureSpec, heightMeasureSpec);
686
+ // Layout the header with the measured size
687
+ View.layoutChild(this, headerView, 0, 0, measuredSize.measuredWidth, measuredSize.measuredHeight);
688
+ return measuredSize.measuredHeight;
689
+ }
690
+ return 44;
691
+ }
692
+ _getHeaderTemplate() {
693
+ if (this.stickyHeaderTemplate) {
694
+ if (__UI_USE_EXTERNAL_RENDERER__) {
695
+ if (isFunction(this.stickyHeaderTemplate)) {
696
+ return this.stickyHeaderTemplate();
697
+ }
698
+ }
699
+ else {
700
+ if (typeof this.stickyHeaderTemplate === 'string') {
701
+ try {
702
+ const parsed = Builder.parse(this.stickyHeaderTemplate, this);
703
+ if (!parsed) {
704
+ // Create a simple fallback
705
+ const fallbackLabel = new Label();
706
+ fallbackLabel.text = 'Parse Failed';
707
+ return fallbackLabel;
708
+ }
709
+ return parsed;
710
+ }
711
+ catch (error) {
712
+ if (Trace.isEnabled()) {
713
+ Trace.write(`ListView: Template parsing error: ${error}`, Trace.categories.Debug);
714
+ }
715
+ // Create a simple fallback
716
+ const errorLabel = new Label();
717
+ errorLabel.text = 'Template Error';
718
+ return errorLabel;
719
+ }
720
+ }
721
+ else {
722
+ const view = this.stickyHeaderTemplate();
723
+ if (Trace.isEnabled()) {
724
+ Trace.write(`ListView: Created header view from template function: ${!!view} (type: ${view?.constructor?.name})`, Trace.categories.Debug);
725
+ }
726
+ return view;
727
+ }
728
+ }
729
+ }
730
+ if (Trace.isEnabled()) {
731
+ Trace.write(`ListView: No sticky header template, creating default`, Trace.categories.Debug);
732
+ }
733
+ // Return a default header if no template is provided
734
+ const lbl = new Label();
735
+ lbl.text = 'Default Header';
736
+ return lbl;
737
+ }
738
+ _removeHeaderContainer(headerCell) {
739
+ const view = headerCell.view;
740
+ // This is to clear the StackLayout that is used to wrap ProxyViewContainer instances.
741
+ if (!(view.parent instanceof ListView)) {
742
+ this._removeView(view.parent);
743
+ }
744
+ // No need to request layout when we are removing headers.
745
+ const preparing = this._preparingHeader;
746
+ this._preparingHeader = true;
747
+ view.parent._removeView(view);
748
+ this._preparingHeader = preparing;
749
+ this._headerMap.delete(headerCell);
750
+ }
426
751
  [separatorColorProperty.getDefault]() {
427
752
  return this.nativeViewProtected.separatorColor;
428
753
  }
@@ -450,6 +775,56 @@ export class ListView extends ListViewBase {
450
775
  const estimatedHeight = layout.toDeviceIndependentPixels(Length.toDevicePixels(value, 0));
451
776
  nativeView.estimatedRowHeight = estimatedHeight < 0 ? DEFAULT_HEIGHT : estimatedHeight;
452
777
  }
778
+ [stickyHeaderProperty.getDefault]() {
779
+ return false;
780
+ }
781
+ [stickyHeaderProperty.setNative](value) {
782
+ if (Trace.isEnabled()) {
783
+ Trace.write(`ListView: stickyHeader set to ${value}`, Trace.categories.Debug);
784
+ }
785
+ // Immediately refresh to apply changes
786
+ if (this.isLoaded) {
787
+ this.refresh();
788
+ }
789
+ }
790
+ [stickyHeaderTemplateProperty.getDefault]() {
791
+ return null;
792
+ }
793
+ [stickyHeaderTemplateProperty.setNative](value) {
794
+ if (Trace.isEnabled()) {
795
+ Trace.write(`ListView: stickyHeaderTemplate set: ${typeof value} ${value ? '(has value)' : '(null)'}`, Trace.categories.Debug);
796
+ }
797
+ // Clear any cached template
798
+ this._headerTemplateCache = null;
799
+ // Immediately refresh to apply changes
800
+ if (this.isLoaded) {
801
+ this.refresh();
802
+ }
803
+ }
804
+ [stickyHeaderHeightProperty.getDefault]() {
805
+ return 'auto';
806
+ }
807
+ [stickyHeaderHeightProperty.setNative](value) {
808
+ if (Trace.isEnabled()) {
809
+ Trace.write(`ListView: stickyHeaderHeight set to ${value}`, Trace.categories.Debug);
810
+ }
811
+ // Immediately refresh to apply changes
812
+ if (this.isLoaded) {
813
+ this.refresh();
814
+ }
815
+ }
816
+ [sectionedProperty.getDefault]() {
817
+ return false;
818
+ }
819
+ [sectionedProperty.setNative](value) {
820
+ if (Trace.isEnabled()) {
821
+ Trace.write(`ListView: sectioned set to ${value}`, Trace.categories.Debug);
822
+ }
823
+ // Immediately refresh to apply changes
824
+ if (this.isLoaded) {
825
+ this.refresh();
826
+ }
827
+ }
453
828
  }
454
829
  __decorate([
455
830
  profile,