@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
@@ -4,19 +4,19 @@ export const DEFAULT_CLASS = 'app-toggle';
4
4
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
5
  const defaultStyles = defineStyles({
6
6
  root: {
7
- width: 36,
7
+ width: 52,
8
+ height: 32,
8
9
  flexDirection: 'row',
9
10
  justifyContent: 'flex-start',
10
11
  alignItems: 'center',
11
- borderRadius: 18,
12
- borderWidth: 1
12
+ borderRadius: 18
13
13
  },
14
14
  text: {},
15
15
  handle: {
16
- width: 18,
17
- height: 18,
16
+ width: 20,
17
+ height: 20,
18
18
  borderRadius: 18,
19
- backgroundColor: themeVariables.toggleHandleColor,
19
+ // backgroundColor: themeVariables.toggleHandleColor,
20
20
  backgroundSize: '100% 100%',
21
21
  backgroundPosition: 'center'
22
22
  }
@@ -25,14 +25,26 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
25
25
  addStyle(DEFAULT_CLASS + '-on', '', {
26
26
  root: {
27
27
  backgroundColor: themeVariables.toggleOnColor,
28
- justifyContent: 'flex-end',
29
- borderColor: themeVariables.toggleOnColor
28
+ justifyContent: 'flex-end'
29
+ },
30
+ handle: {
31
+ width: 24,
32
+ height: 24,
33
+ marginRight: 4,
34
+ backgroundColor: themeVariables.toggleHandleColor
30
35
  }
31
36
  });
32
37
  addStyle(DEFAULT_CLASS + '-off', '', {
33
38
  root: {
34
39
  backgroundColor: themeVariables.toggleOffColor,
35
- borderColor: themeVariables.toggleOffColor
40
+ borderColor: themeVariables.toggleOffBorderColor,
41
+ borderWidth: 2
42
+ },
43
+ handle: {
44
+ width: 16,
45
+ height: 16,
46
+ marginLeft: 6,
47
+ backgroundColor: themeVariables.toggleHandleDisableColor
36
48
  }
37
49
  });
38
50
  addStyle(DEFAULT_CLASS + '-rtl', '', {});
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","flexDirection","justifyContent","alignItems","borderRadius","borderWidth","text","handle","height","backgroundColor","toggleHandleColor","backgroundSize","backgroundPosition","toggleOnColor","borderColor","toggleOffColor"],"sources":["toggle.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform, ViewStyle } from 'react-native';\nimport Color from 'color';\n\nexport type WmToggleStyles = BaseStyles & {\n handle: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-toggle';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmToggleStyles = defineStyles({\n root: {\n width: 36,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n borderRadius: 18,\n borderWidth: 1\n },\n text: {},\n handle: {\n width: 18,\n height: 18,\n borderRadius: 18,\n backgroundColor: themeVariables.toggleHandleColor,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-on', '', {\n root : {\n backgroundColor: themeVariables.toggleOnColor,\n justifyContent: 'flex-end',\n borderColor: themeVariables.toggleOnColor\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-off', '', {\n root : {\n backgroundColor: themeVariables.toggleOffColor,\n borderColor: themeVariables.toggleOffColor\n }\n } as Wm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C,CAAC;EACxCG,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG,CAAC;EACZ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","height","flexDirection","justifyContent","alignItems","borderRadius","text","handle","backgroundSize","backgroundPosition","backgroundColor","toggleOnColor","marginRight","toggleHandleColor","toggleOffColor","borderColor","toggleOffBorderColor","borderWidth","marginLeft","toggleHandleDisableColor"],"sources":["toggle.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform, ViewStyle } from 'react-native';\nimport Color from 'color';\n\nexport type WmToggleStyles = BaseStyles & {\n handle: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-toggle';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmToggleStyles = defineStyles({\n root: {\n width: 52,\n height: 32,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n borderRadius: 18,\n },\n text: {},\n handle: {\n width: 20,\n height: 20,\n borderRadius: 18,\n // backgroundColor: themeVariables.toggleHandleColor,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-on', '', {\n root : {\n backgroundColor: themeVariables.toggleOnColor,\n justifyContent: 'flex-end',\n },\n handle: {\n width: 24,\n height: 24,\n marginRight:4,\n backgroundColor: themeVariables.toggleHandleColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-off', '', {\n root : {\n backgroundColor: themeVariables.toggleOffColor,\n borderColor: themeVariables.toggleOffBorderColor,\n borderWidth: 2\n },\n handle: {\n width: 16,\n height: 16,\n marginLeft: 6,\n backgroundColor: themeVariables.toggleHandleDisableColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {}\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,YAAY;MAC5BC,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNP,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVI,YAAY,EAAE,EAAE;MAChB;MACAG,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE;IACtB;EACJ,CAAC,CAAC;EAEFZ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,KAAK,EAAE,EAAE,EAAE;IAClCK,IAAI,EAAG;MACLW,eAAe,EAAEd,cAAc,CAACe,aAAa;MAC7CR,cAAc,EAAE;IAClB,CAAC;IACDI,MAAM,EAAE;MACNP,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVW,WAAW,EAAC,CAAC;MACbF,eAAe,EAAEd,cAAc,CAACiB;IAClC;EACF,CAAmB,CAAC;EACpBhB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLW,eAAe,EAAEd,cAAc,CAACkB,cAAc;MAC9CC,WAAW,EAAEnB,cAAc,CAACoB,oBAAoB;MAChDC,WAAW,EAAE;IACf,CAAC;IACDV,MAAM,EAAE;MACNP,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACViB,UAAU,EAAE,CAAC;MACbR,eAAe,EAAEd,cAAc,CAACuB;IAClC;EACF,CAAmB,CAAC;EACpBtB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;EACxCG,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG,CAAC;EACZ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -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); }
@@ -25,10 +26,12 @@ export default class WmAppNavbar extends BaseComponent {
25
26
  }, this._background, /*#__PURE__*/React.createElement(View, {
26
27
  style: this.styles.leftSection
27
28
  }, props.showDrawerButton && /*#__PURE__*/React.createElement(WmIcon, {
29
+ id: this.getTestId('leftnavbtn'),
28
30
  styles: this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon),
29
31
  iconclass: props.leftnavpaneliconclass,
30
32
  onTap: this.onDrawerBtnPress
31
33
  }), props.backbutton && /*#__PURE__*/React.createElement(WmIcon, {
34
+ id: this.getTestId('backbtn'),
32
35
  styles: this.theme.mergeStyle({}, this.styles.action, this.styles.backIcon),
33
36
  iconclass: props.backbuttoniconclass,
34
37
  caption: props.backbuttonlabel,
@@ -36,13 +39,15 @@ export default class WmAppNavbar extends BaseComponent {
36
39
  })), /*#__PURE__*/React.createElement(View, {
37
40
  style: this.styles.middleSection
38
41
  }, props.imgsrc && /*#__PURE__*/React.createElement(WmPicture, {
42
+ id: this.getTestId('picture'),
39
43
  styles: this.styles.image,
40
44
  picturesource: props.imgsrc
41
- }), /*#__PURE__*/React.createElement(Text, {
45
+ }), /*#__PURE__*/React.createElement(Text, _extends({
42
46
  style: this.styles.content
43
- }, props.title)), /*#__PURE__*/React.createElement(View, {
47
+ }, this.getTestPropsForLabel('title')), props.title)), /*#__PURE__*/React.createElement(View, {
44
48
  style: this.styles.rightSection
45
49
  }, props.searchbutton && /*#__PURE__*/React.createElement(WmIcon, {
50
+ id: this.getTestId('searchbtn'),
46
51
  styles: this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon),
47
52
  iconclass: props.searchbuttoniconclass,
48
53
  onTap: this.onSearchBtnPress
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmIcon","WmPicture","WmAppNavbarProps","DEFAULT_CLASS","WmAppNavbarState","WmAppNavbar","constructor","props","_defineProperty","onDrawerBtnPress","invokeEventCallback","bind","onBackBtnPress","onSearchBtnPress","renderWidget","createElement","style","styles","root","_background","leftSection","showDrawerButton","theme","mergeStyle","action","leftnavIcon","iconclass","leftnavpaneliconclass","onTap","backbutton","backIcon","backbuttoniconclass","caption","backbuttonlabel","middleSection","imgsrc","image","picturesource","content","title","rightSection","searchbutton","searchbuttoniconclass","children"],"sources":["appnavbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\nimport WmAppNavbarProps from './appnavbar.props';\nimport { DEFAULT_CLASS, WmAppNavbarStyles } from './appnavbar.styles';\n\nexport class WmAppNavbarState extends BaseComponentState<WmAppNavbarProps> {\n\n}\n\nexport default class WmAppNavbar extends BaseComponent<WmAppNavbarProps, WmAppNavbarState, WmAppNavbarStyles> {\n\n private onDrawerBtnPress: Function;\n private onBackBtnPress: Function;\n private onSearchBtnPress: Function;\n\n constructor(props: WmAppNavbarProps) {\n super(props, DEFAULT_CLASS, new WmAppNavbarProps());\n this.onDrawerBtnPress = (() => this.invokeEventCallback('onDrawerbuttonpress', [null, this])).bind(this);\n this.onBackBtnPress = (() => this.invokeEventCallback('onBackbtnclick', [null, this])).bind(this);\n this.onSearchBtnPress = (() => this.invokeEventCallback('onSearchbuttonpress', [null, this])).bind(this);\n }\n\n renderWidget(props: WmAppNavbarProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.leftSection}>\n {props.showDrawerButton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.leftnavpaneliconclass}\n onTap={this.onDrawerBtnPress}\n />)}\n {props.backbutton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.backIcon)}\n iconclass={props.backbuttoniconclass}\n caption={props.backbuttonlabel}\n onTap={this.onBackBtnPress}/>)}\n </View>\n <View style={this.styles.middleSection}>\n {props.imgsrc && (\n <WmPicture\n styles={this.styles.image}\n picturesource={props.imgsrc} />)}\n <Text style={this.styles.content}>{props.title}</Text>\n </View>\n <View style={this.styles.rightSection}>\n {props.searchbutton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.searchbuttoniconclass}\n onTap={this.onSearchBtnPress}\n />)}\n {props.children}\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AA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BiB,MAAM,EAAE,IAAI,CAACK,KAAK,CAACC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAACN,MAAM,CAACO,MAAM,EAAE,IAAI,CAACP,MAAM,CAACQ,WAAW,CAAE;MAC/EC,SAAS,EAAEnB,KAAK,CAACmC,qBAAsB;MACvCd,KAAK,EAAE,IAAI,CAACf;IAAiB,CAC5B,CAAE,EACJN,KAAK,CAACoC,QACH,CACF,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmIcon","WmPicture","WmAppNavbarProps","DEFAULT_CLASS","WmAppNavbarState","WmAppNavbar","constructor","props","_defineProperty","onDrawerBtnPress","invokeEventCallback","bind","onBackBtnPress","onSearchBtnPress","renderWidget","createElement","style","styles","root","_background","leftSection","showDrawerButton","id","getTestId","theme","mergeStyle","action","leftnavIcon","iconclass","leftnavpaneliconclass","onTap","backbutton","backIcon","backbuttoniconclass","caption","backbuttonlabel","middleSection","imgsrc","image","picturesource","_extends","content","getTestPropsForLabel","title","rightSection","searchbutton","searchbuttoniconclass","children"],"sources":["appnavbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\nimport WmAppNavbarProps from './appnavbar.props';\nimport { DEFAULT_CLASS, WmAppNavbarStyles } from './appnavbar.styles';\n\nexport class WmAppNavbarState extends BaseComponentState<WmAppNavbarProps> {\n\n}\n\nexport default class WmAppNavbar extends BaseComponent<WmAppNavbarProps, WmAppNavbarState, WmAppNavbarStyles> {\n\n private onDrawerBtnPress: Function;\n private onBackBtnPress: Function;\n private onSearchBtnPress: Function;\n\n constructor(props: WmAppNavbarProps) {\n super(props, DEFAULT_CLASS, new WmAppNavbarProps());\n this.onDrawerBtnPress = (() => this.invokeEventCallback('onDrawerbuttonpress', [null, this])).bind(this);\n this.onBackBtnPress = (() => this.invokeEventCallback('onBackbtnclick', [null, this])).bind(this);\n this.onSearchBtnPress = (() => this.invokeEventCallback('onSearchbuttonpress', [null, this])).bind(this);\n }\n\n renderWidget(props: WmAppNavbarProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.leftSection}>\n {props.showDrawerButton && (<WmIcon\n id={this.getTestId('leftnavbtn')}\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.leftnavpaneliconclass}\n onTap={this.onDrawerBtnPress}\n />)}\n {props.backbutton && (<WmIcon\n id={this.getTestId('backbtn')}\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.backIcon)}\n iconclass={props.backbuttoniconclass}\n caption={props.backbuttonlabel}\n onTap={this.onBackBtnPress}/>)}\n </View>\n <View style={this.styles.middleSection}>\n {props.imgsrc && (\n <WmPicture\n id={this.getTestId('picture')}\n styles={this.styles.image}\n picturesource={props.imgsrc} />)}\n <Text style={this.styles.content} {...this.getTestPropsForLabel('title')}>{props.title}</Text>\n </View>\n <View style={this.styles.rightSection}>\n {props.searchbutton && (<WmIcon\n id={this.getTestId('searchbtn')}\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.searchbuttoniconclass}\n onTap={this.onSearchBtnPress}\n />)}\n {props.children}\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAE5F,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AAErE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;AAI3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,CAACC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAACR,MAAM,CAACS,MAAM,EAAE,IAAI,CAACT,MAAM,CAACU,WAAW,CAAE;MAC/EC,SAAS,EAAErB,KAAK,CAACuC,qBAAsB;MACvChB,KAAK,EAAE,IAAI,CAACjB;IAAiB,CAC5B,CAAE,EACJN,KAAK,CAACwC,QACH,CACF,CAAC;EAEX;AACF"}
@@ -6,7 +6,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
6
6
  const defaultStyles = defineStyles({
7
7
  root: {
8
8
  flexDirection: 'row',
9
- backgroundColor: themeVariables.navbarBackgroundColor,
9
+ backgroundColor: themeVariables.navitemActiveBackgroundColor,
10
10
  height: 80,
11
11
  padding: 12,
12
12
  paddingHorizontal: 12,
@@ -1 +1 @@
1
- {"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","backgroundColor","navbarBackgroundColor","height","padding","paddingHorizontal","alignItems","text","action","leftSection","flex","leftnavIcon","icon","fontSize","navbarIconSize","color","navbarTextColor","backIcon","navbarFontSize","image","width","navbarImageSize","picture","resizeMode","content","textTransform","fontFamily","baseFont","fontWeight","textAlign","middleSection","rightSection","justifyContent","paddingRight","textDecorationStyle","undefined","badge","fade","rgb","toString","transparent","alignSelf","link"],"sources":["appnavbar.styles.ts"],"sourcesContent":["import Color from 'color';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmMenuStyles } from '@wavemaker/app-rn-runtime/components/navigation/menu/menu.styles';\nimport { WmAnchorStyles } from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.styles';\nimport { WmPopoverStyles } from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.styles';\nimport { WmPictureStyles } from '@wavemaker/app-rn-runtime/components/basic/picture/picture.styles';\n\nexport type WmAppNavbarStyles = BaseStyles & {\n action: WmIconStyles,\n image: WmPictureStyles,\n leftnavIcon: WmIconStyles,\n backIcon: WmIconStyles,\n leftSection: ViewStyle,\n middleSection: ViewStyle,\n rightSection: ViewStyle,\n content: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-appnavbar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAppNavbarStyles = defineStyles({\n root: {\n flexDirection: 'row',\n backgroundColor: themeVariables.navbarBackgroundColor,\n height: 80,\n padding: 12,\n paddingHorizontal: 12,\n alignItems: 'center'\n },\n text: {},\n action: {} as WmIconStyles,\n leftSection: {\n flex: 1,\n flexDirection: 'row'\n },\n leftnavIcon: {\n root: {\n alignItems: 'flex-start'\n },\n icon: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n } as WmIconStyles,\n backIcon: {\n root: {},\n text: {\n fontSize: themeVariables.navbarFontSize,\n color: themeVariables.navbarTextColor\n },\n icon: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n } as WmIconStyles,\n image: {\n root: {\n width: themeVariables.navbarImageSize,\n height: themeVariables.navbarImageSize,\n },\n picture: {\n resizeMode: 'contain'\n }\n } as WmPictureStyles,\n content: {\n textTransform: 'capitalize',\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n textAlign: 'center'\n },\n middleSection: {\n alignItems: 'center',\n flexDirection: 'row'\n },\n rightSection: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'flex-end'\n },\n } as WmAppNavbarStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('navbarAnchorItem', '', {\n root: {\n paddingRight: 8,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize,\n textDecorationStyle: undefined\n },\n badge: {\n backgroundColor: Color(themeVariables.navbarTextColor).fade(0.8).rgb().toString(),\n color: themeVariables.navbarTextColor,\n },\n icon: {\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarIconSize\n },\n icon : {\n color: themeVariables.navbarTextColor\n }\n }\n } as WmAnchorStyles);\n addStyle('navbarButton', '', {\n root: {\n backgroundColor: themeVariables.transparent,\n paddingRight: 8,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'center'\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize\n },\n icon: {\n root: {\n color: themeVariables.navbarTextColor\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarIconSize\n }\n }\n } as WmAnchorStyles);\n addStyle('navbarMenu', '', {\n root: {\n paddingRight: 8,\n height: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n link: {\n icon: {\n root: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize\n }\n }\n } as any as WmMenuStyles);\n addStyle('navbarPopover', '', {\n root: {\n height: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n link: {\n icon: {\n root: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize\n }\n }\n } as any as WmPopoverStyles);\n});"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAmBxF,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MA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"}
1
+ {"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","backgroundColor","navitemActiveBackgroundColor","height","padding","paddingHorizontal","alignItems","text","action","leftSection","flex","leftnavIcon","icon","fontSize","navbarIconSize","color","navbarTextColor","backIcon","navbarFontSize","image","width","navbarImageSize","picture","resizeMode","content","textTransform","fontFamily","baseFont","fontWeight","textAlign","middleSection","rightSection","justifyContent","paddingRight","textDecorationStyle","undefined","badge","fade","rgb","toString","transparent","alignSelf","link"],"sources":["appnavbar.styles.ts"],"sourcesContent":["import Color from 'color';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmMenuStyles } from '@wavemaker/app-rn-runtime/components/navigation/menu/menu.styles';\nimport { WmAnchorStyles } from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.styles';\nimport { WmPopoverStyles } from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.styles';\nimport { WmPictureStyles } from '@wavemaker/app-rn-runtime/components/basic/picture/picture.styles';\n\nexport type WmAppNavbarStyles = BaseStyles & {\n action: WmIconStyles,\n image: WmPictureStyles,\n leftnavIcon: WmIconStyles,\n backIcon: WmIconStyles,\n leftSection: ViewStyle,\n middleSection: ViewStyle,\n rightSection: ViewStyle,\n content: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-appnavbar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAppNavbarStyles = defineStyles({\n root: {\n flexDirection: 'row',\n backgroundColor: themeVariables.navitemActiveBackgroundColor,\n height: 80,\n padding: 12,\n paddingHorizontal: 12,\n alignItems: 'center'\n },\n text: {},\n action: {} as WmIconStyles,\n leftSection: {\n flex: 1,\n flexDirection: 'row'\n },\n leftnavIcon: {\n root: {\n alignItems: 'flex-start'\n },\n icon: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n } as WmIconStyles,\n backIcon: {\n root: {},\n text: {\n fontSize: themeVariables.navbarFontSize,\n color: themeVariables.navbarTextColor\n },\n icon: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n } as WmIconStyles,\n image: {\n root: {\n width: themeVariables.navbarImageSize,\n height: themeVariables.navbarImageSize,\n },\n picture: {\n resizeMode: 'contain'\n }\n } as WmPictureStyles,\n content: {\n textTransform: 'capitalize',\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n textAlign: 'center'\n },\n middleSection: {\n alignItems: 'center',\n flexDirection: 'row'\n },\n rightSection: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'flex-end'\n },\n } as WmAppNavbarStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('navbarAnchorItem', '', {\n root: {\n paddingRight: 8,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize,\n textDecorationStyle: undefined\n },\n badge: {\n backgroundColor: Color(themeVariables.navbarTextColor).fade(0.8).rgb().toString(),\n color: themeVariables.navbarTextColor,\n },\n icon: {\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarIconSize\n },\n icon : {\n color: themeVariables.navbarTextColor\n }\n }\n } as WmAnchorStyles);\n addStyle('navbarButton', '', {\n root: {\n backgroundColor: themeVariables.transparent,\n paddingRight: 8,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'center'\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize\n },\n icon: {\n root: {\n color: themeVariables.navbarTextColor\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarIconSize\n }\n }\n } as WmAnchorStyles);\n addStyle('navbarMenu', '', {\n root: {\n paddingRight: 8,\n height: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n link: {\n icon: {\n root: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize\n }\n }\n } as any as WmMenuStyles);\n addStyle('navbarPopover', '', {\n root: {\n height: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n },\n link: {\n icon: {\n root: {\n fontSize: themeVariables.navbarIconSize,\n color: themeVariables.navbarTextColor\n }\n },\n text: {\n color: themeVariables.navbarTextColor,\n fontSize: themeVariables.navbarFontSize\n }\n }\n } as any as WmPopoverStyles);\n});"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAmBxF,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAgC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,eAAe,EAAEL,cAAc,CAACM,4BAA4B;MAC5DC,MAAM,EAAE,EAAE;MACVC,OAAO,EAAE,EAAE;MACXC,iBAAiB,EAAE,EAAE;MACrBC,UAAU,EAAE;IACd,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE,CAAC,CAAiB;IAC1BC,WAAW,EAAE;MACXC,IAAI,EAAE,CAAC;MACPV,aAAa,EAAE;IACjB,CAAC;IACDW,WAAW,EAAE;MACXZ,IAAI,EAAE;QACFO,UAAU,EAAE;MAChB,CAAC;MACDM,IAAI,EAAE;QACFC,QAAQ,EAAEjB,cAAc,CAACkB,cAAc;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CAAC;IACDoC,IAAI,EAAE;MACJ9B,IAAI,EAAE;QACJb,IAAI,EAAE;UACJc,QAAQ,EAAEjB,cAAc,CAACkB,cAAc;UACvCC,KAAK,EAAEnB,cAAc,CAACoB;QACxB;MACF,CAAC;MACDT,IAAI,EAAE;QACJQ,KAAK,EAAEnB,cAAc,CAACoB,eAAe;QACrCH,QAAQ,EAAEjB,cAAc,CAACsB;MAC3B;IACF;EACF,CAAwB,CAAC;EACzBrB,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BE,IAAI,EAAE;MACJI,MAAM,EAAE,MAAM;MACdH,aAAa,EAAE,KAAK;MACpBgC,cAAc,EAAE,QAAQ;MACxB1B,UAAU,EAAE;IACd,CAAC;IACDoC,IAAI,EAAE;MACJ9B,IAAI,EAAE;QACJb,IAAI,EAAE;UACJc,QAAQ,EAAEjB,cAAc,CAACkB,cAAc;UACvCC,KAAK,EAAEnB,cAAc,CAACoB;QACxB;MACF,CAAC;MACDT,IAAI,EAAE;QACJQ,KAAK,EAAEnB,cAAc,CAACoB,eAAe;QACrCH,QAAQ,EAAEjB,cAAc,CAACsB;MAC3B;IACF;EACF,CAA2B,CAAC;AAC9B,CAAC,CAAC"}
@@ -35,6 +35,7 @@ export class BaseNavComponent extends BaseComponent {
35
35
  return {
36
36
  key: `${name}_item${i}`,
37
37
  label: s,
38
+ data: s,
38
39
  icon: 'wi wi-' + s
39
40
  };
40
41
  });
@@ -50,6 +51,7 @@ export class BaseNavComponent extends BaseComponent {
50
51
  link: this.getValue(d, this.state.props.itemlink),
51
52
  badge: this.getValue(d, this.state.props.itembadge),
52
53
  isactive: this.getValue(d, this.state.props.isactive),
54
+ data: d,
53
55
  childnavigation: this.state.props.itemchildren ? d[this.state.props.itemchildren] : null
54
56
  };
55
57
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BaseComponent","BaseComponentState","DEFAULT_CLASS","isArray","BaseNavState","constructor","arguments","_defineProperty","BaseNavComponent","props","defaultClass","length","undefined","defaultProps","defaultState","getValue","item","val","setDataItems","dataset","state","name","dataItems","split","map","s","i","key","label","icon","d","itemlabel","itemicon","link","itemlink","badge","itembadge","isactive","childnavigation","itemchildren","updateState","onPropertyChange","$new","$old"],"sources":["basenav.component.ts"],"sourcesContent":["import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { BaseNavProps } from './basenav.props';\nimport { DEFAULT_CLASS, BaseNavStyles } from './basenav.styles';\nimport { isArray } from 'lodash-es';\n\nexport interface NavigationDataItem {\n key: string;\n label: string;\n icon?: string;\n link?: string;\n badge?: string;\n isactive?: string;\n childnavigation?: any;\n}\n\nexport class BaseNavState <T extends BaseNavProps> extends BaseComponentState<T> {\n dataItems = [] as NavigationDataItem[];\n}\n\nexport abstract class BaseNavComponent< T extends BaseNavProps, S extends BaseNavState<T>, L extends BaseNavStyles> extends BaseComponent<T, S, L> {\n\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n getValue(item: any, val?: string | ((item: any) => string)) {\n if (typeof val === 'string') {\n return item[val];\n } else if (typeof val === 'function') {\n return val(item);\n }\n return null;\n }\n\n setDataItems(dataset: any = this.state.props.dataset) {\n const name = this.props.name;\n let dataItems = [] as NavigationDataItem[];\n if (typeof dataset === 'string') {\n dataItems = dataset.split(',').map((s, i) => {\n return {\n key: `${name}_item${i}`,\n label: s,\n icon: 'wi wi-' + s\n } as NavigationDataItem;\n });\n } else if (dataset) {\n if (!isArray(dataset)) {\n dataset = [dataset];\n }\n dataItems = (dataset as any[]).map((d, i) => {\n return {\n key: `${name}_item${i}`,\n label: this.getValue(d, this.state.props.itemlabel),\n icon: this.getValue(d, this.state.props.itemicon),\n link: this.getValue(d, this.state.props.itemlink),\n badge: this.getValue(d, this.state.props.itembadge),\n isactive: this.getValue(d, this.state.props.isactive),\n childnavigation: this.state.props.itemchildren ? d[this.state.props.itemchildren] : null\n } as NavigationDataItem;\n });\n }\n this.updateState({dataItems: dataItems} as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n this.setDataItems($new);\n break;\n case 'itemlabel':\n case 'itemicon':\n case 'itemlink':\n case 'itemchildren':\n this.setDataItems();\n break;\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,aAAa,QAAuB,kBAAkB;AAC/D,SAASC,OAAO,QAAQ,WAAW;AAYnC,OAAO,MAAMC,YAAY,SAAkCH,kBAAkB,CAAI;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACnE,EAAE;EAAA;AAChB;AAEA,OAAO,MAAeC,gBAAgB,SAAsFR,aAAa,CAAU;EAEjJK,WAAWA,CAACI,KAAQ,EAAmF;IAAA,IAA1EC,YAAoB,GAAAJ,SAAA,CAAAK,MAAA,QAAAL,SAAA,QAAAM,SAAA,GAAAN,SAAA,MAAGJ,aAAa;IAAA,IAAEW,YAAgB,GAAAP,SAAA,CAAAK,MAAA,OAAAL,SAAA,MAAAM,SAAA;IAAA,IAAEE,YAAgB,GAAAR,SAAA,CAAAK,MAAA,OAAAL,SAAA,MAAAM,SAAA;IACnG,KAAK,CAACH,KAAK,EAAEC,YAAY,EAAEG,YAAY,EAAEC,YAAY,CAAC;IAAC,KAD5BJ,YAAoB,GAApBA,YAAoB;EAEjD;EAEAK,QAAQA,CAACC,IAAS,EAAEC,GAAsC,EAAE;IAC1D,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MAC3B,OAAOD,IAAI,CAACC,GAAG,CAAC;IAClB,CAAC,MAAM,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MACpC,OAAOA,GAAG,CAACD,IAAI,CAAC;IAClB;IACA,OAAO,IAAI;EACb;EAEAE,YAAYA,CAAA,EAA0C;IAAA,IAAzCC,OAAY,GAAAb,SAAA,CAAAK,MAAA,QAAAL,SAAA,Q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I,CAACV,KAAK,CAACX,KAAK,CAAC4B,QAAQ,CAAC;UACrDC,eAAe,EAAE,IAAI,CAAClB,KAAK,CAACX,KAAK,CAAC8B,YAAY,GAAGT,CAAC,CAAC,IAAI,CAACV,KAAK,CAACX,KAAK,CAAC8B,YAAY,CAAC,GAAG;QACtF,CAAC;MACH,CAAC,CAAC;IACJ;IACA,IAAI,CAACC,WAAW,CAAC;MAAClB,SAAS,EAAEA;IAAS,CAAM,CAAC;EAC/C;EAEAmB,gBAAgBA,CAACpB,IAAY,EAAEqB,IAAS,EAAEC,IAAS,EAAE;IACnD,QAAQtB,IAAI;MACV,KAAK,SAAS;QACZ,IAAI,CAACH,YAAY,CAACwB,IAAI,CAAC;QACvB;MACF,KAAK,WAAW;MAChB,KAAK,UAAU;MACf,KAAK,UAAU;MACf,KAAK,cAAc;QACjB,IAAI,CAACxB,YAAY,CAAC,CAAC;QACnB;IACJ;EACF;AACF"}
1
+ {"version":3,"names":["BaseComponent","BaseComponentState","DEFAULT_CLASS","isArray","BaseNavState","constructor","arguments","_defineProperty","BaseNavComponent","props","defaultClass","length","undefined","defaultProps","defaultState","getValue","item","val","setDataItems","dataset","state","name","dataItems","split","map","s","i","key","label","data","icon","d","itemlabel","itemicon","link","itemlink","badge","itembadge","isactive","childnavigation","itemchildren","updateState","onPropertyChange","$new","$old"],"sources":["basenav.component.ts"],"sourcesContent":["import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { BaseNavProps } from './basenav.props';\nimport { DEFAULT_CLASS, BaseNavStyles } from './basenav.styles';\nimport { isArray } from 'lodash-es';\n\nexport interface NavigationDataItem {\n key: string;\n label: string;\n icon?: string;\n link?: string;\n badge?: string;\n isactive?: string;\n data: any;\n childnavigation?: any;\n}\n\nexport class BaseNavState <T extends BaseNavProps> extends BaseComponentState<T> {\n dataItems = [] as NavigationDataItem[];\n}\n\nexport abstract class BaseNavComponent< T extends BaseNavProps, S extends BaseNavState<T>, L extends BaseNavStyles> extends BaseComponent<T, S, L> {\n\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n getValue(item: any, val?: string | ((item: any) => string)) {\n if (typeof val === 'string') {\n return item[val];\n } else if (typeof val === 'function') {\n return val(item);\n }\n return null;\n }\n\n setDataItems(dataset: any = this.state.props.dataset) {\n const name = this.props.name;\n let dataItems = [] as NavigationDataItem[];\n if (typeof dataset === 'string') {\n dataItems = dataset.split(',').map((s, i) => {\n return {\n key: `${name}_item${i}`,\n label: s,\n data: s,\n icon: 'wi wi-' + s\n } as NavigationDataItem;\n });\n } else if (dataset) {\n if (!isArray(dataset)) {\n dataset = [dataset];\n }\n dataItems = (dataset as any[]).map((d, i) => {\n return {\n key: `${name}_item${i}`,\n label: this.getValue(d, this.state.props.itemlabel),\n icon: this.getValue(d, this.state.props.itemicon),\n link: this.getValue(d, this.state.props.itemlink),\n badge: this.getValue(d, this.state.props.itembadge),\n isactive: this.getValue(d, this.state.props.isactive),\n data: d,\n childnavigation: this.state.props.itemchildren ? d[this.state.props.itemchildren] : null\n } as NavigationDataItem;\n });\n }\n this.updateState({dataItems: dataItems} as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n this.setDataItems($new);\n break;\n case 'itemlabel':\n case 'itemicon':\n case 'itemlink':\n case 'itemchildren':\n this.setDataItems();\n break;\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,aAAa,QAAuB,kBAAkB;AAC/D,SAASC,OAAO,QAAQ,WAAW;AAanC,OAAO,MAAMC,YAAY,SAAkCH,kBAAkB,CAAI;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACnE,EAAE;EAAA;AAChB;AAEA,OAAO,MAAeC,gBAAgB,SAAsFR,aAAa,CAAU;EAEjJK,WAAWA,CAACI,KAAQ,E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AW;MAChB,KAAK,UAAU;MACf,KAAK,UAAU;MACf,KAAK,cAAc;QACjB,IAAI,CAACzB,YAAY,CAAC,CAAC;QACnB;IACJ;EACF;AACF"}
@@ -26,9 +26,10 @@ export default class WmMenu extends BaseNavComponent {
26
26
  }
27
27
  });
28
28
  }
29
- renderMenuItem(item) {
29
+ renderMenuItem(item, index) {
30
30
  const getDisplayLabel = this.props.getDisplayExpression || (label => label);
31
31
  return /*#__PURE__*/React.createElement(WmAnchor, {
32
+ id: this.getTestId('menuitem' + index),
32
33
  iconclass: item.icon,
33
34
  caption: getDisplayLabel(item.label),
34
35
  hyperlink: item.link,
@@ -42,6 +43,7 @@ export default class WmMenu extends BaseNavComponent {
42
43
  renderWidget(props) {
43
44
  const menuItems = this.state.dataItems;
44
45
  return /*#__PURE__*/React.createElement(WmPopover, {
46
+ id: this.getTestId('menu'),
45
47
  styles: this.styles,
46
48
  contentanimation: animationMap[props.animateitems || 'scale'],
47
49
  caption: props.caption,
@@ -53,9 +55,9 @@ export default class WmMenu extends BaseNavComponent {
53
55
  type: "dropdown"
54
56
  }, /*#__PURE__*/React.createElement(View, {
55
57
  style: this.styles.menu
56
- }, menuItems.map(item => /*#__PURE__*/React.createElement(View, {
58
+ }, menuItems.map((item, index) => /*#__PURE__*/React.createElement(View, {
57
59
  key: item.key
58
- }, this.renderMenuItem(item)))));
60
+ }, this.renderMenuItem(item, index)))));
59
61
  }
60
62
  }
61
63
  //# sourceMappingURL=menu.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","WmAnchor","BaseNavComponent","BaseNavState","WmPopover","WmMenuProps","DEFAULT_CLASS","WmMenuState","animationMap","slide","fade","scale","WmMenu","constructor","props","_defineProperty","onComponentInit","c","popOverRef","renderMenuItem","item","getDisplayLabel","getDisplayExpression","label","createElement","iconclass","icon","caption","hyperlink","link","styles","menuItem","onTap","invokeEventCallback","hide","renderWidget","menuItems","state","dataItems","contentanimation","animateitems","listener","popoverheight","menu","height","popoverwidth","width","iconposition","type","style","map","key"],"sources":["menu.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '../basenav/basenav.component';\nimport WmPopover from '../popover/popover.component';\nimport WmMenuProps from './menu.props';\nimport { DEFAULT_CLASS, WmMenuStyles } from './menu.styles';\n\nexport class WmMenuState <T extends WmMenuProps> extends BaseNavState<T> {}\n\nconst animationMap: any = {\n slide: 'slideInDown',\n fade: 'fadeIn',\n scale: 'zoomIn'\n};\n\nexport default class WmMenu extends BaseNavComponent<WmMenuProps, WmMenuState<WmMenuProps>, WmMenuStyles> {\n\n private popOverRef: WmPopover = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmPopover) {\n this.popOverRef = c;\n }\n }\n };\n\n constructor(props: WmMenuProps) {\n super(props, DEFAULT_CLASS, new WmMenuProps(), new WmMenuState());\n }\n\n renderMenuItem(item: NavigationDataItem) {\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n return (\n <WmAnchor\n iconclass={item.icon as string}\n caption={getDisplayLabel(item.label)}\n hyperlink={item.link}\n styles={this.styles.menuItem}\n onTap={() => {\n this.invokeEventCallback('onSelect', [null, this, item]);\n this.popOverRef.hide();\n }}></WmAnchor>\n );\n }\n\n renderWidget(props: WmMenuProps) {\n const menuItems = this.state.dataItems;\n return (\n <WmPopover styles={this.styles}\n contentanimation={animationMap[props.animateitems || 'scale']}\n caption={props.caption}\n iconclass={props.iconclass}\n listener={this.listener}\n popoverheight={this.styles.menu.height as string | number | undefined || null}\n popoverwidth={this.styles.menu.width as string | number | undefined || null}\n iconposition=\"right\"\n type='dropdown'>\n <View style={this.styles.menu}>\n {menuItems.map(item => (\n <View key={item.key}>\n {this.renderMenuItem(item)}\n </View>\n ))}\n </View>\n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EAAE,CAAC,IAAI,EAAE,IAAI,EAAEb,IAAI,CAAC,CAAC;QACxD,IAAI,CAACF,UAAU,CAACgB,IAAI,CAAC,CAAC;MAC1B;IAAE,CAAW,CAAC;EAElB;EAEAC,YAAYA,CAACrB,KAAkB,EAAE;IAC/B,MAAMsB,SAAS,GAAG,IAAI,CAACC,KAAK,CAACC,SAAS;IACtC,oBACEvC,KAAA,CAAAyB,aAAA,CAACpB,SAAS;MAAC0B,MAAM,EAAE,IAAI,CAACA,MAAO;MAC7BS,gBAAgB,EAAE/B,YAAY,CAACM,KAAK,CAAC0B,YAAY,IAAI,OAAO,CAAE;MAC9Db,OAAO,EAAEb,KAAK,CAACa,OAAQ;MACvBF,SAAS,EAAEX,KAAK,CAACW,SAAU;MAC3BgB,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,aAAa,EAAE,IAAI,CAACZ,MAAM,CAACa,IAAI,CAACC,MAAM,IAAmC,IAAK;MAC9EC,YAAY,EAAE,IAAI,CAACf,MAAM,CAACa,IAAI,CAACG,KAAK,IAAmC,IAAK;MAC5EC,YAAY,EAAC,OAAO;MACpBC,IAAI,EAAC;IAAU,gBACbjD,KAAA,CAAAyB,aAAA,CAACxB,IAAI;MAACiD,KAAK,EAAE,IAAI,CAACnB,MAAM,CAACa;IAAK,GAC3BP,SAAS,CAACc,GAAG,CAAC9B,IAAI,iBACjBrB,KAAA,CAAAyB,aAAA,CAACxB,IAAI;MAACmD,GAAG,EAAE/B,IAAI,CAAC+B;IAAI,GACjB,IAAI,CAAChC,cAAc,CAACC,IAAI,CACrB,CACP,CACG,CACC,CAAC;EAEhB;AACF"}
1
+ {"version":3,"names":["React","View","WmAnchor","BaseNavComponent","BaseNavState","WmPopover","WmMenuProps","DEFAULT_CLASS","WmMenuState","animationMap","slide","fade","scale","WmMenu","constructor","props","_defineProperty","onComponentInit","c","popOverRef","renderMenuItem","item","index","getDisplayLabel","getDisplayExpression","label","createElement","id","getTestId","iconclass","icon","caption","hyperlink","link","styles","menuItem","onTap","invokeEventCallback","hide","renderWidget","menuItems","state","dataItems","contentanimation","animateitems","listener","popoverheight","menu","height","popoverwidth","width","iconposition","type","style","map","key"],"sources":["menu.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '../basenav/basenav.component';\nimport WmPopover from '../popover/popover.component';\nimport WmMenuProps from './menu.props';\nimport { DEFAULT_CLASS, WmMenuStyles } from './menu.styles';\n\nexport class WmMenuState <T extends WmMenuProps> extends BaseNavState<T> {}\n\nconst animationMap: any = {\n slide: 'slideInDown',\n fade: 'fadeIn',\n scale: 'zoomIn'\n};\n\nexport default class WmMenu extends BaseNavComponent<WmMenuProps, WmMenuState<WmMenuProps>, WmMenuStyles> {\n\n private popOverRef: WmPopover = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmPopover) {\n this.popOverRef = c;\n }\n }\n };\n\n constructor(props: WmMenuProps) {\n super(props, DEFAULT_CLASS, new WmMenuProps(), new WmMenuState());\n }\n\n renderMenuItem(item: NavigationDataItem, index: number) {\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n return (\n <WmAnchor\n id={this.getTestId('menuitem' + index)}\n iconclass={item.icon as string}\n caption={getDisplayLabel(item.label)}\n hyperlink={item.link}\n styles={this.styles.menuItem}\n onTap={() => {\n this.invokeEventCallback('onSelect', [null, this, item]);\n this.popOverRef.hide();\n }}></WmAnchor>\n );\n }\n\n renderWidget(props: WmMenuProps) {\n const menuItems = this.state.dataItems;\n return (\n <WmPopover \n id={this.getTestId('menu')}\n styles={this.styles}\n contentanimation={animationMap[props.animateitems || 'scale']}\n caption={props.caption}\n iconclass={props.iconclass}\n listener={this.listener}\n popoverheight={this.styles.menu.height as string | number | undefined || null}\n popoverwidth={this.styles.menu.width as string | number | undefined || null}\n iconposition=\"right\"\n type='dropdown'>\n <View style={this.styles.menu}>\n {menuItems.map((item, index) => (\n <View key={item.key}>\n {this.renderMenuItem(item, index)}\n </View>\n ))}\n </View>\n </WmPopover>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,QAAQ,MAAM,oEAAoE;AAGzF,SAASC,gBAAgB,EAAEC,YAAY,QAA4B,8BAA8B;AACjG,OAAOC,SAAS,MAAM,8BAA8B;AACpD,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAO,MAAMC,WAAW,SAAiCJ,YAAY,CAAI;AAEzE,MAAMK,YAAiB,GAAG;EACxBC,KAAK,EAAE,aAAa;EACpBC,IAAI,EAAE,QAAQ;EACdC,KAAK,EAAE;AACT,CAAC;AAED,eAAe,MAAMC,MAAM,SAASV,gBAAgB,CAAsD;EAYxGW,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIE,WAAW,CAAC,CAAC,CAAC;IAACQ,eAAA,qBAXpC,IAAI;IAAAA,eAAA,mBAEE;MACpCC,eAAe,EAAGC,CAAC,IAAK;QACtB,IAAIA,CAAC,YAAYb,SAAS,EAAE;UAC1B,IAAI,CAACc,UAAU,GAAGD,CAAC;QACrB;MACF;IACF,CAAC;EAID;EAEAE,cAAcA,CAACC,IAAwB,EAAEC,KAAa,EAAE;IACtD,MAAMC,eAAe,GAAG,IAAI,CAACR,KAAK,CAACS,oBAAoB,KAAMC,KAAa,IAAKA,KAAK,CAAC;IACrF,oBACEzB,KAAA,CAAA0B,aAAA,CAACxB,QAAQ;MACPyB,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,UAAU,GAAGN,KAAK,CAAE;MACvCO,SAAS,EAAER,IAAI,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,GACjB,IAAI,CAACnC,cAAc,CAACC,IAAI,EAAEC,KAAK,CAC5B,CACP,CACG,CACC,CAAC;EAEhB;AACF"}
@@ -22,7 +22,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
22
22
  }
23
23
  },
24
24
  popover: {
25
- backgroundColor: themeVariables.transparent
25
+ backgroundColor: themeVariables.transparent,
26
+ borderTopLeftRadius: 0,
27
+ borderTopRightRadius: 0
26
28
  },
27
29
  popoverContent: {
28
30
  //@ts-ignore
@@ -30,21 +32,23 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
30
32
  },
31
33
  menu: {
32
34
  width: 160,
33
- padding: 12,
35
+ paddingTop: 8,
36
+ paddingBottom: 8,
37
+ paddingLeft: 12,
38
+ paddingRight: 12,
34
39
  backgroundColor: themeVariables.menuBackgroundColor,
35
- borderRadius: 6
40
+ borderRadius: 4
36
41
  },
37
42
  menuItem: {
38
43
  root: {
39
- width: '100%',
40
- padding: 8,
44
+ height: 48,
41
45
  borderBottomWidth: 0,
42
46
  borderStyle: 'solid',
43
47
  borderBottomColor: themeVariables.menuItemBorderColor
44
48
  },
45
49
  icon: {
46
50
  root: {
47
- fontSize: 16
51
+ fontSize: 24
48
52
  },
49
53
  icon: {
50
54
  color: themeVariables.menuItemIconColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","POPOVER_CLASS","Platform","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","text","link","icon","color","menuIconColor","textDecorationLine","paddingRight","fontWeight","menuTextColor","popover","backgroundColor","transparent","popoverContent","flex","undefined","menu","width","padding","menuBackgroundColor","borderRadius","menuItem","borderBottomWidth","borderStyle","borderBottomColor","menuItemBorderColor","fontSize","menuItemIconColor","menuItemTextColor","OS"],"sources":["menu.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmAnchorStyles } from '../../basic/anchor/anchor.styles';\nimport { WmPopoverStyles, DEFAULT_CLASS as POPOVER_CLASS } from '../popover/popover.styles';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform } from 'react-native';\n\nexport type WmMenuStyles = WmPopoverStyles & {\n menu: AllStyle,\n menuItem: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-menu';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmMenuStyles = {\n root : {\n alignSelf: 'flex-start'\n },\n text: {},\n link: {\n icon: {\n root: {\n color: themeVariables.menuIconColor\n }\n },\n text: {\n textDecorationLine: 'none',\n paddingRight: 12,\n fontWeight: 'bold',\n color: themeVariables.menuTextColor\n }\n } as WmAnchorStyles,\n popover: {\n backgroundColor: themeVariables.transparent\n },\n popoverContent: {\n //@ts-ignore\n flex: undefined\n },\n menu: {\n width: 160,\n padding: 12,\n backgroundColor: themeVariables.menuBackgroundColor,\n borderRadius: 6\n },\n menuItem: {\n root : {\n width: '100%',\n padding: 8,\n borderBottomWidth: 0,\n borderStyle: 'solid',\n borderBottomColor: themeVariables.menuItemBorderColor\n },\n icon :{\n root : {\n fontSize: 16,\n },\n icon : {\n color: themeVariables.menuItemIconColor\n }\n },\n text: {\n fontSize: 16,\n textDecorationLine: 'none',\n color: themeVariables.menuItemTextColor\n }\n } as any as WmAnchorStyles\n };\n\n addStyle(DEFAULT_CLASS, POPOVER_CLASS, defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{}:{\n root: {\n width: '100%'\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAE7E,SAA0BC,aAAa,IAAIC,aAAa,QAAQ,2BAA2B;AAG3F,SAASC,QAAQ,QAAQ,cAAc;AAOvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MA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CAAC,GAAC;IACvD9B,IAAI,EAAE;MACFkB,KAAK,EAAE;IACX;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","POPOVER_CLASS","Platform","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","text","link","icon","color","menuIconColor","textDecorationLine","paddingRight","fontWeight","menuTextColor","popover","backgroundColor","transparent","borderTopLeftRadius","borderTopRightRadius","popoverContent","flex","undefined","menu","width","paddingTop","paddingBottom","paddingLeft","menuBackgroundColor","borderRadius","menuItem","height","borderBottomWidth","borderStyle","borderBottomColor","menuItemBorderColor","fontSize","menuItemIconColor","menuItemTextColor","OS"],"sources":["menu.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmAnchorStyles } from '../../basic/anchor/anchor.styles';\nimport { WmPopoverStyles, DEFAULT_CLASS as POPOVER_CLASS } from '../popover/popover.styles';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform } from 'react-native';\n\nexport type WmMenuStyles = WmPopoverStyles & {\n menu: AllStyle,\n menuItem: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-menu';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmMenuStyles = {\n root : {\n alignSelf: 'flex-start'\n },\n text: {},\n link: {\n icon: {\n root: {\n color: themeVariables.menuIconColor\n }\n },\n text: {\n textDecorationLine: 'none',\n paddingRight: 12,\n fontWeight: 'bold',\n color: themeVariables.menuTextColor\n }\n } as WmAnchorStyles,\n popover: {\n backgroundColor: themeVariables.transparent,\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0 \n },\n popoverContent: {\n //@ts-ignore\n flex: undefined\n },\n menu: {\n width: 160,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 12,\n paddingRight: 12,\n backgroundColor: themeVariables.menuBackgroundColor,\n borderRadius: 4\n },\n menuItem: {\n root : {\n height: 48,\n borderBottomWidth: 0,\n borderStyle: 'solid',\n borderBottomColor: themeVariables.menuItemBorderColor\n },\n icon :{\n root : {\n fontSize: 24\n },\n icon : {\n color: themeVariables.menuItemIconColor\n }\n },\n text: {\n fontSize: 16,\n textDecorationLine: 'none',\n color: themeVariables.menuItemTextColor\n }\n } as any as WmAnchorStyles\n };\n\n addStyle(DEFAULT_CLASS, POPOVER_CLASS, defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{}:{\n root: {\n width: '100%'\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAE7E,SAA0BC,aAAa,IAAIC,aAAa,QAAQ,2BAA2B;AAG3F,SAASC,QAAQ,QAAQ,cAAc;AAOvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAG;IAChCC,IAAI,EAAG;MACHC,SAAS,EAAE;IACf,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE;MACFC,IAAI,EAAE;QACFJ,IAAI,EAAE;UACFK,KAAK,EAAER,cAAc,CAACS;QAC1B;MACJ,CAAC;MACDJ,IAAI,EAAE;QACFK,kBAAkB,EAAE,MAAM;QAC1BC,YAAY,EAAE,EAAE;QAChBC,UAAU,EAAE,MAAM;QAClBJ,KAAK,EAAER,cAAc,CAACa;MAC1B;IACJ,CAAmB;IACnBC,OAAO,EAAE;MACLC,eAAe,EAAEf,cAAc,CAACgB,WAAW;MAC3CC,mBAAmB,EAAE,CAAC;MACtBC,oBAAoB,EAAE;IAC1B,CAAC;IACDC,cAAc,EAAE;MACZ;MACAC,IAAI,EAAEC;IACV,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAE,GAAG;MACVC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,EAAE;MACff,YAAY,EAAE,EAAE;MAChBI,eAAe,EAAEf,cAAc,CAAC2B,mBAAmB;MACnDC,YAAY,EAAE;IAClB,CAAC;IACDC,QAAQ,EAAE;MACN1B,IAAI,EAAG;QACH2B,MAAM,EAAE,EAAE;QACVC,iBAAiB,EAAE,CAAC;QACpBC,WAAW,EAAE,OAAO;QACpBC,iBAAiB,EAAEjC,cAAc,CAACkC;MACtC,CAAC;MACD3B,IAAI,EAAE;QACFJ,IAAI,EAAG;UACLgC,QAAQ,EAAE;QACZ,CAAC;QACD5B,IAAI,EAAG;UACHC,KAAK,EAAER,cAAc,CAACoC;QAC1B;MACJ,CAAC;MACD/B,IAAI,EAAE;QACF8B,QAAQ,EAAE,EAAE;QACZzB,kBAAkB,EAAE,MAAM;QAC1BF,KAAK,EAAER,cAAc,CAACqC;MAC1B;IACJ;EACJ,CAAC;EAEDpC,QAAQ,CAACL,aAAa,EAAEC,aAAa,EAAEK,aAAa,CAAC;EACrDD,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACwC,EAAE,IAAE,KAAK,GAAC,CAAC,CAAC,GAAC;IACvDnC,IAAI,EAAE;MACFoB,KAAK,EAAE;IACX;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -29,7 +29,7 @@ export default class WmNavbar extends BaseNavComponent {
29
29
  itemStyles
30
30
  };
31
31
  }
32
- renderNavItem(item, props) {
32
+ renderNavItem(item, index, props) {
33
33
  const indent = this.styles.childNav.paddingLeft || 0;
34
34
  const {
35
35
  activeItemStyles,
@@ -40,11 +40,13 @@ export default class WmNavbar extends BaseNavComponent {
40
40
  key: item.key
41
41
  }, /*#__PURE__*/React.createElement(WmNavItem, {
42
42
  item: item,
43
+ id: this.getTestId('child' + index),
43
44
  onSelect: props.onSelect,
44
45
  styles: item.isactive ? activeItemStyles : itemStyles,
45
46
  getDisplayExpression: this.props.getDisplayExpression,
46
47
  view: item.childnavigation ? 'dropdown' : 'anchor'
47
48
  }, item.childnavigation && /*#__PURE__*/React.createElement(WmNavbar, {
49
+ id: this.getTestId('child' + index + '_menu'),
48
50
  dataset: item.childnavigation,
49
51
  type: props.type,
50
52
  styles: this.styles,
@@ -57,7 +59,8 @@ export default class WmNavbar extends BaseNavComponent {
57
59
  isactive: props.isactive,
58
60
  indent: props.indent || indent + indent,
59
61
  getDisplayExpression: this.props.getDisplayExpression,
60
- ischildnav: true
62
+ ischildnav: true,
63
+ onSelect: props.onSelect
61
64
  })));
62
65
  }
63
66
  renderWidget(props) {
@@ -66,8 +69,8 @@ export default class WmNavbar extends BaseNavComponent {
66
69
  const styleName = props.layout + 'Nav';
67
70
  return /*#__PURE__*/React.createElement(View, {
68
71
  style: [this.theme.getStyle(styleName), this.styles.nav]
69
- }, navItems && navItems.length ? navItems.map(item => {
70
- return this.renderNavItem(item, props);
72
+ }, navItems && navItems.length ? navItems.map((item, index) => {
73
+ return this.renderNavItem(item, index, props);
71
74
  }) : childElements);
72
75
  }
73
76
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","WmNavItem","BaseNavComponent","BaseNavState","WmNavbarProps","DEFAULT_CLASS","WmNavbarState","WmNavbar","constructor","props","computeItemStyles","activeItemStyles","theme","getStyle","itemStyles","indentStyle","indent","navAnchorItem","root","paddingLeft","ischildnav","mergeStyle","renderNavItem","item","styles","childNav","createElement","style","navitem","key","onSelect","isactive","getDisplayExpression","view","childnavigation","dataset","type","layout","itemlabel","itembadge","itemicon","itemchildren","itemlink","renderWidget","navItems","state","dataItems","childElements","children","styleName","nav","length","map"],"sources":["navbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmNavItem from '@wavemaker/app-rn-runtime/components/navigation/navitem/navitem.component';\nimport { BaseNavComponent, NavigationDataItem, BaseNavState } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\n\nimport WmNavbarProps from './navbar.props';\nimport { DEFAULT_CLASS, WmNavbarStyles } from './navbar.styles';\n\nclass WmNavbarState<T extends BaseNavProps> extends BaseNavState<T> {}\n\nexport default class WmNavbar extends BaseNavComponent<WmNavbarProps, WmNavbarState<WmNavbarProps>, WmNavbarStyles> {\n constructor(props: WmNavbarProps) {\n super(props, DEFAULT_CLASS, new WmNavbarProps(), new WmNavbarState());\n }\n\n computeItemStyles(props: WmNavbarProps) {\n let activeItemStyles = this.theme.getStyle('app-navitem-active');\n let itemStyles = this.theme.getStyle('app-navitem');\n const indentStyle = props.indent ? {\n navAnchorItem: {\n root: {\n paddingLeft: props.indent\n }\n }\n } : null;\n if (props.ischildnav) {\n itemStyles = this.theme.mergeStyle({}, itemStyles, this.theme.getStyle('app-navitem-child'));\n }\n activeItemStyles = this.theme.mergeStyle({}, activeItemStyles, indentStyle);\n itemStyles = this.theme.mergeStyle({}, itemStyles, indentStyle);\n return {activeItemStyles, itemStyles};\n }\n\n renderNavItem(item: NavigationDataItem, props: WmNavbarProps) {\n const indent = this.styles.childNav.paddingLeft as number || 0;\n const {activeItemStyles, itemStyles} = this.computeItemStyles(props);\n return (\n <View style={this.styles.navitem} key={item.key} >\n <WmNavItem item={item}\n onSelect={props.onSelect}\n styles={item.isactive ? activeItemStyles: itemStyles}\n getDisplayExpression={this.props.getDisplayExpression} \n view={item.childnavigation ? 'dropdown' : 'anchor'}>\n {item.childnavigation && (\n <WmNavbar\n dataset={item.childnavigation}\n type={props.type}\n styles={this.styles}\n layout={props.layout}\n itemlabel={props.itemlabel}\n itembadge={props.itembadge}\n itemicon={props.itemicon}\n itemchildren={props.itemchildren}\n itemlink={props.itemlink}\n isactive={props.isactive}\n indent={props.indent || indent + indent}\n getDisplayExpression={this.props.getDisplayExpression} \n ischildnav={true}>\n </WmNavbar>)}\n </WmNavItem>\n </View>\n );\n }\n\n renderWidget(props: WmNavbarProps) {\n const navItems = this.state.dataItems;\n let childElements = props.children;\n const styleName = props.layout + 'Nav';\n\n return (\n <View style={[this.theme.getStyle(styleName), this.styles.nav]}>\n { navItems && navItems.length ? navItems.map(item => {\n return this.renderNavItem(item, props);\n }) : childElements\n }\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,SAAS,MAAM,2EAA2E;AACjG,SAASC,gBAAgB,EAAsBC,YAAY,QAAQ,2EAA2E;AAG9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,MAAMC,aAAa,SAAiCH,YAAY,CAAI;AAEpE,eAAe,MAAMI,QAAQ,SAASL,gBAAgB,CAA8D;EAClHM,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIE,aAAa,CAAC,CAAC,CAAC;EACvE;EAEAI,iBAAiBA,CAACD,KAAoB,EAAE;IACtC,IAAIE,gBAAgB,GAAG,IAAI,CAACC,KAAK,CAACC,QAAQ,CAAC,oBAAoB,CAAC;IAChE,IAAIC,UAAU,GAAG,IAAI,CAACF,KAAK,CAACC,QAAQ,CAAC,aAAa,CAAC;IACnD,MAAME,WAAW,GAAIN,KAAK,CAACO,MAAM,GAAG;MAClCC,aAAa,EAAE;QACbC,IAAI,EAAE;UACJC,WAAW,EAAEV,KAAK,CAACO;QACrB;MACF;IACF,CAAC,GAAI,IAAI;IACT,IAAIP,KAAK,CAACW,UAAU,EAAE;MACpBN,UAAU,GAAG,IAAI,CAACF,KAAK,CAACS,UAAU,CAAC,CAAC,CAAC,EAAEP,UAAU,EAAE,IAAI,CAACF,KAAK,CAACC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC9F;IACAF,gBAAgB,GAAG,IAAI,CAACC,KAAK,CAACS,UAAU,CAAC,CAAC,CAAC,EAAEV,gB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AAK,CAACgC,YAAa;MACjCC,QAAQ,EAAEjC,KAAK,CAACiC,QAAS;MACzBX,QAAQ,EAAEtB,KAAK,CAACsB,QAAS;MACzBf,MAAM,EAAEP,KAAK,CAACO,MAAM,IAAIA,MAAM,GAAGA,MAAO;MACxCgB,oBAAoB,EAAE,IAAI,CAACvB,KAAK,CAACuB,oBAAqB;MACtDZ,UAAU,EAAE;IAAK,CACT,CACH,CACP,CAAC;EAEX;EAEAuB,YAAYA,CAAClC,KAAoB,EAAE;IACjC,MAAMmC,QAAQ,GAAG,IAAI,CAACC,KAAK,CAACC,SAAS;IACrC,IAAIC,aAAa,GAAGtC,KAAK,CAACuC,QAAQ;IAClC,MAAMC,SAAS,GAAGxC,KAAK,CAAC4B,MAAM,GAAG,KAAK;IAEtC,oBACEtC,KAAA,CAAA2B,aAAA,CAAC1B,IAAI;MAAC2B,KAAK,EAAE,CAAC,IAAI,CAACf,KAAK,CAACC,QAAQ,CAACoC,SAAS,CAAC,EAAE,IAAI,CAACzB,MAAM,CAAC0B,GAAG;IAAE,GACzDN,QAAQ,IAAIA,QAAQ,CAACO,MAAM,GAAGP,QAAQ,CAACQ,GAAG,CAAC7B,IAAI,IAAI;MACjD,OAAO,IAAI,CAACD,aAAa,CAACC,IAAI,EAAEd,KAAK,CAAC;IACxC,CAAC,CAAC,GAAGsC,aAEL,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","WmNavItem","BaseNavComponent","BaseNavState","WmNavbarProps","DEFAULT_CLASS","WmNavbarState","WmNavbar","constructor","props","computeItemStyles","activeItemStyles","theme","getStyle","itemStyles","indentStyle","indent","navAnchorItem","root","paddingLeft","ischildnav","mergeStyle","renderNavItem","item","index","styles","childNav","createElement","style","navitem","key","id","getTestId","onSelect","isactive","getDisplayExpression","view","childnavigation","dataset","type","layout","itemlabel","itembadge","itemicon","itemchildren","itemlink","renderWidget","navItems","state","dataItems","childElements","children","styleName","nav","length","map"],"sources":["navbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmNavItem from '@wavemaker/app-rn-runtime/components/navigation/navitem/navitem.component';\nimport { BaseNavComponent, NavigationDataItem, BaseNavState } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\n\nimport WmNavbarProps from './navbar.props';\nimport { DEFAULT_CLASS, WmNavbarStyles } from './navbar.styles';\n\nclass WmNavbarState<T extends BaseNavProps> extends BaseNavState<T> {}\n\nexport default class WmNavbar extends BaseNavComponent<WmNavbarProps, WmNavbarState<WmNavbarProps>, WmNavbarStyles> {\n constructor(props: WmNavbarProps) {\n super(props, DEFAULT_CLASS, new WmNavbarProps(), new WmNavbarState());\n }\n\n computeItemStyles(props: WmNavbarProps) {\n let activeItemStyles = this.theme.getStyle('app-navitem-active');\n let itemStyles = this.theme.getStyle('app-navitem');\n const indentStyle = props.indent ? {\n navAnchorItem: {\n root: {\n paddingLeft: props.indent\n }\n }\n } : null;\n if (props.ischildnav) {\n itemStyles = this.theme.mergeStyle({}, itemStyles, this.theme.getStyle('app-navitem-child'));\n }\n activeItemStyles = this.theme.mergeStyle({}, activeItemStyles, indentStyle);\n itemStyles = this.theme.mergeStyle({}, itemStyles, indentStyle);\n return {activeItemStyles, itemStyles};\n }\n\n renderNavItem(item: NavigationDataItem, index: number, props: WmNavbarProps) {\n const indent = this.styles.childNav.paddingLeft as number || 0;\n const {activeItemStyles, itemStyles} = this.computeItemStyles(props);\n return (\n <View style={this.styles.navitem} key={item.key} >\n <WmNavItem item={item}\n id={this.getTestId('child'+ index)}\n onSelect={props.onSelect}\n styles={item.isactive ? activeItemStyles: itemStyles}\n getDisplayExpression={this.props.getDisplayExpression} \n view={item.childnavigation ? 'dropdown' : 'anchor'}>\n {item.childnavigation && (\n <WmNavbar\n id={this.getTestId('child'+ index +'_menu')}\n dataset={item.childnavigation}\n type={props.type}\n styles={this.styles}\n layout={props.layout}\n itemlabel={props.itemlabel}\n itembadge={props.itembadge}\n itemicon={props.itemicon}\n itemchildren={props.itemchildren}\n itemlink={props.itemlink}\n isactive={props.isactive}\n indent={props.indent || indent + indent}\n getDisplayExpression={this.props.getDisplayExpression} \n ischildnav={true}\n onSelect={props.onSelect}>\n </WmNavbar>)}\n </WmNavItem>\n </View>\n );\n }\n\n renderWidget(props: WmNavbarProps) {\n const navItems = this.state.dataItems;\n let childElements = props.children;\n const styleName = props.layout + 'Nav';\n\n return (\n <View style={[this.theme.getStyle(styleName), this.styles.nav]}>\n { navItems && navItems.length ? navItems.map((item, index) => {\n return this.renderNavItem(item, index, props);\n }) : childElements\n }\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,SAAS,MAAM,2EAA2E;AACjG,SAASC,gBAAgB,EAAsBC,YAAY,QAAQ,2EAA2E;AAG9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,MAAMC,aAAa,SAAiCH,YAAY,CAAI;AAEpE,eAAe,MAAMI,QAAQ,SAASL,gBAAgB,CAA8D;EAClHM,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIE,aAAa,CAAC,CAAC,CAAC;EACvE;EAEAI,iBAAiBA,CAACD,KAAoB,EAAE;IACtC,IAAIE,gBAAgB,GAAG,IAAI,CAACC,KAAK,CAACC,QAAQ,CAAC,oBAAoB,CAAC;IAChE,IAAIC,UAAU,GAAG,IAAI,CAACF,KAAK,CAACC,QAAQ,CAAC,aAAa,CAAC;IACnD,MAAME,WAAW,GAAIN,KAAK,CAACO,MAAM,GAAG;MAClCC,aAAa,EAAE;QACbC,IAAI,EAAE;UACJC,WAAW,EAAEV,KAAK,CAACO;QACrB;MACF;IACF,CAAC,GAAI,IAAI;IACT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1D,OAAO,IAAI,CAACF,aAAa,CAACC,IAAI,EAAEC,KAAK,EAAEf,KAAK,CAAC;IAC/C,CAAC,CAAC,GAAGyC,aAEL,CAAC;EAEX;AACF"}
@@ -2,8 +2,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
2
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import React from 'react';
5
- import { View } from 'react-native';
6
- import { TouchableOpacity } from 'react-native-gesture-handler';
5
+ import { View, TouchableOpacity } from 'react-native';
7
6
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
8
7
  import WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';
9
8
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
@@ -20,13 +19,14 @@ export default class WmNavItem extends BaseComponent {
20
19
  super(props, DEFAULT_CLASS, new WmNavItemProps(), new WmNavItemState());
21
20
  }
22
21
  onSelectItem(cb, $item, $event) {
23
- cb && cb($event, this, $item);
22
+ cb && cb($event, this, $item === null || $item === void 0 ? void 0 : $item.data);
24
23
  }
25
24
  renderWidget(props) {
26
25
  const getDisplayLabel = this.props.getDisplayExpression || (label => label);
27
26
  let child = props.children;
28
27
  if (props.view === 'anchor') {
29
28
  child = /*#__PURE__*/React.createElement(WmAnchor, {
29
+ id: this.getTestId('navlink'),
30
30
  styles: this.styles.navAnchorItem,
31
31
  caption: getDisplayLabel(props.item.label),
32
32
  hyperlink: props.item.link,
@@ -37,6 +37,7 @@ export default class WmNavItem extends BaseComponent {
37
37
  }
38
38
  if (props.view === 'dropdown') {
39
39
  child = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
40
+ id: this.getTestId('navlink'),
40
41
  onPress: () => {
41
42
  this.updateState({
42
43
  collapsed: !this.state.collapsed
@@ -45,11 +46,13 @@ export default class WmNavItem extends BaseComponent {
45
46
  }, /*#__PURE__*/React.createElement(View, {
46
47
  style: this.styles.dropdownNav
47
48
  }, /*#__PURE__*/React.createElement(WmAnchor, {
49
+ id: this.getTestId('navlink'),
48
50
  styles: this.styles.navAnchorItem,
49
51
  caption: getDisplayLabel(props.item.label),
50
52
  iconclass: props.item.icon,
51
53
  onTap: this.onSelectItem.bind(this, props.onSelect, props.item)
52
54
  }), /*#__PURE__*/React.createElement(WmIcon, {
55
+ id: this.getTestId('icon'),
53
56
  styles: this.styles.caretIcon,
54
57
  iconclass: this.state.collapsed ? 'fa fa-sort-down' : 'fa fa-sort-up'
55
58
  }))), !this.state.collapsed && props.children);
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","TouchableOpacity","BaseComponent","BaseComponentState","WmAnchor","WmIcon","WmNavItemProps","DEFAULT_CLASS","WmNavItemState","constructor","arguments","_defineProperty","WmNavItem","props","onSelectItem","cb","$item","$event","renderWidget","getDisplayLabel","getDisplayExpression","label","child","children","view","createElement","styles","navAnchorItem","caption","item","hyperlink","link","badgevalue","badge","iconclass","icon","onTap","bind","onSelect","Fragment","onPress","updateState","collapsed","state","style","dropdownNav","caretIcon","root","_background"],"sources":["navitem.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { TouchableOpacity } from 'react-native-gesture-handler';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmNavItemProps from './navitem.props';\nimport { DEFAULT_CLASS, WmNavItemStyles } from './navitem.styles';\nimport { NavigationDataItem } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component\";\nimport { TapEvent } from \"@wavemaker/app-rn-runtime/core/tappable.component\";\n\nexport class WmNavItemState extends BaseComponentState<WmNavItemProps> {\n collapsed = true;\n}\n\nexport default class WmNavItem extends BaseComponent<WmNavItemProps, WmNavItemState, WmNavItemStyles> {\n\n constructor(props: WmNavItemProps) {\n super(props, DEFAULT_CLASS, new WmNavItemProps(), new WmNavItemState());\n }\n\n onSelectItem(cb: any, $item: NavigationDataItem, $event: TapEvent) {\n cb && cb($event, this, $item);\n }\n\n renderWidget(props: WmNavItemProps) {\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let child = props.children;\n if (props.view === 'anchor') {\n child = <WmAnchor styles={this.styles.navAnchorItem} caption={getDisplayLabel(props.item.label)} hyperlink={props.item.link}\n badgevalue={props.item.badge} iconclass={props.item.icon} onTap={this.onSelectItem.bind(this, props.onSelect, props.item)}></WmAnchor>\n }\n if (props.view === 'dropdown') {\n child = (\n <>\n <TouchableOpacity onPress={() => {\n this.updateState({collapsed: !this.state.collapsed} as WmNavItemState);\n }}>\n <View style={this.styles.dropdownNav}>\n <WmAnchor styles={this.styles.navAnchorItem} caption={getDisplayLabel(props.item.label)} iconclass={props.item.icon} onTap={this.onSelectItem.bind(this, props.onSelect, props.item)}></WmAnchor>\n <WmIcon styles={this.styles.caretIcon} iconclass={this.state.collapsed ? 'fa fa-sort-down' : 'fa fa-sort-up'}></WmIcon>\n </View>\n </TouchableOpacity>\n {!this.state.collapsed && props.children}\n </>\n );\n }\n return (\n <View style={this.styles.root}>{this._background}{child}</View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,gBAAgB,QAAQ,8BAA8B;AAE/D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AAE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,IAAI,KAAK,UAAU,EAAE;MAC7BF,KAAK,gBACHvB,KAAA,CAAA0B,aAAA,CAAA1B,KAAA,CAAAwC,QAAA,qBACAxC,KAAA,CAAA0B,aAAA,CAACxB,gBAAgB;QAACuC,OAAO,EAAEA,CAAA,KAAM;UAC/B,IAAI,CAACC,WAAW,CAAC;YAACC,SAAS,EAAE,CAAC,IAAI,CAACC,KAAK,CAACD;UAAS,CAAmB,CAAC;QACxE;MAAE,gBACA3C,KAAA,CAAA0B,aAAA,CAACzB,IAAI;QAAC4C,KAAK,EAAE,IAAI,CAAClB,MAAM,CAACmB;MAAY,gBACnC9C,KAAA,CAAA0B,aAAA,CAACrB,QAAQ;QAACsB,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,aAAc;QAACC,OAAO,EAAET,eAAe,CAACN,KAAK,CAACgB,IAAI,CAACR,KAAK,CAAE;QAACa,SAAS,EAAErB,KAAK,CAACgB,IAAI,CAACM,IAAK;QAACC,KAAK,EAAE,IAAI,CAACtB,YAAY,CAACuB,IAAI,CAAC,IAAI,EAAExB,KAAK,CAACyB,QAAQ,EAAEzB,KAAK,CAACgB,IAAI;MAAE,CAAW,CAAC,eACjM9B,KAAA,CAAA0B,aAAA,CAACpB,MAAM;QAACqB,MAAM,EAAE,IAAI,CAACA,MAAM,CAACoB,SAAU;QAACZ,SAAS,EAAE,IAAI,CAACS,KAAK,CAACD,SAAS,GAAG,iBAAiB,GAAG;MAAgB,CAAS,CAClH,CACU,CAAC,EAClB,CAAC,IAAI,CAACC,KAAK,CAACD,SAAS,IAAI7B,KAAK,CAACU,QAC9B,CACH;IACH;IACA,oBACExB,KAAA,CAAA0B,aAAA,CAACzB,IAAI;MAAC4C,KAAK,EAAE,IAAI,CAAClB,MAAM,CAACqB;IAAK,GAAE,IAAI,CAACC,WAAW,EAAE1B,KAAY,CAAC;EAEnE;AACF"}
1
+ {"version":3,"names":["React","View","TouchableOpacity","BaseComponent","BaseComponentState","WmAnchor","WmIcon","WmNavItemProps","DEFAULT_CLASS","WmNavItemState","constructor","arguments","_defineProperty","WmNavItem","props","onSelectItem","cb","$item","$event","data","renderWidget","getDisplayLabel","getDisplayExpression","label","child","children","view","createElement","id","getTestId","styles","navAnchorItem","caption","item","hyperlink","link","badgevalue","badge","iconclass","icon","onTap","bind","onSelect","Fragment","onPress","updateState","collapsed","state","style","dropdownNav","caretIcon","root","_background"],"sources":["navitem.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmNavItemProps from './navitem.props';\nimport { DEFAULT_CLASS, WmNavItemStyles } from './navitem.styles';\nimport { NavigationDataItem } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component\";\nimport { TapEvent } from \"@wavemaker/app-rn-runtime/core/tappable.component\";\n\nexport class WmNavItemState extends BaseComponentState<WmNavItemProps> {\n collapsed = true;\n}\n\nexport default class WmNavItem extends BaseComponent<WmNavItemProps, WmNavItemState, WmNavItemStyles> {\n\n constructor(props: WmNavItemProps) {\n super(props, DEFAULT_CLASS, new WmNavItemProps(), new WmNavItemState());\n }\n\n onSelectItem(cb: any, $item: NavigationDataItem, $event: TapEvent) {\n cb && cb($event, this, $item?.data);\n }\n\n renderWidget(props: WmNavItemProps) {\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let child = props.children;\n if (props.view === 'anchor') {\n child = <WmAnchor id={this.getTestId('navlink')} styles={this.styles.navAnchorItem} caption={getDisplayLabel(props.item.label)} hyperlink={props.item.link}\n badgevalue={props.item.badge} iconclass={props.item.icon} onTap={this.onSelectItem.bind(this, props.onSelect, props.item)}></WmAnchor>\n }\n if (props.view === 'dropdown') {\n child = (\n <>\n <TouchableOpacity \n id={this.getTestId('navlink')}\n onPress={() => {\n this.updateState({collapsed: !this.state.collapsed} as WmNavItemState);\n }}>\n <View style={this.styles.dropdownNav}>\n <WmAnchor id={this.getTestId('navlink')} styles={this.styles.navAnchorItem} caption={getDisplayLabel(props.item.label)} iconclass={props.item.icon} onTap={this.onSelectItem.bind(this, props.onSelect, props.item)}></WmAnchor>\n <WmIcon id={this.getTestId('icon')} styles={this.styles.caretIcon} iconclass={this.state.collapsed ? 'fa fa-sort-down' : 'fa fa-sort-up'}></WmIcon>\n </View>\n </TouchableOpacity>\n {!this.state.collapsed && props.children}\n </>\n );\n }\n return (\n <View style={this.styles.root}>{this._background}{child}</View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAIjE,OAAO,MAAMC,cAAc,SAASL,kBAAkB,CAAiB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACzD,IAAI;EAAA;AAClB;AAEA,eAAe,MAAMC,SAAS,SAASV,aAAa,CAAkD;EAEpGO,WAAWA,CAACI,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,EAAE,IAAIE,cAAc,CAAC,CAAC,CAAC;EACzE;EAEAM,YAAYA,CAACC,EAAO,EAAEC,KAAyB,EAAEC,MAAgB,EAAE;IACjEF,EAAE,IAAIA,EAAE,CAACE,MAAM,EAAE,IAAI,EAAED,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,IAAI,CAAC;EACrC;EAEAC,YAAYA,CAACN,KAAqB,EAAE;IAClC,MAAMO,eAAe,GAAG,IAAI,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