@wavemaker/app-rn-runtime 11.4.0-next.25501 → 11.4.0-next.25701

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 (529) hide show
  1. app-rn-runtime/actions/base-action.js.map +1 -1
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js.map +1 -1
  4. app-rn-runtime/actions/navigation-action.js +14 -2
  5. app-rn-runtime/actions/navigation-action.js.map +1 -1
  6. app-rn-runtime/actions/notification-action.js +5 -4
  7. app-rn-runtime/actions/notification-action.js.map +1 -1
  8. app-rn-runtime/actions/timer-action.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
  13. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
  15. app-rn-runtime/components/advanced/carousel/carousel.component.js +2 -2
  16. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  18. app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
  19. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  20. app-rn-runtime/components/advanced/login/login.component.js +1 -1
  21. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
  23. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
  24. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  25. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
  26. app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
  27. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  28. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  29. app-rn-runtime/components/basic/anchor/anchor.component.js +2 -1
  30. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  31. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  32. app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
  33. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/animatedview.component.js +1 -3
  35. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  36. app-rn-runtime/components/basic/audio/audio.component.js +240 -0
  37. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
  38. app-rn-runtime/components/basic/audio/audio.props.js +15 -0
  39. app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
  40. app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
  41. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
  42. app-rn-runtime/components/basic/button/button.component.js +1 -1
  43. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  44. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  45. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  46. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
  47. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
  48. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
  49. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  50. app-rn-runtime/components/basic/custom/custom.component.js +25 -0
  51. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
  52. app-rn-runtime/components/basic/custom/custom.props.js +16 -0
  53. app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
  54. app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
  55. app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
  56. app-rn-runtime/components/basic/icon/icon.component.js +1 -1
  57. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  58. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  59. app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
  60. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  61. app-rn-runtime/components/basic/label/label.component.js +3 -2
  62. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  63. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  64. app-rn-runtime/components/basic/label/label.styles.js +8 -0
  65. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
  67. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
  68. app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
  69. app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
  70. app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
  71. app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
  72. app-rn-runtime/components/basic/message/message.component.js +1 -1
  73. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  74. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  75. app-rn-runtime/components/basic/message/message.styles.js +22 -0
  76. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  77. app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
  78. app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
  79. app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
  80. app-rn-runtime/components/basic/picture/picture.component.js +40 -29
  81. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  82. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  83. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  84. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
  85. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  86. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  87. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  88. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
  89. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  90. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  91. app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
  92. app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
  93. app-rn-runtime/components/basic/search/search.component.js +5 -2
  94. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  95. app-rn-runtime/components/basic/search/search.props.js +1 -0
  96. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  97. app-rn-runtime/components/basic/search/search.styles.js +47 -0
  98. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  99. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  100. app-rn-runtime/components/basic/spinner/spinner.component.js +13 -11
  101. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  102. app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
  103. app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
  104. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  105. app-rn-runtime/components/basic/video/video.component.js +56 -0
  106. app-rn-runtime/components/basic/video/video.component.js.map +1 -0
  107. app-rn-runtime/components/basic/video/video.props.js +22 -0
  108. app-rn-runtime/components/basic/video/video.props.js.map +1 -0
  109. app-rn-runtime/components/basic/video/video.styles.js +11 -0
  110. app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
  111. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  112. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  113. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  114. app-rn-runtime/components/chart/basechart.component.js +6 -2
  115. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  116. app-rn-runtime/components/chart/basechart.props.js +1 -0
  117. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  118. app-rn-runtime/components/chart/basechart.styles.js +17 -0
  119. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  120. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  121. app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
  122. app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
  123. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +0 -1
  124. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
  125. app-rn-runtime/components/chart/legend/legend.component.js +36 -0
  126. app-rn-runtime/components/chart/legend/legend.component.js.map +1 -0
  127. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  128. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  129. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +119 -40
  130. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  131. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -2
  132. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  133. app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
  134. app-rn-runtime/components/container/accordion/accordion.component.js +75 -119
  135. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  136. app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
  137. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  138. app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
  139. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  140. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +49 -8
  141. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  142. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
  143. app-rn-runtime/components/container/container.component.js +1 -1
  144. app-rn-runtime/components/container/container.component.js.map +1 -1
  145. app-rn-runtime/components/container/container.props.js.map +1 -1
  146. app-rn-runtime/components/container/container.styles.js.map +1 -1
  147. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
  148. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  149. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
  150. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
  151. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  152. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
  153. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
  154. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  155. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  156. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  157. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +2 -1
  158. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  159. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  160. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +3 -3
  161. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  162. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  163. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
  164. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  165. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
  166. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
  167. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  168. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
  169. app-rn-runtime/components/container/panel/panel.component.js +1 -1
  170. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  171. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  172. app-rn-runtime/components/container/panel/panel.styles.js +9 -0
  173. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  174. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  175. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +42 -9
  176. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  177. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  178. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +12 -2
  179. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  180. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +5 -2
  181. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  182. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  183. app-rn-runtime/components/container/tabs/tabs.component.js +84 -65
  184. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  185. app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
  186. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  187. app-rn-runtime/components/container/tabs/tabs.styles.js +40 -1
  188. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  189. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  190. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  191. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  192. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  193. app-rn-runtime/components/container/wizard/wizard.component.js +16 -7
  194. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  195. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  196. app-rn-runtime/components/container/wizard/wizard.styles.js +53 -1
  197. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  198. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  199. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  200. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  201. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  202. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  203. app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
  204. app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
  205. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  206. app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
  207. app-rn-runtime/components/data/card/card.component.js +1 -1
  208. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  209. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  210. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  211. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -6
  212. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  213. app-rn-runtime/components/data/form/form-action/form-action.props.js +3 -1
  214. app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
  215. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  216. app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
  217. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  218. app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
  219. app-rn-runtime/components/data/form/form-field/form-field.component.js +24 -3
  220. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  221. app-rn-runtime/components/data/form/form-field/form-field.props.js +8 -0
  222. app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
  223. app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
  224. app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
  225. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  226. app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
  227. app-rn-runtime/components/data/form/form.component.js +95 -34
  228. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  229. app-rn-runtime/components/data/form/form.props.js +2 -0
  230. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  231. app-rn-runtime/components/data/form/form.styles.js +6 -0
  232. app-rn-runtime/components/data/form/form.styles.js.map +1 -1
  233. app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
  234. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  235. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  236. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  237. app-rn-runtime/components/data/list/list.component.js +94 -24
  238. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  239. app-rn-runtime/components/data/list/list.props.js +2 -0
  240. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  241. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  242. app-rn-runtime/components/data/liveform/liveform.component.js +102 -0
  243. app-rn-runtime/components/data/liveform/liveform.component.js.map +1 -0
  244. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +3 -2
  245. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  246. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  247. app-rn-runtime/components/device/camera/camera.component.js +9 -4
  248. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  249. app-rn-runtime/components/device/camera/camera.props.js +0 -1
  250. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  251. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  252. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  253. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  254. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  255. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  256. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
  257. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  258. app-rn-runtime/components/dialogs/dialog/dialog.component.js +6 -3
  259. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  260. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  261. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  262. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  263. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
  264. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
  265. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  266. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
  267. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  268. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  269. app-rn-runtime/components/input/baseinput/baseinput.component.js +10 -3
  270. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  271. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  272. app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
  273. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  274. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  275. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  276. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  277. app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
  278. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
  279. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  280. app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
  281. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  282. app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
  283. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  284. app-rn-runtime/components/input/checkbox/checkbox.props.js +1 -1
  285. app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
  286. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  287. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
  288. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  289. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  290. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  291. app-rn-runtime/components/input/chips/chips.component.js +1 -0
  292. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  293. app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
  294. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  295. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  296. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  297. app-rn-runtime/components/input/currency/currency.component.js +6 -4
  298. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  299. app-rn-runtime/components/input/currency/currency.props.js +1 -1
  300. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  301. app-rn-runtime/components/input/currency/currency.styles.js +9 -0
  302. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  303. app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -3
  304. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  305. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  306. app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
  307. app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
  308. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  309. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  310. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  311. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  312. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
  313. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  314. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  315. app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
  316. app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
  317. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  318. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  319. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  320. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  321. app-rn-runtime/components/input/number/number.component.js +6 -13
  322. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  323. app-rn-runtime/components/input/number/number.props.js +1 -1
  324. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  325. app-rn-runtime/components/input/number/number.styles.js +5 -0
  326. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  327. app-rn-runtime/components/input/radioset/radioset.component.js +3 -41
  328. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  329. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  330. app-rn-runtime/components/input/radioset/radioset.styles.js +8 -0
  331. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  332. app-rn-runtime/components/input/rating/rating.component.js +2 -2
  333. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  334. app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
  335. app-rn-runtime/components/input/select/select.component.js +14 -2
  336. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  337. app-rn-runtime/components/input/select/select.props.js.map +1 -1
  338. app-rn-runtime/components/input/select/select.styles.js +18 -1
  339. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  340. app-rn-runtime/components/input/slider/slider.component.js +3 -2
  341. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  342. app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
  343. app-rn-runtime/components/input/switch/switch.component.js +19 -22
  344. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  345. app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
  346. app-rn-runtime/components/input/switch/switch.styles.js +43 -7
  347. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  348. app-rn-runtime/components/input/text/text.component.js +6 -13
  349. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  350. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  351. app-rn-runtime/components/input/text/text.styles.js +5 -0
  352. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  353. app-rn-runtime/components/input/textarea/textarea.component.js +5 -13
  354. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  355. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  356. app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
  357. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  358. app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
  359. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  360. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  361. app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
  362. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  363. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
  364. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  365. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  366. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  367. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  368. app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
  369. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  370. app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
  371. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  372. app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
  373. app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
  374. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  375. app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
  376. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  377. app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
  378. app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
  379. app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
  380. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  381. app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
  382. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  383. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  384. app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
  385. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  386. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  387. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  388. app-rn-runtime/components/page/content/content.component.js +1 -1
  389. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  390. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  391. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  392. app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
  393. app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
  394. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  395. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  396. app-rn-runtime/components/page/page.component.js +1 -1
  397. app-rn-runtime/components/page/page.component.js.map +1 -1
  398. app-rn-runtime/components/page/partial/partial.component.js +1 -1
  399. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  400. app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
  401. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  402. app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
  403. app-rn-runtime/components/page/partial-container/partial-container.styles.js +2 -1
  404. app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
  405. app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
  406. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  407. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  408. app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
  409. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  410. app-rn-runtime/core/asset.provider.js +5 -0
  411. app-rn-runtime/core/asset.provider.js.map +1 -0
  412. app-rn-runtime/core/base.component.js +141 -57
  413. app-rn-runtime/core/base.component.js.map +1 -1
  414. app-rn-runtime/core/components/textinput.component.js +37 -0
  415. app-rn-runtime/core/components/textinput.component.js.map +1 -0
  416. app-rn-runtime/core/device/camera-service.js.map +1 -1
  417. app-rn-runtime/core/device/scan-service.js.map +1 -1
  418. app-rn-runtime/core/display.manager.js.map +1 -1
  419. app-rn-runtime/core/event-notifier.js.map +1 -1
  420. app-rn-runtime/core/fixed-view.component.js.map +1 -1
  421. app-rn-runtime/core/formatters.js.map +1 -1
  422. app-rn-runtime/core/i18n.service.js +2 -0
  423. app-rn-runtime/core/i18n.service.js.map +1 -0
  424. app-rn-runtime/core/if.component.js +3 -3
  425. app-rn-runtime/core/if.component.js.map +1 -1
  426. app-rn-runtime/core/imageSizeEstimator.js +1 -0
  427. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  428. app-rn-runtime/core/injector.js +16 -1
  429. app-rn-runtime/core/injector.js.map +1 -1
  430. app-rn-runtime/core/logger.js +4 -1
  431. app-rn-runtime/core/logger.js.map +1 -1
  432. app-rn-runtime/core/modal.service.js.map +1 -1
  433. app-rn-runtime/core/navigation.service.js.map +1 -1
  434. app-rn-runtime/core/network.service.js +17 -15
  435. app-rn-runtime/core/network.service.js.map +1 -1
  436. app-rn-runtime/core/partial.service.js.map +1 -1
  437. app-rn-runtime/core/props.provider.js +1 -1
  438. app-rn-runtime/core/props.provider.js.map +1 -1
  439. app-rn-runtime/core/scroll-view.component.js.map +1 -1
  440. app-rn-runtime/core/security.service.js.map +1 -1
  441. app-rn-runtime/core/spinner.service.js.map +1 -1
  442. app-rn-runtime/core/storage.service.js.map +1 -1
  443. app-rn-runtime/core/tappable.component.js +20 -4
  444. app-rn-runtime/core/tappable.component.js.map +1 -1
  445. app-rn-runtime/core/toast.service.js.map +1 -1
  446. app-rn-runtime/core/utils.js +28 -0
  447. app-rn-runtime/core/utils.js.map +1 -1
  448. app-rn-runtime/core/viewport.js.map +1 -1
  449. app-rn-runtime/gestures/swipe.animation.js +110 -0
  450. app-rn-runtime/gestures/swipe.animation.js.map +1 -0
  451. app-rn-runtime/package.json +42 -41
  452. app-rn-runtime/runtime/App.js +38 -22
  453. app-rn-runtime/runtime/App.js.map +1 -1
  454. app-rn-runtime/runtime/App.navigator.js +13 -14
  455. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  456. app-rn-runtime/runtime/base-fragment.component.js +26 -11
  457. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  458. app-rn-runtime/runtime/base-page.component.js +2 -0
  459. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  460. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  461. app-rn-runtime/runtime/base-prefab.component.js +5 -7
  462. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  463. app-rn-runtime/runtime/lib-patch.js.map +1 -1
  464. app-rn-runtime/runtime/memo.component.js.map +1 -1
  465. app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
  466. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  467. app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
  468. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  469. app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
  470. app-rn-runtime/runtime/services/app-i18n.service.js +26 -3
  471. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  472. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  473. app-rn-runtime/runtime/services/app-security.service.js +7 -7
  474. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  475. app-rn-runtime/runtime/services/app-spinner.service.js +8 -3
  476. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  477. app-rn-runtime/runtime/services/app-toast.service.js +1 -1
  478. app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
  479. app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
  480. app-rn-runtime/runtime/services/device/camera-service.js +30 -9
  481. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  482. app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
  483. app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
  484. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  485. app-rn-runtime/runtime/services/device/scan-service.js +15 -14
  486. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  487. app-rn-runtime/runtime/services/partial.service.js.map +1 -1
  488. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  489. app-rn-runtime/runtime/watcher.js +3 -1
  490. app-rn-runtime/runtime/watcher.js.map +1 -1
  491. app-rn-runtime/styles/MediaQueryList.js.map +1 -1
  492. app-rn-runtime/styles/background.component.js +298 -0
  493. app-rn-runtime/styles/background.component.js.map +1 -0
  494. app-rn-runtime/styles/style-prop.validator.js +42 -8
  495. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  496. app-rn-runtime/styles/style-props.js +93 -0
  497. app-rn-runtime/styles/style-props.js.map +1 -0
  498. app-rn-runtime/styles/theme.js +18 -42
  499. app-rn-runtime/styles/theme.js.map +1 -1
  500. app-rn-runtime/styles/theme.variables.js +58 -2
  501. app-rn-runtime/styles/theme.variables.js.map +1 -1
  502. app-rn-runtime/variables/base-variable.js +3 -3
  503. app-rn-runtime/variables/base-variable.js.map +1 -1
  504. app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
  505. app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
  506. app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
  507. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  508. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  509. app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
  510. app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
  511. app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
  512. app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
  513. app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
  514. app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
  515. app-rn-runtime/variables/device/file/upload-file.operation.js +43 -21
  516. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  517. app-rn-runtime/variables/device/operation.provider.js.map +1 -1
  518. app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
  519. app-rn-runtime/variables/device-variable.js.map +1 -1
  520. app-rn-runtime/variables/http.service.js +10 -15
  521. app-rn-runtime/variables/http.service.js.map +1 -1
  522. app-rn-runtime/variables/live-variable.js +115 -0
  523. app-rn-runtime/variables/live-variable.js.map +1 -0
  524. app-rn-runtime/variables/model-variable.js.map +1 -1
  525. app-rn-runtime/variables/service-variable.js +33 -12
  526. app-rn-runtime/variables/service-variable.js.map +1 -1
  527. app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
  528. app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
  529. app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["BaseComponent","BaseComponentState","BaseProps","PartialHostState","PartialHostProps","PartialHost","constructor","markupProps","defaultClass","defaultProps","defaultState","onPartialLoad","invokeEventCallback","renderContent","props","renderPartial","state","isPartialLoaded","isVisible","setTimeout","updateState","bind","children"],"sources":["partial-host.component.tsx"],"sourcesContent":["import { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport abstract class PartialHostState<T extends BaseProps> extends BaseComponentState<T> {\n isPartialLoaded = false;\n}\n\nexport abstract class PartialHostProps extends BaseProps {\n renderPartial?: Function;\n children?: any;\n}\n\nexport abstract class PartialHost<T extends BaseProps, S extends PartialHostState<T>, L extends BaseStyles>\n extends BaseComponent<T, S, L> {\n\n constructor(markupProps: T, defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps, defaultClass, defaultProps, defaultState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: PartialHostProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded && !this.isVisible()) {\n return null;\n }\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as any);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n}"],"mappings":";;;AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,SAAS,QAAoB,+CAA+C;AAExH,OAAO,MAAeC,gBAAgB,SAA8BF,kBAAkB,CAAI;EAAA;IAAA;IAAA,yCACpE,KAAK;EAAA;AAC3B;AAEA,OAAO,MAAeG,gBAAgB,SAASF,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA;EAAA;AAGzD;AAEA,OAAO,MAAeG,WAAW,SACrBL,aAAa,CAAU;EAE/BM,WAAW,CAACC,WAAc,EAAEC,YAAoB,EAAEC,YAAgB,EAAEC,YAAgB,EAAE;IAClF,KAAK,CAACH,WAAW,EAAEC,YAAY,EAAEC,YAAY,EAAEC,YAAY,CAAC;EAChE;EAEAC,aAAa,GAAG;IACZ,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC9C;EAEAC,aAAa,CAACC,KAAuB,EAAE;IACnC,IAAIA,KAAK,CAACC,aAAa,EAAE;MACrB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,EAAE;QAClD,OAAO,IAAI;MACf;MACA,IAAI,CAAC,IAAI,CAACF,KAAK,CAACC,eAAe,EAAE;QAC7BE,UAAU,CAAC,MAAM;UACb,IAAI,CAACC,WAAW,CAAC;YACbH,eAAe,EAAE;UACrB,CAAC,CAAQ;QACb,CAAC,CAAC;MACN;MACA,OAAOH,KAAK,CAACC,aAAa,CAAC,IAAI,CAACJ,aAAa,CAACU,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D;IACA,OAAOP,KAAK,CAACQ,QAAQ;EACzB;AAEJ"}
1
+ {"version":3,"names":["BaseComponent","BaseComponentState","BaseProps","PartialHostState","constructor","arguments","_defineProperty","PartialHostProps","PartialHost","markupProps","defaultClass","defaultProps","defaultState","onPartialLoad","invokeEventCallback","renderContent","props","renderPartial","state","isPartialLoaded","isVisible","setTimeout","updateState","bind","children"],"sources":["partial-host.component.tsx"],"sourcesContent":["import { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport abstract class PartialHostState<T extends BaseProps> extends BaseComponentState<T> {\n isPartialLoaded = false;\n}\n\nexport abstract class PartialHostProps extends BaseProps {\n renderPartial?: Function;\n children?: any;\n}\n\nexport abstract class PartialHost<T extends BaseProps, S extends PartialHostState<T>, L extends BaseStyles>\n extends BaseComponent<T, S, L> {\n\n constructor(markupProps: T, defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps, defaultClass, defaultProps, defaultState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: PartialHostProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded && !this.isVisible()) {\n return null;\n }\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as any);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n}"],"mappings":";;;AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,SAAS,QAAoB,+CAA+C;AAExH,OAAO,MAAeC,gBAAgB,SAA8BF,kBAAkB,CAAI;EAAAG,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACpE,KAAK;EAAA;AAC3B;AAEA,OAAO,MAAeC,gBAAgB,SAASL,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA;EAAA;AAGzD;AAEA,OAAO,MAAeE,WAAW,SACrBR,aAAa,CAAU;EAE/BI,WAAWA,CAACK,WAAc,EAAEC,YAAoB,EAAEC,YAAgB,EAAEC,YAAgB,EAAE;IAClF,KAAK,CAACH,WAAW,EAAEC,YAAY,EAAEC,YAAY,EAAEC,YAAY,CAAC;EAChE;EAEAC,aAAaA,CAAA,EAAG;IACZ,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC9C;EAEAC,aAAaA,CAACC,KAAuB,EAAE;IACnC,IAAIA,KAAK,CAACC,aAAa,EAAE;MACrB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,IAAI,CAAC,IAAI,CAACC,SAAS,CAAC,CAAC,EAAE;QAClD,OAAO,IAAI;MACf;MACA,IAAI,CAAC,IAAI,CAACF,KAAK,CAACC,eAAe,EAAE;QAC7BE,UAAU,CAAC,MAAM;UACb,IAAI,CAACC,WAAW,CAAC;YACbH,eAAe,EAAE;UACrB,CAAQ,CAAC;QACb,CAAC,CAAC;MACN;MACA,OAAOH,KAAK,CAACC,aAAa,CAAC,IAAI,CAACJ,aAAa,CAACU,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D;IACA,OAAOP,KAAK,CAACQ,QAAQ;EACzB;AAEJ"}
@@ -8,6 +8,7 @@ import WmTabheaderProps from './tabheader.props';
8
8
  import { DEFAULT_CLASS } from './tabheader.styles';
9
9
  import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
10
10
  import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
11
+ import { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';
11
12
  export class WmTabheaderState extends BaseComponentState {}
12
13
  export default class WmTabheader extends BaseComponent {
13
14
  constructor(props) {
@@ -46,6 +47,9 @@ export default class WmTabheader extends BaseComponent {
46
47
  let toIndicatorWidth = ((_this$headersLayout$s = this.headersLayout[selectedTabIndex]) === null || _this$headersLayout$s === void 0 ? void 0 : _this$headersLayout$s.width) || 0;
47
48
  let toHeaderScrollPosition = this.headerScrollPositionValue;
48
49
  let totalWidth = 0;
50
+ if (this.state.props.data.length !== this.headersLayout.length) {
51
+ return;
52
+ }
49
53
  this.headersLayout.forEach((p, i) => {
50
54
  if (i < selectedTabIndex) {
51
55
  toIndicatorPosition += p.width;
@@ -57,6 +61,8 @@ export default class WmTabheader extends BaseComponent {
57
61
  const maxScrollPosition = 0;
58
62
  toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);
59
63
  toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);
64
+ let positionIndicator = toIndicatorPosition - (100 - toIndicatorWidth) / 2;
65
+ let position = this.isRTL ? -positionIndicator : positionIndicator;
60
66
  Animated.parallel([Animated.timing(this.headerScrollPosition, {
61
67
  useNativeDriver: true,
62
68
  toValue: toHeaderScrollPosition,
@@ -69,7 +75,7 @@ export default class WmTabheader extends BaseComponent {
69
75
  easing: Easing.linear
70
76
  }), Animated.timing(this.indicatorPosition, {
71
77
  useNativeDriver: true,
72
- toValue: toIndicatorPosition - (100 - toIndicatorWidth) / 2,
78
+ toValue: position,
73
79
  duration: 200,
74
80
  easing: Easing.linear
75
81
  })]).start();
@@ -89,7 +95,10 @@ export default class WmTabheader extends BaseComponent {
89
95
  const isSelected = i === this.props.selectedTabIndex;
90
96
  return /*#__PURE__*/React.createElement(Tappable, {
91
97
  onTap: this.onTabSelection.bind(this, i),
92
- key: header.key
98
+ key: header.key,
99
+ styles: {
100
+ flex: 1
101
+ }
93
102
  }, /*#__PURE__*/React.createElement(View, {
94
103
  onLayout: this.setHeaderPositon.bind(this, i),
95
104
  style: [this.styles.header, isSelected ? this.styles.activeHeader : null]
@@ -114,7 +123,12 @@ export default class WmTabheader extends BaseComponent {
114
123
  }
115
124
  renderWidget(props) {
116
125
  this.setPosition();
117
- return /*#__PURE__*/React.createElement(Animated.View, {
126
+ const activeIndicator = this.styles.activeIndicator;
127
+ return /*#__PURE__*/React.createElement(View, {
128
+ style: {
129
+ overflow: 'hidden'
130
+ }
131
+ }, /*#__PURE__*/React.createElement(Animated.View, {
118
132
  style: {
119
133
  transform: [{
120
134
  translateX: this.headerScrollPosition
@@ -123,18 +137,24 @@ export default class WmTabheader extends BaseComponent {
123
137
  onLayout: this.setHeaderPanelPositon.bind(this)
124
138
  }, /*#__PURE__*/React.createElement(View, {
125
139
  style: this.styles.root
126
- }, props.data.map((header, i) => {
140
+ }, this._background, props.data.map((header, i) => {
127
141
  const isSelected = i === props.selectedTabIndex;
128
142
  return /*#__PURE__*/React.createElement(Tappable, {
129
143
  onTap: this.onTabSelection.bind(this, i),
130
- key: header.key
144
+ key: header.key,
145
+ styles: this.styles.header.flexGrow ? {
146
+ flexGrow: this.styles.header.flexGrow
147
+ } : null
131
148
  }, /*#__PURE__*/React.createElement(View, {
132
- onLayout: this.setHeaderPositon.bind(this, i),
133
- style: [this.styles.header, isSelected ? this.styles.activeHeader : null]
149
+ onLayout: this.setHeaderPositon.bind(this, i)
150
+ }, /*#__PURE__*/React.createElement(View, {
151
+ style: [this.styles.header, {
152
+ flexGrow: undefined
153
+ }, isSelected ? this.styles.activeHeader : null]
134
154
  }, /*#__PURE__*/React.createElement(Text, {
135
155
  numberOfLines: 1,
136
156
  style: [this.styles.headerText, isSelected ? this.styles.activeHeaderText : null]
137
- }, header.title)));
157
+ }, header.title))));
138
158
  })), /*#__PURE__*/React.createElement(Animated.View, {
139
159
  style: [this.styles.activeIndicator, {
140
160
  transform: [{
@@ -143,7 +163,20 @@ export default class WmTabheader extends BaseComponent {
143
163
  scaleX: this.indicatorWidth
144
164
  }]
145
165
  }]
146
- }));
166
+ }, activeIndicator.backgroundImage ? /*#__PURE__*/React.createElement(BackgroundComponent, {
167
+ image: activeIndicator.backgroundImage,
168
+ position: activeIndicator.backgroundPosition,
169
+ size: activeIndicator.backgroundSize,
170
+ repeat: activeIndicator.backgroundRepeat,
171
+ resizeMode: activeIndicator.backgroundResizeMode,
172
+ style: {
173
+ borderRadius: this.styles.root.borderRadius
174
+ }
175
+ }) : null, /*#__PURE__*/React.createElement(View, {
176
+ style: this.styles.arrowIndicator
177
+ }, /*#__PURE__*/React.createElement(View, {
178
+ style: this.styles.arrowIndicatorDot
179
+ })))));
147
180
  }
148
181
  }
149
182
  //# sourceMappingURL=tabheader.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","WmTabheaderState","WmTabheader","constructor","props","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","setHeaderPositon","index","headersLayout","selectedTabIndex","forceUpdate","onTabSelection","state","onIndexChange","setPosition","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","indicatorPosition","start","renderSkeleton","transform","translateX","bind","styles","root","data","map","header","isSelected","key","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","headerText","title"],"sources":["tabheader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, Easing, LayoutChangeEvent, LayoutRectangle, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabheaderProps from './tabheader.props';\nimport { DEFAULT_CLASS, WmTabheaderStyles } from './tabheader.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport class WmTabheaderState extends BaseComponentState<WmTabheaderProps> {\n}\n\nexport default class WmTabheader extends BaseComponent<WmTabheaderProps, WmTabheaderState, WmTabheaderStyles> {\n\n private headerPanelLayout: LayoutRectangle = null as any;\n private headersLayout: LayoutRectangle[] = [];\n private headerScrollPosition = new Animated.Value(0);\n private headerScrollPositionValue = 0;\n private indicatorPosition = new Animated.Value(0);\n private indicatorWidth = new Animated.Value(0);\n\n constructor(props: WmTabheaderProps) {\n super(props, DEFAULT_CLASS, new WmTabheaderProps(), new WmTabheaderState());\n this.headerScrollPosition.addListener(({value}) => this.headerScrollPositionValue = value);\n }\n\n setHeaderPanelPositon(nativeEvent: LayoutChangeEvent) {\n this.headerPanelLayout = nativeEvent.nativeEvent.layout;\n }\n\n setHeaderPositon(index: number, nativeEvent: LayoutChangeEvent) {\n this.headersLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.props.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n onTabSelection(index: number) {\n if (this.state.props.selectedTabIndex != index) {\n this.state.props.onIndexChange && this.state.props.onIndexChange(index);\n }\n }\n\n setPosition() {\n const selectedTabIndex = this.state.props.selectedTabIndex;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n this.headersLayout.forEach((p, i) => {\n if (i < selectedTabIndex) {\n toIndicatorPosition += p.width;\n }\n totalWidth += p.width;\n });\n toHeaderScrollPosition = -1 * (toIndicatorPosition - (this.headerPanelLayout?.width || 0) / 2 + toIndicatorWidth/ 2) ;\n const minScrollPosition = -1 * (totalWidth - (this.headerPanelLayout?.width || 0));\n const maxScrollPosition = 0;\n toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);\n toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);\n Animated.parallel([\n Animated.timing(this.headerScrollPosition, {\n useNativeDriver: true,\n toValue: toHeaderScrollPosition,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth / 100,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: (toIndicatorPosition - (100 - toIndicatorWidth) / 2),\n duration: 200,\n easing: Easing.linear\n })\n ]).start();\n }\n\n public renderSkeleton(props: WmTabheaderProps){\n return(\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this.props.data.map((header ,i) => {\n const isSelected = i === this.props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header, \n isSelected ? this.styles.activeHeader : null]}>\n {\n createSkeleton(this.theme, { root: { borderRadius: 4 }} as WmSkeletonStyles, {\n ...this.styles.root,\n width: this.styles.root?.width || \"100%\",\n height: this.styles.root?.height || this.styles.activeHeaderText?.fontSize || 16\n })\n }\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n\n )\n }\n\n renderWidget(props: WmTabheaderProps) {\n this.setPosition();\n return (\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {props.data.map((header ,i) => {\n const isSelected = i === props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header, \n isSelected ? this.styles.activeHeader : null]}>\n <Text numberOfLines={1} style={[\n this.styles.headerText, \n isSelected ? this.styles.activeHeaderText : null]}>{header.title}</Text>\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n ); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,MAAM,EAAsCC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAAqBC,cAAc,QAAQ,wEAAwE;AAGnH,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;AAG3E,eAAe,MAAMM,WAAW,SAASP,aAAa,CAAwD;EAS5GQ,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,gBAAgB,EAAE,EAAE,IAAII,gBAAgB,EAAE,CAAC;IAAC,2CARjC,IAAI;IAAA,uCACN,EAAE;IAAA,8CACd,IAAIV,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;IAAA,mDAChB,CAAC;IAAA,2CACT,IAAId,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;IAAA,wCACxB,IAAId,QAAQ,CAACc,KAAK,CAA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I;QAAC,aAAa,EAAE,CAAE;QAAC,KAAK,EAAE,CAC7B,IAAI,CAACP,MAAM,CAACgB,UAAU,EACtBX,UAAU,GAAG,IAAI,CAACL,MAAM,CAACW,gBAAgB,GAAG,IAAI;MAAE,GAAEP,MAAM,CAACa,KAAK,CAAQ,CACrE,CACE;IAEf,CAAC,CAAC,CACG,eACP,oBAAC,QAAQ,CAAC,IAAI;MAAC,KAAK,EAAE,CAAC,IAAI,CAACjB,MAAM,CAACa,eAAe,EAAE;QAClDhB,SAAS,EAAE,CAAC;UACVC,UAAU,EAAE,IAAI,CAACJ;QACnB,CAAC,EAAE;UACDoB,MAAM,EAAE,IAAI,CAACrB;QACf,CAAC;MACH,CAAC;IAAE,EAAiB,CACN;EAEpB;AACF"}
1
+ {"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","BackgroundComponent","WmTabheaderState","WmTabheader","constructor","props","_defineProperty","Value","headerScrollPosition","addListener","_ref","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","setHeaderPositon","index","headersLayout","selectedTabIndex","forceUpdate","onTabSelection","state","onIndexChange","setPosition","_this$headersLayout$s","_this$headerPanelLayo","_this$headerPanelLayo2","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","data","length","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","positionIndicator","position","isRTL","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","indicatorPosition","start","renderSkeleton","createElement","style","transform","translateX","onLayout","bind","styles","root","map","header","_this$styles$root","_this$styles$root2","_this$styles$activeHe","isSelected","onTap","key","flex","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","overflow","_background","flexGrow","undefined","numberOfLines","headerText","title","backgroundImage","image","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","arrowIndicator","arrowIndicatorDot"],"sources":["tabheader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, Easing, LayoutChangeEvent, LayoutRectangle, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabheaderProps from './tabheader.props';\nimport { DEFAULT_CLASS, WmTabheaderStyles } from './tabheader.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\n\nexport class WmTabheaderState extends BaseComponentState<WmTabheaderProps> {\n}\n\nexport default class WmTabheader extends BaseComponent<WmTabheaderProps, WmTabheaderState, WmTabheaderStyles> {\n\n private headerPanelLayout: LayoutRectangle = null as any;\n private headersLayout: LayoutRectangle[] = [];\n private headerScrollPosition = new Animated.Value(0);\n private headerScrollPositionValue = 0;\n private indicatorPosition = new Animated.Value(0);\n private indicatorWidth = new Animated.Value(0);\n\n constructor(props: WmTabheaderProps) {\n super(props, DEFAULT_CLASS, new WmTabheaderProps(), new WmTabheaderState());\n this.headerScrollPosition.addListener(({value}) => this.headerScrollPositionValue = value);\n }\n\n setHeaderPanelPositon(nativeEvent: LayoutChangeEvent) {\n this.headerPanelLayout = nativeEvent.nativeEvent.layout;\n }\n\n setHeaderPositon(index: number, nativeEvent: LayoutChangeEvent) {\n this.headersLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.props.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n onTabSelection(index: number) {\n if (this.state.props.selectedTabIndex != index) {\n this.state.props.onIndexChange && this.state.props.onIndexChange(index);\n }\n }\n\n setPosition() {\n const selectedTabIndex = this.state.props.selectedTabIndex;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n if (this.state.props.data.length !== this.headersLayout.length) {\n return;\n }\n this.headersLayout.forEach((p, i) => {\n if (i < selectedTabIndex) {\n toIndicatorPosition += p.width;\n }\n totalWidth += p.width;\n });\n toHeaderScrollPosition = -1 * (toIndicatorPosition - (this.headerPanelLayout?.width || 0) / 2 + toIndicatorWidth/ 2) ;\n const minScrollPosition = -1 * (totalWidth - (this.headerPanelLayout?.width || 0));\n const maxScrollPosition = 0;\n toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);\n toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);\n let positionIndicator = (toIndicatorPosition - (100 - toIndicatorWidth) / 2);\n let position = this.isRTL?-positionIndicator:positionIndicator;\n Animated.parallel([\n Animated.timing(this.headerScrollPosition, {\n useNativeDriver: true,\n toValue: toHeaderScrollPosition,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth / 100,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: position,\n duration: 200,\n easing: Easing.linear\n })\n ]).start();\n }\n\n public renderSkeleton(props: WmTabheaderProps){\n return(\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this.props.data.map((header ,i) => {\n const isSelected = i === this.props.selectedTabIndex;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key} styles={{flex: 1}}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header, \n isSelected ? this.styles.activeHeader : null]}>\n {\n createSkeleton(this.theme, { root: { borderRadius: 4 }} as WmSkeletonStyles, {\n ...this.styles.root,\n width: this.styles.root?.width || \"100%\",\n height: this.styles.root?.height || this.styles.activeHeaderText?.fontSize || 16\n })\n }\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n\n )\n }\n\n renderWidget(props: WmTabheaderProps) {\n this.setPosition();\n const activeIndicator = this.styles.activeIndicator as any;\n return (\n <View style={{overflow: 'hidden'}}>\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this._background}\n {props.data.map((header ,i) => {\n const isSelected = i === props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)}\n key={header.key} \n styles={this.styles.header.flexGrow ? {flexGrow: this.styles.header.flexGrow} : null}>\n <View onLayout={this.setHeaderPositon.bind(this, i)}>\n <View style={[\n this.styles.header,\n {flexGrow: undefined},\n isSelected ? this.styles.activeHeader : null]}>\n <Text numberOfLines={1} style={[\n this.styles.headerText, \n isSelected ? this.styles.activeHeaderText : null]}>{header.title}</Text>\n </View>\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}>\n {activeIndicator.backgroundImage ? (<BackgroundComponent\n image={activeIndicator.backgroundImage}\n position={activeIndicator.backgroundPosition}\n size={activeIndicator.backgroundSize}\n repeat={activeIndicator.backgroundRepeat}\n resizeMode={activeIndicator.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n <View style={this.styles.arrowIndicator}>\n <View style={this.styles.arrowIndicatorDot}></View>\n </View>\n </Animated.View>\n </Animated.View>\n </View>\n ); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,MAAM,EAAsCC,IAAI,EAAEC,IAAI,QAA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AAC,EAAE;UACD2B,MAAM,EAAE,IAAI,CAAC5B;QACf,CAAC;MACH,CAAC;IAAE,GACA2B,eAAe,CAACU,eAAe,gBAAIrG,KAAA,CAAAoE,aAAA,CAACzD,mBAAmB;MACtD2F,KAAK,EAAEX,eAAe,CAACU,eAAgB;MACvC9C,QAAQ,EAAEoC,eAAe,CAACY,kBAAmB;MAC7CC,IAAI,EAAEb,eAAe,CAACc,cAAe;MACrCC,MAAM,EAAEf,eAAe,CAACgB,gBAAiB;MACzCC,UAAU,EAAEjB,eAAe,CAACkB,oBAAqB;MACjDxC,KAAK,EAAE;QAACkB,YAAY,EAAE,IAAI,CAACb,MAAM,CAACC,IAAI,CAACY;MAAY;IAAE,CACjC,CAAC,GAAI,IAAI,eAC/BvF,KAAA,CAAAoE,aAAA,CAAChE,IAAI;MAACiE,KAAK,EAAE,IAAI,CAACK,MAAM,CAACoC;IAAe,gBACtC9G,KAAA,CAAAoE,aAAA,CAAChE,IAAI;MAACiE,KAAK,EAAE,IAAI,CAACK,MAAM,CAACqC;IAAkB,CAAO,CAC9C,CACO,CACF,CACT,CAAC;EAEX;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmTabheaderProps"],"sources":["tabheader.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabheaderProps extends BaseProps {\n data: {icon: string, key: string, title: string}[] = [] as any;\n selectedTabIndex = 0;\n onIndexChange?: (index: number) => any = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,gBAAgB,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,8BACD,EAAE;IAAA,0CACpC,CAAC;IAAA,uCACqB,IAAI;EAAA;AAC/C"}
1
+ {"version":3,"names":["BaseProps","WmTabheaderProps","constructor","arguments","_defineProperty"],"sources":["tabheader.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabheaderProps extends BaseProps {\n data: {icon: string, key: string, title: string}[] = [] as any;\n selectedTabIndex = 0;\n onIndexChange?: (index: number) => any = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,gBAAgB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eACD,EAAE;IAAAA,eAAA,2BACpC,CAAC;IAAAA,eAAA,wBACqB,IAAI;EAAA;AAC/C"}
@@ -15,7 +15,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
15
15
  paddingVertical: 12,
16
16
  minWidth: 80,
17
17
  flexDirection: 'row',
18
- justifyContent: 'center'
18
+ justifyContent: 'center',
19
+ flexGrow: 1
19
20
  },
20
21
  headerIcon: {
21
22
  text: {
@@ -37,7 +38,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
37
38
  backgroundColor: themeVariables.tabActiveIndicatorBgColor,
38
39
  width: 100,
39
40
  height: 4,
40
- marginTop: -4
41
+ marginTop: -4,
42
+ backgroundPosition: '0px center',
43
+ backgroundSize: '48px 48px',
44
+ backgroundRepeat: 'no-repeat'
41
45
  },
42
46
  activeHeaderIcon: {
43
47
  text: {
@@ -47,6 +51,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
47
51
  activeHeaderText: {
48
52
  color: themeVariables.tabActiveHeaderTextColor
49
53
  },
54
+ arrowIndicator: {
55
+ display: 'none'
56
+ },
57
+ arrowIndicatorDot: {
58
+ display: 'none'
59
+ },
50
60
  skeleton: {}
51
61
  };
52
62
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingHorizontal","paddingVertical","justifyContent","headerIcon","color","tabHeaderIconColor","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","fontSize","textTransform","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingHorizontal: 12,\n paddingVertical: 12,\n minWidth: 80,\n flexDirection: 'row',\n justifyContent: 'center'\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: 'bold',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 4,\n marginTop: -4\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAiB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAG;IAClBC,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,SAAS;MACnBC,eAAe,EAAEP,cAAc,CAACQ;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJH,eAAe,EAAEP,cAAc,CAACQ,gBAAgB;MAChDG,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,EAAE;MACnBP,QAAQ,EAAE,EAAE;MACZD,aAAa,EAAE,KAAK;MACpBS,cAAc,EAAE;IACpB,CAAC;IACDC,UAAU,EAAE;MACRL,IAAI,EAAE;QACFM,KAAK,EAAEf,cAAc,CAACgB;MAC1B;IACJ,CAAiB;IACjBC,UAAU,EAAE;MACRF,KAAK,EAAEf,cAAc,CAACkB,kBAAkB;MACxCZ,QAAQ,EAAE,SAAS;MACnBa,UAAU,EAAEnB,cAAc,CAACoB,QAAQ;MACnCC,UAAU,EAAE,MAAM;MAClBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACnB,CAAC;IACDC,YAAY,EAAE;MACVjB,eAAe,EAAEP,cAAc,CAACyB;IACpC,CAAC;IACDC,eAAe,EAAE;MACbnB,eAAe,EAAEP,cAAc,CAAC2B,yBAAyB;MACzDC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,CAAC;MACTC,SAAS,EAAE,CAAC;IAChB,CAAC;IACDC,gBAAgB,EAAE;MACdtB,IAAI,EAAE;QACFM,KAAK,EAAEf,cAAc,CAACgC;MAC1B;IACJ,CAAiB;IACjBC,gBAAgB,EAAE;MACdlB,KAAK,EAAEf,cAAc,CAACkC;IAC1B,CAAC;IACDC,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtBlC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingHorizontal","paddingVertical","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","fontSize","textTransform","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","backgroundPosition","backgroundSize","backgroundRepeat","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","arrowIndicator","display","arrowIndicatorDot","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n arrowIndicator: ViewStyle,\n arrowIndicatorDot: ViewStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingHorizontal: 12,\n paddingVertical: 12,\n minWidth: 80,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: 'bold',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 4,\n marginTop: -4,\n backgroundPosition: '0px center',\n backgroundSize: '48px 48px',\n backgroundRepeat: 'no-repeat'\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n arrowIndicator: {\n display: 'none'\n },\n arrowIndicatorDot: {\n display: 'none'\n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAmB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAG;IAClBC,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,SAAS;MACnBC,eAAe,EAAEP,cAAc,CAACQ;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJH,eAAe,EAAEP,cAAc,CAACQ,gBAAgB;MAChDG,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,EAAE;MACnBP,QAAQ,EAAE,EAAE;MACZD,aAAa,EAAE,KAAK;MACpBS,cAAc,EAAE,QAAQ;MACxBC,QAAQ,EAAE;IACd,CAAC;IACDC,UAAU,EAAE;MACRN,IAAI,EAAE;QACFO,KAAK,EAAEhB,cAAc,CAACiB;MAC1B;IACJ,CAAiB;IACjBC,UAAU,EAAE;MACRF,KAAK,EAAEhB,cAAc,CAACmB,kBAAkB;MACxCb,QAAQ,EAAE,SAAS;MACnBc,UAAU,EAAEpB,cAAc,CAACqB,QAAQ;MACnCC,UAAU,EAAE,MAAM;MAClBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACnB,CAAC;IACDC,YAAY,EAAE;MACVlB,eAAe,EAAEP,cAAc,CAAC0B;IACpC,CAAC;IACDC,eAAe,EAAE;MACbpB,eAAe,EAAEP,cAAc,CAAC4B,yBAAyB;MACzDC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,CAAC;MACTC,SAAS,EAAE,CAAC,CAAC;MACbC,kBAAkB,EAAE,YAAY;MAChCC,cAAc,EAAE,WAAW;MAC3BC,gBAAgB,EAAE;IACtB,CAAC;IACDC,gBAAgB,EAAE;MACd1B,IAAI,EAAE;QACFO,KAAK,EAAEhB,cAAc,CAACoC;MAC1B;IACJ,CAAiB;IACjBC,gBAAgB,EAAE;MACdrB,KAAK,EAAEhB,cAAc,CAACsC;IAC1B,CAAC;IACDC,cAAc,EAAE;MACZC,OAAO,EAAE;IACb,CAAC;IACDC,iBAAiB,EAAE;MACfD,OAAO,EAAE;IACb,CAAC;IACDE,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtBzC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -34,7 +34,7 @@ export default class WmTabpane extends BaseComponent {
34
34
  }
35
35
  componentDidMount() {
36
36
  const tabs = this.parent;
37
- tabs.addTabPane(this);
37
+ tabs.addTabPane(this.proxy);
38
38
  super.componentDidMount();
39
39
  }
40
40
  _onSelect() {
@@ -43,10 +43,13 @@ export default class WmTabpane extends BaseComponent {
43
43
  _onDeselect() {
44
44
  this.invokeEventCallback('onDeselect', [null, this.proxy]);
45
45
  }
46
+ select() {
47
+ this.parent.selectTabPane(this);
48
+ }
46
49
  renderWidget(props) {
47
50
  return /*#__PURE__*/React.createElement(View, {
48
51
  style: this.styles.root
49
- }, this.renderContent(props));
52
+ }, this._background, this.renderContent(props));
50
53
  }
51
54
  }
52
55
  //# sourceMappingURL=tabpane.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","WmTabpane","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","componentDidMount","tabs","parent","addTabPane","_onSelect","proxy","_onDeselect","renderWidget","styles","root"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabpaneProps from './tabpane.props';\nimport { DEFAULT_CLASS, WmTabpaneStyles } from './tabpane.styles';\nimport WmTabs from '../tabs.component';\n\nexport class WmTabpaneState extends BaseComponentState<WmTabpaneProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmTabpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmTabpaneState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n componentDidMount() {\n const tabs = (this.parent) as WmTabs;\n tabs.addTabPane(this);\n super.componentDidMount();\n }\n\n _onSelect() {\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.invokeEventCallback('onDeselect', [null, this.proxy]);\n }\n\n renderWidget(props: WmTabpaneProps) {\n return (<View style={this.styles.root}>{this.renderContent(props)}</View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAGjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;EAAA;IAAA;IAAA,yCACnD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAkD;EAEpGM,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,cAAc,EAAE,CAAC;EACnD;EAEAM,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAa,CAACH,KAAqB,EAAE;IACnC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAC,CAAmB;QACtB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,iBAAiB,GAAG;IAClB,MAAMC,IAAI,GAAI,IAAI,CAACC,MAAiB;IACpCD,IAAI,CAACE,UAAU,CAAC,IAAI,CAAC;IACrB,KAAK,CAACH,iBAAiB,EAAE;EAC3B;EAEAI,SAAS,GAAG;IACV,IAAI,CAACb,mBAAmB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACc,KAAK,CAAC,CAAC;EAC1D;EACAC,WAAW,GAAG;IACZ,IAAI,CAACf,mBAAmB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACc,KAAK,CAAC,CAAC;EAC5D;EAEAE,YAAY,CAAClB,KAAqB,EAAE;IAClC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACmB,MAAM,CAACC;IAAK,GAAE,IAAI,CAACjB,aAAa,CAACH,KAAK,CAAC,CAAQ;EAC3E;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","constructor","arguments","_defineProperty","WmTabpane","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","componentDidMount","tabs","parent","addTabPane","proxy","_onSelect","_onDeselect","select","selectTabPane","renderWidget","createElement","style","styles","root","_background"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabpaneProps from './tabpane.props';\nimport { DEFAULT_CLASS, WmTabpaneStyles } from './tabpane.styles';\nimport WmTabs from '../tabs.component';\n\nexport class WmTabpaneState extends BaseComponentState<WmTabpaneProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmTabpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmTabpaneState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n componentDidMount() {\n const tabs = (this.parent) as WmTabs;\n tabs.addTabPane(this.proxy as WmTabpane);\n super.componentDidMount();\n }\n\n _onSelect() {\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.invokeEventCallback('onDeselect', [null, this.proxy]);\n }\n\n select() {\n (this.parent as WmTabs).selectTabPane(this);\n }\n\n renderWidget(props: WmTabpaneProps) {\n return (<View style={this.styles.root}>{this._background}{this.renderContent(props)}</View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAGjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACnD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,SAAS,SAASR,aAAa,CAAkD;EAEpGK,WAAWA,CAACI,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;EACnD;EAEAQ,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAaA,CAACH,KAAqB,EAAE;IACnC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAmB,CAAC;QACtB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,iBAAiBA,CAAA,EAAG;IAClB,MAAMC,IAAI,GAAI,IAAI,CAACC,MAAiB;IACpCD,IAAI,CAACE,UAAU,CAAC,IAAI,CAACC,KAAkB,CAAC;IACxC,KAAK,CAACJ,iBAAiB,CAAC,CAAC;EAC3B;EAEAK,SAASA,CAAA,EAAG;IACV,IAAI,CAACd,mBAAmB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACa,KAAK,CAAC,CAAC;EAC1D;EACAE,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACf,mBAAmB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACa,KAAK,CAAC,CAAC;EAC5D;EAEAG,MAAMA,CAAA,EAAG;IACN,IAAI,CAACL,MAAM,CAAYM,aAAa,CAAC,IAAI,CAAC;EAC7C;EAEAC,YAAYA,CAACpB,KAAqB,EAAE;IAClC,oBAAQX,KAAA,CAAAgC,aAAA,CAAC/B,IAAI;MAACgC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAE,IAAI,CAACtB,aAAa,CAACH,KAAK,CAAQ,CAAC;EAC7F;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmTabpaneProps"],"sources":["tabpane.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabpaneProps extends BaseProps {\n children: any;\n paneicon: string = null as any;\n title: string = 'Tab Title';\n renderPartial?: Function;\n isPartialLoaded = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA,kCAEjC,IAAI;IAAA,+BACP,WAAW;IAAA;IAAA,yCAET,KAAK;EAAA;AACzB"}
1
+ {"version":3,"names":["BaseProps","WmTabpaneProps","constructor","arguments","_defineProperty"],"sources":["tabpane.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabpaneProps extends BaseProps {\n children: any;\n paneicon: string = null as any;\n title: string = 'Tab Title';\n renderPartial?: Function;\n isPartialLoaded = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,mBAEjC,IAAI;IAAAA,eAAA,gBACP,WAAW;IAAAA,eAAA;IAAAA,eAAA,0BAET,KAAK;EAAA;AACzB"}
@@ -2,8 +2,10 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
2
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import React from 'react';
5
- import { Animated, Easing, PanResponder, View } from 'react-native';
5
+ import { View } from 'react-native';
6
6
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
7
+ import * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';
8
+ import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
7
9
  import WmTabsProps from './tabs.props';
8
10
  import { DEFAULT_CLASS } from './tabs.styles';
9
11
  import WmTabheader from './tabheader/tabheader.component';
@@ -20,35 +22,27 @@ export default class WmTabs extends BaseComponent {
20
22
  _defineProperty(this, "tabPanes", []);
21
23
  _defineProperty(this, "newIndex", 0);
22
24
  _defineProperty(this, "tabLayout", null);
23
- _defineProperty(this, "tabPosition", new Animated.Value(0));
24
25
  _defineProperty(this, "tabPaneHeights", []);
25
- _defineProperty(this, "panResponder", PanResponder.create({
26
- onMoveShouldSetPanResponder: () => true,
27
- onPanResponderGrant: () => {
28
- this.tabPosition.setOffset(this.tabPosition._value);
26
+ _defineProperty(this, "animationView", null);
27
+ _defineProperty(this, "animationHandlers", {
28
+ bounds: e => {
29
+ var _this$tabLayout;
30
+ const activeTabIndex = this.state.selectedTabIndex,
31
+ w = ((_this$tabLayout = this.tabLayout) === null || _this$tabLayout === void 0 ? void 0 : _this$tabLayout.width) || 0,
32
+ noOfTabs = this.tabPanes.length;
33
+ return {
34
+ lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,
35
+ center: -1 * activeTabIndex * w,
36
+ upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w
37
+ };
29
38
  },
30
- onPanResponderMove: Animated.event([null, {
31
- dx: this.tabPosition
32
- }]),
33
- onPanResponderRelease: () => {
34
- const dx = this.tabPosition._value;
35
- this.tabPosition.flattenOffset();
36
- let toIndex = this.state.selectedTabIndex;
37
- if (Math.abs(dx) > 50) {
38
- if (dx < 0) {
39
- if (toIndex < this.tabPanes.length - 1) {
40
- this.onChange(toIndex + 1);
41
- return;
42
- }
43
- } else if (toIndex > 0) {
44
- this.onChange(toIndex - 1);
45
- return;
46
- }
47
- }
48
- this.onChange(toIndex);
49
- this.forceUpdate();
39
+ onLower: e => {
40
+ this.onChange(this.state.selectedTabIndex - 1);
41
+ },
42
+ onUpper: e => {
43
+ this.onChange(this.state.selectedTabIndex + 1);
50
44
  }
51
- }));
45
+ });
52
46
  const selectedIndex = props.defaultpaneindex || 0;
53
47
  const tabsShown = [];
54
48
  tabsShown[selectedIndex] = true;
@@ -59,7 +53,9 @@ export default class WmTabs extends BaseComponent {
59
53
  }
60
54
  setTabLayout(event) {
61
55
  this.tabLayout = event.nativeEvent.layout;
62
- this.forceUpdate();
56
+ this.forceUpdate(() => {
57
+ this.goToTab();
58
+ });
63
59
  }
64
60
  setTabPaneHeights(index, nativeEvent) {
65
61
  var _nativeEvent$nativeEv;
@@ -68,15 +64,6 @@ export default class WmTabs extends BaseComponent {
68
64
  this.forceUpdate();
69
65
  }
70
66
  }
71
- setTabPosition() {
72
- var _this$tabLayout;
73
- Animated.timing(this.tabPosition, {
74
- useNativeDriver: true,
75
- toValue: -1 * this.state.selectedTabIndex * (((_this$tabLayout = this.tabLayout) === null || _this$tabLayout === void 0 ? void 0 : _this$tabLayout.width) || 0),
76
- duration: 200,
77
- easing: Easing.linear
78
- }).start();
79
- }
80
67
  setTabShown(tabIndex, callback) {
81
68
  if (!this.state.tabsShown[tabIndex]) {
82
69
  const tabsShown = [...this.state.tabsShown];
@@ -91,10 +78,34 @@ export default class WmTabs extends BaseComponent {
91
78
  }
92
79
  }
93
80
  addTabPane(tabPane) {
94
- this.tabPanes[this.newIndex || this.state.selectedTabIndex] = tabPane;
95
- this.newIndex++;
81
+ const i = this.tabPanes.findIndex(t => t.props.name === tabPane.props.name);
82
+ if (i >= 0) {
83
+ this.tabPanes[i] = tabPane;
84
+ } else {
85
+ this.tabPanes[this.newIndex++] = tabPane;
86
+ }
87
+ }
88
+ selectTabPane(tabPane) {
89
+ this.goToTab(this.tabPanes.indexOf(tabPane));
90
+ }
91
+ goToTab() {
92
+ var _this$tabLayout2, _this$animationView;
93
+ let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.state.selectedTabIndex;
94
+ const position = -1 * index * (((_this$tabLayout2 = this.tabLayout) === null || _this$tabLayout2 === void 0 ? void 0 : _this$tabLayout2.width) || 0);
95
+ (_this$animationView = this.animationView) === null || _this$animationView === void 0 ? void 0 : _this$animationView.setPosition(position).then(() => this.onChange(index));
96
+ }
97
+ prev() {
98
+ var _this$animationView2;
99
+ (_this$animationView2 = this.animationView) === null || _this$animationView2 === void 0 ? void 0 : _this$animationView2.goToLower();
100
+ }
101
+ next() {
102
+ var _this$animationView3;
103
+ (_this$animationView3 = this.animationView) === null || _this$animationView3 === void 0 ? void 0 : _this$animationView3.goToLower();
96
104
  }
97
105
  onChange(newIndex) {
106
+ if (newIndex < 0 || newIndex >= this.tabPanes.length) {
107
+ return;
108
+ }
98
109
  const oldIndex = this.state.selectedTabIndex;
99
110
  const deselectedTab = this.tabPanes[this.state.selectedTabIndex];
100
111
  this.newIndex = newIndex;
@@ -116,7 +127,6 @@ export default class WmTabs extends BaseComponent {
116
127
  icon: '',
117
128
  key: `tab-${p.props.title}-${i}`
118
129
  }));
119
- this.setTabPosition();
120
130
  return /*#__PURE__*/React.createElement(View, {
121
131
  style: [this.styles.root, {
122
132
  borderBottomWidth: 0
@@ -130,8 +140,7 @@ export default class WmTabs extends BaseComponent {
130
140
  styles: this.styles.tabHeader,
131
141
  data: headerData,
132
142
  showskeleton: this.props.showskeleton,
133
- selectedTabIndex: this.state.selectedTabIndex,
134
- onIndexChange: this.onChange.bind(this)
143
+ selectedTabIndex: this.state.selectedTabIndex
135
144
  }), /*#__PURE__*/React.createElement(View
136
145
  //{...this.panResponder.panHandlers}
137
146
  , {
@@ -140,13 +149,10 @@ export default class WmTabs extends BaseComponent {
140
149
  //height: this.tabPaneHeights[this.state.selectedTabIndex],
141
150
  overflow: 'hidden'
142
151
  }
143
- }, /*#__PURE__*/React.createElement(Animated.View, {
152
+ }, /*#__PURE__*/React.createElement(View, {
144
153
  style: {
145
154
  flexDirection: 'row',
146
- flexWrap: 'nowrap',
147
- transform: [{
148
- translateX: this.tabPosition
149
- }]
155
+ flexWrap: 'nowrap'
150
156
  }
151
157
  }, tabPanes.map((p, i) => {
152
158
  return /*#__PURE__*/React.createElement(View, {
@@ -156,7 +162,7 @@ export default class WmTabs extends BaseComponent {
156
162
  alignSelf: 'flex-start'
157
163
  },
158
164
  onLayout: this.setTabPaneHeights.bind(this, i)
159
- }, this.state.tabsShown[i] ? p : null);
165
+ }, p);
160
166
  }))));
161
167
  }
162
168
  renderWidget(props) {
@@ -166,10 +172,9 @@ export default class WmTabs extends BaseComponent {
166
172
  icon: '',
167
173
  key: `tab-${p.props.title}-${i}`
168
174
  }));
169
- this.setTabPosition();
170
175
  return /*#__PURE__*/React.createElement(View, {
171
176
  style: this.styles.root
172
- }, /*#__PURE__*/React.createElement(View, {
177
+ }, this._background, /*#__PURE__*/React.createElement(View, {
173
178
  onLayout: this.setTabLayout.bind(this),
174
179
  style: {
175
180
  width: '100%'
@@ -178,32 +183,46 @@ export default class WmTabs extends BaseComponent {
178
183
  styles: this.styles.tabHeader,
179
184
  data: headerData,
180
185
  selectedTabIndex: this.state.selectedTabIndex,
181
- onIndexChange: this.onChange.bind(this)
182
- }), /*#__PURE__*/React.createElement(View
183
- //{...this.panResponder.panHandlers}
184
- , {
185
- style: {
186
+ onIndexChange: this.goToTab.bind(this)
187
+ }), /*#__PURE__*/React.createElement(View, {
188
+ style: [{
186
189
  width: '100%',
187
- //height: this.tabPaneHeights[this.state.selectedTabIndex],
188
- overflow: 'hidden'
189
- }
190
- }, /*#__PURE__*/React.createElement(Animated.View, {
190
+ flex: 1
191
+ }, this.styles.root.height ? isWebPreviewMode() ? {
192
+ 'overflow-x': 'hidden',
193
+ 'overflow-y': 'auto'
194
+ } : {
195
+ overflow: 'scroll'
196
+ } : {
197
+ overflow: 'hidden',
198
+ maxHeight: this.tabPaneHeights[this.state.selectedTabIndex]
199
+ }]
200
+ }, /*#__PURE__*/React.createElement(SwipeAnimation.View, {
201
+ enableGestures: props.enablegestures,
191
202
  style: {
192
203
  flexDirection: 'row',
193
- flexWrap: 'nowrap',
194
- transform: [{
195
- translateX: this.tabPosition
196
- }]
197
- }
204
+ flexWrap: 'nowrap'
205
+ },
206
+ direction: "horizontal",
207
+ ref: r => {
208
+ this.animationView = r;
209
+ },
210
+ handlers: this.animationHandlers
198
211
  }, tabPanes.map((p, i) => {
199
212
  return /*#__PURE__*/React.createElement(View, {
213
+ style: {
214
+ width: '100%',
215
+ height: this.styles.root.height ? undefined : 1000000,
216
+ alignSelf: 'flex-start'
217
+ }
218
+ }, /*#__PURE__*/React.createElement(View, {
200
219
  key: `tab-${p.props.title}-${i}`,
201
220
  style: {
202
221
  width: '100%',
203
222
  alignSelf: 'flex-start'
204
223
  },
205
224
  onLayout: this.setTabPaneHeights.bind(this, i)
206
- }, this.state.tabsShown[i] ? p : null);
225
+ }, p));
207
226
  }))));
208
227
  }
209
228
  }