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

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 (363) 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/actions/notification-action.js.map +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
  7. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
  9. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel.component.js +214 -69
  11. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
  13. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel.styles.js +22 -10
  15. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  16. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  17. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  18. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  19. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  20. app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
  21. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
  23. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  24. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  25. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  26. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  27. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  28. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  29. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  30. app-rn-runtime/components/basic/button/button.component.js +20 -7
  31. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  32. app-rn-runtime/components/basic/button/button.styles.js +15 -5
  33. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
  35. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  36. app-rn-runtime/components/basic/icon/icon.component.js +11 -5
  37. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  38. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  39. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  40. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  41. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  42. app-rn-runtime/components/basic/label/label.component.js +79 -11
  43. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  44. app-rn-runtime/components/basic/label/label.props.js +1 -0
  45. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  46. app-rn-runtime/components/basic/label/label.styles.js +5 -0
  47. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  48. app-rn-runtime/components/basic/message/message.component.js +6 -3
  49. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  50. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  51. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
  53. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  54. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  55. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  57. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  58. app-rn-runtime/components/basic/search/search.component.js +12 -6
  59. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  60. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  61. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  62. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  63. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  64. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  65. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/video/video.component.js +2 -1
  67. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  68. app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  70. app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
  71. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
  75. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  76. app-rn-runtime/components/chart/basechart.component.js +158 -46
  77. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  78. app-rn-runtime/components/chart/basechart.props.js +18 -4
  79. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  80. app-rn-runtime/components/chart/basechart.styles.js +44 -2
  81. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
  83. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  84. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
  85. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
  87. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  89. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  90. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
  91. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  92. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  93. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  94. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +275 -0
  95. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
  96. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +17 -0
  97. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
  98. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
  99. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
  100. app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
  101. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  102. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
  103. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/container.component.js +14 -4
  105. app-rn-runtime/components/container/container.component.js.map +1 -1
  106. app-rn-runtime/components/container/container.props.js +1 -0
  107. app-rn-runtime/components/container/container.props.js.map +1 -1
  108. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  109. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  110. app-rn-runtime/components/container/panel/panel.component.js +44 -62
  111. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  112. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  113. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  114. app-rn-runtime/components/container/partial-host.component.js +1 -1
  115. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
  117. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  118. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
  119. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  120. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  121. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  122. app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
  123. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  124. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
  125. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  126. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  127. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  128. app-rn-runtime/components/container/wizard/wizard.component.js +139 -22
  129. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  130. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  131. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  132. app-rn-runtime/components/container/wizard/wizard.styles.js +117 -6
  133. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  134. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
  135. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  136. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
  137. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  138. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  139. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  140. app-rn-runtime/components/data/card/card.component.js +3 -2
  141. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  143. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  144. app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
  145. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  146. app-rn-runtime/components/data/form/form.component.js +12 -6
  147. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  150. app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
  151. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.component.js +93 -31
  153. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.props.js +7 -0
  155. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  156. app-rn-runtime/components/data/list/list.styles.js +12 -5
  157. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  158. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  159. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  160. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  161. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  162. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  163. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  164. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  165. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  166. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  167. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  168. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  169. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  170. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  171. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  172. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  173. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  174. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  175. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  176. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
  177. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  178. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
  179. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  180. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
  181. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  182. app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
  183. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  184. app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
  185. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  186. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  187. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  188. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  189. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  190. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  191. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  192. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  193. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  194. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  195. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  196. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
  197. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  198. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
  199. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  200. app-rn-runtime/components/input/chips/chips.component.js +15 -4
  201. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  202. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  203. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  204. app-rn-runtime/components/input/composite/composite.component.js +8 -1
  205. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  206. app-rn-runtime/components/input/composite/composite.props.js +1 -0
  207. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  208. app-rn-runtime/components/input/composite/composite.styles.js +16 -1
  209. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  210. app-rn-runtime/components/input/currency/currency.component.js +21 -3
  211. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  212. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  213. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  214. app-rn-runtime/components/input/currency/currency.styles.js +31 -5
  215. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  216. app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
  217. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  218. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  219. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  220. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  221. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  222. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  223. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  224. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  225. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  226. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  227. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  228. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  229. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  230. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  231. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  232. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  233. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  234. app-rn-runtime/components/input/number/number.component.js +16 -2
  235. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  236. app-rn-runtime/components/input/number/number.props.js +1 -0
  237. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  238. app-rn-runtime/components/input/number/number.styles.js +23 -2
  239. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  240. app-rn-runtime/components/input/radioset/radioset.component.js +13 -6
  241. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  242. app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
  243. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  244. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -9
  245. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  246. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  247. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  248. app-rn-runtime/components/input/select/select.component.js +17 -13
  249. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  250. app-rn-runtime/components/input/select/select.styles.js +8 -4
  251. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  252. app-rn-runtime/components/input/slider/slider.component.js +99 -23
  253. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  254. app-rn-runtime/components/input/slider/slider.styles.js +30 -3
  255. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  256. app-rn-runtime/components/input/switch/switch.component.js +11 -5
  257. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  258. app-rn-runtime/components/input/switch/switch.styles.js +15 -9
  259. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  260. app-rn-runtime/components/input/text/text.component.js +12 -1
  261. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  262. app-rn-runtime/components/input/text/text.props.js +1 -0
  263. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  264. app-rn-runtime/components/input/text/text.styles.js +22 -1
  265. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  266. app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
  267. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  268. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  269. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  270. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  271. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  272. app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
  273. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  274. app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
  275. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  276. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
  277. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  278. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  279. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  280. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
  281. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  282. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  283. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  284. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  285. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  286. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  287. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  288. app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
  289. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  290. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  291. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  292. app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
  293. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  294. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  295. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  296. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  297. app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
  298. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  299. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  300. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  301. app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
  302. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  303. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  304. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  305. app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
  306. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  307. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  308. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  309. app-rn-runtime/components/page/tabbar/tabbar.styles.js +76 -1
  310. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  311. app-rn-runtime/core/base.component.js +84 -37
  312. app-rn-runtime/core/base.component.js.map +1 -1
  313. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  314. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  315. app-rn-runtime/core/components/textinput.component.js +25 -2
  316. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  317. app-rn-runtime/core/constant.service.js +22 -0
  318. app-rn-runtime/core/constant.service.js.map +1 -0
  319. app-rn-runtime/core/formatters.js +9 -2
  320. app-rn-runtime/core/formatters.js.map +1 -1
  321. app-rn-runtime/core/imageSizeEstimator.js +4 -0
  322. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  323. app-rn-runtime/core/key.extractor.js +22 -0
  324. app-rn-runtime/core/key.extractor.js.map +1 -0
  325. app-rn-runtime/core/tappable.component.js +49 -12
  326. app-rn-runtime/core/tappable.component.js.map +1 -1
  327. app-rn-runtime/core/testid.provider.js +5 -0
  328. app-rn-runtime/core/testid.provider.js.map +1 -0
  329. app-rn-runtime/core/utils.js +16 -0
  330. app-rn-runtime/core/utils.js.map +1 -1
  331. app-rn-runtime/gestures/swipe.animation.js +90 -16
  332. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  333. app-rn-runtime/package.json +6 -3
  334. app-rn-runtime/runtime/App.js +55 -22
  335. app-rn-runtime/runtime/App.js.map +1 -1
  336. app-rn-runtime/runtime/base-fragment.component.js +27 -6
  337. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  338. app-rn-runtime/runtime/base-page.component.js +25 -2
  339. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  340. app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
  341. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  342. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  343. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  344. app-rn-runtime/runtime/services/app-security.service.js +14 -3
  345. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  346. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  347. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  348. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  349. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  350. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  351. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  352. app-rn-runtime/styles/theme.js +66 -1
  353. app-rn-runtime/styles/theme.js.map +1 -1
  354. app-rn-runtime/styles/theme.variables.js +24 -3
  355. app-rn-runtime/styles/theme.variables.js.map +1 -1
  356. app-rn-runtime/variables/http.service.js +1 -1
  357. app-rn-runtime/variables/http.service.js.map +1 -1
  358. app-rn-runtime/variables/live-variable.js +1 -0
  359. app-rn-runtime/variables/live-variable.js.map +1 -1
  360. app-rn-runtime/variables/model-variable.js +13 -1
  361. app-rn-runtime/variables/model-variable.js.map +1 -1
  362. app-rn-runtime/variables/service-variable.js +1 -0
  363. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Carousel","Pagination","WmIcon","BaseComponent","BaseComponentState","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_defineProperty","WmCarousel","props","index","prevIndex","state","activeIndex","updateState","invokeEventCallback","data","type","renderSlide","item","children","e","sliderWidth","nativeEvent","layout","width","_ref","active","createElement","style","styles","activeDotStyle","dotStyle","carouselRef","currentIndex","noOfSlides","_this$carouselRef","snapToNext","_this$carouselRef2","snapToItem","_this$carouselRef3","snapToPrev","_this$carouselRef4","cleanup","push","stopPlay","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","onPropertyChange","name","$new","$old","renderPagination","dotsLength","activeDotIndex","containerStyle","dotsWrapperStyle","inactiveDotStyle","inactiveDotScale","tappableDots","renderWidget","hasNavs","controls","hasDots","dataset","length","root","onLayout","onLayoutChange","_background","ref","firstItem","height","enableSnap","loopClonesPerSide","autoplay","activeSlideAlignment","renderItem","itemWidth","lockScrollWhileSnapping","scrollEnabled","onSnapToItem","onSlideChange","btnPanel","iconclass","prevBtn","onTap","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, LayoutChangeEvent } from 'react-native';\nimport Carousel, { Pagination } from 'react-native-snap-carousel';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 0;\n sliderWidth = 0;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n carouselRef: Carousel<unknown> | null = null as any;\n noOfSlides: number = 0;\n stopPlay: Function = null as any;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n }\n\n renderItem = (data: any) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(data.item, data.index) : null;\n }\n return props.children[data.index];\n }\n\n onLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n sliderWidth: e.nativeEvent.layout.width\n } as WmCarouselState);\n }\n\n getDotElement = ({active, index}: {active: boolean, index: number}) => {\n return (<Text style={active ? this.styles.activeDotStyle: this.styles.dotStyle}>{index}</Text>);\n }\n\n renderPagination(props: WmCarouselProps, styles: WmCarouselStyles) {\n return (\n <Pagination\n carouselRef={this.carouselRef as any}\n dotsLength={this.noOfSlides}\n activeDotIndex={this.state.activeIndex}\n containerStyle={styles.dotsWrapperStyle}\n dotStyle={styles.activeDotStyle}\n inactiveDotStyle={styles.dotStyle}\n inactiveDotScale={0.8}\n tappableDots={true}\n />\n );\n }\n\n next = () => {\n if (this.carouselRef && this.carouselRef.currentIndex < this.noOfSlides - 1) {\n this.carouselRef?.snapToNext();\n } else {\n this.carouselRef?.snapToItem(0);\n }\n }\n\n prev = () => {\n if (this.carouselRef && this.carouselRef.currentIndex > 0) {\n this.carouselRef?.snapToPrev();\n } else {\n this.carouselRef?.snapToItem(this.noOfSlides - 1);\n }\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n this.noOfSlides = data?.length || 0;\n const autoPlay = props.animation === 'auto';\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root} onLayout={this.onLayoutChange}>\n {this._background}\n {this.state.sliderWidth > 0 ?\n (<Carousel\n ref={ref => this.carouselRef = ref}\n data={data || []}\n firstItem={0}\n style={{width: '100%', height: '100%'}}\n enableSnap={true}\n loopClonesPerSide={1}\n autoplay={false}\n activeSlideAlignment='start'\n renderItem={this.renderItem}\n sliderWidth={this.state.sliderWidth}\n itemWidth={this.state.sliderWidth}\n lockScrollWhileSnapping={false}\n scrollEnabled={false}\n onSnapToItem={this.onSlideChange}\n ></Carousel>) : null}\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}\n {this.state.sliderWidth > 0 && hasDots && data ? this.renderPagination(props, styles) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,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D,WAAW,EAAE,IAAI,CAACV,KAAK,CAACU,WAAY;MACpC6D,SAAS,EAAE,IAAI,CAACvE,KAAK,CAACU,WAAY;MAClC8D,uBAAuB,EAAE,KAAM;MAC/BC,aAAa,EAAE,KAAM;MACrBC,YAAY,EAAE,IAAI,CAACC;IAAc,CACxB,CAAC,GAAI,IAAI,EACrBrB,OAAO,gBACNxE,KAAA,CAAAkC,aAAA,CAACjC,IAAI;MAACkC,KAAK,EAAEC,MAAM,CAAC0D;IAAS,gBAC3B9F,KAAA,CAAAkC,aAAA,CAAC7B,MAAM;MACL0F,SAAS,EAAC,0BAA0B;MACpC3D,MAAM,EAAEA,MAAM,CAAC4D,OAAQ;MACvBC,KAAK,EAAE,IAAI,CAACC;IAAK,CAAC,CAAC,eACrBlG,KAAA,CAAAkC,aAAA,CAAC7B,MAAM;MACL0F,SAAS,EAAC,2BAA2B;MACrC3D,MAAM,EAAEA,MAAM,CAAC+D,OAAQ;MACvBF,KAAK,EAAE,IAAI,CAACxC;IAAK,CAAC,CAChB,CAAC,GAAG,IAAI,EACf,IAAI,CAACvC,KAAK,CAACU,WAAW,GAAG,CAAC,IAAI8C,OAAO,IAAIpD,IAAI,GAAG,IAAI,CAACyC,gBAAgB,CAAChD,KAAK,EAAEqB,MAAM,CAAC,GAAG,IACpF,CAAC;EACX;AACF"}
1
+ {"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","arguments","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView","animationView","setPosition","_this$animationView2","goToUpper","_this$animationView3","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView4","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","createElement","style","dotsWrapperStyle","flexDirection","map","key","activeDotStyle","undefined","height","transform","translateX","right","left","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","noOfSlides","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","root","_background","enableGestures","enablegestures","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView5","_this$animationView6","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","firstSlide","lastSlide","activeSlide","onTap","_this$animationView7","renderItem","btnPanel","id","getTestId","iconclass","prevBtn","prev","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n this.onSlideChange(this.state.activeIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} \n style={[this.styles.dotStyle]}>\n </View>) : null;\n })\n }\n <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n </View>\n </View>);\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures}\n style={{\n height: props.type === 'dynamic' ? undefined : '100%',\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OA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/C,CAAC;EACX;AACF"}
@@ -11,7 +11,10 @@ export default class WmCarouselProps extends BaseProps {
11
11
  _defineProperty(this, "animationinterval", 3);
12
12
  _defineProperty(this, "controls", 'both');
13
13
  _defineProperty(this, "children", null);
14
+ _defineProperty(this, "itemkey", null);
14
15
  _defineProperty(this, "renderSlide", void 0);
16
+ _defineProperty(this, "enablegestures", true);
17
+ _defineProperty(this, "maxnoofdots", 20);
15
18
  }
16
19
  }
17
20
  //# sourceMappingURL=carousel.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmCarouselProps","constructor","arguments","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: string = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n renderSlide?: ($item: any, $index: number) => React.ReactNode;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACjB,MAAM;IAAAA,eAAA,4BACE,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA;EAAA;AAElB"}
1
+ {"version":3,"names":["BaseProps","WmCarouselProps","constructor","arguments","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: 'auto' | 'none' = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n itemkey?: ($item: any, $index: any) => any = null as any;\n renderSlide?: ($item: any, $index: number, carousel: any) => React.ReactNode;\n enablegestures = true;\n maxnoofdots = 20;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACR,MAAM;IAAAA,eAAA,4BACP,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA,kBAC6B,IAAI;IAAAA,eAAA;IAAAA,eAAA,yBAE/B,IAAI;IAAAA,eAAA,sBACR,EAAE;EAAA;AAClB"}
@@ -15,6 +15,17 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
15
15
  position: 'relative'
16
16
  },
17
17
  text: {},
18
+ slide: {
19
+ width: '100%',
20
+ overflow: 'hidden',
21
+ paddingHorizontal: 16,
22
+ transform: [{
23
+ scale: 0.8
24
+ }]
25
+ },
26
+ firstSlide: {},
27
+ lastSlide: {},
28
+ activeSlide: {},
18
29
  btnPanel: {
19
30
  position: 'absolute',
20
31
  top: '50%',
@@ -53,25 +64,26 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
53
64
  },
54
65
  dotsWrapperStyle: {
55
66
  opacity: 1,
56
- height: 64,
57
- marginTop: -64,
58
- position: 'absolute',
59
- top: '100%',
60
67
  backgroundColor: themeVariables.carouselDotWrapperBgColor,
61
- alignSelf: 'center',
68
+ flexDirection: 'row',
69
+ justifyContent: 'center',
70
+ alignItems: 'center',
62
71
  paddingTop: 4,
63
72
  paddingBottom: 4
64
73
  },
65
74
  activeDotStyle: {
66
- width: 12,
67
- height: 12,
68
- borderRadius: 10,
75
+ position: 'absolute',
69
76
  backgroundColor: themeVariables.carouselActiveDotColor,
70
- opacity: 1
77
+ opacity: 1,
78
+ padding: 4
71
79
  },
72
80
  dotStyle: {
81
+ width: 8,
82
+ height: 8,
83
+ borderRadius: 10,
73
84
  opacity: 0.2,
74
- marginHorizontal: -2,
85
+ marginLeft: 2,
86
+ marginRight: 2,
75
87
  backgroundColor: themeVariables.carouselDotColor
76
88
  }
77
89
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","text","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","alignSelf","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","dotStyle","marginHorizontal","carouselDotColor","transform","rotateY","defaultColorF","right","padding","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative'\n },\n text: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n height: 64,\n marginTop: -64,\n position: 'absolute',\n top: '100%',\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n alignSelf: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n width: 12,\n height: 12,\n borderRadius: 10,\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1\n },\n dotStyle: {\n opacity: 0.2,\n marginHorizontal: -2,\n backgroundColor: themeVariables.carouselDotColor\n }\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,GAAc,GAAG;IACnBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAEN,cAAc,CAACO,WAAW;IACvCC,WAAW,EAAE,CAAC;IACdC,cAAc,EAAE;EACpB,CAAC;EACD,MAAMC,aAA+B,GAAGb,YAAY,CAAC;IACjDc,IAAI,EAAE;MACFC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNF,QAAQ,EAAE,UAAU;MACpBG,GAAG,EAAE,KAAK;MACVC,SAAS,EAAE,CAAC,EAAE;MACdb,MAAM,EAAE,EAAE;MACVc,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBT,cAAc,EAAE,eAAe;MAC/BL,KAAK,EAAE;IACX,CAAC;IACDe,OAAO,EAAG;MACNR,IAAI,EAAE;QACFS,UAAU,EAAE,EAAE;QACd,GAAGlB,GAAG;QACNmB,eAAe,EAAErB,cAAc,CAACsB;MACpC,CAAC;MACDT,IAAI,EAAE;QACFU,QAAQ,EAAE;MACd,CAAC;MACDC,IAAI,EAAG;QACHC,KAAK,EAAEzB,cAAc,CAAC0B;MAC1B;IACJ,CAAiB;IACjBC,OAAO,E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,EAAE;MACNC,GAAG,EAAE;IACT,CAAC;IACDI,OAAO,EAAE;MACLR,IAAI,EAAE;QACFN,YAAY,EAAE;MAClB;IACJ,CAAC;IACDsB,OAAO,EAAE;MACLhB,IAAI,EAAE;QACFN,YAAY,EAAE;MAClB;IACJ;EACJ,CAA4B,CAAC;EAE7BJ,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC3Ba,QAAQ,EAAE;MACNO,eAAe,EAAErB,cAAc,CAAC2C,aAAa;MAC7CvC,KAAK,EAAE,MAAM;MACbW,GAAG,EAAE,MAAM;MACX6B,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE,CAAC;MACVpC,cAAc,EAAE;IACpB,CAAC;IACDqB,gBAAgB,EAAC;MACbG,SAAS,EAAE,YAAY;MACvBxB,cAAc,EAAE;IACpB,CAAC;IACD2B,cAAc,EAAE;MACZf,eAAe,EAAErB,cAAc,CAAC8C;IACpC,CAAC;IACDR,QAAQ,EAAE;MACNjB,eAAe,EAAErB,cAAc,CAAC8C;IACpC,CAAC;IACD3B,OAAO,EAAE;MACLR,IAAI,EAAE;QACFU,eAAe,EAAE,0BAA0B;QAC3Cf,WAAW,EAAEN,cAAc,CAAC8C;MAChC,CAAC;MACDtB,IAAI,EAAG;QACHC,KAAK,EAAEzB,cAAc,CAAC8C;MAC1B;IACJ,CAAC;IACDnB,OAAO,EAAE;MACLhB,IAAI,EAAE;QACFS,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3Cf,WAAW,EAAEN,cAAc,CAAC8C;MAChC,CAAC;MACDtB,IAAI,EAAG;QACHC,KAAK,EAAEzB,cAAc,CAAC8C;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","text","slide","overflow","paddingHorizontal","transform","scale","firstSlide","lastSlide","activeSlide","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","padding","dotStyle","carouselDotColor","rotateY","defaultColorF","right","alignSelf","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n slide: AllStyle,\n firstSlide: AllStyle,\n lastSlide: AllStyle,\n activeSlide: AllStyle,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative'\n },\n text: {},\n slide: {\n width: '100%',\n overflow: 'hidden',\n paddingHorizontal: 16,\n transform: [\n {\n scale: 0.8\n }\n ]\n },\n firstSlide: {},\n lastSlide: {},\n activeSlide: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n position: 'absolute',\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1,\n padding: 4\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginLeft: 2,\n marginRight: 2,\n backgroundColor: themeVariables.carouselDotColor\n }\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,GAAc,GAAG;IACnBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAEN,cAAc,CAACO,WAAW;IACvCC,WAAW,EAAE,CAAC;IACdC,cAAc,EAAE;EACpB,CAAC;EACD,MAAMC,aAA+B,GAAGb,YAAY,CAAC;IACjDc,IAAI,EAAE;MACFC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACHV,KAAK,EAAE,MAAM;MACbW,QAAQ,EAAE,QAAQ;MAClBC,iBAAiB,EAAE,EAAE;MACrBC,SAAS,EAAE,CACP;QACIC,KAAK,EAAE;MACX,CAAC;IAET,CAAC;IACDC,UAAU,EAAE,CAAC,CAAC;IACdC,SAAS,EAAE,CAAC,CAAC;IACbC,WAAW,EAAE,CAAC,CAAC;IACfC,QAAQ,EAAE;MACNV,QAAQ,EAAE,UAAU;MACpBW,GAAG,EAAE,KAAK;MACVC,SAAS,EAAE,CAAC,EAAE;MACdrB,MAAM,EAAE,EAAE;MACVsB,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBjB,cAAc,EAAE,eAAe;MAC/BL,KAAK,EAAE;IACX,CAAC;IACDuB,OAAO,EAAG;MACNhB,IAAI,EAAE;QACFiB,UAAU,EAAE,EAAE;QACd,GAAG1B,GAAG;QACN2B,eAAe,EAAE7B,cAAc,CAAC8B;MACpC,CAAC;MACDj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,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); }
@@ -28,9 +29,9 @@ export default class WmLogin extends BaseComponent {
28
29
  renderWidget(props) {
29
30
  return /*#__PURE__*/React.createElement(View, {
30
31
  style: this.styles.root
31
- }, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, {
32
+ }, this._background, this.state.errorMsg && /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('error'), {
32
33
  style: this.styles.errorMsgStyles
33
- }, this.state.errorMsg), /*#__PURE__*/React.createElement(View, {
34
+ }), this.state.errorMsg), /*#__PURE__*/React.createElement(View, {
34
35
  style: this.styles.formStyles
35
36
  }, props.children));
36
37
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmLoginProps","DEFAULT_CLASS","WmLoginState","constructor","arguments","_defineProperty","WmLogin","props","onLoginSuccess","response","onLoginError","error","updateState","errorMsg","message","doLogin","formData","onLogin","bind","renderWidget","createElement","style","styles","root","_background","state","errorMsgStyles","formStyles","children"],"sources":["login.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLoginProps from './login.props';\nimport { DEFAULT_CLASS, WmLoginStyles } from './login.styles';\nimport { AxiosError, AxiosResponse } from 'axios';\n\nexport class WmLoginState extends BaseComponentState<WmLoginProps> {\n errorMsg = '';\n}\n\nexport default class WmLogin extends BaseComponent<WmLoginProps, WmLoginState, WmLoginStyles> {\n constructor(props: WmLoginProps) {\n super(props, DEFAULT_CLASS, new WmLoginProps());\n }\n\n onLoginSuccess(response: AxiosResponse) {\n }\n\n onLoginError(error: AxiosError) {\n this.updateState({errorMsg: error?.message} as WmLoginState);\n }\n\n doLogin(formData: any) {\n this.props.onLogin(formData, this.onLoginSuccess.bind(this), this.onLoginError.bind(this));\n }\n\n renderWidget(props: WmLoginProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.state.errorMsg && <Text style={this.styles.errorMsgStyles}>{this.state.errorMsg}</Text>}\n <View style={this.styles.formStyles}>{props.children}</View>\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAG7D,OAAO,MAAMC,YAAY,SAASH,kBAAkB,CAAe;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACtD,EAAE;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASR,aAAa,CAA4C;EAC5FK,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEAQ,cAAcA,CAACC,QAAuB,EAAE,CACxC;EAEAC,YAAYA,CAACC,KAAiB,EAAE;IAC9B,IAAI,CAACC,WAAW,CAAC;MAACC,QAAQ,EAAEF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG;IAAO,CAAiB,CAAC;EAC9D;EAEAC,OAAOA,CAACC,QAAa,EAAE;IACrB,IAAI,CAACT,KAAK,CAACU,OAAO,CAACD,QAAQ,EAAE,IAAI,CAACR,cAAc,CAACU,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAACR,YAAY,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;EAC5F;EAEAC,YAAYA,CAACZ,KAAmB,EAAE;IAChC,oBAAQZ,KAAA,CAAAyB,aAAA,CAACvB,IAAI;MAACwB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACC,KAAK,CAACZ,QAAQ,iBAAIlB,KAAA,CAAAyB,aAAA,CAACxB,IAAI;MAACyB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACI;IAAe,GAAE,IAAI,CAACD,KAAK,CAACZ,QAAe,CAAC,eAC7FlB,KAAA,CAAAyB,aAAA,CAACvB,IAAI;MAACwB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACK;IAAW,GAAEpB,KAAK,CAACqB,QAAe,CACvD,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmLoginProps","DEFAULT_CLASS","WmLoginState","constructor","arguments","_defineProperty","WmLogin","props","onLoginSuccess","response","onLoginError","error","updateState","errorMsg","message","doLogin","formData","onLogin","bind","renderWidget","createElement","style","styles","root","_background","state","_extends","getTestPropsForLabel","errorMsgStyles","formStyles","children"],"sources":["login.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLoginProps from './login.props';\nimport { DEFAULT_CLASS, WmLoginStyles } from './login.styles';\nimport { AxiosError, AxiosResponse } from 'axios';\n\nexport class WmLoginState extends BaseComponentState<WmLoginProps> {\n errorMsg = '';\n}\n\nexport default class WmLogin extends BaseComponent<WmLoginProps, WmLoginState, WmLoginStyles> {\n constructor(props: WmLoginProps) {\n super(props, DEFAULT_CLASS, new WmLoginProps());\n }\n\n onLoginSuccess(response: AxiosResponse) {\n }\n\n onLoginError(error: AxiosError) {\n this.updateState({errorMsg: error?.message} as WmLoginState);\n }\n\n doLogin(formData: any) {\n this.props.onLogin(formData, this.onLoginSuccess.bind(this), this.onLoginError.bind(this));\n }\n\n renderWidget(props: WmLoginProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.state.errorMsg && <Text {...this.getTestPropsForLabel('error')} style={this.styles.errorMsgStyles}>{this.state.errorMsg}</Text>}\n <View style={this.styles.formStyles}>{props.children}</View>\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAG7D,OAAO,MAAMC,YAAY,SAASH,kBAAkB,CAAe;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACtD,EAAE;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASR,aAAa,CAA4C;EAC5FK,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEAQ,cAAcA,CAACC,QAAuB,EAAE,CACxC;EAEAC,YAAYA,CAACC,KAAiB,EAAE;IAC9B,IAAI,CAACC,WAAW,CAAC;MAACC,QAAQ,EAAEF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG;IAAO,CAAiB,CAAC;EAC9D;EAEAC,OAAOA,CAACC,QAAa,EAAE;IACrB,IAAI,CAACT,KAAK,CAACU,OAAO,CAACD,QAAQ,EAAE,IAAI,CAACR,cAAc,CAACU,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAACR,YAAY,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;EAC5F;EAEAC,YAAYA,CAACZ,KAAmB,EAAE;IAChC,oBAAQZ,KAAA,CAAAyB,aAAA,CAACvB,IAAI;MAACwB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACC,KAAK,CAACZ,QAAQ,iBAAIlB,KAAA,CAAAyB,aAAA,CAACxB,IAAI,EAAA8B,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,OAAO,CAAC;MAAEN,KAAK,EAAE,IAAI,CAACC,MAAM,CAACM;IAAe,IAAE,IAAI,CAACH,KAAK,CAACZ,QAAe,CAAC,eACrIlB,KAAA,CAAAyB,aAAA,CAACvB,IAAI;MAACwB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACO;IAAW,GAAEtB,KAAK,CAACuB,QAAe,CACvD,CAAC;EACT;AACF"}
@@ -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); }
@@ -38,60 +39,60 @@ export default class WmNetworkInfoToaster extends BaseComponent {
38
39
  if (this.state.newtworkState.isConnected) {
39
40
  return /*#__PURE__*/React.createElement(View, {
40
41
  style: this.styles.root
41
- }, this._background, /*#__PURE__*/React.createElement(Text, {
42
+ }, this._background, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('msg'), {
42
43
  style: this.styles.text
43
- }, this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED), /*#__PURE__*/React.createElement(TouchableOpacity, {
44
+ }), this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED), /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction('close'), {
44
45
  style: this.styles.action,
45
46
  onPress: () => this._close()
46
- }, /*#__PURE__*/React.createElement(Text, {
47
+ }), /*#__PURE__*/React.createElement(Text, {
47
48
  style: this.styles.actionText
48
49
  }, this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO)));
49
50
  }
50
51
  if (this.state.newtworkState.isConnecting) {
51
52
  return /*#__PURE__*/React.createElement(View, {
52
53
  style: this.styles.root
53
- }, this._background, /*#__PURE__*/React.createElement(Text, {
54
+ }, this._background, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('msg'), {
54
55
  style: this.styles.text
55
- }, this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING));
56
+ }), this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING));
56
57
  }
57
58
  if (this.state.newtworkState.isServiceAvailable) {
58
59
  return /*#__PURE__*/React.createElement(View, {
59
60
  style: this.styles.root
60
- }, this._background, /*#__PURE__*/React.createElement(Text, {
61
+ }, this._background, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('msg'), {
61
62
  style: this.styles.text
62
- }, this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
63
+ }), this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction('close'), {
63
64
  style: this.styles.action,
64
65
  onPress: () => this._close()
65
- }, /*#__PURE__*/React.createElement(Text, {
66
+ }), /*#__PURE__*/React.createElement(Text, {
66
67
  style: this.styles.actionText
67
68
  }, this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO)), /*#__PURE__*/React.createElement(Text, {
68
69
  style: this.styles.actionSeparator
69
- }, "|"), /*#__PURE__*/React.createElement(TouchableOpacity, {
70
+ }, "|"), /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction('connect'), {
70
71
  style: this.styles.action
71
- }, /*#__PURE__*/React.createElement(Text, {
72
+ }), /*#__PURE__*/React.createElement(Text, {
72
73
  style: this.styles.actionText
73
74
  }, this.props.appLocale.messages.LABEL_CONNECT_TO_SERVICE)));
74
75
  }
75
76
  if (!this.state.newtworkState.isNetworkAvailable) {
76
77
  return /*#__PURE__*/React.createElement(View, {
77
78
  style: this.styles.root
78
- }, this._background, /*#__PURE__*/React.createElement(Text, {
79
+ }, this._background, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('msg'), {
79
80
  style: this.styles.text
80
- }, this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
81
+ }), this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction('close'), {
81
82
  style: this.styles.action,
82
83
  onPress: () => this._close()
83
- }, /*#__PURE__*/React.createElement(Text, {
84
+ }), /*#__PURE__*/React.createElement(Text, {
84
85
  style: this.styles.actionText
85
86
  }, this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO)));
86
87
  }
87
88
  return /*#__PURE__*/React.createElement(View, {
88
89
  style: this.styles.root
89
- }, this._background, /*#__PURE__*/React.createElement(Text, {
90
+ }, this._background, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('msg'), {
90
91
  style: this.styles.text
91
- }, this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
92
+ }), this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE), /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction('close'), {
92
93
  style: this.styles.action,
93
94
  onPress: () => this._close()
94
- }, /*#__PURE__*/React.createElement(Text, {
95
+ }), /*#__PURE__*/React.createElement(Text, {
95
96
  style: this.styles.actionText
96
97
  }, this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO)));
97
98
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","TouchableOpacity","View","NetworkService","BaseComponent","BaseComponentState","ToastConsumer","WmNetworkInfoToasterProps","DEFAULT_CLASS","isEqual","WmNetworkInfoToasterState","constructor","arguments","_defineProperty","WmNetworkInfoToaster","props","updateState","newtworkState","getState","showToast","isConnected","cleanup","push","notifier","subscribe","networkState","state","getToastContent","createElement","style","styles","root","_background","text","appLocale","messages","MESSAGE_SERVICE_CONNECTED","action","onPress","_close","actionText","LABEL_HIDE_NETWORK_INFO","isConnecting","MESSAGE_SERVICE_CONNECTING","isServiceAvailable","MESSAGE_SERVICE_AVAILABLE","actionSeparator","LABEL_CONNECT_TO_SERVICE","isNetworkAvailable","MESSAGE_NETWORK_NOT_AVAILABLE","MESSAGE_SERVICE_NOT_AVAILABLE","renderWidget","options","content","onClose","toastService","hideToast"],"sources":["network-info-toaster.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport NetworkService, { NetworkState } from '@wavemaker/app-rn-runtime/core/network.service';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ToastConsumer, ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nimport WmNetworkInfoToasterProps from './network-info-toaster.props';\nimport { DEFAULT_CLASS, WmNetworkInfoToasterStyles } from './network-info-toaster.styles';\nimport { isEqual } from 'lodash-es';\n\nexport class WmNetworkInfoToasterState extends BaseComponentState<WmNetworkInfoToasterProps> {\n newtworkState = {} as NetworkState;\n showToast = false;\n}\n\nexport default class WmNetworkInfoToaster extends BaseComponent<WmNetworkInfoToasterProps, WmNetworkInfoToasterState, WmNetworkInfoToasterStyles> {\n options = {} as ToastOptions;\n private _close: Function = null as any;\n\n constructor(props: WmNetworkInfoToasterProps) {\n super(props, DEFAULT_CLASS, new WmNetworkInfoToasterProps(), new WmNetworkInfoToasterState());\n this.updateState({\n newtworkState: NetworkService.getState(),\n showToast: !NetworkService.isConnected()\n } as WmNetworkInfoToasterState);\n this.cleanup.push(\n NetworkService.notifier.subscribe('onNetworkStateChange', (networkState: NetworkState) => {\n if (!isEqual(networkState, this.state.newtworkState)) {\n this.updateState({\n newtworkState: networkState,\n showToast: true\n } as WmNetworkInfoToasterState);\n }\n }\n ));\n }\n\n getToastContent() {\n if (this.state.newtworkState.isConnected) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (this.state.newtworkState.isConnecting) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING}</Text>\n </View>);\n }\n if (this.state.newtworkState.isServiceAvailable) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n <Text style={this.styles.actionSeparator}>|</Text>\n <TouchableOpacity style={this.styles.action}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_CONNECT_TO_SERVICE}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (!this.state.newtworkState.isNetworkAvailable) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n return (\n <View style={this.styles.root}>\n {this._background}\n <Text style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE}</Text>\n <TouchableOpacity style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n\n renderWidget(props: WmNetworkInfoToasterProps) {\n this.options.content = this.getToastContent();\n this.options.onClose = () => {\n this._close = null as any;\n this.updateState({\n showToast : false\n } as WmNetworkInfoToasterState);\n };\n return this.options.content && this.state.showToast ? (\n <ToastConsumer>\n {(toastService: ToastService) => {\n this._close = () => toastService.hideToast(this.options);\n toastService.showToast(this.options)\n return null;\n }}\n </ToastConsumer>\n ) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,cAAc,MAAwB,gDAAgD;AAC7F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,aAAa,QAAoC,8CAA8C;AAExG,OAAOC,yBAAyB,MAAM,8BAA8B;AACpE,SAASC,aAAa,QAAoC,+BAA+B;AACzF,SAASC,OAAO,QAAQ,WAAW;AAEnC,OAAO,MAAMC,yBAAyB,SAASL,kBAAkB,CAA4B;EAAAM,YAAA;IAAA,S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;AACF"}
1
+ {"version":3,"names":["React","Text","TouchableOpacity","View","NetworkService","BaseComponent","BaseComponentState","ToastConsumer","WmNetworkInfoToasterProps","DEFAULT_CLASS","isEqual","WmNetworkInfoToasterState","constructor","arguments","_defineProperty","WmNetworkInfoToaster","props","updateState","newtworkState","getState","showToast","isConnected","cleanup","push","notifier","subscribe","networkState","state","getToastContent","createElement","style","styles","root","_background","_extends","getTestPropsForLabel","text","appLocale","messages","MESSAGE_SERVICE_CONNECTED","getTestPropsForAction","action","onPress","_close","actionText","LABEL_HIDE_NETWORK_INFO","isConnecting","MESSAGE_SERVICE_CONNECTING","isServiceAvailable","MESSAGE_SERVICE_AVAILABLE","actionSeparator","LABEL_CONNECT_TO_SERVICE","isNetworkAvailable","MESSAGE_NETWORK_NOT_AVAILABLE","MESSAGE_SERVICE_NOT_AVAILABLE","renderWidget","options","content","onClose","toastService","hideToast"],"sources":["network-info-toaster.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport NetworkService, { NetworkState } from '@wavemaker/app-rn-runtime/core/network.service';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ToastConsumer, ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nimport WmNetworkInfoToasterProps from './network-info-toaster.props';\nimport { DEFAULT_CLASS, WmNetworkInfoToasterStyles } from './network-info-toaster.styles';\nimport { isEqual } from 'lodash-es';\n\nexport class WmNetworkInfoToasterState extends BaseComponentState<WmNetworkInfoToasterProps> {\n newtworkState = {} as NetworkState;\n showToast = false;\n}\n\nexport default class WmNetworkInfoToaster extends BaseComponent<WmNetworkInfoToasterProps, WmNetworkInfoToasterState, WmNetworkInfoToasterStyles> {\n options = {} as ToastOptions;\n private _close: Function = null as any;\n\n constructor(props: WmNetworkInfoToasterProps) {\n super(props, DEFAULT_CLASS, new WmNetworkInfoToasterProps(), new WmNetworkInfoToasterState());\n this.updateState({\n newtworkState: NetworkService.getState(),\n showToast: !NetworkService.isConnected()\n } as WmNetworkInfoToasterState);\n this.cleanup.push(\n NetworkService.notifier.subscribe('onNetworkStateChange', (networkState: NetworkState) => {\n if (!isEqual(networkState, this.state.newtworkState)) {\n this.updateState({\n newtworkState: networkState,\n showToast: true\n } as WmNetworkInfoToasterState);\n }\n }\n ));\n }\n\n getToastContent() {\n if (this.state.newtworkState.isConnected) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text {...this.getTestPropsForLabel('msg')} style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTED}</Text>\n <TouchableOpacity {...this.getTestPropsForAction('close')} style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (this.state.newtworkState.isConnecting) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text {...this.getTestPropsForLabel('msg')} style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_CONNECTING}</Text>\n </View>);\n }\n if (this.state.newtworkState.isServiceAvailable) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text {...this.getTestPropsForLabel('msg')} style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_AVAILABLE}</Text>\n <TouchableOpacity {...this.getTestPropsForAction('close')} style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n <Text style={this.styles.actionSeparator}>|</Text>\n <TouchableOpacity {...this.getTestPropsForAction('connect')} style={this.styles.action}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_CONNECT_TO_SERVICE}</Text>\n </TouchableOpacity>\n </View>);\n }\n if (!this.state.newtworkState.isNetworkAvailable) { \n return (\n <View style={this.styles.root}>\n {this._background}\n <Text {...this.getTestPropsForLabel('msg')} style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_NETWORK_NOT_AVAILABLE}</Text>\n <TouchableOpacity {...this.getTestPropsForAction('close')} style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n return (\n <View style={this.styles.root}>\n {this._background}\n <Text {...this.getTestPropsForLabel('msg')} style={this.styles.text}>{this.props.appLocale.messages.MESSAGE_SERVICE_NOT_AVAILABLE}</Text>\n <TouchableOpacity {...this.getTestPropsForAction('close')} style={this.styles.action} onPress={() => this._close()}>\n <Text style={this.styles.actionText}>{this.props.appLocale.messages.LABEL_HIDE_NETWORK_INFO}</Text>\n </TouchableOpacity>\n </View>);\n }\n\n renderWidget(props: WmNetworkInfoToasterProps) {\n this.options.content = this.getToastContent();\n this.options.onClose = () => {\n this._close = null as any;\n this.updateState({\n showToast : false\n } as WmNetworkInfoToasterState);\n };\n return this.options.content && this.state.showToast ? (\n <ToastConsumer>\n {(toastService: ToastService) => {\n this._close = () => toastService.hideToast(this.options);\n toastService.showToast(this.options)\n return null;\n }}\n </ToastConsumer>\n ) : null; \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,cAAc,MAAwB,gDAAgD;AAC7F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,aAAa,QAAoC,8CAA8C;AAExG,OAAOC,yBAAyB,MAAM,8BAA8B;AACpE,SAASC,aAAa,QAAoC,+BAA+B;AACzF,SAASC,OAAO,QAAQ,WAAW;AAEnC,OAAO,MAAMC,yBAAyB,SAASL,kBAAkB,CAA4B;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,wBAC3E,CAAC,CAAC;IAAAA,eAAA,oBACN,KAAK;EAAA;AACnB;AAEA,eAAe,MAAMC,oBAAoB,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AAO,GAAG,MAAM;MAC3B,IAAI,CAACf,MAAM,GAAG,IAAW;MACzB,IAAI,CAAC1B,WAAW,CAAC;QACfG,SAAS,EAAG;MACd,CAA8B,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,CAACoC,OAAO,CAACC,OAAO,IAAI,IAAI,CAAC9B,KAAK,CAACP,SAAS,gBACjDpB,KAAA,CAAA6B,aAAA,CAACtB,aAAa,QACVoD,YAA0B,IAAK;MAC/B,IAAI,CAAChB,MAAM,GAAG,MAAMgB,YAAY,CAACC,SAAS,CAAC,IAAI,CAACJ,OAAO,CAAC;MACxDG,YAAY,CAACvC,SAAS,CAAC,IAAI,CAACoC,OAAO,CAAC;MACpC,OAAO,IAAI;IACb,CACa,CAAC,GACd,IAAI;EACV;AACF"}
@@ -8,7 +8,15 @@ import { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';
8
8
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
9
9
  import WmWebviewProps from './webview.props';
10
10
  import { DEFAULT_CLASS } from './webview.styles';
11
- class WmWebViewState extends BaseComponentState {}
11
+ class WmWebViewState extends BaseComponentState {
12
+ constructor() {
13
+ super(...arguments);
14
+ _defineProperty(this, "currentTarget", {
15
+ title: '',
16
+ src: ''
17
+ });
18
+ }
19
+ }
12
20
  export default class WmWebview extends BaseComponent {
13
21
  constructor(props) {
14
22
  super(props, DEFAULT_CLASS, new WmWebviewProps());
@@ -34,16 +42,6 @@ export default class WmWebview extends BaseComponent {
34
42
  this.invokeEventCallback('onMessage', [event, this]);
35
43
  }
36
44
  });
37
- _defineProperty(this, "onLoad", (e, title, url) => {
38
- this.updateState({
39
- props: {
40
- title: title,
41
- src: url
42
- }
43
- }, () => {
44
- this.invokeEventCallback('onLoad', [e, this]);
45
- });
46
- });
47
45
  this.hideMode = HideMode.DONOT_ADD_TO_DOM;
48
46
  BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);
49
47
  }
@@ -51,6 +49,14 @@ export default class WmWebview extends BaseComponent {
51
49
  super.componentWillUnmount();
52
50
  BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);
53
51
  }
52
+ get title() {
53
+ var _this$state$currentTa;
54
+ return (_this$state$currentTa = this.state.currentTarget) === null || _this$state$currentTa === void 0 ? void 0 : _this$state$currentTa.title;
55
+ }
56
+ get currentsrc() {
57
+ var _this$state$currentTa2;
58
+ return (_this$state$currentTa2 = this.state.currentTarget) === null || _this$state$currentTa2 === void 0 ? void 0 : _this$state$currentTa2.src;
59
+ }
54
60
  executeScript(fn) {
55
61
  return new Promise((resolve, reject) => {
56
62
  if (this.webview) {
@@ -100,6 +106,16 @@ export default class WmWebview extends BaseComponent {
100
106
  // browser blocks cross origin access to iframe content.
101
107
  }
102
108
  }
109
+ onLoad(e, title, src) {
110
+ this.updateState({
111
+ currentTarget: {
112
+ title: title,
113
+ src: src
114
+ }
115
+ }, () => {
116
+ this.invokeEventCallback('onLoad', [e, this]);
117
+ });
118
+ }
103
119
  renderWidget(props) {
104
120
  return /*#__PURE__*/React.createElement(View, {
105
121
  style: this.styles.root
@@ -115,6 +131,7 @@ export default class WmWebview extends BaseComponent {
115
131
  source: {
116
132
  uri: props.src
117
133
  },
134
+ testID: this.getTestId('web_view'),
118
135
  incognito: props.incognito,
119
136
  onMessage: this.onMessage,
120
137
  sharedCookiesEnabled: true,
@@ -1 +1 @@
1
- {"version":3,"names":["React","BackHandler","Platform","View","WebView","HideMode","BaseComponent","BaseComponentState","WmWebviewProps","DEFAULT_CLASS","WmWebViewState","WmWebview","constructor","props","_defineProperty","webview","webViewState","canGoBack","goBack","event","_event$nativeEvent","data","nativeEvent","startsWith","id","match","callback","invokeJSCallbacks","result","substring","indexOf","parseResult","invokeEventCallback","e","title","url","updateState","src","hideMode","DONOT_ADD_TO_DOM","addEventListener","handleBackButtonPress","componentWillUnmount","removeEventListener","executeScript","fn","Promise","resolve","reject","Date","now","injectJavaScript","insertCSS","style","arguments","length","undefined","replace","JSON","parse","getTitle","iframe","currentTarget","contentWindow","document","renderWidget","createElement","styles","root","_background","OS","width","height","onLoad","ref","nestedScrollEnabled","source","uri","incognito","onMessage","sharedCookiesEnabled","onNavigationStateChange","state","scrollEnabled","onLoadEnd"],"sources":["webview.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BackHandler, Platform, View } from 'react-native';\nimport { WebView, WebViewNavigation, WebViewMessageEvent } from 'react-native-webview';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWebviewProps from './webview.props';\nimport { DEFAULT_CLASS, WebviewStyles } from './webview.styles';\n\nclass WmWebViewState extends BaseComponentState<WmWebviewProps> {\n\n}\n\nexport default class WmWebview extends BaseComponent<WmWebviewProps, WmWebViewState, WebviewStyles> {\n\n private webview: WebView | null = null as any;\n private webViewState: WebViewNavigation = null as any;\n private invokeJSCallbacks = {} as any;\n\n constructor(props: WmWebviewProps) {\n super(props, DEFAULT_CLASS, new WmWebviewProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n handleBackButtonPress = (): boolean => {\n if (this.webview && this.webViewState && this.webViewState.canGoBack) {\n this.webview.goBack();\n return true;\n }\n return false;\n }\n\n executeScript(fn: string) {\n return new Promise((resolve, reject) => {\n if (this.webview) {\n const id = '' + Date.now();\n this.invokeJSCallbacks[id] = resolve;\n fn = `\n (function(){\n try{\n return (${fn});\n } catch(e) {\n return e.getMessage();\n }\n }())\n `;\n this.webview.injectJavaScript(\n `window.ReactNativeWebView.postMessage('afterInjectJavaScript:' + ${id} + ':' + JSON.stringify(${fn}))`\n );\n } else {\n reject();\n }\n });\n }\n\n insertCSS(style = '') {\n style = style.replace(/[\\n\\t\\r]/g, '');\n return this.executeScript(`\n function() {\n const style = document.createElement('style');\n style.innerHTML = '${style}';\n document.head.appendChild(style);\n return 'SUCCESS';\n }()\n `);\n }\n\n parseResult(result: string) {\n try {\n return JSON.parse(result);\n } catch(e) {\n if (result === 'undefined' || result === 'null') {\n return null;\n }\n return result;\n }\n }\n\n onMessage = (event: WebViewMessageEvent) => {\n const data: string = event.nativeEvent?.data;\n if (data && data.startsWith('afterInjectJavaScript')) {\n const id = data?.match(/\\:([0-9]+)\\:/);\n const callback = id && this.invokeJSCallbacks[id[1]];\n const result = data.substring(data.indexOf(':', data.indexOf(':') + 1) + 1);\n callback && callback(this.parseResult(result));\n } else {\n this.invokeEventCallback('onMessage', [event, this]);\n }\n }\n\n getTitle(iframe: any) {\n try {\n return iframe.currentTarget.contentWindow.document.title;\n } catch(e) {\n // browser blocks cross origin access to iframe content.\n }\n }\n\n public onLoad = (e: any, title: string, url: string) => {\n this.updateState({\n props: {\n title: title,\n src: url\n }\n } as WmWebViewState, () => {\n this.invokeEventCallback('onLoad', [e, this]);\n });\n }\n\n protected renderWidget(props: WmWebviewProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {Platform.OS === 'web' ?\n (<iframe src={props.src} width={'100%'} height={'100%'}\n onLoad={(e) => this.onLoad(e, this.getTitle(e.currentTarget), (e.currentTarget as any).src)}></iframe>) :\n (<WebView\n ref={(ref) => this.webview = ref}\n nestedScrollEnabled={true}\n style={this.styles.webview}\n source={{\n uri: props.src\n }}\n incognito={props.incognito}\n onMessage={this.onMessage}\n sharedCookiesEnabled={true}\n onNavigationStateChange={(state) => {\n this.webViewState = state;\n }}\n scrollEnabled={true}\n onLoadEnd={(e) => this.onLoad(e, e.nativeEvent.title, e.nativeEvent.url)}>\n </WebView>)}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,OAAO,QAAgD,sBAAsB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B,aAAa,CAAC,EAAG7B,CAAC,CAAC6B,aAAa,CAASzB,GAAG;IAAE,CAAS,CAAC,gBACvGrC,KAAA,CAAAkE,aAAA,CAAC9D,OAAO;MACPsE,GAAG,EAAGA,GAAG,IAAK,IAAI,CAAC3D,OAAO,GAAG2D,GAAI;MACjCC,mBAAmB,EAAE,IAAK;MAC1BtB,KAAK,EAAE,IAAI,CAACc,MAAM,CAACpD,OAAQ;MAC3B6D,MAAM,EAAE;QACNC,GAAG,EAAEhE,KAAK,CAACwB;MACb,CAAE;MACFyC,SAAS,EAAEjE,KAAK,CAACiE,SAAU;MAC3BC,SAAS,EAAE,IAAI,CAACA,SAAU;MAC1BC,oBAAoB,EAAE,IAAK;MAC3BC,uBAAuB,EAAGC,KAAK,IAAK;QAClC,IAAI,CAAClE,YAAY,GAAGkE,KAAK;MAC3B,CAAE;MACFC,aAAa,EAAE,IAAK;MACpBC,SAAS,EAAGnD,CAAC,IAAK,IAAI,CAACwC,MAAM,CAACxC,CAAC,EAAEA,CAAC,CAACX,WAAW,CAACY,KAAK,EAAED,CAAC,CAACX,WAAW,CAACa,GAAG;IAAE,CAClE,CACP,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","BackHandler","Platform","View","WebView","HideMode","BaseComponent","BaseComponentState","WmWebviewProps","DEFAULT_CLASS","WmWebViewState","constructor","arguments","_defineProperty","title","src","WmWebview","props","webview","webViewState","canGoBack","goBack","event","_event$nativeEvent","data","nativeEvent","startsWith","id","match","callback","invokeJSCallbacks","result","substring","indexOf","parseResult","invokeEventCallback","hideMode","DONOT_ADD_TO_DOM","addEventListener","handleBackButtonPress","componentWillUnmount","removeEventListener","_this$state$currentTa","state","currentTarget","currentsrc","_this$state$currentTa2","executeScript","fn","Promise","resolve","reject","Date","now","injectJavaScript","insertCSS","style","length","undefined","replace","JSON","parse","e","getTitle","iframe","contentWindow","document","onLoad","updateState","renderWidget","createElement","styles","root","_background","OS","width","height","ref","nestedScrollEnabled","source","uri","testID","getTestId","incognito","onMessage","sharedCookiesEnabled","onNavigationStateChange","scrollEnabled","onLoadEnd","url"],"sources":["webview.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BackHandler, Platform, View } from 'react-native';\nimport { WebView, WebViewNavigation, WebViewMessageEvent } from 'react-native-webview';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWebviewProps from './webview.props';\nimport { DEFAULT_CLASS, WebviewStyles } from './webview.styles';\n\nclass WmWebViewState extends BaseComponentState<WmWebviewProps> {\n currentTarget = {\n title: '',\n src: ''\n };\n\n}\n\nexport default class WmWebview extends BaseComponent<WmWebviewProps, WmWebViewState, WebviewStyles> {\n\n private webview: WebView | null = null as any;\n private webViewState: WebViewNavigation = null as any;\n private invokeJSCallbacks = {} as any;\n\n constructor(props: WmWebviewProps) {\n super(props, DEFAULT_CLASS, new WmWebviewProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n handleBackButtonPress = (): boolean => {\n if (this.webview && this.webViewState && this.webViewState.canGoBack) {\n this.webview.goBack();\n return true;\n }\n return false;\n }\n\n get title() {\n return this.state.currentTarget?.title;\n }\n\n get currentsrc() {\n return this.state.currentTarget?.src;\n }\n\n executeScript(fn: string) {\n return new Promise((resolve, reject) => {\n if (this.webview) {\n const id = '' + Date.now();\n this.invokeJSCallbacks[id] = resolve;\n fn = `\n (function(){\n try{\n return (${fn});\n } catch(e) {\n return e.getMessage();\n }\n }())\n `;\n this.webview.injectJavaScript(\n `window.ReactNativeWebView.postMessage('afterInjectJavaScript:' + ${id} + ':' + JSON.stringify(${fn}))`\n );\n } else {\n reject();\n }\n });\n }\n\n insertCSS(style = '') {\n style = style.replace(/[\\n\\t\\r]/g, '');\n return this.executeScript(`\n function() {\n const style = document.createElement('style');\n style.innerHTML = '${style}';\n document.head.appendChild(style);\n return 'SUCCESS';\n }()\n `);\n }\n\n parseResult(result: string) {\n try {\n return JSON.parse(result);\n } catch(e) {\n if (result === 'undefined' || result === 'null') {\n return null;\n }\n return result;\n }\n }\n\n onMessage = (event: WebViewMessageEvent) => {\n const data: string = event.nativeEvent?.data;\n if (data && data.startsWith('afterInjectJavaScript')) {\n const id = data?.match(/\\:([0-9]+)\\:/);\n const callback = id && this.invokeJSCallbacks[id[1]];\n const result = data.substring(data.indexOf(':', data.indexOf(':') + 1) + 1);\n callback && callback(this.parseResult(result));\n } else {\n this.invokeEventCallback('onMessage', [event, this]);\n }\n }\n\n getTitle(iframe: any) {\n try {\n return iframe.currentTarget.contentWindow.document.title;\n } catch(e) {\n // browser blocks cross origin access to iframe content.\n }\n }\n\n public onLoad(e: any, title: string, src: string) {\n this.updateState({\n currentTarget: {\n title: title,\n src: src\n }\n } as WmWebViewState, () => {\n this.invokeEventCallback('onLoad', [e, this]);\n });\n }\n\n protected renderWidget(props: WmWebviewProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {Platform.OS === 'web' ?\n (<iframe src={props.src} width={'100%'} height={'100%'}\n onLoad={(e) => this.onLoad(e, this.getTitle(e.currentTarget), (e.currentTarget as any).src)}></iframe>) :\n (<WebView\n ref={(ref) => this.webview = ref}\n nestedScrollEnabled={true}\n style={this.styles.webview}\n source={{\n uri: props.src\n }}\n testID={this.getTestId('web_view')}\n incognito={props.incognito}\n onMessage={this.onMessage}\n sharedCookiesEnabled={true}\n onNavigationStateChange={(state) => {\n this.webViewState = state;\n }}\n scrollEnabled={true}\n onLoadEnd={(e) => this.onLoad(e, e.nativeEvent.title, e.nativeEvent.url)}>\n </WebView>)}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAA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E,CACP,CAAC;EAEX;AACF"}
@@ -6,7 +6,6 @@ export default class WmWebviewProps extends BaseProps {
6
6
  constructor() {
7
7
  super(...arguments);
8
8
  _defineProperty(this, "src", null);
9
- _defineProperty(this, "title", null);
10
9
  _defineProperty(this, "incognito", false);
11
10
  _defineProperty(this, "onLoad", null);
12
11
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmWebviewProps","constructor","arguments","_defineProperty"],"sources":["webview.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmWebview from './webview.component';\n\nexport default class WmWebviewProps extends BaseProps {\n src: string = null as any;\n title: string = null as any;\n incognito? = false;\n onLoad?: ($event: any, $widget: WmWebview) => void = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,cACtC,IAAI;IAAAA,eAAA,gBACF,IAAI;IAAAA,eAAA,oBACP,KAAK;IAAAA,eAAA,iBACmC,IAAI;EAAA;AAC3D"}
1
+ {"version":3,"names":["BaseProps","WmWebviewProps","constructor","arguments","_defineProperty"],"sources":["webview.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmWebview from './webview.component';\n\nexport default class WmWebviewProps extends BaseProps {\n src: string = null as any;\n incognito? = false;\n onLoad?: ($event: any, $widget: WmWebview) => void = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,cACtC,IAAI;IAAAA,eAAA,oBACL,KAAK;IAAAA,eAAA,iBACmC,IAAI;EAAA;AAC3D"}
@@ -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
  import React from 'react';
2
3
  import { Text } from 'react-native';
3
4
  import { Badge } from 'react-native-paper';
@@ -36,11 +37,12 @@ export default class WmAnchor extends BaseComponent {
36
37
  if (this.styles.icon && this.styles.icon.text) {
37
38
  this.styles.icon.text.color = this.styles.text.color;
38
39
  }
39
- const icon = /*#__PURE__*/React.createElement(WmIcon, {
40
+ const icon = props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
41
+ id: this.getTestId('icon'),
40
42
  styles: this.styles.icon,
41
43
  name: props.name + '_icon',
42
44
  iconclass: props.iconclass
43
- });
45
+ }) : null;
44
46
  //@ts-ignore
45
47
  const badge = props.badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, {
46
48
  style: this.styles.badge
@@ -52,7 +54,7 @@ export default class WmAnchor extends BaseComponent {
52
54
  height: this.styles.root.height,
53
55
  justifyContent: 'center'
54
56
  }
55
- }, /*#__PURE__*/React.createElement(Tappable, {
57
+ }, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
56
58
  target: this,
57
59
  styles: [this.styles.root, this.styles.root.width && this.styles.root.height ? {
58
60
  width: '100%',
@@ -61,9 +63,9 @@ export default class WmAnchor extends BaseComponent {
61
63
  flexDirection: props.iconposition === 'top' ? 'column' : 'row'
62
64
  }],
63
65
  onTap: props.hyperlink || props.onTap ? e => this.onTap(navigationService, e) : undefined
64
- }, this._background, props.iconposition === 'top' && icon, props.iconposition === 'left' && icon, props.caption ? /*#__PURE__*/React.createElement(Text, {
66
+ }), this._background, props.iconposition === 'top' && icon, props.iconposition === 'left' && icon, props.caption ? /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('caption'), {
65
67
  style: this.styles.text
66
- }, props.caption) : null, props.iconposition === 'right' && icon, badge)));
68
+ }), props.caption) : null, props.iconposition === 'right' && icon, badge)));
67
69
  }
68
70
  }
69
71
  //# sourceMappingURL=anchor.component.js.map