@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-rc.151

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 (276) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
  8. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel.component.js +130 -68
  10. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
  12. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  13. app-rn-runtime/components/advanced/carousel/carousel.styles.js +17 -9
  14. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  15. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  16. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  18. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  19. app-rn-runtime/components/advanced/webview/webview.component.js +1 -0
  20. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  21. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  22. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  23. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  24. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  25. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  26. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  27. app-rn-runtime/components/basic/button/button.component.js +7 -6
  28. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  29. app-rn-runtime/components/basic/button/button.styles.js +14 -4
  30. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +2 -1
  32. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  33. app-rn-runtime/components/basic/icon/icon.component.js +11 -5
  34. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  35. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  36. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  37. app-rn-runtime/components/basic/label/label.component.js +60 -3
  38. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  39. app-rn-runtime/components/basic/label/label.styles.js +2 -1
  40. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  41. app-rn-runtime/components/basic/message/message.component.js +6 -3
  42. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  43. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  44. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  45. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -2
  46. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  47. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  48. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  50. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  51. app-rn-runtime/components/basic/search/search.component.js +12 -6
  52. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  53. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  54. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  55. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  56. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  57. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  58. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  59. app-rn-runtime/components/basic/video/video.component.js +2 -1
  60. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  61. app-rn-runtime/components/chart/basechart.component.js +19 -8
  62. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  63. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +23 -2
  64. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  65. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  66. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  67. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +213 -0
  68. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
  69. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +15 -0
  70. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
  71. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
  72. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
  73. app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
  74. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  75. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
  76. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  77. app-rn-runtime/components/container/container.component.js +3 -2
  78. app-rn-runtime/components/container/container.component.js.map +1 -1
  79. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  80. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  81. app-rn-runtime/components/container/panel/panel.component.js +44 -62
  82. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  83. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  84. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  85. app-rn-runtime/components/container/partial-host.component.js +1 -1
  86. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  87. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +7 -5
  88. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  89. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +9 -5
  90. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  91. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  92. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  93. app-rn-runtime/components/container/tabs/tabs.component.js +1 -0
  94. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  95. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  96. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  97. app-rn-runtime/components/container/wizard/wizard.component.js +9 -4
  98. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  99. app-rn-runtime/components/container/wizard/wizard.styles.js +18 -5
  100. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  101. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  102. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  103. app-rn-runtime/components/data/card/card.component.js +3 -2
  104. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  105. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  106. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  107. app-rn-runtime/components/data/form/form-field/form-field.component.js +3 -2
  108. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  109. app-rn-runtime/components/data/form/form.component.js +3 -0
  110. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  111. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  112. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  113. app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
  114. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  115. app-rn-runtime/components/data/list/list.component.js +41 -31
  116. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  117. app-rn-runtime/components/data/list/list.props.js +6 -0
  118. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  119. app-rn-runtime/components/data/list/list.styles.js +12 -5
  120. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  121. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  122. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  123. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  124. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  125. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  126. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  127. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  128. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  129. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  130. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  131. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  132. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  133. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  134. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  135. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  136. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  137. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  138. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  139. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +17 -8
  140. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  141. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
  142. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  143. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
  144. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  145. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  146. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  147. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  148. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  149. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  150. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  151. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  152. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  153. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -6
  154. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  155. app-rn-runtime/components/input/chips/chips.component.js +8 -4
  156. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  157. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  158. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  159. app-rn-runtime/components/input/composite/composite.component.js +8 -1
  160. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  161. app-rn-runtime/components/input/composite/composite.props.js +1 -0
  162. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  163. app-rn-runtime/components/input/composite/composite.styles.js +16 -1
  164. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  165. app-rn-runtime/components/input/currency/currency.component.js +1 -1
  166. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  167. app-rn-runtime/components/input/currency/currency.styles.js +12 -4
  168. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  169. app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -4
  170. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  171. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  172. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  173. app-rn-runtime/components/input/number/number.component.js +1 -1
  174. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  175. app-rn-runtime/components/input/number/number.styles.js +6 -2
  176. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  177. app-rn-runtime/components/input/radioset/radioset.component.js +10 -5
  178. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  179. app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
  180. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  181. app-rn-runtime/components/input/radioset/radioset.styles.js +4 -8
  182. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  183. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  184. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  185. app-rn-runtime/components/input/select/select.component.js +17 -13
  186. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  187. app-rn-runtime/components/input/select/select.styles.js +8 -4
  188. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  189. app-rn-runtime/components/input/slider/slider.component.js +94 -23
  190. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  191. app-rn-runtime/components/input/slider/slider.styles.js +27 -2
  192. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  193. app-rn-runtime/components/input/switch/switch.component.js +6 -4
  194. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  195. app-rn-runtime/components/input/switch/switch.styles.js +7 -4
  196. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  197. app-rn-runtime/components/input/text/text.component.js +1 -1
  198. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  199. app-rn-runtime/components/input/text/text.styles.js +5 -1
  200. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  201. app-rn-runtime/components/input/textarea/textarea.component.js +1 -1
  202. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  203. app-rn-runtime/components/input/toggle/toggle.component.js +3 -2
  204. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  205. app-rn-runtime/components/input/toggle/toggle.styles.js +21 -9
  206. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  207. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +7 -2
  208. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  209. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  210. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  211. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
  212. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  213. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  214. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  215. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  216. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  217. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  218. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  219. app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
  220. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  221. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  222. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  223. app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
  224. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  225. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  226. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  227. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  228. app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
  229. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  230. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  231. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  232. app-rn-runtime/components/page/tabbar/tabbar.component.js +7 -6
  233. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  234. app-rn-runtime/components/page/tabbar/tabbar.styles.js +22 -0
  235. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  236. app-rn-runtime/core/base.component.js +80 -37
  237. app-rn-runtime/core/base.component.js.map +1 -1
  238. app-rn-runtime/core/constant.service.js +22 -0
  239. app-rn-runtime/core/constant.service.js.map +1 -0
  240. app-rn-runtime/core/formatters.js +9 -2
  241. app-rn-runtime/core/formatters.js.map +1 -1
  242. app-rn-runtime/core/imageSizeEstimator.js +4 -0
  243. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  244. app-rn-runtime/core/key.extractor.js +22 -0
  245. app-rn-runtime/core/key.extractor.js.map +1 -0
  246. app-rn-runtime/core/tappable.component.js +15 -5
  247. app-rn-runtime/core/tappable.component.js.map +1 -1
  248. app-rn-runtime/core/testid.provider.js +5 -0
  249. app-rn-runtime/core/testid.provider.js.map +1 -0
  250. app-rn-runtime/gestures/swipe.animation.js +34 -11
  251. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  252. app-rn-runtime/package.json +4 -3
  253. app-rn-runtime/runtime/App.js +29 -4
  254. app-rn-runtime/runtime/App.js.map +1 -1
  255. app-rn-runtime/runtime/base-fragment.component.js +13 -3
  256. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  257. app-rn-runtime/runtime/base-page.component.js +17 -0
  258. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  259. app-rn-runtime/runtime/services/app-security.service.js +14 -3
  260. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  261. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  262. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  263. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  264. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  265. app-rn-runtime/styles/theme.js +30 -1
  266. app-rn-runtime/styles/theme.js.map +1 -1
  267. app-rn-runtime/styles/theme.variables.js +14 -3
  268. app-rn-runtime/styles/theme.variables.js.map +1 -1
  269. app-rn-runtime/variables/http.service.js +1 -1
  270. app-rn-runtime/variables/http.service.js.map +1 -1
  271. app-rn-runtime/variables/live-variable.js +1 -0
  272. app-rn-runtime/variables/live-variable.js.map +1 -1
  273. app-rn-runtime/variables/model-variable.js +11 -0
  274. app-rn-runtime/variables/model-variable.js.map +1 -1
  275. app-rn-runtime/variables/service-variable.js +1 -0
  276. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","View","isWebPreviewMode","Animated","require","CollapsiblePane","props","height","setHeight","offset","useSharedValue","value","close","onLayoutChange","e","_e$nativeEvent","nativeEvent","layout","animatedStyles","useAnimatedStyle","maxHeight","withTiming","createElement","default","style","overflow","onLayout","children"],"sources":["collapsible-pane.component.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { LayoutChangeEvent, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nconst Animated: any = isWebPreviewMode() ? {} : require('react-native-reanimated');\n\nexport const CollapsiblePane = (props: {\n close: boolean,\n children: any\n }) => {\n const [height, setHeight] = useState(0);\n const offset = Animated.useSharedValue(0);\n offset.value = props.close ? 0 : 1;\n const onLayoutChange = (e: LayoutChangeEvent) => {\n setHeight((e.nativeEvent?.layout?.height || height || 100000000) + 1000);\n };\n const animatedStyles = Animated.useAnimatedStyle(() => {\n return {\n maxHeight: Animated.withTiming(offset.value * height)\n };\n });\n return (\n <Animated.default.View style={[{overflow: 'hidden'}, animatedStyles]}>\n <View onLayout={onLayoutChange}>\n {props.children}\n </View>\n </Animated.default.View>\n );\n };"],"mappings":"AAAA,OAAOA,KAAK,IAA0BC,QAAQ,QAAQ,OAAO;AAC7D,SAA4BC,IAAI,QAAQ,cAAc;AACtD,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,MAAMC,QAAa,GAAGD,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAGE,OAAO,CAAC,yBAAyB,CAAC;AAElF,OAAO,MAAMC,eAAe,GAAIC,KAG7B,IAAK;EACJ,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGR,QAAQ,CAAC,CAAC,CAAC;EACvC,MAAMS,MAAM,GAAGN,QAAQ,CAACO,cAAc,CAAC,CAAC,CAAC;EACzCD,MAAM,CAACE,KAAK,GAAGL,KAAK,CAACM,KAAK,GAAG,CAAC,GAAG,CAAC;EAClC,MAAMC,cAAc,GAAIC,CAAoB,IAAK;IAAA,IAAAC,cAAA;IAC/CP,SAAS,CAAC,CAAC,EAAAO,cAAA,GAAAD,CAAC,CAACE,WAAW,cAAAD,cAAA,gBAAAA,cAAA,GAAbA,cAAA,CAAeE,MAAM,cAAAF,cAAA,uBAArBA,cAAA,CAAuBR,MAAM,KAAIA,MAAM,IAAI,SAAS,IAAI,IAAI,CAAC;EAC1E,CAAC;EACD,MAAMW,cAAc,GAAGf,QAAQ,CAACgB,gBAAgB,CAAC,MAAM;IACrD,OAAO;MACLC,SAAS,EAAEjB,QAAQ,CAACkB,UAAU,CAACZ,MAAM,CAACE,KAAK,GAAGJ,MAAM;IACtD,CAAC;EACH,CAAC,CAAC;EACF,oBACIR,KAAA,CAAAuB,aAAA,CAACnB,QAAQ,CAACoB,OAAO,CAACtB,IAAI;IAACuB,KAAK,EAAE,CAAC;MAACC,QAAQ,EAAE;IAAQ,CAAC,EAAEP,cAAc;EAAE,gBACnEnB,KAAA,CAAAuB,aAAA,CAACrB,IAAI;IAACyB,QAAQ,EAAEb;EAAe,GAC5BP,KAAK,CAACqB,QACH,CACe,CAAC;AAE9B,CAAC"}
@@ -1,28 +1,26 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  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
5
  import React from 'react';
5
- import { View } from 'react-native';
6
- import { Badge, List } from 'react-native-paper';
6
+ import { Text, View, TouchableOpacity } from 'react-native';
7
+ import { isUndefined } from 'lodash';
8
+ import { Badge } from 'react-native-paper';
7
9
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
8
10
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
9
11
  import WmPanelProps from './panel.props';
10
12
  import { DEFAULT_CLASS } from './panel.styles';
11
- import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
13
+ import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
14
+ import { CollapsiblePane } from './collapsible-pane.component';
12
15
  export class WmPanelState extends BaseComponentState {
13
16
  constructor() {
14
17
  super(...arguments);
15
- _defineProperty(this, "expandedId", void 0);
16
18
  _defineProperty(this, "isPartialLoaded", false);
17
19
  }
18
20
  }
19
21
  export default class WmPanel extends BaseComponent {
20
22
  constructor(props) {
21
23
  super(props, DEFAULT_CLASS, new WmPanelProps());
22
- _defineProperty(this, "animatedRef", void 0);
23
- this.updateState({
24
- expandedId: this.state.props.expanded ? 1 : -1
25
- });
26
24
  }
27
25
  onPartialLoad() {
28
26
  this.invokeEventCallback('onLoad', [this]);
@@ -36,34 +34,19 @@ export default class WmPanel extends BaseComponent {
36
34
  });
37
35
  });
38
36
  }
39
- return props.renderPartial(this.onPartialLoad.bind(this));
37
+ return props.renderPartial(props, this.onPartialLoad.bind(this));
40
38
  }
41
39
  }
42
- onPanelPress(expandedId) {
40
+ onPanelPress() {
43
41
  if (!this.state.props.collapsible) {
44
42
  return;
45
43
  }
46
- const paneId = expandedId === this.state.expandedId ? -1 : 1;
47
- const eventName = paneId === 1 ? 'onExpand' : 'onCollapse';
48
- if (eventName === 'onCollapse') {
49
- this.animatedRef.triggerExit().then(res => {
50
- if (res) {
51
- this.updateState({
52
- expandedId: paneId,
53
- props: {
54
- expanded: false
55
- }
56
- });
57
- }
58
- });
59
- } else {
60
- this.updateState({
61
- expandedId: paneId,
62
- props: {
63
- expanded: true
64
- }
65
- });
66
- }
44
+ const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';
45
+ this.updateState({
46
+ props: {
47
+ expanded: !this.state.props.expanded
48
+ }
49
+ });
67
50
  this.invokeEventCallback(eventName, [null, this.proxy]);
68
51
  }
69
52
  expandCollapseIcon(isExpanded) {
@@ -80,48 +63,47 @@ export default class WmPanel extends BaseComponent {
80
63
  }) : null;
81
64
  return /*#__PURE__*/React.createElement(View, {
82
65
  style: {
83
- flexDirection: 'row'
66
+ flexDirection: 'row',
67
+ alignItems: 'center'
84
68
  }
85
69
  }, badge, expandCollapseIcon);
86
70
  }
87
- renderPanel(props) {
88
- const icon = /*#__PURE__*/React.createElement(WmIcon, {
71
+ renderHeader() {
72
+ const props = this.state.props;
73
+ return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction(`header`), {
74
+ style: [this.styles.header],
75
+ onPress: this.onPanelPress.bind(this)
76
+ }), props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
89
77
  styles: this.styles.icon,
90
78
  name: props.name + '_icon',
91
79
  iconclass: props.iconclass
92
- });
93
- return /*#__PURE__*/React.createElement(List.Accordion, {
94
- title: props.title,
95
- style: this.styles.header,
96
- id: 1,
97
- titleStyle: this.styles.text,
98
- descriptionStyle: this.styles.subheading,
99
- description: props.subheading,
100
- expanded: props.expanded,
101
- right: _ref => {
102
- let {
103
- isExpanded
104
- } = _ref;
105
- return this.expandCollapseIcon(isExpanded);
106
- },
107
- left: props => icon
108
- }, /*#__PURE__*/React.createElement(Animatedview, {
80
+ }) : null, /*#__PURE__*/React.createElement(View, {
109
81
  style: {
110
- marginLeft: -64
111
- },
112
- ref: ref => this.animatedRef = ref,
113
- entryanimation: 'fadeInDown'
114
- }, /*#__PURE__*/React.createElement(View, null, this.renderContent(props)), /*#__PURE__*/React.createElement(View, null, props.children)));
82
+ flexDirection: 'column',
83
+ flex: 1,
84
+ justifyContent: 'center'
85
+ }
86
+ }, /*#__PURE__*/React.createElement(Text, _extends({
87
+ style: [this.styles.text, this.styles.heading]
88
+ }, this.getTestPropsForAction(`header_title`)), isUndefined(props.title) ? 'Title' : props.title), props.subheading ? /*#__PURE__*/React.createElement(Text, _extends({
89
+ style: this.styles.subheading
90
+ }, this.getTestPropsForAction(`subheader`)), props.subheading) : null), this.expandCollapseIcon(props.expanded));
91
+ }
92
+ renderPane(content) {
93
+ const expanded = this.state.props.expanded;
94
+ return isWebPreviewMode() ? /*#__PURE__*/React.createElement(View, {
95
+ style: expanded ? {} : {
96
+ maxHeight: 0,
97
+ overflow: 'hidden'
98
+ }
99
+ }, content) : /*#__PURE__*/React.createElement(CollapsiblePane, {
100
+ close: !expanded
101
+ }, content);
115
102
  }
116
103
  renderWidget(props) {
117
104
  return /*#__PURE__*/React.createElement(View, {
118
105
  style: this.styles.root
119
- }, this._background, /*#__PURE__*/React.createElement(List.AccordionGroup, {
120
- expandedId: this.state.expandedId,
121
- onAccordionPress: this.onPanelPress.bind(this)
122
- }, /*#__PURE__*/React.createElement(Animatedview, {
123
- entryanimation: props.animation
124
- }, this.renderPanel(props))));
106
+ }, this._background, this.renderHeader(), this.renderPane( /*#__PURE__*/React.createElement(React.Fragment, null, this.renderContent(props), /*#__PURE__*/React.createElement(View, null, props.children))));
125
107
  }
126
108
  }
127
109
  //# sourceMappingURL=panel.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Badge","List","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","Animatedview","WmPanelState","constructor","arguments","_defineProperty","WmPanel","props","updateState","expandedId","state","expanded","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","onPanelPress","collapsible","paneId","eventName","animatedRef","triggerExit","then","res","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","renderPanel","icon","Accordion","title","header","id","titleStyle","text","descriptionStyle","subheading","description","right","_ref","left","marginLeft","ref","entryanimation","children","renderWidget","root","_background","AccordionGroup","onAccordionPress","animation"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { Badge, List } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n expandedId: any;\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n private animatedRef: any;\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n this.updateState({\n expandedId: this.state.props.expanded ? 1 : -1,\n } as WmPanelState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress(expandedId: any) {\n if (!this.state.props.collapsible) {\n return;\n }\n const paneId = expandedId === this.state.expandedId ? -1 : 1;\n const eventName = paneId === 1 ? 'onExpand' : 'onCollapse';\n\n if (eventName === 'onCollapse') {\n this.animatedRef.triggerExit().then((res: any) => {\n if (res) {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: false\n }\n } as WmPanelState);\n }\n })\n } else {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: true\n }\n } as WmPanelState);\n }\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderPanel(props: WmPanelProps) {\n const icon = (<WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>);\n return (\n <List.Accordion title={props.title} style={this.styles.header} id={1}\n titleStyle={this.styles.text} descriptionStyle={this.styles.subheading}\n description={props.subheading}\n expanded={props.expanded} \n right={({isExpanded}) => this.expandCollapseIcon(isExpanded)} left={props => icon}>\n <Animatedview style={{marginLeft: -64}} ref={ref => this.animatedRef = ref} entryanimation={'fadeInDown'}>\n <View>{this.renderContent(props)}</View>\n <View>{props.children}</View>\n </Animatedview>\n </List.Accordion>\n );\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n <List.AccordionGroup expandedId={this.state.expandedId} onAccordionPress={this.onPanelPress.bind(this)}>\n <Animatedview entryanimation={props.animation}>\n {this.renderPanel(props)}\n </Animatedview>\n </List.AccordionGroup>\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,YAAY,QAAQ,mEAAmE;AAEhG,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,0BAE/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,OAAO,SAASV,aAAa,CAA4C;EAE5FO,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;IAACM,eAAA;IAChD,IAAI,CAACG,WAAW,CAAC;MACfC,UAAU,EAAE,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,GAAG,CAAC,GAAG,CAAC;IAC/C,CAAiB,CAAC;EACpB;EAEAC,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC5C;EAEAC,aAAaA,CAACP,KAAmB,EAAE;IACjC,IAAIA,KAAK,CAACQ,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACL,KAAK,CAACM,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACT,WAAW,CAAC;YACfQ,eAAe,EAAE;UACnB,CAAiB,CAAC;QACpB,CAAC,CAAC;MAC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IAAI,EAAEhD,KAAK,IAAIoC;IAAK,gBAChGnD,KAAA,CAAA0C,aAAA,CAACjC,YAAY;MAACkC,KAAK,EAAE;QAACqB,UAAU,EAAE,CAAC;MAAE,CAAE;MAACC,GAAG,EAAEA,GAAG,IAAI,IAAI,CAAClC,WAAW,GAAGkC,GAAI;MAACC,cAAc,EAAE;IAAa,gBACvGlE,KAAA,CAAA0C,aAAA,CAACzC,IAAI,QAAE,IAAI,CAACqB,aAAa,CAACP,KAAK,CAAQ,CAAC,eACxCf,KAAA,CAAA0C,aAAA,CAACzC,IAAI,QAAEc,KAAK,CAACoD,QAAe,CAChB,CACA,CAAC;EAErB;EAEAC,YAAYA,CAACrD,KAAmB,EAAE;IAChC,oBAAQf,KAAA,CAAA0C,aAAA,CAACzC,IAAI;MAAC0C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACyB;IAAK,GACvB,IAAI,CAACC,WAAW,eACjBtE,KAAA,CAAA0C,aAAA,CAACvC,IAAI,CAACoE,cAAc;MAACtD,UAAU,EAAE,IAAI,CAACC,KAAK,CAACD,UAAW;MAACuD,gBAAgB,EAAE,IAAI,CAAC7C,YAAY,CAACD,IAAI,CAAC,IAAI;IAAE,gBACnG1B,KAAA,CAAA0C,aAAA,CAACjC,YAAY;MAACyD,cAAc,EAAEnD,KAAK,CAAC0D;IAAU,GAC3C,IAAI,CAACvB,WAAW,CAACnC,KAAK,CACX,CACG,CACrB,CAAC;EACjB;AACF"}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","arguments","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","alignItems","renderHeader","_extends","getTestPropsForAction","header","onPress","icon","flex","justifyContent","text","heading","title","subheading","renderPane","content","maxHeight","overflow","close","renderWidget","root","_background","Fragment","children"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}>\n {props.iconclass ? <WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text>\n {props.subheading ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>{props.subheading}</Text>) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AAC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AAC,gBACN7D,KAAA,CAAAuC,aAAA,CAAC3B,eAAe;MAACoD,KAAK,EAAE,CAACjC;IAAS,GAChC8B,OACc,CAAE;EACvB;EAEAI,YAAYA,CAAC/C,KAAmB,EAAE;IAChC,oBAAQlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACyB;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACnB,YAAY,CAAC,CAAC,EACnB,IAAI,CAACY,UAAU,eACd5D,KAAA,CAAAuC,aAAA,CAAAvC,KAAA,CAAAoE,QAAA,QACC,IAAI,CAAC/C,aAAa,CAACH,KAAK,CAAC,eAC1BlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI,QAAEgB,KAAK,CAACmD,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF"}
@@ -17,6 +17,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
17
17
  fontWeight: 'bold'
18
18
  },
19
19
  header: {
20
+ flexDirection: 'row',
20
21
  backgroundColor: themeVariables.panelHeaderBgColor,
21
22
  paddingHorizontal: 8,
22
23
  paddingVertical: 4,
@@ -26,7 +27,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
26
27
  borderTopLeftRadius: 6,
27
28
  borderTopRightRadius: 6
28
29
  },
29
- subheading: {},
30
+ heading: {
31
+ paddingHorizontal: 16
32
+ },
33
+ subheading: {
34
+ paddingHorizontal: 16
35
+ },
30
36
  icon: {
31
37
  root: {
32
38
  alignSelf: 'auto',
@@ -40,7 +46,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
40
46
  },
41
47
  badge: {
42
48
  color: themeVariables.badgeTextColor,
43
- marginRight: 8
49
+ marginRight: 8,
50
+ alignSelf: 'center'
44
51
  },
45
52
  default: {
46
53
  backgroundColor: themeVariables.labelDefaultColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","panelBgColor","borderStyle","borderWidth","padding","borderRadius","text","color","panelHeaderTextColor","fontSize","fontWeight","header","panelHeaderBgColor","paddingHorizontal","paddingVertical","borderColor","borderTopLeftRadius","borderTopRightRadius","subheading","icon","alignSelf","toggleIcon","badge","badgeTextColor","marginRight","default","labelDefaultColor","success","labelSuccessColor","danger","labelDangerColor","warning","labelWarningColor","info","labelInfoColor","primary","labelPrimaryColor","OS","textAlign","getPanelBgStyles","panelTextColor","panelDangerColor","panelDefaultColor","panelInfoColor","panelPrimaryColor","panelSuccessColor","panelWarningColor"],"sources":["panel.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { Platform } from 'react-native';\n\nexport type WmPanelStyles = BaseStyles & {\n icon: WmIconStyles,\n badge: AllStyle,\n header: AllStyle,\n subheading: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-panel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPanelStyles = defineStyles({\n root: {\n backgroundColor: themeVariables.panelBgColor,\n borderStyle: 'solid',\n borderWidth: 0,\n padding: 12,\n borderRadius: 6\n },\n text: {\n color: themeVariables.panelHeaderTextColor,\n fontSize: 16,\n fontWeight: 'bold'\n },\n header: {\n backgroundColor: themeVariables.panelHeaderBgColor,\n paddingHorizontal: 8,\n paddingVertical: 4,\n borderStyle: 'solid',\n borderWidth: 0,\n borderColor: themeVariables.panelHeaderBgColor,\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n },\n subheading: {},\n icon: {\n root: {\n alignSelf: 'auto',\n fontSize: 32,\n },\n } as WmIconStyles,\n toggleIcon: {\n root: {\n fontSize: 16,\n },\n } as WmIconStyles,\n badge: {\n color: themeVariables.badgeTextColor,\n marginRight: 8\n },\n default: {\n backgroundColor: themeVariables.labelDefaultColor\n },\n success: {\n backgroundColor: themeVariables.labelSuccessColor\n },\n danger: {\n backgroundColor: themeVariables.labelDangerColor\n },\n warning: {\n backgroundColor: themeVariables.labelWarningColor\n },\n info: {\n backgroundColor: themeVariables.labelInfoColor\n },\n primary: {\n backgroundColor: themeVariables.labelPrimaryColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n } ,\n subheading:{\n textAlign:'right',\n }\n }:{});\n const getPanelBgStyles = (color: string) => {\n return {\n header: {\n backgroundColor: color\n },\n text: {\n color: themeVariables.panelTextColor\n },\n subheading: {\n color: themeVariables.panelTextColor\n },\n icon: {\n text: {\n color: themeVariables.panelTextColor\n }\n } as WmIconStyles\n } as WmPanelStyles;\n };\n\n addStyle('panel-danger', '', getPanelBgStyles(themeVariables.panelDangerColor));\n addStyle('panel-default', '', getPanelBgStyles(themeVariables.panelDefaultColor));\n addStyle('panel-info', '', getPanelBgStyles(themeVariables.panelInfoColor));\n addStyle('panel-primary', '', getPanelBgStyles(themeVariables.panelPrimaryColor));\n addStyle('panel-success', '', getPanelBgStyles(themeVariables.panelSuccessColor));\n addStyle('panel-warning', '', getPanelBgStyles(themeVariables.panelWarningColor));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AASvC,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGN,YAAY,CAAC;IAC9CO,IAAI,EAAE;MACJC,eAAe,EAAEJ,cAAc,CAACK,YAAY;MAC5CC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAE,CAAC;MACdC,OAAO,EAAE,EAA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QAAQ,CAAC4C,EAAE,IAAE,KAAK,GAAC;IACtD/B,IAAI,EAAC;MACHgC,SAAS,EAAC;IACZ,CAAC;IACDpB,UAAU,EAAC;MACToB,SAAS,EAAC;IACZ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACL,MAAMC,gBAAgB,GAAIhC,KAAa,IAAK;IAC1C,OAAO;MACLI,MAAM,EAAE;QACNX,eAAe,EAAEO;MACnB,CAAC;MACDD,IAAI,EAAE;QACJC,KAAK,EAAEX,cAAc,CAAC4C;MACxB,CAAC;MACDtB,UAAU,EAAE;QACVX,KAAK,EAAEX,cAAc,CAAC4C;MACxB,CAAC;MACDrB,IAAI,EAAE;QACJb,IAAI,EAAE;UACJC,KAAK,EAAEX,cAAc,CAAC4C;QACxB;MACF;IACF,CAAC;EACH,CAAC;EAED3C,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE0C,gBAAgB,CAAC3C,cAAc,CAAC6C,gBAAgB,CAAC,CAAC;EAC/E5C,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE0C,gBAAgB,CAAC3C,cAAc,CAAC8C,iBAAiB,CAAC,CAAC;EACjF7C,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE0C,gBAAgB,CAAC3C,cAAc,CAAC+C,cAAc,CAAC,CAAC;EAC3E9C,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE0C,gBAAgB,CAAC3C,cAAc,CAACgD,iBAAiB,CAAC,CAAC;EACjF/C,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE0C,gBAAgB,CAAC3C,cAAc,CAACiD,iBAAiB,CAAC,CAAC;EACjFhD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE0C,gBAAgB,CAAC3C,cAAc,CAACkD,iBAAiB,CAAC,CAAC;AACnF,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","panelBgColor","borderStyle","borderWidth","padding","borderRadius","text","color","panelHeaderTextColor","fontSize","fontWeight","header","flexDirection","panelHeaderBgColor","paddingHorizontal","paddingVertical","borderColor","borderTopLeftRadius","borderTopRightRadius","heading","subheading","icon","alignSelf","toggleIcon","badge","badgeTextColor","marginRight","default","labelDefaultColor","success","labelSuccessColor","danger","labelDangerColor","warning","labelWarningColor","info","labelInfoColor","primary","labelPrimaryColor","OS","textAlign","getPanelBgStyles","panelTextColor","panelDangerColor","panelDefaultColor","panelInfoColor","panelPrimaryColor","panelSuccessColor","panelWarningColor"],"sources":["panel.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { Platform } from 'react-native';\n\nexport type WmPanelStyles = BaseStyles & {\n icon: WmIconStyles,\n badge: AllStyle,\n header: AllStyle,\n subheading: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-panel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPanelStyles = defineStyles({\n root: {\n backgroundColor: themeVariables.panelBgColor,\n borderStyle: 'solid',\n borderWidth: 0,\n padding: 12,\n borderRadius: 6\n },\n text: {\n color: themeVariables.panelHeaderTextColor,\n fontSize: 16,\n fontWeight: 'bold'\n },\n header: {\n flexDirection: 'row',\n backgroundColor: themeVariables.panelHeaderBgColor,\n paddingHorizontal: 8,\n paddingVertical: 4,\n borderStyle: 'solid',\n borderWidth: 0,\n borderColor: themeVariables.panelHeaderBgColor,\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n },\n heading: {\n paddingHorizontal: 16\n },\n subheading: {\n paddingHorizontal: 16\n },\n icon: {\n root: {\n alignSelf: 'auto',\n fontSize: 32,\n },\n } as WmIconStyles,\n toggleIcon: {\n root: {\n fontSize: 16,\n },\n } as WmIconStyles,\n badge: {\n color: themeVariables.badgeTextColor,\n marginRight: 8,\n alignSelf: 'center'\n },\n default: {\n backgroundColor: themeVariables.labelDefaultColor\n },\n success: {\n backgroundColor: themeVariables.labelSuccessColor\n },\n danger: {\n backgroundColor: themeVariables.labelDangerColor\n },\n warning: {\n backgroundColor: themeVariables.labelWarningColor\n },\n info: {\n backgroundColor: themeVariables.labelInfoColor\n },\n primary: {\n backgroundColor: themeVariables.labelPrimaryColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n } ,\n subheading:{\n textAlign:'right',\n }\n }:{});\n const getPanelBgStyles = (color: string) => {\n return {\n header: {\n backgroundColor: color\n },\n text: {\n color: themeVariables.panelTextColor\n },\n subheading: {\n color: themeVariables.panelTextColor\n },\n icon: {\n text: {\n color: themeVariables.panelTextColor\n }\n } as WmIconStyles\n } as WmPanelStyles;\n };\n\n addStyle('panel-danger', '', getPanelBgStyles(themeVariables.panelDangerColor));\n addStyle('panel-default', '', getPanelBgStyles(themeVariables.panelDefaultColor));\n addStyle('panel-info', '', getPanelBgStyles(themeVariables.panelInfoColor));\n addStyle('panel-primary', '', getPanelBgStyles(themeVariables.panelPrimaryColor));\n addStyle('panel-success', '', getPanelBgStyles(themeVariables.panelSuccessColor));\n addStyle('panel-warning', '', getPanelBgStyles(themeVariables.panelWarningColor));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AASvC,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGN,YAAY,CAAC;IAC9CO,IAAI,EAAE;MACJC,eAAe,EAAEJ,cAAc,CAACK,YAAY;MAC5CC,WAAW,EAAE,OAAO;MACpBC,WAAW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,iBAAiB,CAAC,CAAC;AACnF,CAAC,CAAC"}
@@ -34,7 +34,7 @@ export class PartialHost extends BaseComponent {
34
34
  });
35
35
  });
36
36
  }
37
- return props.renderPartial(this.onPartialLoad.bind(this));
37
+ return props.renderPartial(props, this.onPartialLoad.bind(this));
38
38
  }
39
39
  return props.children;
40
40
  }
@@ -1 +1 @@
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"}
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(props, 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,CAACD,KAAK,EAAE,IAAI,CAACH,aAAa,CAACU,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE;IACA,OAAOP,KAAK,CAACQ,QAAQ;EACzB;AAEJ"}
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  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); }
@@ -139,22 +140,23 @@ export default class WmTabheader extends BaseComponent {
139
140
  style: this.styles.root
140
141
  }, this._background, props.data.map((header, i) => {
141
142
  const isSelected = i === props.selectedTabIndex;
142
- return /*#__PURE__*/React.createElement(Tappable, {
143
- onTap: this.onTabSelection.bind(this, i),
143
+ return /*#__PURE__*/React.createElement(Tappable, _extends({
144
+ onTap: this.onTabSelection.bind(this, i)
145
+ }, this.getTestPropsForAction(i + ''), {
144
146
  key: header.key,
145
147
  styles: this.styles.header.flexGrow ? {
146
148
  flexGrow: this.styles.header.flexGrow
147
149
  } : null
148
- }, /*#__PURE__*/React.createElement(View, {
150
+ }), /*#__PURE__*/React.createElement(View, {
149
151
  onLayout: this.setHeaderPositon.bind(this, i)
150
152
  }, /*#__PURE__*/React.createElement(View, {
151
153
  style: [this.styles.header, {
152
154
  flexGrow: undefined
153
155
  }, isSelected ? this.styles.activeHeader : null]
154
- }, /*#__PURE__*/React.createElement(Text, {
156
+ }, /*#__PURE__*/React.createElement(Text, _extends({
155
157
  numberOfLines: 1,
156
158
  style: [this.styles.headerText, isSelected ? this.styles.activeHeaderText : null]
157
- }, header.title))));
159
+ }, this.getTestPropsForLabel(i + '_title')), header.title))));
158
160
  })), /*#__PURE__*/React.createElement(Animated.View, {
159
161
  style: [this.styles.activeIndicator, {
160
162
  transform: [{
@@ -1 +1 @@
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"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AAC,IAAI,CAACK,MAAM,CAACiB,eAAe,EAAE;QAClDrB,SAAS,EAAE,CAAC;UACVC,UAAU,EAAE,IAAI,CAACN;QACnB,CAAC,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
+ {"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","_extends","getTestPropsForAction","flexGrow","undefined","numberOfLines","headerText","getTestPropsForLabel","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 {...this.getTestPropsForAction(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]}\n {...this.getTestPropsForLabel(i + '_title')}\n >{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,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;AAEnH,SAASC,mBAAmB,QAAQ,uDAAuD;AAE3F,OAAO,MAAMC,gBAAgB,SAASN,kBAAkB,CAAmB;AAG3E,eAAe,MAAMO,WAAW,SAASR,aAAa,CAAwD;EAS5GS,WAAWA,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIK,gBAAgB,CAAC,CAAC,CAAC;IAACI,eAAA,4BARjC,IAAI;IAAAA,eAAA,wBACN,EAAE;IAAAA,eAAA,+BACd,IAAIf,QAAQ,CAACgB,KAAK,CAAC,CAAC,CAAC;IAAAD,eAAA,oCAChB,CAAC;IAAAA,eAAA,4BACT,IAAIf,QAAQ,CAACgB,KAAK,CAAC,CAAC,CAAC;IAAAD,eAAA,yBACxB,IAAIf,QAAQ,CAACgB,KAAK,CAAC,CAAC,CAAC;IAI5C,IAAI,CAACC,oBAAoB,CAACC,WAAW,CAACC,IAAA;MAAA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,CAC9C,CACO,CACF,CACT,CAAC;EAEX;AACF"}
@@ -11,9 +11,11 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
11
11
  text: {},
12
12
  header: {
13
13
  backgroundColor: themeVariables.tabHeaderBgColor,
14
- paddingHorizontal: 12,
14
+ paddingTop: 16,
15
+ paddingBottom: 16,
15
16
  paddingVertical: 12,
16
17
  minWidth: 80,
18
+ minHeight: 48,
17
19
  flexDirection: 'row',
18
20
  justifyContent: 'center',
19
21
  flexGrow: 1
@@ -21,15 +23,17 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
21
23
  headerIcon: {
22
24
  text: {
23
25
  color: themeVariables.tabHeaderIconColor
26
+ },
27
+ icon: {
28
+ fontSize: 24
24
29
  }
25
30
  },
26
31
  headerText: {
27
32
  color: themeVariables.tabHeaderTextColor,
28
33
  overflow: 'visible',
29
34
  fontFamily: themeVariables.baseFont,
30
- fontWeight: 'bold',
31
- fontSize: 16,
32
- textTransform: 'capitalize'
35
+ fontWeight: '500',
36
+ fontSize: 14
33
37
  },
34
38
  activeHeader: {
35
39
  backgroundColor: themeVariables.tabActiveHeaderBgColor
@@ -37,7 +41,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
37
41
  activeIndicator: {
38
42
  backgroundColor: themeVariables.tabActiveIndicatorBgColor,
39
43
  width: 100,
40
- height: 4,
44
+ height: 2,
41
45
  marginTop: -4,
42
46
  backgroundPosition: '0px center',
43
47
  backgroundSize: '48px 48px',
@@ -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","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"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingTop","paddingBottom","paddingVertical","minHeight","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","icon","fontSize","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","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 paddingTop: 16,\n paddingBottom: 16,\n paddingVertical: 12,\n minWidth: 80,\n minHeight:48,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n },\n icon: {\n fontSize : 24\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n fontSize: 14,\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 2,\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,MAA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AACsC;MAC1B;IACJ,CAAiB;IACjBC,gBAAgB,EAAE;MACdrB,KAAK,EAAElB,cAAc,CAACwC;IAC1B,CAAC;IACDC,cAAc,EAAE;MACZC,OAAO,EAAE;IACb,CAAC;IACDC,iBAAiB,EAAE;MACfD,OAAO,EAAE;IACb,CAAC;IACDE,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtB3C,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -28,7 +28,7 @@ export default class WmTabpane extends BaseComponent {
28
28
  });
29
29
  });
30
30
  }
31
- return props.renderPartial(this.onPartialLoad.bind(this));
31
+ return props.renderPartial(props, this.onPartialLoad.bind(this));
32
32
  }
33
33
  return props.children;
34
34
  }
@@ -1 +1 @@
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
+ {"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(props, 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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AAK,GAAE,IAAI,CAACC,WAAW,EAAE,IAAI,CAACtB,aAAa,CAACH,KAAK,CAAQ,CAAC;EAC7F;AACF"}
@@ -180,6 +180,7 @@ export default class WmTabs extends BaseComponent {
180
180
  width: '100%'
181
181
  }
182
182
  }), /*#__PURE__*/React.createElement(WmTabheader, {
183
+ id: this.getTestId('headers'),
183
184
  styles: this.styles.tabHeader,
184
185
  data: headerData,
185
186
  selectedTabIndex: this.state.selectedTabIndex,