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

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 (516) hide show
  1. app-rn-runtime/actions/base-action.js.map +1 -1
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js.map +1 -1
  4. app-rn-runtime/actions/navigation-action.js +14 -2
  5. app-rn-runtime/actions/navigation-action.js.map +1 -1
  6. app-rn-runtime/actions/notification-action.js +5 -4
  7. app-rn-runtime/actions/notification-action.js.map +1 -1
  8. app-rn-runtime/actions/timer-action.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
  13. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
  15. app-rn-runtime/components/advanced/carousel/carousel.component.js +2 -2
  16. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  18. app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
  19. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  20. app-rn-runtime/components/advanced/login/login.component.js +1 -1
  21. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
  23. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
  24. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  25. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
  26. app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
  27. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  28. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  29. app-rn-runtime/components/basic/anchor/anchor.component.js +2 -1
  30. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  31. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  32. app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
  33. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/animatedview.component.js +1 -3
  35. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  36. app-rn-runtime/components/basic/audio/audio.component.js +240 -0
  37. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
  38. app-rn-runtime/components/basic/audio/audio.props.js +15 -0
  39. app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
  40. app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
  41. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
  42. app-rn-runtime/components/basic/button/button.component.js +1 -1
  43. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  44. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  45. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  46. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
  47. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
  48. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
  49. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  50. app-rn-runtime/components/basic/custom/custom.component.js +25 -0
  51. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
  52. app-rn-runtime/components/basic/custom/custom.props.js +16 -0
  53. app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
  54. app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
  55. app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
  56. app-rn-runtime/components/basic/icon/icon.component.js +1 -1
  57. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  58. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  59. app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
  60. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  61. app-rn-runtime/components/basic/label/label.component.js +3 -2
  62. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  63. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  64. app-rn-runtime/components/basic/label/label.styles.js +8 -0
  65. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
  67. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
  68. app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
  69. app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
  70. app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
  71. app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
  72. app-rn-runtime/components/basic/message/message.component.js +1 -1
  73. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  74. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  75. app-rn-runtime/components/basic/message/message.styles.js +22 -0
  76. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  77. app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
  78. app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
  79. app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
  80. app-rn-runtime/components/basic/picture/picture.component.js +40 -29
  81. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  82. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  83. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  84. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
  85. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  86. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  87. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  88. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
  89. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  90. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  91. app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
  92. app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
  93. app-rn-runtime/components/basic/search/search.component.js +5 -2
  94. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  95. app-rn-runtime/components/basic/search/search.props.js +1 -0
  96. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  97. app-rn-runtime/components/basic/search/search.styles.js +47 -0
  98. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  99. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  100. app-rn-runtime/components/basic/spinner/spinner.component.js +13 -11
  101. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  102. app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
  103. app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
  104. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  105. app-rn-runtime/components/basic/video/video.component.js +56 -0
  106. app-rn-runtime/components/basic/video/video.component.js.map +1 -0
  107. app-rn-runtime/components/basic/video/video.props.js +22 -0
  108. app-rn-runtime/components/basic/video/video.props.js.map +1 -0
  109. app-rn-runtime/components/basic/video/video.styles.js +11 -0
  110. app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
  111. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  112. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  113. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  114. app-rn-runtime/components/chart/basechart.component.js +6 -2
  115. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  116. app-rn-runtime/components/chart/basechart.props.js +1 -0
  117. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  118. app-rn-runtime/components/chart/basechart.styles.js +17 -0
  119. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  120. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  121. app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
  122. app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
  123. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +0 -1
  124. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
  125. app-rn-runtime/components/chart/legend/legend.component.js +36 -0
  126. app-rn-runtime/components/chart/legend/legend.component.js.map +1 -0
  127. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  128. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  129. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +119 -40
  130. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  131. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -2
  132. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  133. app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
  134. app-rn-runtime/components/container/accordion/accordion.component.js +75 -119
  135. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  136. app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
  137. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  138. app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
  139. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  140. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +49 -8
  141. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  142. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
  143. app-rn-runtime/components/container/container.component.js +1 -1
  144. app-rn-runtime/components/container/container.component.js.map +1 -1
  145. app-rn-runtime/components/container/container.props.js.map +1 -1
  146. app-rn-runtime/components/container/container.styles.js.map +1 -1
  147. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
  148. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  149. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
  150. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
  151. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  152. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
  153. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
  154. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  155. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  156. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  157. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
  158. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  159. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  160. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
  161. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  162. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  163. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
  164. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  165. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
  166. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
  167. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  168. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
  169. app-rn-runtime/components/container/panel/panel.component.js +1 -1
  170. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  171. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  172. app-rn-runtime/components/container/panel/panel.styles.js +9 -0
  173. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  174. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  175. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +42 -9
  176. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  177. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  178. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +12 -2
  179. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  180. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +5 -2
  181. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  182. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  183. app-rn-runtime/components/container/tabs/tabs.component.js +84 -65
  184. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  185. app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
  186. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  187. app-rn-runtime/components/container/tabs/tabs.styles.js +40 -1
  188. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  189. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  190. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  191. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  192. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  193. app-rn-runtime/components/container/wizard/wizard.component.js +16 -7
  194. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  195. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  196. app-rn-runtime/components/container/wizard/wizard.styles.js +53 -1
  197. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  198. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  199. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  200. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  201. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  202. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  203. app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
  204. app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
  205. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  206. app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
  207. app-rn-runtime/components/data/card/card.component.js +1 -1
  208. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  209. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  210. app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
  211. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  212. app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
  213. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  214. app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
  215. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  216. app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
  217. app-rn-runtime/components/data/form/form-field/form-field.component.js +3 -3
  218. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  219. app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
  220. app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
  221. app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
  222. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  223. app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
  224. app-rn-runtime/components/data/form/form.component.js +3 -33
  225. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  226. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  227. app-rn-runtime/components/data/form/form.styles.js.map +1 -1
  228. app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
  229. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  230. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  231. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  232. app-rn-runtime/components/data/list/list.component.js +94 -24
  233. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  234. app-rn-runtime/components/data/list/list.props.js +2 -0
  235. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  236. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  237. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +3 -2
  238. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  239. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  240. app-rn-runtime/components/device/camera/camera.component.js +9 -4
  241. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  242. app-rn-runtime/components/device/camera/camera.props.js +0 -1
  243. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  244. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  245. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  246. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  247. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  248. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
  249. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  250. app-rn-runtime/components/dialogs/dialog/dialog.component.js +6 -3
  251. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  252. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  253. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  254. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  255. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
  256. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
  257. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  258. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
  259. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  260. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  261. app-rn-runtime/components/input/baseinput/baseinput.component.js +8 -1
  262. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  263. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  264. app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
  265. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  266. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  267. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  268. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  269. app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
  270. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
  271. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  272. app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
  273. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  274. app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
  275. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  276. app-rn-runtime/components/input/checkbox/checkbox.props.js +1 -1
  277. app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
  278. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
  279. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  280. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  281. app-rn-runtime/components/input/chips/chips.component.js +1 -0
  282. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  283. app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
  284. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  285. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  286. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  287. app-rn-runtime/components/input/currency/currency.component.js +6 -4
  288. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  289. app-rn-runtime/components/input/currency/currency.props.js +1 -1
  290. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  291. app-rn-runtime/components/input/currency/currency.styles.js +9 -0
  292. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  293. app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -3
  294. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  295. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  296. app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
  297. app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
  298. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  299. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  300. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  301. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  302. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
  303. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  304. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  305. app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
  306. app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
  307. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  308. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  309. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  310. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  311. app-rn-runtime/components/input/number/number.component.js +6 -13
  312. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  313. app-rn-runtime/components/input/number/number.props.js +1 -1
  314. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  315. app-rn-runtime/components/input/number/number.styles.js +5 -0
  316. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  317. app-rn-runtime/components/input/radioset/radioset.component.js +3 -41
  318. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  319. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  320. app-rn-runtime/components/input/radioset/radioset.styles.js +8 -0
  321. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  322. app-rn-runtime/components/input/rating/rating.component.js +2 -2
  323. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  324. app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
  325. app-rn-runtime/components/input/select/select.component.js +14 -2
  326. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  327. app-rn-runtime/components/input/select/select.props.js.map +1 -1
  328. app-rn-runtime/components/input/select/select.styles.js +18 -1
  329. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  330. app-rn-runtime/components/input/slider/slider.component.js +3 -2
  331. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  332. app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
  333. app-rn-runtime/components/input/switch/switch.component.js +19 -22
  334. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  335. app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
  336. app-rn-runtime/components/input/switch/switch.styles.js +43 -7
  337. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  338. app-rn-runtime/components/input/text/text.component.js +6 -13
  339. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  340. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  341. app-rn-runtime/components/input/text/text.styles.js +5 -0
  342. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  343. app-rn-runtime/components/input/textarea/textarea.component.js +5 -13
  344. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  345. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  346. app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
  347. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  348. app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
  349. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  350. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  351. app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
  352. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  353. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
  354. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  355. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  356. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  357. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  358. app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
  359. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  360. app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
  361. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  362. app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
  363. app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
  364. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  365. app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
  366. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  367. app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
  368. app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
  369. app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
  370. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  371. app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
  372. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  373. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  374. app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
  375. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  376. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  377. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  378. app-rn-runtime/components/page/content/content.component.js +1 -1
  379. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  380. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  381. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  382. app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
  383. app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
  384. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  385. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  386. app-rn-runtime/components/page/page.component.js +1 -1
  387. app-rn-runtime/components/page/page.component.js.map +1 -1
  388. app-rn-runtime/components/page/partial/partial.component.js +1 -1
  389. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  390. app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
  391. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  392. app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
  393. app-rn-runtime/components/page/partial-container/partial-container.styles.js +2 -1
  394. app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
  395. app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
  396. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  397. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  398. app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
  399. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  400. app-rn-runtime/core/asset.provider.js +5 -0
  401. app-rn-runtime/core/asset.provider.js.map +1 -0
  402. app-rn-runtime/core/base.component.js +141 -57
  403. app-rn-runtime/core/base.component.js.map +1 -1
  404. app-rn-runtime/core/components/textinput.component.js +37 -0
  405. app-rn-runtime/core/components/textinput.component.js.map +1 -0
  406. app-rn-runtime/core/device/camera-service.js.map +1 -1
  407. app-rn-runtime/core/device/scan-service.js.map +1 -1
  408. app-rn-runtime/core/display.manager.js.map +1 -1
  409. app-rn-runtime/core/event-notifier.js.map +1 -1
  410. app-rn-runtime/core/fixed-view.component.js.map +1 -1
  411. app-rn-runtime/core/formatters.js.map +1 -1
  412. app-rn-runtime/core/i18n.service.js +2 -0
  413. app-rn-runtime/core/i18n.service.js.map +1 -0
  414. app-rn-runtime/core/if.component.js +3 -3
  415. app-rn-runtime/core/if.component.js.map +1 -1
  416. app-rn-runtime/core/imageSizeEstimator.js +1 -0
  417. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  418. app-rn-runtime/core/injector.js +16 -1
  419. app-rn-runtime/core/injector.js.map +1 -1
  420. app-rn-runtime/core/logger.js +4 -1
  421. app-rn-runtime/core/logger.js.map +1 -1
  422. app-rn-runtime/core/modal.service.js.map +1 -1
  423. app-rn-runtime/core/navigation.service.js.map +1 -1
  424. app-rn-runtime/core/network.service.js +17 -15
  425. app-rn-runtime/core/network.service.js.map +1 -1
  426. app-rn-runtime/core/partial.service.js.map +1 -1
  427. app-rn-runtime/core/props.provider.js +1 -1
  428. app-rn-runtime/core/props.provider.js.map +1 -1
  429. app-rn-runtime/core/scroll-view.component.js.map +1 -1
  430. app-rn-runtime/core/security.service.js.map +1 -1
  431. app-rn-runtime/core/spinner.service.js.map +1 -1
  432. app-rn-runtime/core/storage.service.js.map +1 -1
  433. app-rn-runtime/core/tappable.component.js +20 -4
  434. app-rn-runtime/core/tappable.component.js.map +1 -1
  435. app-rn-runtime/core/toast.service.js.map +1 -1
  436. app-rn-runtime/core/utils.js +24 -0
  437. app-rn-runtime/core/utils.js.map +1 -1
  438. app-rn-runtime/core/viewport.js.map +1 -1
  439. app-rn-runtime/gestures/swipe.animation.js +110 -0
  440. app-rn-runtime/gestures/swipe.animation.js.map +1 -0
  441. app-rn-runtime/package.json +33 -32
  442. app-rn-runtime/runtime/App.js +38 -22
  443. app-rn-runtime/runtime/App.js.map +1 -1
  444. app-rn-runtime/runtime/App.navigator.js +13 -14
  445. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  446. app-rn-runtime/runtime/base-fragment.component.js +13 -11
  447. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  448. app-rn-runtime/runtime/base-page.component.js +2 -0
  449. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  450. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  451. app-rn-runtime/runtime/base-prefab.component.js +1 -5
  452. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  453. app-rn-runtime/runtime/lib-patch.js.map +1 -1
  454. app-rn-runtime/runtime/memo.component.js.map +1 -1
  455. app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
  456. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  457. app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
  458. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  459. app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
  460. app-rn-runtime/runtime/services/app-i18n.service.js +26 -3
  461. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  462. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  463. app-rn-runtime/runtime/services/app-security.service.js +7 -7
  464. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  465. app-rn-runtime/runtime/services/app-spinner.service.js +8 -3
  466. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  467. app-rn-runtime/runtime/services/app-toast.service.js +1 -1
  468. app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
  469. app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
  470. app-rn-runtime/runtime/services/device/camera-service.js +30 -9
  471. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  472. app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
  473. app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
  474. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  475. app-rn-runtime/runtime/services/device/scan-service.js +15 -14
  476. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  477. app-rn-runtime/runtime/services/partial.service.js.map +1 -1
  478. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  479. app-rn-runtime/runtime/watcher.js.map +1 -1
  480. app-rn-runtime/styles/MediaQueryList.js.map +1 -1
  481. app-rn-runtime/styles/background.component.js +298 -0
  482. app-rn-runtime/styles/background.component.js.map +1 -0
  483. app-rn-runtime/styles/style-prop.validator.js +42 -8
  484. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  485. app-rn-runtime/styles/style-props.js +93 -0
  486. app-rn-runtime/styles/style-props.js.map +1 -0
  487. app-rn-runtime/styles/theme.js +14 -40
  488. app-rn-runtime/styles/theme.js.map +1 -1
  489. app-rn-runtime/styles/theme.variables.js +55 -1
  490. app-rn-runtime/styles/theme.variables.js.map +1 -1
  491. app-rn-runtime/variables/base-variable.js +3 -3
  492. app-rn-runtime/variables/base-variable.js.map +1 -1
  493. app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
  494. app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
  495. app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
  496. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  497. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  498. app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
  499. app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
  500. app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
  501. app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
  502. app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
  503. app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
  504. app-rn-runtime/variables/device/file/upload-file.operation.js +43 -21
  505. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  506. app-rn-runtime/variables/device/operation.provider.js.map +1 -1
  507. app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
  508. app-rn-runtime/variables/device-variable.js.map +1 -1
  509. app-rn-runtime/variables/http.service.js +4 -13
  510. app-rn-runtime/variables/http.service.js.map +1 -1
  511. app-rn-runtime/variables/model-variable.js.map +1 -1
  512. app-rn-runtime/variables/service-variable.js +27 -11
  513. app-rn-runtime/variables/service-variable.js.map +1 -1
  514. app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
  515. app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
  516. app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
@@ -2,7 +2,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
2
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import React from 'react';
5
- import { View, Text } from 'react-native';
5
+ import { View, Text, Platform } from 'react-native';
6
6
  import { debounce, isNumber, isNil } from 'lodash';
7
7
  import Slider from '@react-native-community/slider';
8
8
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -46,7 +46,7 @@ export default class WmSlider extends BaseComponent {
46
46
  renderWidget(props) {
47
47
  return /*#__PURE__*/React.createElement(View, {
48
48
  style: this.styles.root
49
- }, /*#__PURE__*/React.createElement(View, {
49
+ }, this._background, /*#__PURE__*/React.createElement(View, {
50
50
  style: {
51
51
  flexDirection: 'row',
52
52
  justifyContent: 'space-between'
@@ -63,6 +63,7 @@ export default class WmSlider extends BaseComponent {
63
63
  value: this.valueBeforeSlide || props.datavalue || 0,
64
64
  disabled: props.readonly,
65
65
  minimumValue: props.minvalue,
66
+ inverted: this.isRTL && (Platform.OS == "android" || Platform.OS == "web"),
66
67
  maximumValue: props.maxvalue,
67
68
  onValueChange: this.onChange,
68
69
  thumbTintColor: this.styles.thumb.backgroundColor,
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","debounce","isNumber","isNil","Slider","BaseComponent","BaseComponentState","WmSliderProps","DEFAULT_CLASS","WmSliderState","WmSlider","constructor","props","value","state","datavalue","updateState","onFieldChange","valueBeforeSlide","getDataValue","minvalue","maxvalue","Math","min","max","onPropertyChange","name","$new","$old","invokeEventCallback","setProp","renderWidget","styles","root","flexDirection","justifyContent","text","minimumValue","maximumValue","readonly","disabled","step","onChange","thumb","backgroundColor","onBeforeSlide","onAfterSlide","minimumTrack","maximumTrack"],"sources":["slider.component.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text } from 'react-native';\nimport { debounce, isNumber, isNil } from 'lodash';\nimport Slider from '@react-native-community/slider';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSliderProps from './slider.props';\nimport { DEFAULT_CLASS, WmSliderStyles } from './slider.styles';\n\nexport class WmSliderState extends BaseComponentState<WmSliderProps> {}\n\nexport default class WmSlider extends BaseComponent<WmSliderProps, WmSliderState, WmSliderStyles> {\n valueBeforeSlide: number = 0;\n\n constructor(props: WmSliderProps) {\n super(props, DEFAULT_CLASS, new WmSliderProps());\n }\n\n getDataValue() {\n if (isNil(this.props.datavalue)) {\n return this.state.props.minvalue + (this.state.props.maxvalue - this.state.props.minvalue)/2;\n }\n return Math.min(Math.max(this.props.datavalue, this.state.props.minvalue), this.state.props.maxvalue);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'datavalue':\n if (isNumber($new) && isNumber($old)) {\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n }\n case 'maxvalue':\n case 'minvalue': \n this.setProp('datavalue', this.getDataValue() || 0)\n }\n }\n\n onChange = debounce((value: number) => {\n if (this.state.props.datavalue !== value) {\n this.updateState({\n props : {\n datavalue: value\n }\n } as WmSliderState);\n this.props.onFieldChange &&\n this.props.onFieldChange(\n 'datavalue',\n value,\n this.state.props.datavalue\n );\n }\n }, 200);\n\n onBeforeSlide = () => this.valueBeforeSlide = this.props.datavalue;\n\n onAfterSlide = () => this.valueBeforeSlide = 0;\n\n renderWidget(props: WmSliderProps) {\n return (\n <View style={this.styles.root}>\n <View style={{flexDirection:'row', justifyContent:'space-between'}}>\n <Text style={[this.styles.text, this.styles.minimumValue]}>{props.minvalue}</Text>\n <Text style={[this.styles.text, this.styles.value]}>{props.datavalue}</Text>\n <Text style={[this.styles.text, this.styles.maximumValue]}>{props.maxvalue}</Text>\n </View>\n <Slider\n style={props.readonly || props.disabled ? this.styles.disabled : {}}\n step={props.step}\n value={this.valueBeforeSlide || props.datavalue || 0}\n disabled={props.readonly}\n minimumValue={props.minvalue}\n maximumValue={props.maxvalue}\n onValueChange={this.onChange}\n thumbTintColor={this.styles.thumb.backgroundColor as string}\n onTouchStart={this.onBeforeSlide}\n onTouchEnd={this.onAfterSlide}\n minimumTrackTintColor={this.styles.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.maximumTrack.backgroundColor as string}\n />\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACxC,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,QAAQ;AAClD,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC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AAG,CAAC,CAAE;MACpE,IAAI,EAAE5B,KAAK,CAAC6B,IAAK;MACjB,KAAK,EAAE,IAAI,CAACvB,gBAAgB,IAAIN,KAAK,CAACG,SAAS,IAAI,CAAE;MACrD,QAAQ,EAAEH,KAAK,CAAC2B,QAAS;MACzB,YAAY,EAAE3B,KAAK,CAACQ,QAAS;MAC7B,YAAY,EAAER,KAAK,CAACS,QAAS;MAC7B,aAAa,EAAE,IAAI,CAACqB,QAAS;MAC7B,cAAc,EAAE,IAAI,CAACV,MAAM,CAACW,KAAK,CAACC,eAA0B;MAC5D,YAAY,EAAE,IAAI,CAACC,aAAc;MACjC,UAAU,EAAE,IAAI,CAACC,YAAa;MAC9B,qBAAqB,EAAE,IAAI,CAACd,MAAM,CAACe,YAAY,CAACH,eAA0B;MAC1E,qBAAqB,EAAE,IAAI,CAACZ,MAAM,CAACgB,YAAY,CAACJ;IAA0B,EAC1E,CACG;EACT;AACF"}
1
+ {"version":3,"names":["React","View","Text","Platform","debounce","isNumber","isNil","Slider","BaseComponent","BaseComponentState","WmSliderProps","DEFAULT_CLASS","WmSliderState","WmSlider","constructor","props","_defineProperty","value","state","datavalue","updateState","onFieldChange","valueBeforeSlide","getDataValue","minvalue","maxvalue","Math","min","max","onPropertyChange","name","$new","$old","invokeEventCallback","setProp","renderWidget","createElement","style","styles","root","_background","flexDirection","justifyContent","text","minimumValue","maximumValue","readonly","disabled","step","inverted","isRTL","OS","onValueChange","onChange","thumbTintColor","thumb","backgroundColor","onTouchStart","onBeforeSlide","onTouchEnd","onAfterSlide","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack"],"sources":["slider.component.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text, Platform } from 'react-native';\nimport { debounce, isNumber, isNil } from 'lodash';\nimport Slider from '@react-native-community/slider';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSliderProps from './slider.props';\nimport { DEFAULT_CLASS, WmSliderStyles } from './slider.styles';\n\nexport class WmSliderState extends BaseComponentState<WmSliderProps> {}\n\nexport default class WmSlider extends BaseComponent<WmSliderProps, WmSliderState, WmSliderStyles> {\n valueBeforeSlide: number = 0;\n\n constructor(props: WmSliderProps) {\n super(props, DEFAULT_CLASS, new WmSliderProps());\n }\n\n getDataValue() {\n if (isNil(this.props.datavalue)) {\n return this.state.props.minvalue + (this.state.props.maxvalue - this.state.props.minvalue)/2;\n }\n return Math.min(Math.max(this.props.datavalue, this.state.props.minvalue), this.state.props.maxvalue);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'datavalue':\n if (isNumber($new) && isNumber($old)) {\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n }\n case 'maxvalue':\n case 'minvalue': \n this.setProp('datavalue', this.getDataValue() || 0)\n }\n }\n\n onChange = debounce((value: number) => {\n if (this.state.props.datavalue !== value) {\n this.updateState({\n props : {\n datavalue: value\n }\n } as WmSliderState);\n this.props.onFieldChange &&\n this.props.onFieldChange(\n 'datavalue',\n value,\n this.state.props.datavalue\n );\n }\n }, 200);\n\n onBeforeSlide = () => this.valueBeforeSlide = this.props.datavalue;\n\n onAfterSlide = () => this.valueBeforeSlide = 0;\n\n renderWidget(props: WmSliderProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={{flexDirection:'row', justifyContent:'space-between'}}>\n <Text style={[this.styles.text, this.styles.minimumValue]}>{props.minvalue}</Text>\n <Text style={[this.styles.text, this.styles.value]}>{props.datavalue}</Text>\n <Text style={[this.styles.text, this.styles.maximumValue]}>{props.maxvalue}</Text>\n </View>\n <Slider\n style={props.readonly || props.disabled ? this.styles.disabled : {}}\n step={props.step}\n value={this.valueBeforeSlide || props.datavalue || 0}\n disabled={props.readonly}\n minimumValue={props.minvalue}\n inverted={this.isRTL && (Platform.OS==\"android\"||Platform.OS==\"web\")}\n maximumValue={props.maxvalue}\n onValueChange={this.onChange}\n thumbTintColor={this.styles.thumb.backgroundColor as string}\n onTouchStart={this.onBeforeSlide}\n onTouchEnd={this.onAfterSlide}\n minimumTrackTintColor={this.styles.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.maximumTrack.backgroundColor as string}\n />\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAClD,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,QAAQ;AAClD,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASH,kBAAkB,CAAgB;AAErE,eAAe,MAAMI,QAAQ,SAASL,aAAa,CAA+C;EAGhGM,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;IAACM,eAAA,2BAHxB,CAAC;IAAAA,eAAA,mBAyBjBZ,QAAQ,CAAEa,KAAa,IAAK;MACrC,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,SAAS,KAAKF,KAAK,EAAE;QACxC,IAAI,CAACG,WAAW,CAAC;UACfL,KAAK,EAAG;YACNI,SAAS,EAAEF;UACb;QACF,CAAkB,CAAC;QACnB,IAAI,CAACF,KAAK,CAACM,aAAa,IACxB,IAAI,CAACN,KAAK,CAACM,aAAa,CACtB,WAAW,EACXJ,KAAK,EACL,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,SACnB,CAAC;MACH;IACF,CAAC,EAAE,GAAG,CAAC;IAAAH,eAAA,wBAES,MAAM,IAAI,CAACM,gBAAgB,GAAG,IAAI,CAACP,KAAK,CAACI,SAAS;IAAAH,eAAA,uBAEnD,MAAM,IAAI,CAACM,gBAAgB,GAAG,CAA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E,IAAI,CAACvB,MAAM,CAACwB,YAAY,CAACN,eAA0B;MAC1EO,qBAAqB,EAAE,IAAI,CAACzB,MAAM,CAAC0B,YAAY,CAACR;IAA0B,CAC3E,CACG,CAAC;EACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmSliderProps"],"sources":["slider.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmSliderProps extends BaseProps {\n datavalue: any;\n minvalue: number = 0;\n maxvalue: number = 100;\n step: number = 1;\n readonly = false;\n onFieldChange: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA,kCAE9B,CAAC;IAAA,kCACD,GAAG;IAAA,8BACP,CAAC;IAAA,kCACL,KAAK;IAAA;EAAA;AAEpB"}
1
+ {"version":3,"names":["BaseProps","WmSliderProps","constructor","arguments","_defineProperty"],"sources":["slider.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmSliderProps extends BaseProps {\n datavalue: any;\n minvalue: number = 0;\n maxvalue: number = 100;\n step?: number = 1;\n readonly? = false;\n onFieldChange?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,mBAE9B,CAAC;IAAAA,eAAA,mBACD,GAAG;IAAAA,eAAA,eACN,CAAC;IAAAA,eAAA,mBACL,KAAK;IAAAA,eAAA;EAAA;AAErB"}
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Text, View } from "react-native";
3
- import { ToggleButton } from 'react-native-paper';
4
3
  import { isEqual, find } from 'lodash';
5
4
  import WmSwitchProps from './switch.props';
6
5
  import { DEFAULT_CLASS } from './switch.styles';
7
6
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
8
7
  import { BaseDatasetComponent, BaseDatasetState } from '../basedataset/basedataset.component';
8
+ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
9
9
  export class WmSwitchState extends BaseDatasetState {}
10
10
  export default class WmSwitch extends BaseDatasetComponent {
11
11
  constructor(props) {
@@ -32,7 +32,9 @@ export default class WmSwitch extends BaseDatasetComponent {
32
32
  }
33
33
  });
34
34
  }
35
- onTap(event) {
35
+ onTap(event, item) {
36
+ const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;
37
+ this.onChange(value);
36
38
  this.invokeEventCallback('onTap', [event, this.proxy]);
37
39
  }
38
40
  renderChild(item, index) {
@@ -45,29 +47,24 @@ export default class WmSwitch extends BaseDatasetComponent {
45
47
  }
46
48
  const displayText = item.displayexp || item.displayfield;
47
49
  const isSelected = this.state.props.datafield === 'All Fields' ? isEqual(props.datavalue, item.datafield) : this.state.props.datavalue === item.datafield;
48
- return /*#__PURE__*/React.createElement(ToggleButton, {
49
- onPress: this.onTap.bind(this),
50
- disabled: this.state.props.disabled,
51
- style: [this.styles.button, this.styles[btnClass], isSelected ? this.styles.selectedButton : null],
52
- icon: () => this.state.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
53
- styles: this.styles.loadingIcon,
54
- iconclass: item.icon,
55
- caption: displayText
56
- }) : /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
57
- style: [this.styles.text, {
58
- color: isSelected ? this.styles.selectedButton.color : this.styles.button.color
59
- }]
60
- }, displayText)),
61
- key: item.key,
62
- value: this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield
63
- });
50
+ return /*#__PURE__*/React.createElement(Tappable, {
51
+ onTap: this.state.props.disabled ? undefined : this.onTap.bind(this, null, item),
52
+ styles: [this.styles.button, this.styles[btnClass], isSelected ? this.styles.selectedButton : null],
53
+ key: item.key
54
+ }, this.state.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
55
+ styles: this.styles.loadingIcon,
56
+ iconclass: item.icon,
57
+ caption: displayText
58
+ }) : /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
59
+ style: [this.styles.text, {
60
+ color: isSelected ? this.styles.selectedButton.color : this.styles.button.color
61
+ }]
62
+ }, displayText)));
64
63
  }
65
64
  renderWidget(props) {
66
65
  const items = this.state.dataItems;
67
- return /*#__PURE__*/React.createElement(ToggleButton.Row, {
68
- style: this.styles.root,
69
- onValueChange: this.onChange.bind(this),
70
- value: this.state.props.datafield === 'All Fields' ? this.getItemKey(props.datavalue) : props.datavalue
66
+ return /*#__PURE__*/React.createElement(View, {
67
+ style: this.styles.root
71
68
  }, items && items.length ? items.map((item, index) => this.renderChild(item, index)) : null);
72
69
  }
73
70
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","ToggleButton","isEqual","find","WmSwitchProps","DEFAULT_CLASS","WmIcon","BaseDatasetComponent","BaseDatasetState","WmSwitchState","WmSwitch","constructor","props","onChange","value","validate","state","datafield","selectedItem","dataItems","item","key","dataObject","updateState","datavalue","isDefault","invokeEvent","invokeEventCallback","undefined","proxy","onTap","event","renderChild","index","btnClass","length","displayText","displayexp","displayfield","isSelected","bind","disabled","styles","button","selectedButton","iconclass","loadingIcon","icon","text","color","getItemKey","renderWidget","items","root","map"],"sources":["switch.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from \"react-native\";\nimport {Menu, ToggleButton} from 'react-native-paper';\nimport { isEqual, find } from 'lodash';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSwitchProps from './switch.props';\nimport { DEFAULT_CLASS, WmSwitchStyles } from './switch.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseDatasetComponent, BaseDatasetState } from '../basedataset/basedataset.component';\n\nexport class WmSwitchState extends BaseDatasetState<WmSwitchProps> {}\n\nexport default class WmSwitch extends BaseDatasetComponent<WmSwitchProps, WmSwitchState, WmSwitchStyles> {\n constructor(props: WmSwitchProps) {\n super(props, DEFAULT_CLASS, new WmSwitchProps());\n }\n\n onChange(value: any) {\n if (!value) {\n return;\n }\n this.validate(value);\n if (this.state.props.datafield === 'All Fields') {\n const selectedItem = find(this.state.dataItems, (item) => isEqual(item.key, value));\n value = selectedItem && selectedItem.dataObject;\n }\n // @ts-ignore\n this.updateState({props: {datavalue: value}, isDefault: false},\n () => {\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [undefined, this.proxy, value, this.state.props.datavalue])\n }\n });\n }\n\n onTap(event: any) {\n this.invokeEventCallback('onTap', [ event, this.proxy ]);\n }\n\n renderChild(item: any, index: any) {\n let btnClass = 'button';\n const props = this.state.props;\n if(index === 0) {\n btnClass = 'firstButton';\n } else if (index+1 === this.state.dataItems.length) {\n btnClass = 'lastButton';\n }\n const displayText = item.displayexp || item.displayfield;\n const isSelected = this.state.props.datafield === 'All Fields' ? isEqual(props.datavalue, item.datafield) : this.state.props.datavalue === item.datafield;\n return (\n <ToggleButton onPress={this.onTap.bind(this)}\n disabled={this.state.props.disabled}\n style={[this.styles.button, this.styles[btnClass],\n isSelected ? this.styles.selectedButton : null]}\n icon={()=>this.state.props.iconclass ?\n (<WmIcon styles={this.styles.loadingIcon}\n iconclass={item.icon}\n caption={displayText}></WmIcon>)\n : (<View><Text style={[this.styles.text, {color: isSelected ? this.styles.selectedButton.color : this.styles.button.color }]}>{displayText}</Text></View>)}\n key={item.key}\n value={this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield} />\n );\n };\n\n renderWidget(props: WmSwitchProps) {\n const items = this.state.dataItems;\n return (<ToggleButton.Row style={this.styles.root}\n onValueChange={this.onChange.bind(this)}\n value={this.state.props.datafield === 'All Fields'? this.getItemKey(props.datavalue) : props.datavalue}>\n {items && items.length ?\n items.map((item: any, index: any) =>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B;AACF"}
1
+ {"version":3,"names":["React","Text","View","isEqual","find","WmSwitchProps","DEFAULT_CLASS","WmIcon","BaseDatasetComponent","BaseDatasetState","Tappable","WmSwitchState","WmSwitch","constructor","props","onChange","value","validate","state","datafield","selectedItem","dataItems","item","key","dataObject","updateState","datavalue","isDefault","invokeEvent","invokeEventCallback","undefined","proxy","onTap","event","getItemKey","renderChild","index","btnClass","length","displayText","displayexp","displayfield","isSelected","createElement","disabled","bind","styles","button","selectedButton","iconclass","loadingIcon","icon","caption","style","text","color","renderWidget","items","root","map"],"sources":["switch.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from \"react-native\";\nimport { isEqual, find } from 'lodash';\n\nimport WmSwitchProps from './switch.props';\nimport { DEFAULT_CLASS, WmSwitchStyles } from './switch.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseDatasetComponent, BaseDatasetState } from '../basedataset/basedataset.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nexport class WmSwitchState extends BaseDatasetState<WmSwitchProps> {}\n\nexport default class WmSwitch extends BaseDatasetComponent<WmSwitchProps, WmSwitchState, WmSwitchStyles> {\n constructor(props: WmSwitchProps) {\n super(props, DEFAULT_CLASS, new WmSwitchProps());\n }\n\n onChange(value: any) {\n if (!value) {\n return;\n }\n this.validate(value);\n if (this.state.props.datafield === 'All Fields') {\n const selectedItem = find(this.state.dataItems, (item) => isEqual(item.key, value));\n value = selectedItem && selectedItem.dataObject;\n }\n // @ts-ignore\n this.updateState({props: {datavalue: value}, isDefault: false},\n () => {\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [undefined, this.proxy, value, this.state.props.datavalue])\n }\n });\n }\n\n onTap(event: any, item: any) {\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n this.onChange(value);\n this.invokeEventCallback('onTap', [ event, this.proxy ]);\n }\n\n renderChild(item: any, index: any) {\n let btnClass = 'button';\n const props = this.state.props;\n if(index === 0) {\n btnClass = 'firstButton';\n } else if (index+1 === this.state.dataItems.length) {\n btnClass = 'lastButton';\n }\n const displayText = item.displayexp || item.displayfield;\n const isSelected = this.state.props.datafield === 'All Fields' ? isEqual(props.datavalue, item.datafield) : this.state.props.datavalue === item.datafield;\n return (\n <Tappable \n onTap={this.state.props.disabled ? undefined : this.onTap.bind(this, null, item)}\n styles={[\n this.styles.button,\n this.styles[btnClass],\n isSelected ? this.styles.selectedButton : null]}\n key={item.key}>\n {this.state.props.iconclass ?\n (<WmIcon styles={this.styles.loadingIcon}\n iconclass={item.icon}\n caption={displayText}></WmIcon>)\n : (<View>\n <Text \n style={[this.styles.text, \n {color: isSelected ? this.styles.selectedButton.color : this.styles.button.color }]}>\n {displayText}\n </Text>\n </View>)}\n </Tappable>\n );\n };\n\n renderWidget(props: WmSwitchProps) {\n const items = this.state.dataItems;\n return (<View style={this.styles.root}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,oBAAoB,EAAEC,gBAAgB,QAAQ,sCAAsC;AAC7F,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAO,MAAMC,aAAa,SAASF,gBAAgB,CAAgB;AAEnE,eAAe,MAAMG,QAAQ,SAASJ,oBAAoB,CAA+C;EACvGK,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;EAClD;EAEAU,QAAQA,CAACC,KAAU,EAAE;IACnB,IAAI,CAACA,KAAK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Q,IAAI,EACtB;QAACC,KAAK,EAAEb,UAAU,GAAG,IAAI,CAACI,MAAM,CAACE,cAAc,CAACO,KAAK,GAAG,IAAI,CAACT,MAAM,CAACC,MAAM,CAACQ;MAAM,CAAC;IAAE,GACrFhB,WACG,CACF,CACJ,CAAC;EAEf;EAEAiB,YAAYA,CAAC1C,KAAoB,EAAE;IACjC,MAAM2C,KAAK,GAAG,IAAI,CAACvC,KAAK,CAACG,SAAS;IAClC,oBAAQrB,KAAA,CAAA2C,aAAA,CAACzC,IAAI;MAACmD,KAAK,EAAE,IAAI,CAACP,MAAM,CAACY;IAAK,GACnCD,KAAK,IAAIA,KAAK,CAACnB,MAAM,GACpBmB,KAAK,CAACE,GAAG,CAAC,CAACrC,IAAS,EAAEc,KAAU,KAAK,IAAI,CAACD,WAAW,CAACb,IAAI,EAAEc,KAAK,CAAC,CAAC,GAAE,IACnE,CAAC;EACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmSwitchProps"],"sources":["switch.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BaseDatasetProps from '../basedataset/basedataset.props';\n\nexport default class WmSwitchProps extends BaseDatasetProps {\n dataset: any = 'yes, no, maybe';\n dataItems: any;\n invokeEvent?: Function;\n}\n"],"mappings":";;;AACA,OAAOA,gBAAgB,MAAM,kCAAkC;AAE/D,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAA;IAAA;IAAA,iCAC3C,gBAAgB;IAAA;IAAA;EAAA;AAGjC"}
1
+ {"version":3,"names":["BaseDatasetProps","WmSwitchProps","constructor","arguments","_defineProperty"],"sources":["switch.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BaseDatasetProps from '../basedataset/basedataset.props';\n\nexport default class WmSwitchProps extends BaseDatasetProps {\n dataset: any = 'yes, no, maybe';\n dataItems: any;\n invokeEvent?: Function;\n}\n"],"mappings":";;;AACA,OAAOA,gBAAgB,MAAM,kCAAkC;AAE/D,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBAC3C,gBAAgB;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAGjC"}
@@ -1,12 +1,11 @@
1
1
  import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
2
2
  import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
3
+ import { Platform } from 'react-native';
3
4
  export const DEFAULT_CLASS = 'app-switch';
4
5
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
6
  const defaultStyles = defineStyles({
6
7
  root: {
7
8
  height: 38,
8
- width: '100%',
9
- flex: 1,
10
9
  flexDirection: 'row'
11
10
  },
12
11
  text: {
@@ -28,12 +27,15 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
28
27
  button: {
29
28
  backgroundColor: themeVariables.switchBgColor,
30
29
  color: themeVariables.switchTextColor,
31
- flex: 1,
32
30
  fontSize: 16,
33
31
  minWidth: 64,
34
32
  borderRadius: 0,
35
33
  borderColor: themeVariables.switchBorderColor,
36
- fontWeight: 'bold'
34
+ borderWidth: 1,
35
+ borderRightWidth: 0,
36
+ fontWeight: 'bold',
37
+ justifyContent: 'center',
38
+ alignItems: 'center'
37
39
  },
38
40
  selectedButton: {
39
41
  color: themeVariables.switchActiveTextColor,
@@ -41,24 +43,58 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
41
43
  borderColor: themeVariables.switchActiveBgColor
42
44
  },
43
45
  firstButton: {
44
- flex: 1,
45
46
  borderTopLeftRadius: 6,
46
47
  borderBottomLeftRadius: 6,
47
48
  borderTopRightRadius: 0,
48
49
  borderBottomRightRadius: 0
49
50
  },
50
51
  lastButton: {
51
- flex: 1,
52
52
  borderTopLeftRadius: 0,
53
53
  borderBottomLeftRadius: 0,
54
54
  borderTopRightRadius: 6,
55
- borderBottomRightRadius: 6
55
+ borderBottomRightRadius: 6,
56
+ borderRightWidth: 1
56
57
  }
57
58
  });
58
59
  addStyle(DEFAULT_CLASS, '', defaultStyles);
59
60
  addStyle(DEFAULT_CLASS + '-disabled', '', {
60
61
  root: {}
61
62
  });
63
+ addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
64
+ firstButton: {
65
+ borderTopLeftRadius: 0,
66
+ borderBottomLeftRadius: 0,
67
+ borderTopRightRadius: 6,
68
+ borderBottomRightRadius: 6,
69
+ borderRightWidth: 1,
70
+ borderLeftWidth: 0
71
+ },
72
+ lastButton: {
73
+ borderTopLeftRadius: 6,
74
+ borderBottomLeftRadius: 6,
75
+ borderTopRightRadius: 0,
76
+ borderBottomRightRadius: 0,
77
+ borderRightWidth: 0
78
+ }
79
+ } : {});
80
+ addStyle(DEFAULT_CLASS + '1-rtl', '', Platform.OS == "web" ? {
81
+ firstButton: {
82
+ borderTopLeftRadius: 0,
83
+ borderBottomLeftRadius: 0,
84
+ borderTopRightRadius: 500,
85
+ borderBottomRightRadius: 500,
86
+ borderRightWidth: 0,
87
+ borderLeftWidth: 1
88
+ },
89
+ lastButton: {
90
+ flex: 1,
91
+ borderTopLeftRadius: 500,
92
+ borderBottomLeftRadius: 500,
93
+ borderTopRightRadius: 0,
94
+ borderBottomRightRadius: 0,
95
+ borderRightWidth: 1
96
+ }
97
+ } : {});
62
98
  addStyle(DEFAULT_CLASS + '1', '', {
63
99
  firstButton: {
64
100
  borderTopLeftRadius: 500,
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","width","flex","flexDirection","text","fontWeight","fontSize","textTransform","loadingIcon","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","borderRadius","borderColor","switchBorderColor","selectedButton","switchActiveTextColor","switchActiveBgColor","firstButton","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","lastButton"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\nimport {WmLabelStyles} from \"@wavemaker/app-rn-runtime/components/basic/label/label.styles\";\nimport ThemeVariables from \"@wavemaker/app-rn-runtime/styles/theme.variables\";\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n height: 38,\n width: '100%',\n flex: 1,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n flex: 1,\n fontSize: 16,\n minWidth: 64,\n borderRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n fontWeight: 'bold'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchActiveBgColor\n } as AllStyle,\n firstButton: {\n flex: 1,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6\n } as AllStyle\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE,MAAM;MACbC,IAAI,EAAE,CAAC;MACPC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACjB,CAAC;IACHC,WAAW,EAAE;MACXT,IAAI,EAAE;QACJG,IAAI,EAAE,CAAC;QACPO,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBJ,QAAQ,EAAE;MACZ,CAAC;MACDF,IAAI,EAAE;QACJO,KAAK,EAAEf,cAAc,CAACgB;MACxB;IACF,CAAiB;IACjBC,MAAM,EAAE;MACNC,eAAe,EAAElB,cAAc,CAACmB,aAAa;MAC7CJ,KAAK,EAAEf,cAAc,CAACoB,eAAe;MACrCd,IAAI,EAAE,CAAC;MACPI,QAAQ,EAAE,EAAE;MACZW,QAAQ,EAAE,EAAE;MACZC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAEvB,cAAc,CAACwB,iBAAiB;MAC7Cf,UAAU,EAAE;IACd,CAAa;IACbgB,cAAc,EAAE;MACdV,KAAK,EAAEf,cAAc,CAAC0B,qBAAqB;MAC3CR,eAAe,EAAElB,cAAc,CAAC2B,mBAAmB;MACnDJ,WAAW,EAAEvB,cAAc,CAAC2B;IAC9B,CAAa;IACbC,WAAW,EAAE;MACXtB,IAAI,EAAE,CAAC;MACPuB,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAa;IACbC,UAAU,EAAE;MACV3B,IAAI,EAAE,CAAC;MACPuB,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,CAAC;EAEF/B,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE,CAAC;EACT,CAAC,CAAC;EACFF,QAAQ,CAACH,aAAa,GAAG,GAAG,EAAE,EAAE,EAAE;IAChC8B,WAAW,EAAE;MACXC,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAa;IACbC,UAAU,EAAE;MACV3B,IAAI,EAAE,CAAC;MACPuB,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,GAAG;MACzBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,CAAmB;AACtB,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","flexDirection","text","fontWeight","fontSize","textTransform","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","borderRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","firstButton","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","lastButton","OS","borderLeftWidth"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\nimport { Platform } from 'react-native';\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n height: 38,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n fontSize: 16,\n minWidth: 64,\n borderRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: 'bold',\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchActiveBgColor\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1\n } as AllStyle\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1,\n borderLeftWidth: 0\n } ,\n lastButton:{\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 0\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500,\n borderRightWidth: 0,\n borderLeftWidth: 1\n } ,\n lastButton:{\n flex: 1,\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 1\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AAUvC,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGN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xBC,sBAAsB,EAAE,GAAG;MAC3BC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAa;IACbC,UAAU,EAAE;MACVxB,IAAI,EAAE,CAAC;MACPoB,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,GAAG;MACzBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
@@ -1,30 +1,22 @@
1
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); }
2
2
  import React from 'react';
3
- import { Platform, TextInput } from 'react-native';
3
+ import { Platform } from 'react-native';
4
4
  import WmTextProps from './text.props';
5
5
  import { DEFAULT_CLASS } from './text.styles';
6
+ import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
6
7
  import { BaseInputComponent, BaseInputState } from "@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component";
7
8
  import { isNull } from 'lodash';
8
- import { createSkeleton } from '../../basic/skeleton/skeleton.component';
9
9
  export class WmTextState extends BaseInputState {}
10
10
  export default class WmText extends BaseInputComponent {
11
11
  constructor(props) {
12
12
  super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());
13
13
  }
14
- renderSkeleton(props) {
15
- var _this$styles$root, _this$styles$text, _this$styles$placehol;
16
- return createSkeleton(this.theme, this.styles.skeleton, {
17
- ...this.styles.root,
18
- width: this.styles.root.width,
19
- height: ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.height) || ((_this$styles$text = this.styles.text) === null || _this$styles$text === void 0 ? void 0 : _this$styles$text.fontSize) || ((_this$styles$placehol = this.styles.placeholderText) === null || _this$styles$placehol === void 0 ? void 0 : _this$styles$placehol.fontSize)
20
- });
21
- }
22
14
  renderWidget(props) {
23
15
  var _this$state$textValue;
24
16
  let opts = {};
25
17
  const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
26
18
  opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
27
- return /*#__PURE__*/React.createElement(TextInput, _extends({
19
+ return /*#__PURE__*/React.createElement(WMTextInput, _extends({
28
20
  ref: ref => {
29
21
  this.widgetRef = ref;
30
22
  // @ts-ignore
@@ -42,12 +34,13 @@ export default class WmText extends BaseInputComponent {
42
34
  editable: props.disabled || props.readonly ? false : true,
43
35
  secureTextEntry: props.type === 'password' ? true : false,
44
36
  maxLength: props.maxchars,
45
- placeholder: props.placeholder || 'Enter text',
37
+ placeholder: props.placeholder,
46
38
  onBlur: this.onBlur.bind(this),
47
39
  onFocus: this.onFocus.bind(this),
48
40
  onKeyPress: this.onKeyPress.bind(this),
49
41
  onChangeText: this.onChangeText.bind(this),
50
- onChange: this.invokeChange.bind(this)
42
+ onChange: this.invokeChange.bind(this),
43
+ allowContentSelection: this.styles.text.userSelect === 'text'
51
44
  }));
52
45
  }
53
46
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","TextInput","WmTextProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","isNull","createSkeleton","WmTextState","WmText","constructor","props","renderSkeleton","theme","styles","skeleton","root","width","height","text","fontSize","placeholderText","renderWidget","opts","valueExpr","OS","state","textValue","toString","ref","widgetRef","selectionStart","selectionEnd","cursor","color","isValid","invalid","keyboardType","autocomplete","autofocus","disabled","readonly","type","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","invokeChange"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { createSkeleton } from '../../basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public renderSkeleton(props: WmTextProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.styles.root.width,\n height: this.styles.root?.height || this.styles.text?.fontSize || this.styles.placeholderText?.fontSize\n });\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <TextInput\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' ? true : false}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Enter text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAElD,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MA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ACnE;UACAH,GAAG,CAACE,cAAc,GAAGF,GAAG,CAACG,YAAY,GAAG,IAAI,CAACC,MAAM;QACrD;MAAC;IAAE,GACCV,IAAI;MACR,oBAAoB,EAAE,IAAI,CAACT,MAAM,CAACO,eAAe,CAACa,KAAa;MAC/D,KAAK,EAAE,CAAC,IAAI,CAACpB,MAAM,CAACE,IAAI,EAAE,IAAI,CAACU,KAAK,CAACS,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAACrB,MAAM,CAACsB,OAAO,CAAE;MACzE,YAAY,EAAE,IAAI,CAACV,KAAK,CAACW,YAAa;MACtC,YAAY,EAAE1B,KAAK,CAAC2B,YAAY,GAAG,UAAU,GAAG,KAAM;MACtD,SAAS,EAAE3B,KAAK,CAAC4B,SAAU;MAC3B,QAAQ,EAAE5B,KAAK,CAAC6B,QAAQ,IAAI7B,KAAK,CAAC8B,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1D,eAAe,EAAE9B,KAAK,CAAC+B,IAAI,KAAK,UAAU,GAAG,IAAI,GAAG,KAAM;MAC1D,SAAS,EAAE/B,KAAK,CAACgC,QAAS;MAC1B,WAAW,EAAEhC,KAAK,CAACiC,WAAW,IAAI,YAAa;MAC/C,MAAM,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/B,OAAO,EAAE,IAAI,CAACC,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjC,UAAU,EAAE,IAAI,CAACE,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvC,YAAY,EAAE,IAAI,CAACG,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3C,QAAQ,EAAE,IAAI,CAACI,YAAY,CAACJ,IAAI,CAAC,IAAI;IAAE,GACvC;EAER;AACF"}
1
+ {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","WmTextState","WmText","constructor","props","renderWidget","_this$state$textValue","opts","valueExpr","OS","state","textValue","toString","createElement","_extends","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","isValid","invalid","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","text","userSelect"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' ? true : false}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MAAM,QAAQ,QAAQ;AAE/B,OAAO,MAAMC,WAAW,SAASF,cAAc,CAAc;AAG7D,eAAe,MAAMG,MAAM,SAASJ,kBAAkB,CAAyC;EAE7FK,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIM,WAAW,CAAC,CAAC,CAAC;EACnE;EAEAI,YAAYA,CAACD,KAAkB,EAAE;IAAA,IAAAE,qBAAA;IAC/B,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGd,QAAQ,CAACe,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,cAAc;IAClEF,IAAI,CAACC,SAAS,CAAC,GAAG,EAAAF,qBAAA,OAAI,CAACI,KAAK,CAACC,SAAS,cAAAL,qBAAA,uBAApBA,qBAAA,CAAsBM,QAAQ,CAAC,CAAC,KAAI,EAAE;IACxD,oBACInB,KAAA,CAAAoB,aAAA,CAAChB,WAAW,EAAAiB,QAAA;MACVC,GAAG,EAAGA,GAAQ,IAAK;QAAC,IAAI,CAACC,SAAS,GAAGD,GAAG;QACtC;QACF,IAAIA,GAAG,IAAI,CAACf,MAAM,CAACe,GAAG,CAACE,cAAc,CAAC,IAAI,CAACjB,MAAM,CAACe,GAAG,CAACG,YAAY,CAAC,EAAE;UACnE;UACAH,GAAG,CAACE,cAAc,GAAGF,GAAG,CAACG,YAAY,GAAG,IAAI,CAACC,MAAM;QACrD;MAAC;IAAE,GACCZ,IAAI;MACRa,oBAAoB,EAAE,IAAI,CAACC,MAAM,CAACC,eAAe,CAACC,KAAa;MAC/DC,KAAK,EAAE,CAAC,IAAI,CAACH,MAAM,CAACI,IAAI,EAAE,IAAI,CAACf,KAAK,CAACgB,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAACL,MAAM,CAACM,OAAO,CAAE;MACzEC,YAAY,EAAE,IAAI,CAAClB,KAAK,CAACkB,YAAa;MACtCC,YAAY,EAAEzB,KAAK,CAAC0B,YAAY,GAAG,UAAU,GAAG,KAAM;MACtDC,SAAS,EAAE3B,KAAK,CAAC4B,SAAU;MAC3BC,QAAQ,EAAE7B,KAAK,CAAC8B,QAAQ,IAAI9B,KAAK,CAAC+B,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,eAAe,EAAEhC,KAAK,CAACiC,IAAI,KAAK,UAAU,GAAG,IAAI,GAAG,KAAM;MAC1DC,SAAS,EAAElC,KAAK,CAACmC,QAAS;MAC1BC,WAAW,EAAEpC,KAAK,CAACoC,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC3B,MAAM,CAAC4B,IAAI,CAACC,UAAU,KAAK;IAAO,EAC/D,CAAC;EAER;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseInputProps","WmTextProps"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n placeholder: string = 'Enter text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAA;IAAA;IAAA,qCAChC,YAAY;EAAA;AACpC"}
1
+ {"version":3,"names":["BaseInputProps","WmTextProps","constructor","arguments","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n placeholder: string = 'Enter text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBAChC,YAAY;EAAA;AACpC"}
@@ -35,5 +35,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
35
35
  backgroundColor: themeVariables.inputDisabledBgColor
36
36
  }
37
37
  });
38
+ addStyle(DEFAULT_CLASS + '-rtl', '', {
39
+ root: {
40
+ textAlign: 'right'
41
+ }
42
+ });
38
43
  });
39
44
  //# sourceMappingURL=text.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAEjB,cAAc,CAACkB;IACpC,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAEpB,cAAc,CAACqB;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRnB,IAAI,EAAE;QACJoB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVb,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAACyB;IAClC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAEjB,cAAc,CAACkB;IACpC,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAEpB,cAAc,CAACqB;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRnB,IAAI,EAAE;QACJoB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVb,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAACyB;IAClC;EACJ,CAAC,CAAC;EACFxB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACHuB,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,31 +1,22 @@
1
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); }
2
2
  import React from 'react';
3
- import { Platform, TextInput } from 'react-native';
3
+ import { Platform } from 'react-native';
4
4
  import WmTextareaProps from './textarea.props';
5
5
  import { DEFAULT_CLASS } from './textarea.styles';
6
6
  import { BaseInputComponent, BaseInputState } from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';
7
+ import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
7
8
  import { isNull } from 'lodash';
8
- import { createSkeleton } from '../../basic/skeleton/skeleton.component';
9
9
  export class WmTextareaState extends BaseInputState {}
10
10
  export default class WmTextarea extends BaseInputComponent {
11
11
  constructor(props) {
12
12
  super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());
13
13
  }
14
- renderSkeleton(props) {
15
- const styles = {
16
- borderRadius: 4,
17
- marginBottom: 10
18
- };
19
- return createSkeleton(this.theme, this.styles.skeleton, {
20
- ...this.styles.root
21
- });
22
- }
23
14
  renderWidget(props) {
24
15
  var _this$state$textValue;
25
16
  let opts = {};
26
17
  const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
27
18
  opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
28
- return /*#__PURE__*/React.createElement(TextInput, _extends({
19
+ return /*#__PURE__*/React.createElement(WMTextInput, _extends({
29
20
  ref: ref => {
30
21
  this.widgetRef = ref;
31
22
  // @ts-ignore
@@ -49,7 +40,8 @@ export default class WmTextarea extends BaseInputComponent {
49
40
  onFocus: this.onFocus.bind(this),
50
41
  onKeyPress: this.onKeyPress.bind(this),
51
42
  onChangeText: this.onChangeText.bind(this),
52
- onChange: this.invokeChange.bind(this)
43
+ onChange: this.invokeChange.bind(this),
44
+ allowContentSelection: this.styles.text.userSelect === 'text'
53
45
  }));
54
46
  }
55
47
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","TextInput","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","isNull","createSkeleton","WmTextareaState","WmTextarea","constructor","props","renderSkeleton","styles","borderRadius","marginBottom","theme","skeleton","root","renderWidget","opts","valueExpr","OS","state","textValue","toString","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderText","color","text","isValid","invalid","keyboardType","autocomplete","autofocus","disabled","readonly","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","invokeChange"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { isNull } from 'lodash';\nimport { createSkeleton } from '../../basic/skeleton/skeleton.component';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n public renderSkeleton(props: WmTextareaProps){\n const styles = {borderRadius:4, marginBottom: 10};\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n });\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <TextInput\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n multiline={true}\n numberOfLines={4}\n keyboardType={this.state.keyboardType}\n {...opts}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAClD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,cAAc,QAAQ,yCAAyC;AAExE,OAAO,MAAMC,eAAe,SAASH,cAAc,CAAkB;AAErE,eAAe,MAAMI,UAAU,SAASL,kBAAkB,CAAqD;EAE7GM,WAAW,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,eAAe,EAAE,EAAE,IAAIM,eAAe,EAAE,CAAC;EAC3E;EAEOI,cAAc,CAACD,KAAsB,EAAC;IAC3C,MAAME,MAAM,GAAG;MAACC,YAAY,EAAC,CAAC;MAAEC,YAAY,EAAE;IAAE,CAAC;IACjD,OAAOR,cAAc,CAAC,IAAI,CAACS,KAAK,EAAE,IAAI,CAACH,MAAM,CAACI,QAAQ,EAAE;MACtD,GAA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AE7B,KAAK,CAAC8B,QAAS;MAC1B,WAAW,EAAE9B,KAAK,CAAC+B,WAAW,IAAI,iBAAkB;MACpD,MAAM,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/B,OAAO,EAAE,IAAI,CAACC,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjC,UAAU,EAAE,IAAI,CAACE,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvC,YAAY,EAAE,IAAI,CAACG,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3C,QAAQ,EAAE,IAAI,CAACI,YAAY,CAACJ,IAAI,CAAC,IAAI;IAAE,GACvC;EACJ;AACF"}
1
+ {"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","WmTextareaState","WmTextarea","constructor","props","renderWidget","_this$state$textValue","opts","valueExpr","OS","state","textValue","toString","createElement","_extends","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","text","isValid","invalid","multiline","numberOfLines","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput, View } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <WMTextInput\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n multiline={true}\n numberOfLines={4}\n keyboardType={this.state.keyboardType}\n {...opts}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAyB,cAAc;AACxD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAE/B,OAAO,MAAMC,eAAe,SAASH,cAAc,CAAkB;AAErE,eAAe,MAAMI,UAAU,SAASL,kBAAkB,CAAqD;EAE7GM,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIM,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAI,YAAYA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K,GAAG,IAAK;MAC1DC,SAAS,EAAEnC,KAAK,CAACoC,QAAS;MAC1BC,WAAW,EAAErC,KAAK,CAACqC,WAAW,IAAI,iBAAkB;MACpDC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC5B,MAAM,CAACK,IAAI,CAACwB,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseInputProps","WmTextareaProps"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n placeholder: string = 'Place your text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAA;IAAA;IAAA,qCACpC,iBAAiB;EAAA;AACzC"}
1
+ {"version":3,"names":["BaseInputProps","WmTextareaProps","constructor","arguments","_defineProperty"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n placeholder: string = 'Place your text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACpC,iBAAiB;EAAA;AACzC"}
@@ -37,5 +37,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
37
37
  backgroundColor: themeVariables.inputDisabledBgColor
38
38
  }
39
39
  });
40
+ addStyle(DEFAULT_CLASS + '-rtl', '', {
41
+ root: {
42
+ textAlign: 'right'
43
+ }
44
+ });
40
45
  });
41
46
  //# sourceMappingURL=textarea.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","invalid","borderBottomColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n invalid: {\n borderBottomColor: 'red'\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AASxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa,QAAQ;MACnCC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,iBAAiB,EAAE;IACrB,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAE;IACrB,CAAC;IACDC,eAAe,EAAE;MACfC,KAAK,EAAErB,cAAc,CAACsB;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRpB,IAAI,EAAE;QACJqB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVd,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAAC0B;IAClC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","invalid","borderBottomColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n invalid: {\n borderBottomColor: 'red'\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AASxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI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