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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/actions/notification-action.js.map +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel.component.js +123 -32
  7. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel.styles.js +7 -3
  10. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  11. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  12. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  13. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  14. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  15. app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
  16. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
  18. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  19. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  20. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  21. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  22. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  23. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  24. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  25. app-rn-runtime/components/basic/button/button.component.js +20 -7
  26. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  27. app-rn-runtime/components/basic/button/button.styles.js +15 -5
  28. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  29. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
  30. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/icon/icon.component.js +9 -6
  32. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  33. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  34. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  35. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  36. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  37. app-rn-runtime/components/basic/label/label.component.js +79 -11
  38. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  39. app-rn-runtime/components/basic/label/label.props.js +1 -0
  40. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  41. app-rn-runtime/components/basic/label/label.styles.js +5 -0
  42. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/message/message.component.js +6 -3
  44. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  45. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  46. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  47. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
  48. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  50. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  51. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  52. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  53. app-rn-runtime/components/basic/search/search.component.js +9 -5
  54. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  55. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  56. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  57. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  58. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  59. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  60. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  61. app-rn-runtime/components/basic/video/video.component.js +2 -1
  62. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  63. app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
  64. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  65. app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
  66. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  67. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
  68. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  69. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
  70. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  71. app-rn-runtime/components/chart/basechart.component.js +140 -39
  72. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  73. app-rn-runtime/components/chart/basechart.props.js +18 -4
  74. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  75. app-rn-runtime/components/chart/basechart.styles.js +44 -2
  76. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  77. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
  78. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  79. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
  80. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  81. app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
  82. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  83. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  84. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  85. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
  86. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  87. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  88. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  89. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +81 -19
  90. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  91. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +2 -0
  92. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  93. app-rn-runtime/components/container/accordion/accordion.component.js +16 -13
  94. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  95. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +3 -22
  96. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  97. app-rn-runtime/components/container/container.component.js +14 -4
  98. app-rn-runtime/components/container/container.component.js.map +1 -1
  99. app-rn-runtime/components/container/container.props.js +1 -0
  100. app-rn-runtime/components/container/container.props.js.map +1 -1
  101. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  102. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  103. app-rn-runtime/components/container/panel/panel.component.js +43 -61
  104. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  105. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  106. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  107. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
  108. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  109. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
  110. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  111. app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
  112. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  113. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
  114. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  115. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  116. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  117. app-rn-runtime/components/container/wizard/wizard.component.js +137 -20
  118. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  119. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  120. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  121. app-rn-runtime/components/container/wizard/wizard.styles.js +114 -5
  122. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  123. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
  124. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  125. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
  126. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  127. app-rn-runtime/components/data/card/card.component.js +3 -2
  128. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  129. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  130. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  131. app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
  132. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  133. app-rn-runtime/components/data/form/form.component.js +12 -6
  134. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  135. app-rn-runtime/components/data/list/list-template/list-template.styles.js +5 -1
  136. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  137. app-rn-runtime/components/data/list/list.component.js +65 -8
  138. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  139. app-rn-runtime/components/data/list/list.props.js +1 -0
  140. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  141. app-rn-runtime/components/data/list/list.styles.js +12 -5
  142. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  143. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  144. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  145. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  146. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  147. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  148. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  149. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  150. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  151. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  152. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  153. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  154. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  155. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  156. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  157. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  158. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  159. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  160. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  161. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
  162. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  163. app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
  164. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  165. app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
  166. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  167. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  168. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  169. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  170. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  171. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  172. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  173. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  174. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  175. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  176. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  177. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
  178. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  179. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
  180. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  181. app-rn-runtime/components/input/chips/chips.component.js +15 -4
  182. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  183. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  184. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  185. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  186. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  187. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  188. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  189. app-rn-runtime/components/input/currency/currency.component.js +21 -3
  190. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  191. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  192. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  193. app-rn-runtime/components/input/currency/currency.styles.js +31 -5
  194. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  195. app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
  196. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  197. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  198. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  199. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  200. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  201. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  202. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  203. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  204. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  205. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  206. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  207. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  208. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  209. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  210. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  211. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  212. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  213. app-rn-runtime/components/input/number/number.component.js +16 -2
  214. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  215. app-rn-runtime/components/input/number/number.props.js +1 -0
  216. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  217. app-rn-runtime/components/input/number/number.styles.js +23 -2
  218. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  219. app-rn-runtime/components/input/radioset/radioset.component.js +7 -4
  220. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  221. app-rn-runtime/components/input/radioset/radioset.styles.js +2 -1
  222. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  223. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  224. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  225. app-rn-runtime/components/input/select/select.component.js +17 -13
  226. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  227. app-rn-runtime/components/input/select/select.styles.js +6 -3
  228. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  229. app-rn-runtime/components/input/slider/slider.component.js +99 -23
  230. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  231. app-rn-runtime/components/input/slider/slider.styles.js +30 -3
  232. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  233. app-rn-runtime/components/input/switch/switch.component.js +11 -5
  234. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  235. app-rn-runtime/components/input/switch/switch.styles.js +13 -8
  236. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  237. app-rn-runtime/components/input/text/text.component.js +12 -1
  238. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  239. app-rn-runtime/components/input/text/text.props.js +1 -0
  240. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  241. app-rn-runtime/components/input/text/text.styles.js +22 -1
  242. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  243. app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
  244. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  245. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  246. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  247. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  248. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  249. app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
  250. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  251. app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
  252. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  253. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
  254. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  255. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  256. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  257. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  258. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  259. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  260. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  261. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  262. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  263. app-rn-runtime/components/navigation/navitem/navitem.component.js +5 -2
  264. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  265. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  266. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  267. app-rn-runtime/components/navigation/popover/popover.component.js +7 -4
  268. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  269. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  270. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  271. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  272. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  273. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  274. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  275. app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
  276. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  277. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  278. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  279. app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
  280. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  281. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  282. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  283. app-rn-runtime/components/page/tabbar/tabbar.styles.js +54 -1
  284. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  285. app-rn-runtime/core/base.component.js +84 -37
  286. app-rn-runtime/core/base.component.js.map +1 -1
  287. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  288. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  289. app-rn-runtime/core/components/textinput.component.js +25 -2
  290. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  291. app-rn-runtime/core/constant.service.js +22 -0
  292. app-rn-runtime/core/constant.service.js.map +1 -0
  293. app-rn-runtime/core/formatters.js +9 -2
  294. app-rn-runtime/core/formatters.js.map +1 -1
  295. app-rn-runtime/core/tappable.component.js +49 -12
  296. app-rn-runtime/core/tappable.component.js.map +1 -1
  297. app-rn-runtime/core/testid.provider.js +5 -0
  298. app-rn-runtime/core/testid.provider.js.map +1 -0
  299. app-rn-runtime/core/utils.js +16 -0
  300. app-rn-runtime/core/utils.js.map +1 -1
  301. app-rn-runtime/gestures/swipe.animation.js +56 -5
  302. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  303. app-rn-runtime/package.json +6 -3
  304. app-rn-runtime/runtime/App.js +51 -21
  305. app-rn-runtime/runtime/App.js.map +1 -1
  306. app-rn-runtime/runtime/base-fragment.component.js +27 -6
  307. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  308. app-rn-runtime/runtime/base-page.component.js +8 -2
  309. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  310. app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
  311. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  312. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  313. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  314. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  315. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  316. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  317. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  318. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  319. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  320. app-rn-runtime/styles/theme.js +36 -0
  321. app-rn-runtime/styles/theme.js.map +1 -1
  322. app-rn-runtime/styles/theme.variables.js +24 -3
  323. app-rn-runtime/styles/theme.variables.js.map +1 -1
  324. app-rn-runtime/variables/model-variable.js +2 -1
  325. app-rn-runtime/variables/model-variable.js.map +1 -1
@@ -10,14 +10,41 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
10
10
  minimumValue: {},
11
11
  maximumValue: {},
12
12
  value: {},
13
+ track: {
14
+ position: 'relative',
15
+ height: 4,
16
+ flexDirection: 'row',
17
+ width: '100%',
18
+ minWidth: 160,
19
+ marginVertical: 8,
20
+ overflow: 'hidden',
21
+ borderRadius: 4
22
+ },
13
23
  minimumTrack: {
14
- backgroundColor: themeVariables.minimumTrackTintColor
24
+ position: 'absolute',
25
+ height: '100%',
26
+ width: 150,
27
+ backgroundColor: themeVariables.minimumTrackTintColor,
28
+ borderTopLeftRadius: 4,
29
+ borderBottomLeftRadius: 4
15
30
  },
16
31
  maximumTrack: {
17
- backgroundColor: themeVariables.maximumTrackTintColor
32
+ position: 'absolute',
33
+ height: '100%',
34
+ backgroundColor: themeVariables.maximumTrackTintColor,
35
+ flex: 1,
36
+ borderTopRightRadius: 4,
37
+ borderBottomRightRadius: 4
18
38
  },
19
39
  thumb: {
20
- backgroundColor: themeVariables.thumbTintColor
40
+ height: 20,
41
+ width: 20,
42
+ marginLeft: -8,
43
+ marginTop: -20,
44
+ borderRadius: 16,
45
+ backgroundColor: themeVariables.thumbTintColor,
46
+ backgroundSize: '100% 100%',
47
+ backgroundPosition: 'center'
21
48
  },
22
49
  disabled: {
23
50
  pointerEvents: 'none'
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","fontSize","minimumValue","maximumValue","value","minimumTrack","backgroundColor","minimumTrackTintColor","maximumTrack","maximumTrackTintColor","thumb","thumbTintColor","disabled","pointerEvents","opacity"],"sources":["slider.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\n\nexport type WmSliderStyles = BaseStyles & {\n minimumValue: TextStyle,\n maximumValue: TextStyle,\n value: TextStyle,\n minimumTrack: ViewStyle,\n maximumTrack: ViewStyle,\n thumb: ViewStyle,\n disabled: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-slider';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSliderStyles = defineStyles({\n root: {},\n text: {\n fontSize: 16\n },\n minimumValue: {\n\n },\n maximumValue: {\n\n },\n value: {\n\n },\n minimumTrack: {\n backgroundColor: themeVariables.minimumTrackTintColor\n },\n maximumTrack: {\n backgroundColor: themeVariables.maximumTrackTintColor\n },\n thumb: {\n backgroundColor: themeVariables.thumbTintColor\n },\n disabled: {\n pointerEvents: 'none'\n }\n }) as WmSliderStyles;\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE;MACFC,QAAQ,EAAE;IACd,CAAC;IACDC,YAAY,EAAE,CAEd,CAAC;IACDC,YAAY,EAAE,CAEd,CAAC;IACDC,KAAK,EAAE,CAEP,CAAC;IACDC,YAAY,EAAE;MACVC,eAAe,EAAEV,cAAc,CAACW;IACpC,CAAC;IACDC,YAAY,EAAE;MACVF,eAAe,EAAEV,cAAc,CAACa;IACpC,CAAC;IACDC,KAAK,EAAE;MACHJ,eAAe,EAAEV,cAAc,CAACe;IACpC,CAAC;IACDC,QAAQ,EAAE;MACNC,aAAa,EAAE;IACnB;EACJ,CAAC,CAAmB;EAEpBhB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACPe,OAAO,EAAE;IACT;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","fontSize","minimumValue","maximumValue","value","track","position","height","flexDirection","width","minWidth","marginVertical","overflow","borderRadius","minimumTrack","backgroundColor","minimumTrackTintColor","borderTopLeftRadius","borderBottomLeftRadius","maximumTrack","maximumTrackTintColor","flex","borderTopRightRadius","borderBottomRightRadius","thumb","marginLeft","marginTop","thumbTintColor","backgroundSize","backgroundPosition","disabled","pointerEvents","opacity"],"sources":["slider.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\n\nexport type WmSliderStyles = BaseStyles & {\n minimumValue: TextStyle,\n maximumValue: TextStyle,\n value: TextStyle,\n track: ViewStyle,\n minimumTrack: ViewStyle,\n maximumTrack: ViewStyle,\n thumb: ViewStyle,\n disabled: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-slider';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSliderStyles = defineStyles({\n root: {\n },\n text: {\n fontSize: 16\n },\n minimumValue: {\n\n },\n maximumValue: {\n\n },\n value: {\n\n },\n track: {\n position: 'relative',\n height: 4,\n flexDirection: 'row',\n width: '100%',\n minWidth: 160,\n marginVertical: 8,\n overflow: 'hidden',\n borderRadius: 4\n },\n minimumTrack: {\n position: 'absolute',\n height: '100%',\n width: 150,\n backgroundColor: themeVariables.minimumTrackTintColor,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n maximumTrack: {\n position: 'absolute',\n height: '100%',\n backgroundColor: themeVariables.maximumTrackTintColor,\n flex: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n thumb: {\n height: 20,\n width: 20,\n marginLeft: -8,\n marginTop: -20,\n borderRadius: 16,\n backgroundColor: themeVariables.thumbTintColor,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n },\n disabled: {\n pointerEvents: 'none'\n }\n }) as WmSliderStyles;\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAcxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE,CACN,CAAC;IACDC,IAAI,EAAE;MACFC,QAAQ,EAAE;IACd,CAAC;IACDC,YAAY,EAAE,CAEd,CAAC;IACDC,YAAY,EAAE,CAEd,CAAC;IACDC,KAAK,EAAE,CAEP,CAAC;IACDC,KAAK,EAAE;MACHC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,CAAC;MACTC,aAAa,EAAE,KAAK;MACpBC,KAAK,EAAE,MAAM;MACbC,QAAQ,EAAE,GAAG;MACbC,cAAc,EAAE,CAAC;MACjBC,QAAQ,EAAE,QAAQ;MAClBC,YAAY,EAAE;IAClB,CAAC;IACDC,YAAY,EAAE;MACVR,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,MAAM;MACdE,KAAK,EAAG,GAAG;MACXM,eAAe,EAAEnB,cAAc,CAACoB,qBAAqB;MACrDC,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE;IAC5B,CAAC;IACDC,YAAY,EAAE;MACVb,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,MAAM;MACdQ,eAAe,EAAEnB,cAAc,CAACwB,qBAAqB;MACrDC,IAAI,EAAE,CAAC;MACPC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC7B,CAAC;IACDC,KAAK,EAAE;MACHjB,MAAM,EAAE,EAAE;MACVE,KAAK,EAAE,EAAE;MACTgB,UAAU,EAAE,CAAC,CAAC;MACdC,SAAS,EAAE,CAAC,EAAE;MACdb,YAAY,EAAE,EAAE;MAChBE,eAAe,EAAEnB,cAAc,CAAC+B,cAAc;MAC9CC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE;IACxB,CAAC;IACDC,QAAQ,EAAE;MACNC,aAAa,EAAE;IACnB;EACJ,CAAC,CAAmB;EAEpBlC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACPiC,OAAO,EAAE;IACT;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import React from 'react';
2
3
  import { Text, View } from "react-native";
3
4
  import { isEqual, find } from 'lodash';
@@ -15,7 +16,11 @@ export default class WmSwitch extends BaseDatasetComponent {
15
16
  if (!value) {
16
17
  return;
17
18
  }
19
+ const oldVal = this.state.props.datavalue;
18
20
  this.validate(value);
21
+ if (value === oldVal) {
22
+ return;
23
+ }
19
24
  if (this.state.props.datafield === 'All Fields') {
20
25
  const selectedItem = find(this.state.dataItems, item => isEqual(item.key, value));
21
26
  value = selectedItem && selectedItem.dataObject;
@@ -28,7 +33,7 @@ export default class WmSwitch extends BaseDatasetComponent {
28
33
  isDefault: false
29
34
  }, () => {
30
35
  if (!this.props.invokeEvent) {
31
- this.invokeEventCallback('onChange', [undefined, this.proxy, value, this.state.props.datavalue]);
36
+ this.invokeEventCallback('onChange', [undefined, this.proxy, value, oldVal]);
32
37
  }
33
38
  });
34
39
  }
@@ -47,19 +52,20 @@ export default class WmSwitch extends BaseDatasetComponent {
47
52
  }
48
53
  const displayText = item.displayexp || item.displayfield;
49
54
  const isSelected = this.state.props.datafield === 'All Fields' ? isEqual(props.datavalue, item.datafield) : this.state.props.datavalue === item.datafield;
50
- return /*#__PURE__*/React.createElement(Tappable, {
55
+ return /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(index + ''), {
51
56
  onTap: this.state.props.disabled ? undefined : this.onTap.bind(this, null, item),
52
57
  styles: [this.styles.button, this.styles[btnClass], isSelected ? this.styles.selectedButton : null],
53
58
  key: item.key
54
- }, this.state.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
59
+ }), this.state.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
60
+ id: this.getTestId('icon' + index),
55
61
  styles: this.styles.loadingIcon,
56
62
  iconclass: item.icon,
57
63
  caption: displayText
58
- }) : /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
64
+ }) : /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('' + index), {
59
65
  style: [this.styles.text, {
60
66
  color: isSelected ? this.styles.selectedButton.color : this.styles.button.color
61
67
  }]
62
- }, displayText)));
68
+ }), displayText)));
63
69
  }
64
70
  renderWidget(props) {
65
71
  const items = this.state.dataItems;
@@ -1 +1 @@
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,EAAE;MACV;IACF;IACA,IAAI,CAACC,QAAQ,CAACD,KAAK,CAAC;IACpB,IAAI,IAAI,CAACE,KAAK,CAACJ,KAAK,CAACK,SAAS,KAAK,YAAY,EAAE;MAC/C,MAAMC,YAAY,GAAGhB,IAAI,CAAC,IAAI,CAACc,KAAK,CAACG,SAAS,EAAGC,IAAI,IAAKnB,OAAO,CAACmB,IAAI,CAACC,GAAG,EAAEP,KAAK,CAAC,CAAC;MACn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C,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
+ {"version":3,"names":["React","Text","View","isEqual","find","WmSwitchProps","DEFAULT_CLASS","WmIcon","BaseDatasetComponent","BaseDatasetState","Tappable","WmSwitchState","WmSwitch","constructor","props","onChange","value","oldVal","state","datavalue","validate","datafield","selectedItem","dataItems","item","key","dataObject","updateState","isDefault","invokeEvent","invokeEventCallback","undefined","proxy","onTap","event","getItemKey","renderChild","index","btnClass","length","displayText","displayexp","displayfield","isSelected","createElement","_extends","getTestPropsForAction","disabled","bind","styles","button","selectedButton","iconclass","id","getTestId","loadingIcon","icon","caption","getTestPropsForLabel","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 const oldVal = this.state.props.datavalue;\n this.validate(value);\n if (value === oldVal) {\n return;\n }\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, oldVal]);\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 {...this.getTestPropsForAction(index + '')}\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 \n id={this.getTestId('icon' + index)}\n styles={this.styles.loadingIcon}\n iconclass={item.icon}\n caption={displayText}></WmIcon>)\n : (<View>\n <Text \n {...this.getTestPropsForLabel('' + index)}\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,MA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W,CAACZ,IAAI,EAAEa,KAAK,CAAC,CAAC,GAAE,IACnE,CAAC;EACT;AACF"}
@@ -28,32 +28,37 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
28
28
  button: {
29
29
  backgroundColor: themeVariables.switchBgColor,
30
30
  color: themeVariables.switchTextColor,
31
- fontSize: 16,
31
+ fontSize: 14,
32
32
  minWidth: 64,
33
- borderRadius: 0,
33
+ minHeight: 40,
34
+ borderTopLeftRadius: 0,
35
+ borderBottomLeftRadius: 0,
36
+ borderBottomRightRadius: 0,
37
+ borderTopRightRadius: 0,
34
38
  borderColor: themeVariables.switchBorderColor,
35
39
  borderWidth: 1,
36
40
  borderRightWidth: 0,
37
- fontWeight: 'bold',
41
+ fontWeight: '500',
42
+ fontFamily: themeVariables.baseFont,
38
43
  justifyContent: 'center',
39
44
  alignItems: 'center'
40
45
  },
41
46
  selectedButton: {
42
47
  color: themeVariables.switchActiveTextColor,
43
48
  backgroundColor: themeVariables.switchActiveBgColor,
44
- borderColor: themeVariables.switchActiveBgColor
49
+ borderColor: themeVariables.switchBorderColor
45
50
  },
46
51
  firstButton: {
47
- borderTopLeftRadius: 6,
48
- borderBottomLeftRadius: 6,
52
+ borderTopLeftRadius: 18,
53
+ borderBottomLeftRadius: 18,
49
54
  borderTopRightRadius: 0,
50
55
  borderBottomRightRadius: 0
51
56
  },
52
57
  lastButton: {
53
58
  borderTopLeftRadius: 0,
54
59
  borderBottomLeftRadius: 0,
55
- borderTopRightRadius: 6,
56
- borderBottomRightRadius: 6,
60
+ borderTopRightRadius: 18,
61
+ borderBottomRightRadius: 18,
57
62
  borderRightWidth: 1
58
63
  }
59
64
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","padding","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 minHeight: 24,\n padding: 4,\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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,EAAE;MACXC,mBAAmB,EAAE,GAAG;MACxBC,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
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","padding","flexDirection","text","fontWeight","fontSize","textTransform","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","borderTopLeftRadius","borderBottomLeftRadius","borderBottomRightRadius","borderTopRightRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","fontFamily","baseFont","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","firstButton","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 minHeight: 24,\n padding: 4,\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: 14,\n minWidth: 64,\n minHeight: 40,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n borderTopRightRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchBorderColor\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 18,\n borderBottomLeftRadius: 18,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 18,\n borderBottomRightRadius: 18,\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,YAAY,CAAiB;IAC/DO,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,OAAO,EAAE,CAAC;MACVC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACjB,CAAC;IACHC,WAAW,EAAE;MACXR,IAAI,EAAE;QACJS,IAAI,EAAE,CAAC;QACPC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBL,QAAQ,EAAE;MACZ,CAAC;MACDF,IAAI,EAAE;QACJQ,KAAK,EAAEf,cAAc,CAACgB;MACxB;IACF,CAAiB;IACjBC,MAAM,EAAE;MACNC,eAAe,EAAElB,cAAc,CAACmB,aAAa;MAC7CJ,KAAK,EAAEf,cAAc,CAACoB,eAAe;MACrCX,QAAQ,EAAE,EAAE;MACZY,QAAQ,EAAE,EAAE;MACZjB,SAAS,EAAE,EAAE;MACbk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CAAC;IACDF,UAAU,EAAC;MACTf,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBE,oBAAoB,EAAE,CAAC;MACvBD,uBAAuB,EAAE,CAAC;MAC1BK,gBAAgB,EAAE;IACpB;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACL5B,QAAQ,CAACH,aAAa,GAAG,OAAO,EAAE,EAAE,EAAED,QAAQ,CAACyC,EAAE,IAAE,KAAK,GAAC;IACvDF,WAAW,EAAC;MACVd,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBE,oBAAoB,EAAE,GAAG;MACzBD,uBAAuB,EAAE,GAAG;MAC5BK,gBAAgB,EAAE,CAAC;MACnBU,eAAe,EAAE;IACnB,CAAC;IACDF,UAAU,EAAC;MACTzB,IAAI,EAAE,CAAC;MACPU,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BE,oBAAoB,EAAE,CAAC;MACvBD,uBAAuB,EAAE,CAAC;MAC1BK,gBAAgB,EAAE;IACpB;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACL5B,QAAQ,CAACH,aAAa,GAAG,GAAG,EAAE,EAAE,EAAE;IAChCsC,WAAW,EAAE;MACXd,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BE,oBAAoB,EAAE,CAAC;MACvBD,uBAAuB,EAAE;IAC3B,CAAa;IACba,UAAU,EAAE;MACVzB,IAAI,EAAE,CAAC;MACPU,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBE,oBAAoB,EAAE,GAAG;MACzBD,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
@@ -11,12 +11,20 @@ export default class WmText extends BaseInputComponent {
11
11
  constructor(props) {
12
12
  super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());
13
13
  }
14
+ getStyleClassName() {
15
+ const classes = [];
16
+ if (this.state.props.floatinglabel) {
17
+ classes.push('app-text-with-label');
18
+ }
19
+ classes.push(super.getStyleClassName());
20
+ return classes.join(' ');
21
+ }
14
22
  renderWidget(props) {
15
23
  var _this$state$textValue;
16
24
  let opts = {};
17
25
  const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
18
26
  opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
19
- return /*#__PURE__*/React.createElement(WMTextInput, _extends({
27
+ return /*#__PURE__*/React.createElement(WMTextInput, _extends({}, this.getTestPropsForInput(), {
20
28
  ref: ref => {
21
29
  this.widgetRef = ref;
22
30
  // @ts-ignore
@@ -26,6 +34,9 @@ export default class WmText extends BaseInputComponent {
26
34
  }
27
35
  }
28
36
  }, opts, {
37
+ floatingLabel: props.floatinglabel,
38
+ floatingLabelStyle: this.styles.floatingLabel,
39
+ activeFloatingLabelStyle: this.styles.activeFloatingLabel,
29
40
  placeholderTextColor: this.styles.placeholderText.color,
30
41
  style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid],
31
42
  keyboardType: this.state.keyboardType,
@@ -1 +1 @@
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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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
+ {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","styles","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","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 public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\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 {...this.getTestPropsForInput()}\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 floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\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.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C,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,CAAC9B,MAAM,CAAC+B,IAAI,CAACC,UAAU,KAAK;IAAO,EAC/D,CAAC;EAER;AACF"}
@@ -5,6 +5,7 @@ import BaseInputProps from "@wavemaker/app-rn-runtime/components/input/baseinput
5
5
  export default class WmTextProps extends BaseInputProps {
6
6
  constructor() {
7
7
  super(...arguments);
8
+ _defineProperty(this, "floatinglabel", void 0);
8
9
  _defineProperty(this, "placeholder", 'Enter text');
9
10
  }
10
11
  }
@@ -1 +1 @@
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"}
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 floatinglabel?: string;\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;IAAAA,eAAA,sBAEhC,YAAY;EAAA;AACpC"}
@@ -4,8 +4,12 @@ export const DEFAULT_CLASS = 'app-text';
4
4
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
5
  const defaultStyles = defineStyles({
6
6
  root: {
7
- padding: 12,
7
+ minHeight: 42,
8
+ paddingTop: 8,
9
+ paddingBottom: 8,
8
10
  borderWidth: 1,
11
+ paddingLeft: 16,
12
+ paddingRight: 16,
9
13
  borderStyle: 'solid',
10
14
  borderColor: themeVariables.inputBorderColor,
11
15
  backgroundColor: themeVariables.inputBackgroundColor,
@@ -21,6 +25,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
21
25
  placeholderText: {
22
26
  color: themeVariables.inputPlaceholderColor
23
27
  },
28
+ floatingLabel: {},
29
+ activeFloatingLabel: {},
24
30
  skeleton: {
25
31
  root: {
26
32
  width: '100%',
@@ -40,5 +46,20 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
40
46
  textAlign: 'right'
41
47
  }
42
48
  });
49
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
50
+ root: {
51
+ minHeight: 48
52
+ },
53
+ floatingLabel: {
54
+ position: 'absolute',
55
+ top: 12,
56
+ left: 16,
57
+ fontSize: 14,
58
+ color: themeVariables.floatingLabelColor
59
+ },
60
+ activeFloatingLabel: {
61
+ color: themeVariables.activeFloatingLabelColor
62
+ }
63
+ });
43
64
  });
44
65
  //# 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","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 any 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
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"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 floatingLabel: AllStyle;\n activeFloatingLabel: 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 minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n paddingLeft: 16,\n paddingRight: 16,\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 floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any 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 addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48,\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAYxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,I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,QAAQ,EAAE,EAAE;MACZK,KAAK,EAAExB,cAAc,CAACoC;IACxB,CAAC;IACDT,mBAAmB,EAAE;MACnBH,KAAK,EAAExB,cAAc,CAACqC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -11,12 +11,20 @@ export default class WmTextarea extends BaseInputComponent {
11
11
  constructor(props) {
12
12
  super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());
13
13
  }
14
+ getStyleClassName() {
15
+ const classes = [];
16
+ if (this.state.props.floatinglabel) {
17
+ classes.push('app-textarea-with-label');
18
+ }
19
+ classes.push(super.getStyleClassName());
20
+ return classes.join(' ');
21
+ }
14
22
  renderWidget(props) {
15
23
  var _this$state$textValue;
16
24
  let opts = {};
17
25
  const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
18
26
  opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
19
- return /*#__PURE__*/React.createElement(WMTextInput, _extends({
27
+ return /*#__PURE__*/React.createElement(WMTextInput, _extends({}, this.getTestPropsForInput(), {
20
28
  ref: ref => {
21
29
  this.widgetRef = ref;
22
30
  // @ts-ignore
@@ -31,6 +39,9 @@ export default class WmTextarea extends BaseInputComponent {
31
39
  numberOfLines: 4,
32
40
  keyboardType: this.state.keyboardType
33
41
  }, opts, {
42
+ floatingLabel: props.floatinglabel,
43
+ floatingLabelStyle: this.styles.floatingLabel,
44
+ activeFloatingLabelStyle: this.styles.activeFloatingLabel,
34
45
  autoComplete: props.autocomplete ? 'username' : 'off',
35
46
  autoFocus: props.autofocus,
36
47
  editable: props.disabled || props.readonly ? false : true,
@@ -1 +1 @@
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,CAACD,KAAsB,EAAE;IAAA,IAAAE,qBAAA;IACnC,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,oBAASnB,KAAA,CAAAoB,aAAA,CAACd,WAAW,EAAAe,QAAA;MACnBC,GAAG,EAAGA,GAAQ,IAAK;QAAC,IAAI,CAACC,SAAS,GAAGD,GAAG;QACtC;QACA,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,GAA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InputComponent","BaseInputState","WMTextInput","isNull","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","text","isValid","invalid","multiline","numberOfLines","keyboardType","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","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 public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-textarea-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\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 {...this.getTestPropsForInput()}\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 floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\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;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,yBAAyB,CAAC;IACzC;IACAH,OAAO,CAACG,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ElC,KAAK,CAACI,aAAc;MACnC+B,kBAAkB,EAAE,IAAI,CAACZ,MAAM,CAACW,aAAc;MAC9CE,wBAAwB,EAAE,IAAI,CAACb,MAAM,CAACc,mBAAoB;MAC1DC,YAAY,EAAEtC,KAAK,CAACuC,YAAY,GAAG,UAAU,GAAG,KAAM;MACtDC,SAAS,EAAExC,KAAK,CAACyC,SAAU;MAC3BC,QAAQ,EAAE1C,KAAK,CAAC2C,QAAQ,IAAI3C,KAAK,CAAC4C,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,SAAS,EAAE7C,KAAK,CAAC8C,QAAS;MAC1BC,WAAW,EAAE/C,KAAK,CAAC+C,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,CAAChC,MAAM,CAACK,IAAI,CAAC4B,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF"}
@@ -5,6 +5,7 @@ import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput
5
5
  export default class WmTextareaProps extends BaseInputProps {
6
6
  constructor() {
7
7
  super(...arguments);
8
+ _defineProperty(this, "floatinglabel", void 0);
8
9
  _defineProperty(this, "placeholder", 'Place your text');
9
10
  }
10
11
  }
@@ -1 +1 @@
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"}
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 floatinglabel?: string;\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;IAAAA,eAAA,sBAEpC,iBAAiB;EAAA;AACzC"}
@@ -17,6 +17,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
17
17
  fontSize: 16,
18
18
  textAlignVertical: 'top'
19
19
  },
20
+ floatingLabel: {},
21
+ activeFloatingLabel: {},
20
22
  invalid: {
21
23
  borderBottomColor: 'red'
22
24
  },
@@ -42,5 +44,20 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
42
44
  textAlign: 'right'
43
45
  }
44
46
  });
47
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
48
+ text: {
49
+ paddingTop: 24
50
+ },
51
+ floatingLabel: {
52
+ position: 'absolute',
53
+ top: 12,
54
+ left: 16,
55
+ fontSize: 14,
56
+ color: themeVariables.floatingLabelColor
57
+ },
58
+ activeFloatingLabel: {
59
+ color: themeVariables.activeFloatingLabelColor
60
+ }
61
+ });
45
62
  });
46
63
  //# 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","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 any 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,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;EACFzB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAC;MACHwB,SAAS,EAAE;IACb;EACF,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","floatingLabel","activeFloatingLabel","invalid","borderBottomColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"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 floatingLabel: AllStyle;\n activeFloatingLabel: 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 floatingLabel: {},\n activeFloatingLabel: {},\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 any 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 addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAw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