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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/actions/notification-action.js.map +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
  7. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
  9. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel.component.js +214 -69
  11. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
  13. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel.styles.js +22 -10
  15. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  16. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  17. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  18. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  19. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  20. app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
  21. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
  23. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  24. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  25. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  26. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  27. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  28. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  29. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  30. app-rn-runtime/components/basic/button/button.component.js +20 -7
  31. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  32. app-rn-runtime/components/basic/button/button.styles.js +15 -5
  33. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
  35. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  36. app-rn-runtime/components/basic/icon/icon.component.js +11 -5
  37. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  38. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  39. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  40. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  41. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  42. app-rn-runtime/components/basic/label/label.component.js +79 -11
  43. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  44. app-rn-runtime/components/basic/label/label.props.js +1 -0
  45. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  46. app-rn-runtime/components/basic/label/label.styles.js +5 -0
  47. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  48. app-rn-runtime/components/basic/message/message.component.js +6 -3
  49. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  50. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  51. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
  53. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  54. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  55. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  57. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  58. app-rn-runtime/components/basic/search/search.component.js +12 -6
  59. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  60. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  61. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  62. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  63. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  64. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  65. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/video/video.component.js +2 -1
  67. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  68. app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  70. app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
  71. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
  75. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  76. app-rn-runtime/components/chart/basechart.component.js +158 -46
  77. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  78. app-rn-runtime/components/chart/basechart.props.js +18 -4
  79. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  80. app-rn-runtime/components/chart/basechart.styles.js +44 -2
  81. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
  83. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  84. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
  85. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
  87. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  89. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  90. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
  91. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  92. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  93. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  94. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +275 -0
  95. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
  96. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +17 -0
  97. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
  98. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
  99. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
  100. app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
  101. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  102. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
  103. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/container.component.js +14 -4
  105. app-rn-runtime/components/container/container.component.js.map +1 -1
  106. app-rn-runtime/components/container/container.props.js +1 -0
  107. app-rn-runtime/components/container/container.props.js.map +1 -1
  108. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  109. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  110. app-rn-runtime/components/container/panel/panel.component.js +44 -62
  111. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  112. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  113. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  114. app-rn-runtime/components/container/partial-host.component.js +1 -1
  115. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
  117. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  118. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
  119. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  120. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  121. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  122. app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
  123. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  124. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
  125. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  126. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  127. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  128. app-rn-runtime/components/container/wizard/wizard.component.js +139 -22
  129. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  130. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  131. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  132. app-rn-runtime/components/container/wizard/wizard.styles.js +117 -6
  133. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  134. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
  135. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  136. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
  137. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  138. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  139. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  140. app-rn-runtime/components/data/card/card.component.js +3 -2
  141. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  143. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  144. app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
  145. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  146. app-rn-runtime/components/data/form/form.component.js +12 -6
  147. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  150. app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
  151. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.component.js +93 -31
  153. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.props.js +7 -0
  155. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  156. app-rn-runtime/components/data/list/list.styles.js +12 -5
  157. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  158. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  159. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  160. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  161. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  162. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  163. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  164. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  165. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  166. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  167. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  168. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  169. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  170. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  171. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  172. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  173. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  174. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  175. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  176. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
  177. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  178. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
  179. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  180. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
  181. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  182. app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
  183. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  184. app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
  185. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  186. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  187. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  188. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  189. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  190. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  191. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  192. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  193. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  194. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  195. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  196. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
  197. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  198. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
  199. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  200. app-rn-runtime/components/input/chips/chips.component.js +15 -4
  201. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  202. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  203. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  204. app-rn-runtime/components/input/composite/composite.component.js +8 -1
  205. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  206. app-rn-runtime/components/input/composite/composite.props.js +1 -0
  207. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  208. app-rn-runtime/components/input/composite/composite.styles.js +16 -1
  209. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  210. app-rn-runtime/components/input/currency/currency.component.js +21 -3
  211. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  212. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  213. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  214. app-rn-runtime/components/input/currency/currency.styles.js +31 -5
  215. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  216. app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
  217. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  218. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  219. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  220. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  221. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  222. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  223. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  224. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  225. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  226. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  227. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  228. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  229. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  230. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  231. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  232. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  233. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  234. app-rn-runtime/components/input/number/number.component.js +16 -2
  235. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  236. app-rn-runtime/components/input/number/number.props.js +1 -0
  237. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  238. app-rn-runtime/components/input/number/number.styles.js +23 -2
  239. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  240. app-rn-runtime/components/input/radioset/radioset.component.js +13 -6
  241. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  242. app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
  243. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  244. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -9
  245. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  246. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  247. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  248. app-rn-runtime/components/input/select/select.component.js +17 -13
  249. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  250. app-rn-runtime/components/input/select/select.styles.js +8 -4
  251. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  252. app-rn-runtime/components/input/slider/slider.component.js +99 -23
  253. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  254. app-rn-runtime/components/input/slider/slider.styles.js +30 -3
  255. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  256. app-rn-runtime/components/input/switch/switch.component.js +11 -5
  257. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  258. app-rn-runtime/components/input/switch/switch.styles.js +15 -9
  259. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  260. app-rn-runtime/components/input/text/text.component.js +12 -1
  261. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  262. app-rn-runtime/components/input/text/text.props.js +1 -0
  263. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  264. app-rn-runtime/components/input/text/text.styles.js +22 -1
  265. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  266. app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
  267. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  268. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  269. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  270. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  271. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  272. app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
  273. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  274. app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
  275. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  276. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
  277. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  278. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  279. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  280. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
  281. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  282. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  283. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  284. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  285. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  286. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  287. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  288. app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
  289. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  290. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  291. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  292. app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
  293. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  294. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  295. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  296. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  297. app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
  298. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  299. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  300. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  301. app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
  302. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  303. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  304. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  305. app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
  306. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  307. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  308. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  309. app-rn-runtime/components/page/tabbar/tabbar.styles.js +76 -1
  310. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  311. app-rn-runtime/core/base.component.js +84 -37
  312. app-rn-runtime/core/base.component.js.map +1 -1
  313. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  314. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  315. app-rn-runtime/core/components/textinput.component.js +25 -2
  316. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  317. app-rn-runtime/core/constant.service.js +22 -0
  318. app-rn-runtime/core/constant.service.js.map +1 -0
  319. app-rn-runtime/core/formatters.js +9 -2
  320. app-rn-runtime/core/formatters.js.map +1 -1
  321. app-rn-runtime/core/imageSizeEstimator.js +4 -0
  322. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  323. app-rn-runtime/core/key.extractor.js +22 -0
  324. app-rn-runtime/core/key.extractor.js.map +1 -0
  325. app-rn-runtime/core/tappable.component.js +49 -12
  326. app-rn-runtime/core/tappable.component.js.map +1 -1
  327. app-rn-runtime/core/testid.provider.js +5 -0
  328. app-rn-runtime/core/testid.provider.js.map +1 -0
  329. app-rn-runtime/core/utils.js +16 -0
  330. app-rn-runtime/core/utils.js.map +1 -1
  331. app-rn-runtime/gestures/swipe.animation.js +90 -16
  332. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  333. app-rn-runtime/package.json +6 -3
  334. app-rn-runtime/runtime/App.js +55 -22
  335. app-rn-runtime/runtime/App.js.map +1 -1
  336. app-rn-runtime/runtime/base-fragment.component.js +27 -6
  337. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  338. app-rn-runtime/runtime/base-page.component.js +25 -2
  339. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  340. app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
  341. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  342. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  343. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  344. app-rn-runtime/runtime/services/app-security.service.js +14 -3
  345. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  346. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  347. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  348. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  349. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  350. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  351. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  352. app-rn-runtime/styles/theme.js +66 -1
  353. app-rn-runtime/styles/theme.js.map +1 -1
  354. app-rn-runtime/styles/theme.variables.js +24 -3
  355. app-rn-runtime/styles/theme.variables.js.map +1 -1
  356. app-rn-runtime/variables/http.service.js +1 -1
  357. app-rn-runtime/variables/http.service.js.map +1 -1
  358. app-rn-runtime/variables/live-variable.js +1 -0
  359. app-rn-runtime/variables/live-variable.js.map +1 -1
  360. app-rn-runtime/variables/model-variable.js +13 -1
  361. app-rn-runtime/variables/model-variable.js.map +1 -1
  362. app-rn-runtime/variables/service-variable.js +1 -0
  363. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -12,7 +12,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
12
12
  borderColor: themeVariables.inputBorderColor,
13
13
  backgroundColor: themeVariables.inputBackgroundColor,
14
14
  borderRadius: 6,
15
- minWidth: 160
15
+ minWidth: 160,
16
+ alignItems: 'center'
16
17
  },
17
18
  invalid: {
18
19
  borderBottomColor: themeVariables.inputInvalidBorderColor
@@ -24,7 +25,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
24
25
  color: themeVariables.inputTextColor
25
26
  },
26
27
  checkIcon: {
27
- icon: {
28
+ text: {
28
29
  fontSize: 24,
29
30
  color: themeVariables.primaryColor
30
31
  }
@@ -37,12 +38,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
37
38
  height: '100%'
38
39
  },
39
40
  modalContent: {
40
- backgroundColor: themeVariables.selectDropdownBackgroundColor,
41
+ backgroundColor: themeVariables.inputBackgroundColor,
41
42
  borderRadius: 6,
42
43
  position: 'absolute',
43
44
  borderWidth: 1,
44
45
  borderStyle: 'solid',
45
- borderColor: themeVariables.selectBorderColor,
46
+ borderColor: themeVariables.inputBorderColor,
46
47
  width: '90%'
47
48
  },
48
49
  selectItem: {
@@ -64,6 +65,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
64
65
  color: themeVariables.selectItemTextColor,
65
66
  flex: 1
66
67
  },
68
+ selectedItem: {},
69
+ selectedItemText: {},
67
70
  placeholderText: {
68
71
  color: themeVariables.inputPlaceholderColor
69
72
  },
@@ -71,6 +74,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
71
74
  arrowButton: {
72
75
  root: {
73
76
  padding: 0,
77
+ minHeight: 0,
74
78
  alignItems: 'center',
75
79
  alignSelf: 'center',
76
80
  justifyContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","minWidth","invalid","borderBottomColor","inputInvalidBorderColor","text","fontSize","fontFamily","baseFont","flex","color","inputTextColor","checkIcon","icon","primaryColor","disabledText","inputDisabledBgColor","modal","height","modalContent","selectDropdownBackgroundColor","position","selectBorderColor","width","selectItem","paddingHorizontal","paddingVertical","borderBottomWidth","borderBottomStyle","selecttemBorderColor","alignItems","lastSelectItem","selectItemText","selectItemTextColor","placeholderText","inputPlaceholderColor","dropDownContent","arrowButton","alignSelf","justifyContent","OS","textAlign"],"sources":["select.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmSelectStyles = BaseStyles & {\n arrowButton: WmButtonStyles;\n modal: AllStyle;\n modalContent: AllStyle;\n checkIcon: WmIconStyles;\n selectItem: AllStyle;\n lastSelectItem: AllStyle,\n selectItemText: AllStyle;\n dropDownContent: AllStyle;\n disabledText: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-select';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSelectStyles = defineStyles({\n root: {\n flexDirection: 'row',\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n minWidth: 160\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n text: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n flex: 1,\n color: themeVariables.inputTextColor\n },\n checkIcon: {\n icon: {\n fontSize: 24,\n color: themeVariables.primaryColor\n }\n } as WmIconStyles,\n disabledText: {\n backgroundColor : themeVariables.inputDisabledBgColor\n },\n modal: {\n backgroundColor: 'rgba(0, 0, 0, 0.3)',\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.selectDropdownBackgroundColor,\n borderRadius: 6,\n position: 'absolute',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.selectBorderColor,\n width: '90%'\n },\n selectItem: {\n width: '100%',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: themeVariables.selecttemBorderColor,\n flexDirection: 'row',\n alignItems: 'center'\n },\n lastSelectItem: {\n borderBottomWidth: 0\n },\n selectItemText: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n color: themeVariables.selectItemTextColor,\n flex: 1\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n dropDownContent: {},\n arrowButton: {\n root: {\n padding: 0,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\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', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n }\n }:{\n text:{\n textAlign:'left',\n }\n });\n});\n"],"m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Style","themeVariables","addStyle","defaultStyles","root","flexDirection","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","minWidth","alignItems","invalid","borderBottomColor","inputInvalidBorderColor","text","fontSize","fontFamily","baseFont","flex","color","inputTextColor","checkIcon","primaryColor","disabledText","inputDisabledBgColor","modal","height","modalContent","position","width","selectItem","paddingHorizontal","paddingVertical","borderBottomWidth","borderBottomStyle","selecttemBorderColor","lastSelectItem","selectItemText","selectItemTextColor","selectedItem","selectedItemText","placeholderText","inputPlaceholderColor","dropDownContent","arrowButton","minHeight","alignSelf","justifyContent","OS","textAlign"],"sources":["select.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmSelectStyles = BaseStyles & {\n arrowButton: WmButtonStyles;\n modal: AllStyle;\n modalContent: AllStyle;\n checkIcon: WmIconStyles;\n selectItem: AllStyle;\n lastSelectItem: AllStyle,\n selectItemText: AllStyle;\n selectedItem: AllStyle;\n selectedItemText: AllStyle;\n dropDownContent: AllStyle;\n disabledText: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-select';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSelectStyles = defineStyles({\n root: {\n flexDirection: 'row',\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n minWidth: 160,\n alignItems: 'center'\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n text: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n flex: 1,\n color: themeVariables.inputTextColor\n },\n checkIcon: {\n text: {\n fontSize: 24,\n color: themeVariables.primaryColor\n }\n } as WmIconStyles,\n disabledText: {\n backgroundColor : themeVariables.inputDisabledBgColor\n },\n modal: {\n backgroundColor: 'rgba(0, 0, 0, 0.3)',\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n position: 'absolute',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n width: '90%'\n },\n selectItem: {\n width: '100%',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: themeVariables.selecttemBorderColor,\n flexDirection: 'row',\n alignItems: 'center'\n },\n lastSelectItem: {\n borderBottomWidth: 0\n },\n selectItemText: {\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n color: themeVariables.selectItemTextColor,\n flex: 1\n },\n selectedItem: {},\n selectedItemText:{},\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n dropDownContent: {},\n arrowButton: {\n root: {\n padding: 0,\n minHeight: 0,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\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', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n }\n }:{\n text:{\n textAlign:'left',\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AAmBvC,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK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DnC,aAAa,EAAE,KAAK;MACpBU,UAAU,EAAE;IACd,CAAC;IACD0B,cAAc,EAAE;MACdH,iBAAiB,EAAE;IACrB,CAAC;IACDI,cAAc,EAAE;MACdtB,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAEpB,cAAc,CAACqB,QAAQ;MACnCE,KAAK,EAAEvB,cAAc,CAAC0C,mBAAmB;MACzCpB,IAAI,EAAE;IACR,CAAC;IACDqB,YAAY,EAAE,CAAC,CAAC;IAChBC,gBAAgB,EAAC,CAAC,CAAC;IACnBC,eAAe,EAAE;MACftB,KAAK,EAAEvB,cAAc,CAAC8C;IACxB,CAAC;IACDC,eAAe,EAAE,CAAC,CAAC;IACnBC,WAAW,EAAE;MACX7C,IAAI,EAAE;QACJE,OAAO,EAAE,CAAC;QACV4C,SAAS,EAAE,CAAC;QACZnC,UAAU,EAAE,QAAQ;QACpBoC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBzC,eAAe,EAAE;MACnB;IACF;EACF,CAAC,CAAC;EAEFT,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLO,eAAe,EAAEV,cAAc,CAAC4B;IAClC;EACJ,CAAC,CAAC;EACF3B,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACuD,EAAE,IAAE,KAAK,GAAC;IACtDlC,IAAI,EAAC;MACHmC,SAAS,EAAC;IACZ;EACF,CAAC,GAAC;IACAnC,IAAI,EAAC;MACHmC,SAAS,EAAC;IACZ;EACF,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,18 +1,29 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
5
  import React from 'react';
5
- import { View, Text, Platform } from 'react-native';
6
+ import { View, Text, TouchableOpacity, Animated } from 'react-native';
6
7
  import { debounce, isNumber, isNil } from 'lodash';
7
- import Slider from '@react-native-community/slider';
8
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
9
+ import { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';
8
10
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
9
11
  import WmSliderProps from './slider.props';
10
12
  import { DEFAULT_CLASS } from './slider.styles';
11
- export class WmSliderState extends BaseComponentState {}
13
+ import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
14
+ export class WmSliderState extends BaseComponentState {
15
+ constructor() {
16
+ super(...arguments);
17
+ _defineProperty(this, "track", void 0);
18
+ }
19
+ }
12
20
  export default class WmSlider extends BaseComponent {
13
21
  constructor(props) {
14
22
  super(props, DEFAULT_CLASS, new WmSliderProps());
15
23
  _defineProperty(this, "valueBeforeSlide", 0);
24
+ _defineProperty(this, "position", new Animated.Value(0));
25
+ _defineProperty(this, "trackGesture", Gesture.Pan());
26
+ _defineProperty(this, "knobGesture", Gesture.Pan());
16
27
  _defineProperty(this, "onChange", debounce(value => {
17
28
  if (this.state.props.datavalue !== value) {
18
29
  this.updateState({
@@ -23,8 +34,42 @@ export default class WmSlider extends BaseComponent {
23
34
  this.props.onFieldChange && this.props.onFieldChange('datavalue', value, this.state.props.datavalue);
24
35
  }
25
36
  }, 200));
26
- _defineProperty(this, "onBeforeSlide", () => this.valueBeforeSlide = this.props.datavalue);
27
- _defineProperty(this, "onAfterSlide", () => this.valueBeforeSlide = 0);
37
+ _defineProperty(this, "onLayoutChange", e => {
38
+ const layout = e.nativeEvent.layout;
39
+ this.updateState({
40
+ track: {
41
+ top: isWebPreviewMode() ? layout.top : layout.y,
42
+ left: isWebPreviewMode() ? layout.left : layout.x,
43
+ width: layout.width,
44
+ height: layout.height
45
+ }
46
+ }, () => this.computePosition(this.state.props.datavalue));
47
+ });
48
+ this.configureGesture(this.trackGesture);
49
+ this.configureGesture(this.knobGesture);
50
+ }
51
+ getValueFromGesture(positionX) {
52
+ if (this.state.track) {
53
+ const factor = (positionX - this.state.track.left) / this.state.track.width;
54
+ const props = this.state.props;
55
+ const step = props.step || (props.maxvalue - props.minvalue) / 100;
56
+ let value = Math.round((factor * props.maxvalue + props.minvalue) / step) * step;
57
+ return Math.max(Math.min(props.maxvalue, value), props.minvalue);
58
+ }
59
+ return 0;
60
+ }
61
+ configureGesture(gesture) {
62
+ gesture.maxPointers(1).minDistance(0).onChange(e => {
63
+ const value = this.getValueFromGesture(e.absoluteX);
64
+ this.computePosition(value);
65
+ this.forceUpdate();
66
+ }).onEnd(e => {
67
+ if (this.state.track) {
68
+ const value = this.getValueFromGesture(e.absoluteX);
69
+ this.onChange(value);
70
+ this.forceUpdate();
71
+ }
72
+ });
28
73
  }
29
74
  getDataValue() {
30
75
  if (isNil(this.props.datavalue)) {
@@ -41,9 +86,19 @@ export default class WmSlider extends BaseComponent {
41
86
  case 'maxvalue':
42
87
  case 'minvalue':
43
88
  this.setProp('datavalue', this.getDataValue() || 0);
89
+ this.computePosition(this.state.props.datavalue);
44
90
  }
45
91
  }
92
+ computePosition(datavalue) {
93
+ var _this$state$track, _this$position;
94
+ const props = this.state.props;
95
+ const width = ((_this$state$track = this.state.track) === null || _this$state$track === void 0 ? void 0 : _this$state$track.width) || 0;
96
+ const value = (datavalue - props.minvalue) / props.maxvalue * width;
97
+ (_this$position = this.position) === null || _this$position === void 0 ? void 0 : _this$position.setValue(isNaN(value) ? 0 : value);
98
+ }
46
99
  renderWidget(props) {
100
+ var _this$state$track2;
101
+ const width = ((_this$state$track2 = this.state.track) === null || _this$state$track2 === void 0 ? void 0 : _this$state$track2.width) || 0;
47
102
  return /*#__PURE__*/React.createElement(View, {
48
103
  style: this.styles.root
49
104
  }, this._background, /*#__PURE__*/React.createElement(View, {
@@ -51,27 +106,48 @@ export default class WmSlider extends BaseComponent {
51
106
  flexDirection: 'row',
52
107
  justifyContent: 'space-between'
53
108
  }
54
- }, /*#__PURE__*/React.createElement(Text, {
109
+ }, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestProps('min'), {
55
110
  style: [this.styles.text, this.styles.minimumValue]
56
- }, props.minvalue), /*#__PURE__*/React.createElement(Text, {
111
+ }), props.minvalue), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestProps('value'), {
57
112
  style: [this.styles.text, this.styles.value]
58
- }, props.datavalue), /*#__PURE__*/React.createElement(Text, {
113
+ }), props.datavalue), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestProps('max'), {
59
114
  style: [this.styles.text, this.styles.maximumValue]
60
- }, props.maxvalue)), /*#__PURE__*/React.createElement(Slider, {
61
- style: props.readonly || props.disabled ? this.styles.disabled : {},
62
- step: props.step,
63
- value: this.valueBeforeSlide || props.datavalue || 0,
64
- disabled: props.readonly,
65
- minimumValue: props.minvalue,
66
- inverted: this.isRTL && (Platform.OS == "android" || Platform.OS == "web"),
67
- maximumValue: props.maxvalue,
68
- onValueChange: this.onChange,
69
- thumbTintColor: this.styles.thumb.backgroundColor,
70
- onTouchStart: this.onBeforeSlide,
71
- onTouchEnd: this.onAfterSlide,
72
- minimumTrackTintColor: this.styles.minimumTrack.backgroundColor,
73
- maximumTrackTintColor: this.styles.maximumTrack.backgroundColor
74
- }));
115
+ }), props.maxvalue)), /*#__PURE__*/React.createElement(GestureDetector, {
116
+ gesture: this.trackGesture
117
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
118
+ activeOpacity: 1,
119
+ style: this.styles.track,
120
+ onLayout: this.onLayoutChange
121
+ }, this.getTestProps()), /*#__PURE__*/React.createElement(Animated.View, {
122
+ style: [this.styles.minimumTrack, {
123
+ width: width,
124
+ transform: [{
125
+ translateX: this.position.interpolate({
126
+ inputRange: [0, width],
127
+ outputRange: [-width, 0]
128
+ })
129
+ }]
130
+ }]
131
+ }), /*#__PURE__*/React.createElement(Animated.View, {
132
+ style: [this.styles.maximumTrack, {
133
+ width: width,
134
+ transform: [{
135
+ translateX: this.position
136
+ }]
137
+ }]
138
+ }))), /*#__PURE__*/React.createElement(GestureDetector, {
139
+ gesture: this.knobGesture
140
+ }, /*#__PURE__*/React.createElement(Animated.View, {
141
+ style: [this.styles.thumb, {
142
+ transform: [{
143
+ translateX: this.position
144
+ }]
145
+ }]
146
+ }, /*#__PURE__*/React.createElement(BackgroundComponent, {
147
+ size: this.styles.thumb.backgroundSize,
148
+ position: this.styles.thumb.backgroundPosition,
149
+ image: this.styles.thumb.backgroundImage
150
+ }))));
75
151
  }
76
152
  }
77
153
  //# sourceMappingURL=slider.component.js.map
@@ -1 +1 @@
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,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AE;MACrEN,YAAY,EAAE9B,KAAK,CAACU,QAAS;MAC7B2B,aAAa,EAAE,IAAI,CAACC,QAAS;MAC7BC,cAAc,EAAE,IAAI,CAAChB,MAAM,CAACiB,KAAK,CAACC,eAA0B;MAC5DC,YAAY,EAAE,IAAI,CAACC,aAAc;MACjCC,UAAU,EAAE,IAAI,CAACC,YAAa;MAC9BC,qBAAqB,EAAE,IAAI,CAACvB,MAAM,CAACwB,YAAY,CAACN,eAA0B;MAC1EO,qBAAqB,EAAE,IAAI,CAACzB,MAAM,CAAC0B,YAAY,CAACR;IAA0B,CAC3E,CACG,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","View","Text","TouchableOpacity","Animated","debounce","isNumber","isNil","Gesture","GestureDetector","BackgroundComponent","BaseComponent","BaseComponentState","WmSliderProps","DEFAULT_CLASS","isWebPreviewMode","WmSliderState","constructor","arguments","_defineProperty","WmSlider","props","Value","Pan","value","state","datavalue","updateState","onFieldChange","e","layout","nativeEvent","track","top","y","left","x","width","height","computePosition","configureGesture","trackGesture","knobGesture","getValueFromGesture","positionX","factor","step","maxvalue","minvalue","Math","round","max","min","gesture","maxPointers","minDistance","onChange","absoluteX","forceUpdate","onEnd","getDataValue","onPropertyChange","name","$new","$old","invokeEventCallback","setProp","_this$state$track","_this$position","position","setValue","isNaN","renderWidget","_this$state$track2","createElement","style","styles","root","_background","flexDirection","justifyContent","_extends","getTestProps","text","minimumValue","maximumValue","activeOpacity","onLayout","onLayoutChange","minimumTrack","transform","translateX","interpolate","inputRange","outputRange","maximumTrack","thumb","size","backgroundSize","backgroundPosition","image","backgroundImage"],"sources":["slider.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, LayoutChangeEvent, TouchableOpacity, Animated, Easing } from 'react-native';\nimport { debounce, isNumber, isNil } from 'lodash';\nimport { Gesture, GestureDetector, PanGesture } from 'react-native-gesture-handler';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmSliderProps from './slider.props';\nimport { DEFAULT_CLASS, WmSliderStyles } from './slider.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmSliderState extends BaseComponentState<WmSliderProps> {\n track?: {\n top: number,\n left: number,\n width: number,\n height: number\n };\n}\n\nexport default class WmSlider extends BaseComponent<WmSliderProps, WmSliderState, WmSliderStyles> {\n valueBeforeSlide: number = 0;\n private position = new Animated.Value(0);\n private trackGesture = Gesture.Pan();\n private knobGesture = Gesture.Pan();\n\n constructor(props: WmSliderProps) {\n super(props, DEFAULT_CLASS, new WmSliderProps());\n this.configureGesture(this.trackGesture);\n this.configureGesture(this.knobGesture);\n }\n\n getValueFromGesture(positionX: number) {\n if (this.state.track) {\n const factor = (positionX - this.state.track.left) / this.state.track.width;\n const props = this.state.props;\n const step = props.step || (props.maxvalue - props.minvalue) / 100;\n let value = Math.round((factor * props.maxvalue + props.minvalue) / step) * step;\n return Math.max(Math.min(props.maxvalue, value), props.minvalue);\n }\n return 0;\n };\n\n configureGesture(gesture: PanGesture) {\n gesture\n .maxPointers(1)\n .minDistance(0)\n .onChange(e => {\n const value = this.getValueFromGesture(e.absoluteX);\n this.computePosition(value);\n this.forceUpdate();\n })\n .onEnd(e => {\n if (this.state.track) {\n const value = this.getValueFromGesture(e.absoluteX);\n this.onChange(value);\n this.forceUpdate();\n }\n })\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 this.computePosition(this.state.props.datavalue);\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 computePosition(datavalue: number) {\n const props = this.state.props;\n const width = this.state.track?.width || 0;\n const value = ((datavalue - props.minvalue) / props.maxvalue) * (width);\n this.position?.setValue(isNaN(value) ? 0 : value);\n }\n\n onLayoutChange = (e: LayoutChangeEvent) => {\n const layout = e.nativeEvent.layout;\n this.updateState({\n track: {\n top: isWebPreviewMode() ? (layout as any).top : layout.y,\n left: isWebPreviewMode() ? (layout as any).left : layout.x,\n width: layout.width,\n height: layout.height\n }\n } as WmSliderState, () => this.computePosition(this.state.props.datavalue));\n }\n\n renderWidget(props: WmSliderProps) {\n const width = this.state.track?.width || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={{flexDirection:'row', justifyContent:'space-between'}}>\n <Text {...this.getTestProps('min')} style={[this.styles.text, this.styles.minimumValue]}>{props.minvalue}</Text>\n <Text {...this.getTestProps('value')} style={[this.styles.text, this.styles.value]}>{props.datavalue}</Text>\n <Text {...this.getTestProps('max')} style={[this.styles.text, this.styles.maximumValue]}>{props.maxvalue}</Text>\n </View>\n <GestureDetector gesture={this.trackGesture}>\n <TouchableOpacity\n activeOpacity={1} \n style={this.styles.track}\n onLayout={this.onLayoutChange}\n {...this.getTestProps()}>\n <Animated.View style={[this.styles.minimumTrack, {\n width: width,\n transform: [{\n translateX: this.position.interpolate({\n inputRange: [0, width],\n outputRange: [-width, 0]\n })\n }]\n }]}></Animated.View>\n <Animated.View style={[this.styles.maximumTrack, {\n width: width,\n transform: [{\n translateX: this.position\n }]\n }]}></Animated.View>\n </TouchableOpacity>\n </GestureDetector>\n <GestureDetector gesture={this.knobGesture}>\n <Animated.View style={[this.styles.thumb, {\n transform: [{\n translateX: this.position\n }]\n }]}>\n <BackgroundComponent\n size={(this.styles.thumb as any).backgroundSize}\n position={(this.styles.thumb as any).backgroundPosition}\n image={(this.styles.thumb as any).backgroundImage}> \n </BackgroundComponent>\n </Animated.View>\n </GestureDetector>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAqBC,gBAAgB,EAAEC,QAAQ,QAAgB,cAAc;AAChG,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,QAAQ;AAClD,SAASC,OAAO,EAAEC,eAAe,QAAoB,8BAA8B;AACnF,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAO,MAAMC,aAAa,SAASJ,kBAAkB,CAAgB;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;EAAA;AAOrE;AAEA,eAAe,MAAMC,QAAQ,SAAST,aAAa,CAA+C;EAMhGM,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;IAACM,eAAA,2BANxB,CAAC;IAAAA,eAAA,mBACT,IAAIf,QAAQ,CAACkB,KAAK,CAAC,CAAC,CAAC;IAAAH,eAAA,uBACjBX,OAAO,CAACe,GAAG,CAAC,CAAC;IAAAJ,eAAA,sBACdX,OAAO,CAACe,GAAG,CAAC,CAAC;IAAAJ,eAAA,mBAyDxBd,QAAQ,CAAEmB,KAAa,IAAK;MACrC,IAAI,IAAI,CAACC,KAAK,CAACJ,KAAK,CAACK,SAAS,KAAKF,KAAK,EAAE;QACxC,IAAI,CAACG,WAAW,CAAC;UACfN,KAAK,EAAG;YACNK,SAAS,EAAEF;UACb;QACF,CAAkB,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B,QAAQ,EAAG,IAAI,CAACO,MAAM,CAACoB,KAAK,CAASG,kBAAmB;MACxDC,KAAK,EAAG,IAAI,CAACxB,MAAM,CAACoB,KAAK,CAASK;IAAgB,CAC/B,CACR,CACA,CACb,CAAC;EACT;AACF"}
@@ -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,C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AAG,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
+ {"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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A4C,aAAA,CAAC1C,IAAI;MAACyD,KAAK,EAAE,IAAI,CAACV,MAAM,CAACe;IAAK,GACnCD,KAAK,IAAIA,KAAK,CAACxB,MAAM,GACpBwB,KAAK,CAACE,GAAG,CAAC,CAACzC,IAAS,EAAEa,KAAU,KAAK,IAAI,CAACD,WAAW,CAACZ,IAAI,EAAEa,KAAK,CAAC,CAAC,GAAE,IACnE,CAAC;EACT;AACF"}
@@ -5,7 +5,8 @@ export const DEFAULT_CLASS = 'app-switch';
5
5
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
6
6
  const defaultStyles = defineStyles({
7
7
  root: {
8
- height: 38,
8
+ minHeight: 24,
9
+ padding: 4,
9
10
  flexDirection: 'row'
10
11
  },
11
12
  text: {
@@ -27,32 +28,37 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
27
28
  button: {
28
29
  backgroundColor: themeVariables.switchBgColor,
29
30
  color: themeVariables.switchTextColor,
30
- fontSize: 16,
31
+ fontSize: 14,
31
32
  minWidth: 64,
32
- borderRadius: 0,
33
+ minHeight: 40,
34
+ borderTopLeftRadius: 0,
35
+ borderBottomLeftRadius: 0,
36
+ borderBottomRightRadius: 0,
37
+ borderTopRightRadius: 0,
33
38
  borderColor: themeVariables.switchBorderColor,
34
39
  borderWidth: 1,
35
40
  borderRightWidth: 0,
36
- fontWeight: 'bold',
41
+ fontWeight: '500',
42
+ fontFamily: themeVariables.baseFont,
37
43
  justifyContent: 'center',
38
44
  alignItems: 'center'
39
45
  },
40
46
  selectedButton: {
41
47
  color: themeVariables.switchActiveTextColor,
42
48
  backgroundColor: themeVariables.switchActiveBgColor,
43
- borderColor: themeVariables.switchActiveBgColor
49
+ borderColor: themeVariables.switchBorderColor
44
50
  },
45
51
  firstButton: {
46
- borderTopLeftRadius: 6,
47
- borderBottomLeftRadius: 6,
52
+ borderTopLeftRadius: 18,
53
+ borderBottomLeftRadius: 18,
48
54
  borderTopRightRadius: 0,
49
55
  borderBottomRightRadius: 0
50
56
  },
51
57
  lastButton: {
52
58
  borderTopLeftRadius: 0,
53
59
  borderBottomLeftRadius: 0,
54
- borderTopRightRadius: 6,
55
- borderBottomRightRadius: 6,
60
+ borderTopRightRadius: 18,
61
+ borderBottomRightRadius: 18,
56
62
  borderRightWidth: 1
57
63
  }
58
64
  });
@@ -1 +1 @@
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,YAAY,CAAiB;IAC/DO,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACjB,CAAC;IACHC,WAAW,EAAE;MACXP,IAAI,EAAE;QACJQ,IAAI,EAAE,CAAC;QACPC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBL,QAAQ,EAAE;MACZ,CAAC;MACDF,IAAI,EAAE;QACJQ,KAAK,EAAEd,cAAc,CAACe;MACxB;IACF,CAAiB;IACjBC,MAAM,EAAE;MACNC,eAAe,EAAEjB,cAAc,CAACkB,aAAa;MAC7CJ,KAAK,EAAEd,cAAc,CAACmB,eAAe;MACrCX,QAAQ,EAAE,EAAE;MACZY,QAAQ,EAAE,EAAE;MACZC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAEtB,cAAc,CAACuB,iBAAiB;MAC7CC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBlB,UAAU,EAAE,MAAM;MAClBM,cAAc,EAAE,QAAQ;MACxBa,UAAU,EAAE;IACd,CAAa;IACbC,cAAc,EAAE;MACdb,KAAK,EAAEd,cAAc,CAAC4B,qBAAqB;MAC3CX,eAAe,EAAEjB,cAAc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G;MAC5BT,gBAAgB,EAAE,CAAC;MACnBY,eAAe,EAAE;IACnB,CAAC;IACDF,UAAU,EAAC;MACTxB,IAAI,EAAE,CAAC;MACPoB,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE,CAAC;MAC1BT,gBAAgB,EAAE;IACpB;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLxB,QAAQ,CAACH,aAAa,GAAG,GAAG,EAAE,EAAE,EAAE;IAChCgC,WAAW,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,IA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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,