@wavemaker/app-rn-runtime 12.0.0-next.141131 → 12.0.0-next.141138

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +32 -5
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  9. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  11. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  12. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  13. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  14. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +20 -6
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  18. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  19. app-rn-runtime/components/basic/icon/icon.component.js +14 -6
  20. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.component.js +13 -3
  22. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  23. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  24. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  25. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  26. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  27. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  28. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  29. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  30. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  31. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  32. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  33. app-rn-runtime/components/basic/search/search.component.js +10 -1
  34. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  35. app-rn-runtime/components/basic/search/search.props.js +3 -0
  36. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  37. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  38. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  39. app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
  40. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  41. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  42. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  43. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  44. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  45. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  46. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  47. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  48. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  49. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  50. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  51. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  52. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  53. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  54. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  55. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  56. app-rn-runtime/components/chart/basechart.component.js +54 -2
  57. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  58. app-rn-runtime/components/chart/basechart.props.js +3 -2
  59. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  60. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  61. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  62. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  63. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  64. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  65. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  66. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  67. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  68. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  69. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  70. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  71. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  72. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  73. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  74. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +6 -2
  75. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  76. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  77. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  78. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  79. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  80. app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
  81. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  82. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  83. app-rn-runtime/components/container/accordion/accordion.styles.js +5 -0
  84. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  85. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  86. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  87. app-rn-runtime/components/container/container.component.js +44 -3
  88. app-rn-runtime/components/container/container.component.js.map +1 -1
  89. app-rn-runtime/components/container/container.props.js +1 -0
  90. app-rn-runtime/components/container/container.props.js.map +1 -1
  91. app-rn-runtime/components/container/container.styles.js +7 -0
  92. app-rn-runtime/components/container/container.styles.js.map +1 -1
  93. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  94. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  95. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  96. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  97. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  98. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  99. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  100. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  101. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  102. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  103. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  104. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  105. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  106. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  107. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  108. app-rn-runtime/components/container/panel/panel.component.js +47 -6
  109. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  110. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  111. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  112. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  113. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  114. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +3 -4
  115. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  117. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  118. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  119. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  120. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  121. app-rn-runtime/components/container/tabs/tabs.component.js +44 -6
  122. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  123. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  124. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  125. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  126. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  127. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  128. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  129. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  130. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  131. app-rn-runtime/components/container/wizard/wizard.component.js +62 -13
  132. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  133. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  134. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  135. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  136. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
  137. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  138. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  139. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  140. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  141. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  142. app-rn-runtime/components/data/card/card.component.js +18 -0
  143. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  144. app-rn-runtime/components/data/card/card.styles.js +3 -0
  145. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  146. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  147. app-rn-runtime/components/data/form/form.component.js +1 -1
  148. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  149. app-rn-runtime/components/data/form/form.props.js +1 -0
  150. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  151. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  152. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  153. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  154. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  155. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  156. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  157. app-rn-runtime/components/data/list/list.component.js +54 -33
  158. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  159. app-rn-runtime/components/data/list/list.props.js +1 -0
  160. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  161. app-rn-runtime/components/data/list/list.styles.js +9 -0
  162. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  163. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  164. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  165. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  166. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  167. app-rn-runtime/components/input/baseinput/baseinput.component.js +57 -14
  168. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  169. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  170. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  171. app-rn-runtime/components/input/basenumber/basenumber.component.js +40 -14
  172. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  173. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  174. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  175. app-rn-runtime/components/input/checkbox/checkbox.component.js +7 -8
  176. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  177. app-rn-runtime/components/input/checkbox/checkbox.styles.js +3 -1
  178. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  179. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
  180. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  181. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  182. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  183. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  184. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  185. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  186. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  187. app-rn-runtime/components/input/currency/currency.component.js +19 -2
  188. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  189. app-rn-runtime/components/input/currency/currency.styles.js +6 -1
  190. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  191. app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -8
  192. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  193. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  194. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  195. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  196. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  197. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  198. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  199. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  200. app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
  201. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  202. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
  203. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  204. app-rn-runtime/components/input/number/number.component.js +9 -4
  205. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  206. app-rn-runtime/components/input/number/number.styles.js +3 -0
  207. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  208. app-rn-runtime/components/input/radioset/radioset.component.js +39 -14
  209. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  210. app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
  211. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  212. app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
  213. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  214. app-rn-runtime/components/input/select/select.component.js +23 -9
  215. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  216. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  217. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  218. app-rn-runtime/components/input/text/text.component.js +26 -2
  219. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  220. app-rn-runtime/components/input/text/text.props.js +3 -0
  221. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  222. app-rn-runtime/components/input/text/text.styles.js +3 -0
  223. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  224. app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
  225. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  226. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  227. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  228. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  229. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  230. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  231. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  232. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  233. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  234. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  235. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  236. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  237. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  238. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  239. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  240. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  241. app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
  242. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  243. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  244. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  245. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  246. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  247. app-rn-runtime/components/page/page.component.js.map +1 -1
  248. app-rn-runtime/components/page/page.props.js.map +1 -1
  249. app-rn-runtime/components/page/page.styles.js +7 -1
  250. app-rn-runtime/components/page/page.styles.js.map +1 -1
  251. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  252. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  253. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  254. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  255. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  256. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  257. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  258. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  259. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  260. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  261. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  262. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  263. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  264. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  265. app-rn-runtime/core/AppConfig.js.map +1 -1
  266. app-rn-runtime/core/base.component.js +35 -7
  267. app-rn-runtime/core/base.component.js.map +1 -1
  268. app-rn-runtime/core/components/textinput.component.js +13 -10
  269. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  270. app-rn-runtime/core/formatters.js.map +1 -1
  271. app-rn-runtime/core/key.extractor.js.map +1 -1
  272. app-rn-runtime/core/props.provider.js +4 -1
  273. app-rn-runtime/core/props.provider.js.map +1 -1
  274. app-rn-runtime/core/storage.service.js +15 -0
  275. app-rn-runtime/core/storage.service.js.map +1 -1
  276. app-rn-runtime/core/tappable.component.js +34 -27
  277. app-rn-runtime/core/tappable.component.js.map +1 -1
  278. app-rn-runtime/core/ui-preferences.context.js +7 -0
  279. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  280. app-rn-runtime/core/utils.js +87 -4
  281. app-rn-runtime/core/utils.js.map +1 -1
  282. app-rn-runtime/core/wm-component-tree.js +58 -0
  283. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  284. app-rn-runtime/package.json +39 -9
  285. app-rn-runtime/runtime/App.js +21 -10
  286. app-rn-runtime/runtime/App.js.map +1 -1
  287. app-rn-runtime/runtime/App.navigator.js +1 -0
  288. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  289. app-rn-runtime/runtime/base-fragment.component.js +61 -13
  290. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  291. app-rn-runtime/runtime/base-page.component.js +10 -0
  292. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  293. app-rn-runtime/runtime/base-partial.component.js +3 -0
  294. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  295. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  296. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  297. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  298. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  299. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  300. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  301. app-rn-runtime/runtime/services/app-security.service.js +42 -2
  302. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  303. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  304. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  305. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  306. app-rn-runtime/runtime/watcher.js.map +1 -1
  307. app-rn-runtime/styles/background.component.js +1 -0
  308. app-rn-runtime/styles/background.component.js.map +1 -1
  309. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  310. app-rn-runtime/styles/theme.js +10 -0
  311. app-rn-runtime/styles/theme.js.map +1 -1
  312. app-rn-runtime/styles/theme.variables.js +2 -1
  313. app-rn-runtime/styles/theme.variables.js.map +1 -1
  314. app-rn-runtime/variables/base-variable.js.map +1 -1
  315. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  316. app-rn-runtime/variables/device-variable.js.map +1 -1
  317. app-rn-runtime/variables/http.service.js +5 -1
  318. app-rn-runtime/variables/http.service.js.map +1 -1
  319. app-rn-runtime/variables/live-variable.js +14 -0
  320. app-rn-runtime/variables/live-variable.js.map +1 -1
  321. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","createRef","Text","View","ScrollView","DEFAULT_CLASS","BaseComponent","BaseComponentState","WmWheelPickerState","constructor","args","_defineProperty","WmWheelScrollPicker","props","event","selectedIdx","Math","round","nativeEvent","contentOffset","y","itemHeight","setState","selectedIndex","_this$props$onValueCh","_this$props","state","selectedData","data","onValueChange","call","wheelPickerRef","initialScrollTo","_this$wheelPickerRef","_this$wheelPickerRef$","current","scrollTo","animated","renderWidget","styles","wrapperHeight","scrollOffset","createElement","style","root","height","ref","scrollEventThrottle","contentContainerStyle","paddingVertical","showsVerticalScrollIndicator","onLayout","onScroll","handleWheelScroll","onMomentumScrollEnd","handleWheelMomentumEnd","decelerationRate","snapToInterval","map","item","index","isSelected","key","center","itemBg","selectedItemText","itemText","selectedItemBg","top"],"sources":["wheelpicker.component.tsx"],"sourcesContent":["import React, {createRef} from 'react';\nimport {\n NativeScrollEvent,\n NativeSyntheticEvent,\n Text,\n View,\n} from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport WmWheelPickerProps from './wheelpicker.props';\nimport { DEFAULT_CLASS, WmWheelPickerStyles } from './wheelpicker.styles';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport class WmWheelPickerState extends BaseComponentState<WmWheelPickerProps> {\n selectedIndex: number = 0;\n}\n\nexport class WmWheelScrollPicker extends BaseComponent<WmWheelPickerProps, WmWheelPickerState,\n WmWheelPickerStyles> {\n wheelPickerRef: any = null;\n\n constructor(props: WmWheelPickerProps) {\n super(props, DEFAULT_CLASS);\n\n this.wheelPickerRef = createRef();\n }\n\n initialScrollTo() {\n const props = this.props;\n const y = props.itemHeight * props.selectedIndex;\n this.wheelPickerRef?.current?.scrollTo?.({y: y, animated: false});\n this.setState({\n selectedIndex: props.selectedIndex || 0,\n });\n }\n\n handleWheelScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n // console.log('scroll =>', event.nativeEvent.contentOffset);\n const selectedIdx = Math.round(\n event.nativeEvent.contentOffset.y / this.props.itemHeight,\n );\n\n this.setState({\n selectedIndex: selectedIdx,\n });\n };\n\n handleWheelMomentumEnd = () => {\n const props = this.props;\n const state = this.state;\n\n const selectedData = props.data[state.selectedIndex];\n this.props.onValueChange?.(selectedData, state.selectedIndex);\n };\n\n renderWidget(props: WmWheelPickerProps) {\n const state = this.state;\n const styles = this.styles;\n const {data, wrapperHeight, itemHeight} = props;\n const scrollOffset = (wrapperHeight - itemHeight) / 2;\n\n return (\n <View style={[styles.root, {height: wrapperHeight}]}>\n <ScrollView\n ref={this.wheelPickerRef}\n scrollEventThrottle={16}\n contentContainerStyle={{paddingVertical: scrollOffset}}\n showsVerticalScrollIndicator={false}\n onLayout={() => this.initialScrollTo()}\n onScroll={this.handleWheelScroll}\n onMomentumScrollEnd={this.handleWheelMomentumEnd}\n decelerationRate=\"fast\"\n snapToInterval={itemHeight} // your snap points\n >\n {data.map((item, index) => {\n const isSelected = index === state.selectedIndex;\n\n return (\n <View\n key={`data_item_${index}`}\n style={[styles.center, styles.itemBg, {height: itemHeight}]}>\n <Text\n style={\n isSelected ? [styles.selectedItemText] : [styles.itemText]\n }>\n {item}\n </Text>\n </View>\n );\n })}\n </ScrollView>\n <View\n style={[\n styles.selectedItemBg,\n {\n height: itemHeight,\n top: scrollOffset,\n },\n ]}\n />\n </View>\n );\n }\n}\n\nexport default WmWheelScrollPicker;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAGC,SAAS,QAAO,OAAO;AACtC,SAGEC,IAAI,EACJC,IAAI,QACC,cAAc;AACrB,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,SAASC,aAAa,QAA6B,sBAAsB;AACzE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAO,MAAMC,kBAAkB,SAASD,kBAAkB,CAAqB;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,wBACrD,CAAC;EAAA;AAC3B;AAEA,OAAO,MAAMC,mBAAmB,SAASN,aAAa,CAChC;EAGpBG,WAAWA,CAACI,MAAyB,EAAE;IACrC,KAAK,CAACA,MAAK,EAAER,aAAa,CAAC;IAACM,eAAA,yBAHR,IAAI;IAAAA,eAAA,4BAiBLG,KAA8C,IAAK;MACtE;MACA,MAAMC,WAAW,GAAGC,IAAI,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,GAAG,CAAC1B,MAAM,CAAC2B,QAAQ;MAC1D,GACAP,IACG,CACF,CAAC;IAEX,CAAC,CACS,CAAC,eACb3D,KAAA,CAAA0C,aAAA,CAACvC,IAAI;MACHwC,KAAK,EAAE,CACLJ,MAAM,CAAC4B,cAAc,EACrB;QACEtB,MAAM,EAAExB,UAAU;QAClB+C,GAAG,EAAE3B;MACP,CAAC;IACD,CACH,CACG,CAAC;EAEX;AACF;AAEA,eAAe7B,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["React","createRef","Text","View","ScrollView","DEFAULT_CLASS","BaseComponent","BaseComponentState","WmWheelPickerState","constructor","args","_defineProperty","WmWheelScrollPicker","props","event","selectedIdx","Math","round","nativeEvent","contentOffset","y","itemHeight","setState","selectedIndex","_this$props$onValueCh","_this$props","state","selectedData","data","onValueChange","call","wheelPickerRef","initialScrollTo","_this$wheelPickerRef","_this$wheelPickerRef$","current","scrollTo","animated","renderWidget","styles","wrapperHeight","scrollOffset","createElement","style","root","height","ref","scrollEventThrottle","contentContainerStyle","paddingVertical","showsVerticalScrollIndicator","onLayout","onScroll","handleWheelScroll","onMomentumScrollEnd","handleWheelMomentumEnd","decelerationRate","snapToInterval","map","item","index","isSelected","key","center","itemBg","selectedItemText","itemText","selectedItemBg","top"],"sources":["wheelpicker.component.tsx"],"sourcesContent":["import React, {createRef} from 'react';\nimport {\n NativeScrollEvent,\n NativeSyntheticEvent,\n Text,\n View,\n} from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport WmWheelPickerProps from './wheelpicker.props';\nimport { DEFAULT_CLASS, WmWheelPickerStyles } from './wheelpicker.styles';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport class WmWheelPickerState extends BaseComponentState<WmWheelPickerProps> {\n selectedIndex: number = 0;\n}\n\nexport class WmWheelScrollPicker extends BaseComponent<WmWheelPickerProps, WmWheelPickerState,\n WmWheelPickerStyles> {\n wheelPickerRef: any = null;\n\n constructor(props: WmWheelPickerProps) {\n super(props, DEFAULT_CLASS);\n\n this.wheelPickerRef = createRef();\n }\n\n initialScrollTo() {\n const props = this.props;\n const y = props.itemHeight * props.selectedIndex;\n this.wheelPickerRef?.current?.scrollTo?.({y: y, animated: false});\n this.setState({\n selectedIndex: props.selectedIndex || 0,\n });\n }\n\n handleWheelScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n // console.log('scroll =>', event.nativeEvent.contentOffset);\n const selectedIdx = Math.round(\n event.nativeEvent.contentOffset.y / this.props.itemHeight,\n );\n\n this.setState({\n selectedIndex: selectedIdx,\n });\n };\n\n handleWheelMomentumEnd = () => {\n const props = this.props;\n const state = this.state;\n\n const selectedData = props.data[state.selectedIndex];\n this.props.onValueChange?.(selectedData, state.selectedIndex);\n };\n\n renderWidget(props: WmWheelPickerProps) {\n const state = this.state;\n const styles = this.styles;\n const {data, wrapperHeight, itemHeight} = props;\n const scrollOffset = (wrapperHeight - itemHeight) / 2;\n\n return (\n <View style={[styles.root, {height: wrapperHeight}]}>\n <ScrollView\n ref={this.wheelPickerRef}\n scrollEventThrottle={16}\n contentContainerStyle={{paddingVertical: scrollOffset}}\n showsVerticalScrollIndicator={false}\n onLayout={() => this.initialScrollTo()}\n onScroll={this.handleWheelScroll}\n onMomentumScrollEnd={this.handleWheelMomentumEnd}\n decelerationRate=\"fast\"\n snapToInterval={itemHeight} // your snap points\n >\n {data.map((item, index) => {\n const isSelected = index === state.selectedIndex;\n\n return (\n <View\n key={`data_item_${index}`}\n style={[styles.center, styles.itemBg, {height: itemHeight}]}>\n <Text\n style={\n isSelected ? [styles.selectedItemText] : [styles.itemText]\n }>\n {item}\n </Text>\n </View>\n );\n })}\n </ScrollView>\n <View\n style={[\n styles.selectedItemBg,\n {\n height: itemHeight,\n top: scrollOffset,\n },\n ]}\n />\n </View>\n );\n }\n}\n\nexport default WmWheelScrollPicker;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAGC,SAAS,QAAO,OAAO;AAC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uB;MACjDC,gBAAgB,EAAC,MAAM;MACvBC,cAAc,EAAEpC,UAAW,CAAC;IAAA,GAE3BO,IAAI,CAAC8B,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;MACzB,MAAMC,UAAU,GAAGD,KAAK,KAAKlC,KAAK,CAACH,aAAa;MAEhD,oBACEvB,KAAA,CAAA0C,aAAA,CAACvC,IAAI;QACH2D,GAAG,EAAE,aAAaF,KAAK,EAAG;QAC1BjB,KAAK,EAAE,CAACJ,MAAM,CAACwB,MAAM,EAAExB,MAAM,CAACyB,MAAM,EAAE;UAACnB,MAAM,EAAExB;QAAU,CAAC;MAAE,gBAC5DrB,KAAA,CAAA0C,aAAA,CAACxC,IAAI;QACHyC,KAAK,EACHkB,UAAU,GAAG,CAACtB,MAAM,CAAC0B,gBAAgB,CAAC,GAAG,CAAC1B,MAAM,CAAC2B,QAAQ;MAC1D,GACAP,IACG,CACF,CAAC;IAEX,CAAC,CACS,CAAC,eACb3D,KAAA,CAAA0C,aAAA,CAACvC,IAAI;MACHwC,KAAK,EAAE,CACLJ,MAAM,CAAC4B,cAAc,EACrB;QACEtB,MAAM,EAAExB,UAAU;QAClB+C,GAAG,EAAE3B;MACP,CAAC;IACD,CACH,CACG,CAAC;EAEX;AACF;AAEA,eAAe7B,mBAAmB","ignoreList":[]}
@@ -21,6 +21,8 @@ export class WmDatePickerModal extends BaseComponent {
21
21
  renderWidget() {
22
22
  const {
23
23
  isVisible,
24
+ minDate,
25
+ maxDate,
24
26
  onClose,
25
27
  onCancel,
26
28
  onSelect
@@ -49,6 +51,8 @@ export class WmDatePickerModal extends BaseComponent {
49
51
  }, /*#__PURE__*/React.createElement(Text, {
50
52
  style: styles.header
51
53
  }, "Select Date"), /*#__PURE__*/React.createElement(WmWheelDatePicker, {
54
+ minDate: minDate,
55
+ maxDate: maxDate,
52
56
  selectedDate: this.props.selectedDate || selectedDate,
53
57
  onDateChange: date => {
54
58
  this.setState({
@@ -1 +1 @@
1
- {"version":3,"names":["React","Modal","Text","TouchableWithoutFeedback","View","WmWheelDatePicker","WmButton","DEFAULT_CLASS","BaseComponent","BaseComponentState","WmDatePickerModalProps","WmDatePickerModalState","constructor","args","_defineProperty","Date","WmDatePickerModal","props","renderWidget","isVisible","onClose","onCancel","onSelect","selectedDate","state","styles","createElement","animationType","transparent","visible","onRequestClose","onDismiss","style","root","flex1","onPress","container","header","onDateChange","date","setState","buttonWrapper","cancelBtn","caption","onTap","selectBtn"],"sources":["date-picker-modal.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, Text, TouchableWithoutFeedback, View } from 'react-native';\nimport WmWheelDatePicker from '../../wheel-date-picker.component';\nimport WmButton from '../../../../basic/button/button.component';\nimport {\n DEFAULT_CLASS,\n WmDateTimePickerModalStyles,\n} from '../styles/datetime-picker-modal.styles';\nimport {\n BaseComponent,\n BaseComponentState,\n} from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmDatePickerModalProps from './date-picker-modal.props';\n\nexport class WmDatePickerModalState extends BaseComponentState<WmDatePickerModalProps> {\n selectedDate: Date = new Date();\n}\n\nexport class WmDatePickerModal extends BaseComponent<\n WmDatePickerModalProps,\n WmDatePickerModalState,\n WmDateTimePickerModalStyles\n> {\n constructor(props: WmDatePickerModalProps) {\n super(props, DEFAULT_CLASS, new WmDatePickerModalProps());\n }\n\n renderWidget() {\n const { isVisible, onClose, onCancel, onSelect } = this.props;\n const { selectedDate } = this.state;\n const { styles } = this;\n\n return (\n <Modal\n animationType=\"fade\"\n transparent={true}\n visible={isVisible}\n onRequestClose={onClose}\n onDismiss={onClose}\n >\n <View style={styles.root}>\n <TouchableWithoutFeedback style={styles.flex1} onPress={onClose}>\n <View style={styles.flex1} />\n </TouchableWithoutFeedback>\n <View style={styles.container}>\n <Text style={styles.header}>Select Date</Text>\n <WmWheelDatePicker\n selectedDate={this.props.selectedDate || selectedDate}\n onDateChange={(date) => {\n this.setState({ selectedDate: date });\n }}\n />\n <View style={styles.buttonWrapper}>\n <WmButton\n styles={styles.cancelBtn}\n caption=\"Cancel\"\n onTap={onCancel}\n />\n <WmButton\n styles={styles.selectBtn}\n caption=\"Select\"\n onTap={() => onSelect?.(selectedDate || this.props.selectedDate || new Date())}\n />\n </View>\n </View>\n </View>\n </Modal>\n );\n }\n}\n\nexport default WmDatePickerModal;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,EAAEC,wBAAwB,EAAEC,IAAI,QAAQ,cAAc;AAC1E,OAAOC,iBAAiB,MAAM,mCAAmC;AACjE,OAAOC,QAAQ,MAAM,2CAA2C;AAChE,SACEC,aAAa,QAER,wCAAwC;AAC/C,SACEC,aAAa,EACbC,kBAAkB,QACb,+CAA+C;AACtD,OAAOC,sBAAsB,MAAM,2BAA2B;AAE9D,OAAO,MAAMC,sBAAsB,SAASF,kBAAkB,CAAyB;EAAAG,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAChE,IAAIC,IAAI,CAAC,CAAC;EAAA;AACjC;AAEA,OAAO,MAAMC,iBAAiB,SAASR,aAAa,CAIlD;EACAI,WAAWA,CAACK,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAIG,sBAAsB,CAAC,CAAC,CAAC;EAC3D;EAEAQ,YAAYA,CAAA,EAAG;IACb,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACL,KAAK;IAC7D,MAAM;MAAEM;IAAa,CAAC,GAAG,IAAI,CAACC,KAAK;IACnC,MAAM;MAAEC;IAAO,CAAC,GAAG,IAAI;IAEvB,oBACEzB,KAAA,CAAA0B,aAAA,CAACzB,KAAK;MACJ0B,aAAa,EAAC,MAAM;MACpBC,WAAW,EAAE,IAAK;MAClBC,OAAO,EAAEV,SAAU;MACnBW,cAAc,EAAEV,OAAQ;MACxBW,SAAS,EAAEX;IAAQ,gBAE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ACF,CACD,CAAC;EAEZ;AACF;AAEA,eAAeC,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["React","Modal","Text","TouchableWithoutFeedback","View","WmWheelDatePicker","WmButton","DEFAULT_CLASS","BaseComponent","BaseComponentState","WmDatePickerModalProps","WmDatePickerModalState","constructor","args","_defineProperty","Date","WmDatePickerModal","props","renderWidget","isVisible","minDate","maxDate","onClose","onCancel","onSelect","selectedDate","state","styles","createElement","animationType","transparent","visible","onRequestClose","onDismiss","style","root","flex1","onPress","container","header","onDateChange","date","setState","buttonWrapper","cancelBtn","caption","onTap","selectBtn"],"sources":["date-picker-modal.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, Text, TouchableWithoutFeedback, View } from 'react-native';\nimport WmWheelDatePicker from '../../wheel-date-picker.component';\nimport WmButton from '../../../../basic/button/button.component';\nimport {\n DEFAULT_CLASS,\n WmDateTimePickerModalStyles,\n} from '../styles/datetime-picker-modal.styles';\nimport {\n BaseComponent,\n BaseComponentState,\n} from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmDatePickerModalProps from './date-picker-modal.props';\n\nexport class WmDatePickerModalState extends BaseComponentState<WmDatePickerModalProps> {\n selectedDate: Date = new Date();\n}\n\nexport class WmDatePickerModal extends BaseComponent<\n WmDatePickerModalProps,\n WmDatePickerModalState,\n WmDateTimePickerModalStyles\n> {\n constructor(props: WmDatePickerModalProps) {\n super(props, DEFAULT_CLASS, new WmDatePickerModalProps());\n }\n\n renderWidget() {\n const { isVisible, minDate, maxDate, onClose, onCancel, onSelect } = this.props;\n const { selectedDate } = this.state;\n const { styles } = this;\n\n return (\n <Modal\n animationType=\"fade\"\n transparent={true}\n visible={isVisible}\n onRequestClose={onClose}\n onDismiss={onClose}\n >\n <View style={styles.root}>\n <TouchableWithoutFeedback style={styles.flex1} onPress={onClose}>\n <View style={styles.flex1} />\n </TouchableWithoutFeedback>\n <View style={styles.container}>\n <Text style={styles.header}>Select Date</Text>\n <WmWheelDatePicker\n minDate={minDate}\n maxDate={maxDate}\n selectedDate={this.props.selectedDate || selectedDate}\n onDateChange={(date) => {\n this.setState({ selectedDate: date });\n }}\n />\n <View style={styles.buttonWrapper}>\n <WmButton\n styles={styles.cancelBtn}\n caption=\"Cancel\"\n onTap={onCancel}\n />\n <WmButton\n styles={styles.selectBtn}\n caption=\"Select\"\n onTap={() => onSelect?.(selectedDate || this.props.selectedDate || new Date())}\n />\n </View>\n </View>\n </View>\n </Modal>\n );\n }\n}\n\nexport default WmDatePickerModal;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,EAAEC,wBAAwB,EAAEC,IAAI,QAAQ,cAAc;AAC1E,OAAOC,iBAAiB,MAAM,mCAAmC;AACjE,OAAOC,QAAQ,MAAM,2CAA2C;AAChE,SACEC,aAAa,QAER,wCAAwC;AAC/C,SACEC,aAAa,EACbC,kBAAkB,QACb,+CAA+C;AACtD,OAAOC,sBAAsB,MAAM,2BAA2B;AAE9D,OAAO,MAAMC,sBAAsB,SAASF,kBAAkB,CAAyB;EAAAG,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAChE,IAAIC,IAAI,CAAC,CAAC;EAAA;AACjC;AAEA,OAAO,MAAMC,iBAAiB,SAASR,aAAa,CAIlD;EACAI,WAAWA,CAACK,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAIG,sBAAsB,CAAC,CAAC,CAAC;EAC3D;EAEAQ,YAAYA,CAAA,EAAG;IACb,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAEC,OAAO;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACP,KAAK;IAC/E,MAAM;MAAEQ;IAAa,CAAC,GAAG,IAAI,CAACC,KAAK;IACnC,MAAM;MAAEC;IAAO,CAAC,GAAG,IAAI;IAEvB,oBACE3B,KAAA,CAAA4B,aAAA,CAAC3B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U;MACzBF,OAAO,EAAC,QAAQ;MAChBC,KAAK,EAAEA,CAAA,KAAMtB,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGC,YAAY,IAAI,IAAI,CAACR,KAAK,CAACQ,YAAY,IAAI,IAAIV,IAAI,CAAC,CAAC;IAAE,CAChF,CACG,CACF,CACF,CACD,CAAC;EAEZ;AACF;AAEA,eAAeC,iBAAiB","ignoreList":[]}
@@ -6,6 +6,8 @@ export default class WmDatePickerModalProps extends BaseProps {
6
6
  constructor(...args) {
7
7
  super(...args);
8
8
  _defineProperty(this, "isVisible", false);
9
+ _defineProperty(this, "minDate", void 0);
10
+ _defineProperty(this, "maxDate", void 0);
9
11
  _defineProperty(this, "selectedDate", void 0);
10
12
  _defineProperty(this, "onClose", void 0);
11
13
  _defineProperty(this, "onSelect", void 0);
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmDatePickerModalProps","constructor","args","_defineProperty"],"sources":["date-picker-modal.props.ts"],"sourcesContent":["import { BaseProps } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport default class WmDatePickerModalProps extends BaseProps {\n isVisible: boolean = false;\n selectedDate?: any;\n onClose?: () => void;\n onSelect?: (date: Date) => void;\n onCancel?: () => void;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,sBAAsB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACvC,KAAK;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAK5B","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmDatePickerModalProps","constructor","args","_defineProperty"],"sources":["date-picker-modal.props.ts"],"sourcesContent":["import { BaseProps } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport default class WmDatePickerModalProps extends BaseProps {\n isVisible: boolean = false;\n minDate?: Date | string;\n maxDate?: Date | string;\n selectedDate?: any;\n onClose?: () => void;\n onSelect?: (date: Date) => void;\n onCancel?: () => void;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,sBAAsB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACvC,KAAK;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAO5B","ignoreList":[]}
@@ -8,6 +8,7 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
8
8
  import WmFileuploadProps from './fileupload.props';
9
9
  import { DEFAULT_CLASS } from './fileupload.styles';
10
10
  import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
11
+ import { getMimeType } from '@wavemaker/app-rn-runtime/core/utils';
11
12
  export class WmFileuploadState extends BaseComponentState {
12
13
  constructor(...args) {
13
14
  super(...args);
@@ -23,7 +24,8 @@ export default class WmFileupload extends BaseComponent {
23
24
  constructor(props) {
24
25
  super(props, DEFAULT_CLASS, new WmFileuploadProps());
25
26
  }
26
- onTap() {
27
+ onTap(props) {
28
+ namedParameters.type = getMimeType(props.contenttype);
27
29
  DocumentPicker.getDocumentAsync(namedParameters).then(response => {
28
30
  let selectedFile;
29
31
  if (Platform.OS !== 'web') {
@@ -51,7 +53,7 @@ export default class WmFileupload extends BaseComponent {
51
53
  caption: props.caption,
52
54
  styles: this.styles.button,
53
55
  iconsize: props.iconsize,
54
- onTap: this.onTap.bind(this)
56
+ onTap: () => this.onTap.bind(this)(props)
55
57
  }));
56
58
  }
57
59
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","View","DocumentPicker","BaseComponent","BaseComponentState","WmFileuploadProps","DEFAULT_CLASS","WmButton","WmFileuploadState","constructor","args","_defineProperty","namedParameters","copyToCacheDirectory","multiple","type","WmFileupload","props","onTap","getDocumentAsync","then","response","selectedFile","OS","assets","mimeType","file","invokeEventCallback","proxy","updateState","selectedFiles","bind","renderWidget","createElement","style","styles","root","_background","accessibilitylabel","caption","hint","id","getTestId","iconclass","button","iconsize"],"sources":["fileupload.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, View } from 'react-native';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFileuploadProps from './fileupload.props';\nimport { DEFAULT_CLASS, WmFileuploadStyles } from './fileupload.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nexport interface SelectFileOutput {\n mimeType: string;\n name: string;\n size: number;\n type: 'cancel' | 'success';\n uri: string;\n}\n\nexport class WmFileuploadState extends BaseComponentState<WmFileuploadProps> {\n selectedFiles: any;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport default class WmFileupload extends BaseComponent<WmFileuploadProps, WmFileuploadState, WmFileuploadStyles> {\n\n constructor(props: WmFileuploadProps) {\n super(props, DEFAULT_CLASS, new WmFileuploadProps());\n }\n\n onTap() {\n DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n let selectedFile;\n if (Platform.OS !== 'web') {\n selectedFile = response.assets[0];\n selectedFile.type = selectedFile.mimeType;\n } else {\n selectedFile = [response.assets[0].file];\n }\n this.invokeEventCallback('onBeforeselect', [null, this.proxy, selectedFile]);\n\n this.updateState({\n props: {\n selectedFiles: selectedFile\n }\n } as WmFileuploadState, this.invokeEventCallback.bind(this, 'onSelect', [null, this.proxy, selectedFile]));\n });\n }\n\n renderWidget(props: WmFileuploadProps) {\n return <View style={this.styles.root}>\n {this._background}\n <WmButton accessibilitylabel={props.accessibilitylabel || props.caption} hint = {props.hint} id={this.getTestId()} iconclass={props.iconclass} caption={props.caption} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onTap.bind(this)}></WmButton>\n </View>\n }\n}\n"],"mappings":";;;AAA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;QACjB;MACF,CAAC,EAAuB,IAAI,CAACK,mBAAmB,CAACI,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACH,KAAK,EAAEN,YAAY,CAAC,CAAC,CAAC;IAC5G,CAAC,CAAC;EACJ;EAEAU,YAAYA,CAACf,KAAwB,EAAE;IACrC,oBAAOlB,KAAA,CAAAkC,aAAA,CAAChC,IAAI;MAACiC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAClC,IAAI,CAACC,WAAW,eACjBtC,KAAA,CAAAkC,aAAA,CAAC1B,QAAQ;MAAC+B,kBAAkB,EAAErB,KAAK,CAACqB,kBAAkB,IAAIrB,KAAK,CAACsB,OAAQ;MAACC,IAAI,EAAIvB,KAAK,CAACuB,IAAK;MAACC,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,CAAE;MAACC,SAAS,EAAE1B,KAAK,CAAC0B,SAAU;MAACJ,OAAO,EAAEtB,KAAK,CAACsB,OAAQ;MAACJ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACS,MAAO;MAACC,QAAQ,EAAE5B,KAAK,CAAC4B,QAAS;MAAC3B,KAAK,EAAE,IAAI,CAACA,KAAK,CAACa,IAAI,CAAC,IAAI;IAAE,CAAW,CACjQ,CAAC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","View","DocumentPicker","BaseComponent","BaseComponentState","WmFileuploadProps","DEFAULT_CLASS","WmButton","getMimeType","WmFileuploadState","constructor","args","_defineProperty","namedParameters","copyToCacheDirectory","multiple","type","WmFileupload","props","onTap","contenttype","getDocumentAsync","then","response","selectedFile","OS","assets","mimeType","file","invokeEventCallback","proxy","updateState","selectedFiles","bind","renderWidget","createElement","style","styles","root","_background","accessibilitylabel","caption","hint","id","getTestId","iconclass","button","iconsize"],"sources":["fileupload.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, View } from 'react-native';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFileuploadProps from './fileupload.props';\nimport { DEFAULT_CLASS, WmFileuploadStyles } from './fileupload.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { getMimeType } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport interface SelectFileOutput {\n mimeType: string;\n name: string;\n size: number;\n type: 'cancel' | 'success';\n uri: string;\n}\n\nexport class WmFileuploadState extends BaseComponentState<WmFileuploadProps> {\n selectedFiles: any;\n}\n\ntype NamedParametersType = {\n copyToCacheDirectory: boolean,\n multiple: boolean,\n type: string | string[]\n};\n\nconst namedParameters: NamedParametersType = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport default class WmFileupload extends BaseComponent<WmFileuploadProps, WmFileuploadState, WmFileuploadStyles> {\n\n constructor(props: WmFileuploadProps) {\n super(props, DEFAULT_CLASS, new WmFileuploadProps());\n }\n\n onTap(props: WmFileuploadProps) {\n namedParameters.type = getMimeType(props.contenttype);\n DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n let selectedFile;\n if (Platform.OS !== 'web') {\n selectedFile = response.assets[0];\n selectedFile.type = selectedFile.mimeType;\n } else {\n selectedFile = [response.assets[0].file];\n }\n this.invokeEventCallback('onBeforeselect', [null, this.proxy, selectedFile]);\n\n this.updateState({\n props: {\n selectedFiles: selectedFile\n }\n } as WmFileuploadState, this.invokeEventCallback.bind(this, 'onSelect', [null, this.proxy, selectedFile]));\n });\n }\n\n renderWidget(props: WmFileuploadProps) {\n return <View style={this.styles.root}>\n {this._background}\n <WmButton accessibilitylabel={props.accessibilitylabel || props.caption} hint = {props.hint} id={this.getTestId()} iconclass={props.iconclass} caption={props.caption} styles={this.styles.button} iconsize={props.iconsize} onTap={() => this.onTap.bind(this)(props)}></WmButton>\n </View>\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ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C;MAE5E,IAAI,CAACO,WAAW,CAAC;QACbb,KAAK,EAAE;UACPc,aAAa,EAAER;QACjB;MACF,CAAC,EAAuB,IAAI,CAACK,mBAAmB,CAACI,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACH,KAAK,EAAEN,YAAY,CAAC,CAAC,CAAC;IAC5G,CAAC,CAAC;EACJ;EAEAU,YAAYA,CAAChB,KAAwB,EAAE;IACrC,oBAAOnB,KAAA,CAAAoC,aAAA,CAAClC,IAAI;MAACmC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAClC,IAAI,CAACC,WAAW,eACjBxC,KAAA,CAAAoC,aAAA,CAAC5B,QAAQ;MAACiC,kBAAkB,EAAEtB,KAAK,CAACsB,kBAAkB,IAAItB,KAAK,CAACuB,OAAQ;MAACC,IAAI,EAAIxB,KAAK,CAACwB,IAAK;MAACC,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,CAAE;MAACC,SAAS,EAAE3B,KAAK,CAAC2B,SAAU;MAACJ,OAAO,EAAEvB,KAAK,CAACuB,OAAQ;MAACJ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACS,MAAO;MAACC,QAAQ,EAAE7B,KAAK,CAAC6B,QAAS;MAAC5B,KAAK,EAAEA,CAAA,KAAM,IAAI,CAACA,KAAK,CAACc,IAAI,CAAC,IAAI,CAAC,CAACf,KAAK;IAAE,CAAW,CAC9Q,CAAC;EACT;AACF","ignoreList":[]}
@@ -9,6 +9,7 @@ export default class WmFileuploadProps extends BaseProps {
9
9
  _defineProperty(this, "iconsize", 16);
10
10
  _defineProperty(this, "caption", 'Upload');
11
11
  _defineProperty(this, "selectedFiles", void 0);
12
+ _defineProperty(this, "contenttype", void 0);
12
13
  _defineProperty(this, "accessibilitylabel", undefined);
13
14
  _defineProperty(this, "hint", undefined);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFileuploadProps","constructor","args","_defineProperty","undefined"],"sources":["fileupload.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {AccessibilityRole} from 'react-native';\n\nexport default class WmFileuploadProps extends BaseProps {\n iconclass: string = 'wm-sl-l sl-cloud-upload';\n iconsize: number = 16;\n caption: string = 'Upload';\n selectedFiles?: any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACnC,yBAAyB;IAAAA,eAAA,mBAC1B,EAAE;IAAAA,eAAA,kBACH,QAAQ;IAAAA,eAAA;IAAAA,eAAA,6BAEIC,SAAS;IAAAD,eAAA,eACvBC,SAAS;EAAA;AAC3B","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmFileuploadProps","constructor","args","_defineProperty","undefined"],"sources":["fileupload.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {AccessibilityRole} from 'react-native';\n\nexport default class WmFileuploadProps extends BaseProps {\n iconclass: string = 'wm-sl-l sl-cloud-upload';\n iconsize: number = 16;\n caption: string = 'Upload';\n selectedFiles?: any;\n contenttype?: string;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACnC,yBAAyB;IAAAA,eAAA,mBAC1B,EAAE;IAAAA,eAAA,kBACH,QAAQ;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGIC,SAAS;IAAAD,eAAA,eACvBC,SAAS;EAAA;AAC3B","ignoreList":[]}
@@ -46,20 +46,25 @@ export default class WmNumber extends BaseNumberComponent {
46
46
  floatingLabel: props.floatinglabel,
47
47
  floatingLabelStyle: this.styles.floatingLabel,
48
48
  activeFloatingLabelStyle: this.styles.activeFloatingLabel,
49
- style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid],
49
+ isInputFocused: this.state.isInputFocused,
50
+ style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
50
51
  keyboardType: "numeric",
52
+ background: this._background,
51
53
  placeholderTextColor: this.styles.placeholderText.color,
52
54
  autoFocus: props.autofocus,
53
55
  editable: props.disabled || props.readonly ? false : true,
54
56
  placeholder: props.placeholder,
55
- onBlur: this.onBlur.bind(this),
57
+ onBlur: event => {
58
+ this.onBlur.bind(this)(event, !!props.displayValue);
59
+ },
56
60
  onFocus: this.onFocus.bind(this),
57
61
  onKeyPress: this.validateInputEntry.bind(this),
58
62
  onChangeText: text => {
59
- this.onChangeText.bind(this)(text, 'number');
63
+ this.onChangeText.bind(this)(text, 'number', !!props.displayValue);
60
64
  },
61
65
  onChange: this.invokeChange.bind(this),
62
- allowContentSelection: this.styles.text.userSelect === 'text'
66
+ allowContentSelection: this.styles.text.userSelect === 'text',
67
+ customDisplayValue: props.displayValue
63
68
  }));
64
69
  }
65
70
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","isNull","WmNumberProps","DEFAULT_CLASS","WMTextInput","BaseNumberComponent","BaseNumberState","AccessibilityWidgetType","getAccessibilityProps","WmNumberState","constructor","args","_defineProperty","WmNumber","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","NUMBER","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","styles","activeFloatingLabelStyle","activeFloatingLabel","style","root","isValid","invalid","keyboardType","placeholderTextColor","placeholderText","color","autoFocus","autofocus","editable","disabled","readonly","placeholder","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","text","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["number.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport { isNull } from 'lodash';\n\nimport WmNumberProps from './number.props';\nimport { DEFAULT_CLASS, WmNumberStyles } from './number.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmNumberState extends BaseNumberState<WmNumberProps> {\n keyboardType: any;\n}\n\nexport default class WmNumber extends BaseNumberComponent<WmNumberProps, WmNumberState, WmNumberStyles> {\n\n constructor(props: WmNumberProps) {\n super(props, DEFAULT_CLASS, new WmNumberProps(), new WmNumberState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-number-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmNumberProps) {\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 {...getAccessibilityProps(AccessibilityWidgetType.NUMBER, props)}\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 style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n this.onChangeText.bind(this)(text, 'number');\n }}\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,QAAQ,cAAc;AACvC,SAASC,MAAM,QAAQ,QAAQ;AAE/B,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SACEC,mBAAmB,EACnBC,eAAe,QACV,4EAA4E;AACnF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,aAAa,SAASH,eAAe,CAAgB;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;AAElE;AAEA,eAAe,MAAMC,QAAQ,SAASR,mBAAmB,CAA+C;EAEtGK,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIO,aAAa,CAAC,CAAC,CAAC;EACvE;EAEOM,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,uBAAuB,CAAC;IACvC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAoB,EAAE;IAAA,IAAAQ,qBAAA;IACjC,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,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AG,IAAK;MAC1DC,WAAW,EAAEzC,KAAK,CAACyC,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,CAACC,kBAAkB,CAACH,IAAI,CAAC,IAAI,CAAE;MAC/CI,YAAY,EAAGC,IAAI,IAAK;QACtB,IAAI,CAACD,YAAY,CAACJ,IAAI,CAAC,IAAI,CAAC,CAACK,IAAI,EAAE,QAAQ,CAAC;MAC9C,CAAE;MACFC,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACP,IAAI,CAAC,IAAI,CAAE;MACvCQ,qBAAqB,EAAE,IAAI,CAAC1B,MAAM,CAACuB,IAAI,CAACI,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","isNull","WmNumberProps","DEFAULT_CLASS","WMTextInput","BaseNumberComponent","BaseNumberState","AccessibilityWidgetType","getAccessibilityProps","WmNumberState","constructor","args","_defineProperty","WmNumber","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","NUMBER","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","styles","activeFloatingLabelStyle","activeFloatingLabel","isInputFocused","style","root","isValid","invalid","focused","keyboardType","background","_background","placeholderTextColor","placeholderText","color","autoFocus","autofocus","editable","disabled","readonly","placeholder","onBlur","event","bind","displayValue","onFocus","onKeyPress","validateInputEntry","onChangeText","text","onChange","invokeChange","allowContentSelection","userSelect","customDisplayValue"],"sources":["number.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport { isNull } from 'lodash';\n\nimport WmNumberProps from './number.props';\nimport { DEFAULT_CLASS, WmNumberStyles } from './number.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmNumberState extends BaseNumberState<WmNumberProps> {\n keyboardType: any;\n}\n\nexport default class WmNumber extends BaseNumberComponent<WmNumberProps, WmNumberState, WmNumberStyles> {\n\n constructor(props: WmNumberProps) {\n super(props, DEFAULT_CLASS, new WmNumberProps(), new WmNumberState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-number-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmNumberProps) {\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 {...getAccessibilityProps(AccessibilityWidgetType.NUMBER, props)}\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 isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n keyboardType=\"numeric\"\n background={this._background}\n placeholderTextColor={this.styles.placeholderText.color as any}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={(event)=>{this.onBlur.bind(this)(event, !!props.displayValue)}}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n this.onChangeText.bind(this)(text, 'number', !!props.displayValue);\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n customDisplayValue={props.displayValue}\n />);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,MAAM,QAAQ,QAAQ;AAE/B,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SACEC,mBAAmB,EACnBC,eAAe,QACV,4EAA4E;AACnF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,aAAa,SAASH,eAAe,CAAgB;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;AAElE;AAEA,eAAe,MAAMC,QAAQ,SAASR,mBAAmB,CAA+C;EAEtGK,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIO,aAAa,CAAC,CAAC,CAAC;EACvE;EAEOM,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,uBAAuB,CAAC;IACvC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAoB,EAAE;IAAA,IAAAQ,qBAAA;IACjC,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGxB,QAAQ,CAACyB,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,cAAc;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AAS,EAAExC,KAAK,CAACyC,SAAU;MAC3BC,QAAQ,EAAE1C,KAAK,CAAC2C,QAAQ,IAAI3C,KAAK,CAAC4C,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,WAAW,EAAE7C,KAAK,CAAC6C,WAAY;MAC/BC,MAAM,EAAGC,KAAK,IAAG;QAAC,IAAI,CAACD,MAAM,CAACE,IAAI,CAAC,IAAI,CAAC,CAACD,KAAK,EAAE,CAAC,CAAC/C,KAAK,CAACiD,YAAY,CAAC;MAAA,CAAE;MACvEC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACF,IAAI,CAAC,IAAI,CAAE;MACjCG,UAAU,EAAE,IAAI,CAACC,kBAAkB,CAACJ,IAAI,CAAC,IAAI,CAAE;MAC/CK,YAAY,EAAGC,IAAI,IAAK;QACtB,IAAI,CAACD,YAAY,CAACL,IAAI,CAAC,IAAI,CAAC,CAACM,IAAI,EAAE,QAAQ,EAAE,CAAC,CAACtD,KAAK,CAACiD,YAAY,CAAC;MACpE,CAAE;MACFM,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACR,IAAI,CAAC,IAAI,CAAE;MACvCS,qBAAqB,EAAE,IAAI,CAAChC,MAAM,CAAC6B,IAAI,CAACI,UAAU,KAAK,MAAO;MAC9DC,kBAAkB,EAAE3D,KAAK,CAACiD;IAAa,EACxC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -22,6 +22,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
22
22
  invalid: {
23
23
  borderBottomColor: themeVariables.inputInvalidBorderColor
24
24
  },
25
+ focused: {
26
+ borderColor: themeVariables.inputFocusBorderColor
27
+ },
25
28
  placeholderText: {
26
29
  color: themeVariables.inputPlaceholderColor
27
30
  },
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","paddingLeft","paddingRight","text","fontSize","textAlign","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["number.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 '../../basic/skeleton/skeleton.styles';\n\nexport type WmNumberStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-number';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmNumberStyles = defineStyles<WmNumberStyles>({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16\n },\n text: {\n fontSize: 16,\n textAlign: 'left'\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {} 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 },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GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDqB,aAAa,EAAE;MACbI,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRd,QAAQ,EAAE,EAAE;MACZM,KAAK,EAAEvB,cAAc,CAACgC;IACxB,CAAC;IACDN,mBAAmB,EAAE;MACnBH,KAAK,EAAEvB,cAAc,CAACiC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","paddingLeft","paddingRight","text","fontSize","textAlign","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["number.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 '../../basic/skeleton/skeleton.styles';\n\nexport type WmNumberStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-number';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmNumberStyles = defineStyles<WmNumberStyles>({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16\n },\n text: {\n fontSize: 16,\n textAlign: 'left'\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {} 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});\n\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAYxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAET,cAAc,CAACU,gBAAgB;MAC5CC,eAAe,EAAEX,cAAc,CAACY,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,SAAS,EAAE;IACb,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAEpB,cAAc,CAACqB;IACpC,CAAC;IACDC,OAAO,EAAG;MACRb,WAAW,EAAET,cAAc,CAACuB;IAC9B,CAAC;IACDC,eAAe,EAAE;MACfC,KAAK,EAAEzB,cAAc,CAAC0B;IACxB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,QAAQ,EAAE,CAAC;EACf,CAAC,CAAC;EAEF5B,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLQ,eAAe,EAAEX,cAAc,CAAC8B;IAClC;EACJ,CAAC,CAAC;EACF7B,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAG;MACLe,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACFjB,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDuB,aAAa,EAAE;MACbI,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRhB,QAAQ,EAAE,EAAE;MACZQ,KAAK,EAAEzB,cAAc,CAACkC;IACxB,CAAC;IACDN,mBAAmB,EAAE;MACnBH,KAAK,EAAEzB,cAAc,CAACmC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -11,6 +11,8 @@ import { BaseDatasetComponent, BaseDatasetState } from '@wavemaker/app-rn-runtim
11
11
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
12
12
  import { find, isEqual } from 'lodash-es';
13
13
  import { isEmpty } from 'lodash';
14
+ import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
15
+ import { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';
14
16
  export class WmRadiosetState extends BaseDatasetState {
15
17
  constructor(...args) {
16
18
  super(...args);
@@ -22,10 +24,10 @@ export default class WmRadioset extends BaseDatasetComponent {
22
24
  super(props, DEFAULT_CLASS, new WmRadiosetProps());
23
25
  }
24
26
  onPress(item) {
25
- this.invokeEventCallback('onTap', [null, this.proxy]);
26
27
  if (this.state.props.disabled || this.state.props.readonly) {
27
28
  return;
28
29
  }
30
+ this.invokeEventCallback('onTap', [null, this.proxy]);
29
31
  item.selected = true;
30
32
  let selectedValue = "";
31
33
  const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));
@@ -45,20 +47,21 @@ export default class WmRadioset extends BaseDatasetComponent {
45
47
  renderChild(item, index, colWidth) {
46
48
  const displayText = item.displayexp || item.displayfield;
47
49
  const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;
50
+ const itemStyle = colWidth ? [{
51
+ width: colWidth
52
+ }, this.styles.item] : [this.styles.noscrollitem];
48
53
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
49
- style: [this.styles.item, item.selected ? this.styles.selectedItem : null, {
50
- width: colWidth
51
- }],
54
+ style: [itemStyle, item.selected ? this.styles.selectedItem : null],
52
55
  onPress: this.onPress.bind(this, item),
53
56
  key: item.key
54
- }, this.getTestPropsForAction()), /*#__PURE__*/React.createElement(WmIcon, _extends({}, this.getTestProps('' + index), {
57
+ }, this.getTestPropsForAction("radio" + index)), /*#__PURE__*/React.createElement(WmIcon, {
58
+ id: this.getTestId('radiobutton' + index),
55
59
  iconclass: "wi wi-fiber-manual-record",
56
60
  styles: item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio,
57
- disabled: this.state.props.readonly || this.state.props.disabled,
58
- accessibilitylabel: `Radio button for ${displayText}`
59
- })), !isEmpty(this.state.template) && this.props.renderitempartial ? this.props.renderitempartial(item.dataObject, index, this.state.template) : /*#__PURE__*/React.createElement(Text, _extends({
60
- style: this.styles.radioLabel
61
- }, this.getTestPropsForLabel('caption')), displayText));
61
+ disabled: this.state.props.readonly || this.state.props.disabled
62
+ }), !isEmpty(this.state.template) && this.props.renderitempartial ? this.props.renderitempartial(item.dataObject, index, this.state.template) : /*#__PURE__*/React.createElement(Text, _extends({
63
+ style: [this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]
64
+ }, this.getTestPropsForLabel('caption' + index)), displayText));
62
65
  }
63
66
  setTemplate(partialName) {
64
67
  this.updateState({
@@ -81,17 +84,39 @@ export default class WmRadioset extends BaseDatasetComponent {
81
84
  const props = this.state.props;
82
85
  const noOfColumns = props.itemsperrow.xs || 1;
83
86
  const colWidth = Math.round(100 / noOfColumns) + '%';
84
- return /*#__PURE__*/React.createElement(View, {
87
+ return props.radiosetscroll ? /*#__PURE__*/React.createElement(View, {
85
88
  style: noOfColumns === 1 ? {} : this.styles.group
86
- }, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null);
89
+ }, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null) : /*#__PURE__*/React.createElement(View, {
90
+ style: [this.styles.group]
91
+ }, items && items.length ? items.map((item, index) => this.renderChild(item, index)) : null);
92
+ }
93
+ renderSkeleton(props) {
94
+ var _ref;
95
+ const noOfColumns = props.itemsperrow.xs || 1;
96
+ const colWidth = Math.round(100 / noOfColumns) + '%';
97
+ return [...getNumberOfEmptyObjects((_ref = props.numberofskeletonitems) !== null && _ref !== void 0 ? _ref : 5)].map(_ => {
98
+ return /*#__PURE__*/React.createElement(View, {
99
+ style: [this.styles.item, {
100
+ width: colWidth
101
+ }]
102
+ }, /*#__PURE__*/React.createElement(WmIcon, {
103
+ styles: this.styles.checkedRadio
104
+ }), /*#__PURE__*/React.createElement(WmLabel, {
105
+ styles: {
106
+ skeleton: this.styles.skeleton
107
+ }
108
+ }));
109
+ });
87
110
  }
88
111
  renderWidget(props) {
89
112
  const items = this.state.dataItems;
90
- return /*#__PURE__*/React.createElement(ScrollView, {
113
+ return props.radiosetscroll ? /*#__PURE__*/React.createElement(ScrollView, {
91
114
  style: this.styles.root
92
115
  }, /*#__PURE__*/React.createElement(ScrollView, {
93
116
  horizontal: true
94
- }, props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items)));
117
+ }, props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items))) : /*#__PURE__*/React.createElement(View, {
118
+ style: [this.styles.root]
119
+ }, props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items));
95
120
  }
96
121
  }
97
122
  //# sourceMappingURL=radioset.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","TouchableOpacity","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","find","isEqual","isEmpty","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","invokeEventCallback","proxy","state","disabled","readonly","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","createElement","_extends","style","styles","width","bind","getTestPropsForAction","getTestProps","iconclass","checkedRadio","uncheckedRadio","accessibilitylabel","template","renderitempartial","dataObject","radioLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","accessibilityRole","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","group","renderWidget","root","horizontal","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n this.invokeEventCallback('onTap', [null, this.proxy]);\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n return (\n <TouchableOpacity style={[\n this.styles.item,\n item.selected ? this.styles.selectedItem : null,\n {width: colWidth}]} onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction()}>\n <WmIcon {...this.getTestProps('' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled} accessibilitylabel={`Radio button for ${displayText}`}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={this.styles.radioLabel} {...this.getTestPropsForLabel('caption')}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return(\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>)\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAkBC,gBAAgB,QAAQ,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AAGnF,SAASC,IAAI,EAAWC,OAAO,QAAQ,WAAW;AAClD,SAASC,OAAO,QAAQ,QAAQ;AAEhC,OAAO,MAAMC,eAAe,SAASL,gBAAgB,CAAkB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAClD,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,UAAU,SAASV,oBAAoB,C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AA,CAAC9C,IAAI;MAACgD,KAAK,EAAE2B,WAAW,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC1B,MAAM,CAAC+B;IAAM,GACrDN,KAAK,IAAIA,KAAK,CAACN,MAAM,GACpBM,KAAK,CAACL,GAAG,CAAC,CAAClD,IAAS,EAAEoB,KAAU,KAAK,IAAI,CAACD,WAAW,CAACnB,IAAI,EAAEoB,KAAK,EAAEC,QAAQ,CAAC,CAAC,GAAE,IAC7E,CAAC;EACX;EAEAyC,YAAYA,CAAChE,KAAsB,EAAE;IACnC,MAAMyD,KAAK,GAAG,IAAI,CAACpD,KAAK,CAACM,SAAS;IAClC,oBACE7B,KAAA,CAAA+C,aAAA,CAAC3C,UAAU;MAAC6C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACiC;IAAK,gBAClCnF,KAAA,CAAA+C,aAAA,CAAC3C,UAAU;MAACgF,UAAU,EAAE;IAAK,GAC1BlE,KAAK,CAACmE,OAAO,IAAI,IAAI,CAACnB,aAAa,CAAC,CAAC,EACrC,CAAChD,KAAK,CAACmE,OAAO,IAAI,IAAI,CAACZ,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","TouchableOpacity","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","find","isEqual","isEmpty","WmLabel","getNumberOfEmptyObjects","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","itemStyle","width","styles","noscrollitem","createElement","_extends","style","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","template","renderitempartial","dataObject","radioLabel","selectedLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","accessibilityRole","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","radiosetscroll","group","renderSkeleton","_ref","numberofskeletonitems","_","skeleton","renderWidget","root","horizontal","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth?: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n const itemStyle = colWidth ? [{ width: colWidth }, this.styles.item] \n : [this.styles.noscrollitem];\n return (\n <TouchableOpacity style={[\n itemStyle,\n item.selected ? this.styles.selectedItem : null]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction(\"radio\"+index)}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={[this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return props.radiosetscroll ? (\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>\n ) : (\n <View style={[this.styles.group]}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>\n )\n }\n\n public renderSkeleton(props: WmRadiosetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 5)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkedRadio}/>\n <WmLabel styles={{ skeleton: this.styles.skeleton }}/>\n </View>\n })\n\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return props.radiosetscroll ? (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n ) : (\n <View style={[this.styles.root]}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAkBC,gBAAgB,QAAQ,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AAGnF,SAASC,IAAI,EAAWC,OAAO,QAAQ,WAAW;AAClD,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,OAAO,MAAM,kEAAkE;AACtF,SAASC,uBAAuB,QAAQ,sCAAsC;AAE9E,OAAO,MAAMC,eAAe,SAASP,gBAAgB,CAAkB;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAClD,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,UAAU,SAASZ,oBAAoB,CAAqD;EAE/GS,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAA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ACJ,MAAM,CAAC7B,IAAI,EAAE;UAAC4B,KAAK,EAAEP;QAAQ,CAAC;MAAE,gBACxD3C,KAAA,CAAAqD,aAAA,CAAC5C,MAAM;QAAC0C,MAAM,EAAE,IAAI,CAACA,MAAM,CAACU;MAAa,CAAC,CAAC,eAC3C7D,KAAA,CAAAqD,aAAA,CAACxC,OAAO;QAACsC,MAAM,EAAE;UAAEyC,QAAQ,EAAE,IAAI,CAACzC,MAAM,CAACyC;QAAS;MAAE,CAAC,CACjD,CAAC;IACT,CAAC,CAAC;EAEJ;EAEAC,YAAYA,CAACzE,KAAsB,EAAE;IACnC,MAAM4D,KAAK,GAAG,IAAI,CAACzD,KAAK,CAACQ,SAAS;IAClC,OAAOX,KAAK,CAACkE,cAAc,gBACzBtF,KAAA,CAAAqD,aAAA,CAACjD,UAAU;MAACmD,KAAK,EAAE,IAAI,CAACJ,MAAM,CAAC2C;IAAK,gBAClC9F,KAAA,CAAAqD,aAAA,CAACjD,UAAU;MAAC2F,UAAU,EAAE;IAAK,GAC1B3E,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAACzB,aAAa,CAAC,CAAC,EACrC,CAACnD,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAAClB,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC,gBAEbhF,KAAA,CAAAqD,aAAA,CAACpD,IAAI;MAACsD,KAAK,EAAE,CAAC,IAAI,CAACJ,MAAM,CAAC2C,IAAI;IAAE,GAC7B1E,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAACzB,aAAa,CAAC,CAAC,EACrC,CAACnD,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAAClB,kBAAkB,CAACE,KAAK,CAC5C,CACP;EACH;AACF","ignoreList":[]}
@@ -12,7 +12,9 @@ export default class WmRadiosetProps extends BaseDatasetProps {
12
12
  md: 1,
13
13
  lg: 1
14
14
  });
15
+ _defineProperty(this, "radiosetscroll", true);
15
16
  _defineProperty(this, "renderitempartial", void 0);
17
+ _defineProperty(this, "numberofskeletonitems", void 0);
16
18
  }
17
19
  }
18
20
  //# sourceMappingURL=radioset.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmRadiosetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["radioset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmRadiosetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,eAAe,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC7C,8BAA8B;IAAAA,eAAA,sBAC9B;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;EAAA;AAEF","ignoreList":[]}
1
+ {"version":3,"names":["BaseDatasetProps","WmRadiosetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["radioset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmRadiosetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n radiosetscroll: boolean = true;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n numberofskeletonitems?: number | string\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,eAAe,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC7C,8BAA8B;IAAAA,eAAA,sBAC9B;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA,yBACyB,IAAI;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAG/B","ignoreList":[]}
@@ -25,7 +25,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
25
25
  marginRight: -20,
26
26
  marginTop: 8
27
27
  },
28
+ noscrollitem: {
29
+ flexDirection: 'row',
30
+ alignContent: 'center',
31
+ marginTop: 8,
32
+ marginLeft: 16
33
+ },
28
34
  selectedItem: {},
35
+ selectedLabel: {},
29
36
  radioLabel: {
30
37
  alignSelf: 'center',
31
38
  fontFamily: themeVariables.baseFont,
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","checkedColor","text","group","flexDirection","flexWrap","groupHeaderTitle","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","item","alignContent","marginRight","marginTop","selectedItem","radioLabel","alignSelf","labelDefaultColor","marginLeft","skeleton","width","height","borderRadius","uncheckedRadio","borderStyle","borderWidth","borderColor","checkedBorderColor","icon","opacity","checkedRadio","padding","checkedDisabledColor"],"sources":["radioset.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 '../../basic/skeleton/skeleton.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmRadiosetStyles = BaseStyles & {\n group: AllStyle,\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n selectedItem: AllStyle;\n radioLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n uncheckedRadio: WmIconStyles;\n checkedRadio: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-radioset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmRadiosetStyles = defineStyles({\n root: {\n color: themeVariables.checkedColor\n },\n text: {},\n group: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n selectedItem: {} as AllStyle,\n radioLabel: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n uncheckedRadio: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {},\n icon: {\n opacity: 0,\n }\n } as WmIconStyles,\n checkedRadio : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 16,\n },\n icon : {\n color: themeVariables.checkedColor,\n padding: 0,\n }\n } as WmIconStyles\n});\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n color: themeVariables.checkedDisabledColor,\n opacity: 0.8\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CA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AY,EAAG;MACbpC,IAAI,EAAE;QACJ0B,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE,EAAE;QAChBE,WAAW,EAAE,OAAO;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEnC,cAAc,CAACoC;MAC9B,CAAC;MACD9B,IAAI,EAAE;QACJO,QAAQ,EAAE;MACZ,CAAC;MACDwB,IAAI,EAAG;QACLjC,KAAK,EAAEJ,cAAc,CAACK,YAAY;QAClCmC,OAAO,EAAE;MACX;IACN;EACF,CAAC,CAAC;EAEAvC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLC,KAAK,EAAEJ,cAAc,CAACyC,oBAAoB;MAC1CH,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFrC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","checkedColor","text","group","flexDirection","flexWrap","groupHeaderTitle","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","item","alignContent","marginRight","marginTop","noscrollitem","marginLeft","selectedItem","selectedLabel","radioLabel","alignSelf","labelDefaultColor","skeleton","width","height","borderRadius","uncheckedRadio","borderStyle","borderWidth","borderColor","checkedBorderColor","icon","opacity","checkedRadio","padding","checkedDisabledColor"],"sources":["radioset.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';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmRadiosetStyles = BaseStyles & {\n group: AllStyle,\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n selectedItem: AllStyle;\n radioLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n uncheckedRadio: WmIconStyles;\n checkedRadio: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-radioset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmRadiosetStyles = defineStyles({\n root: {\n color: themeVariables.checkedColor\n },\n text: {},\n group: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n noscrollitem:{\n flexDirection: 'row',\n alignContent: 'center',\n marginTop: 8, \n marginLeft: 16 \n } as AllStyle,\n selectedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n radioLabel: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4,\n }\n } as any as WmSkeletonStyles,\n uncheckedRadio: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {},\n icon: {\n opacity: 0,\n }\n } as WmIconStyles,\n checkedRadio : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 16,\n },\n icon : {\n color: themeVariables.checkedColor,\n padding: 0,\n }\n } as WmIconStyles\n});\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n color: themeVariables.checkedDis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AM;QACbC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BC,cAAc,EAAE;MACd/B,IAAI,EAAE;QACJ4B,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE,EAAE;QAChBE,WAAW,EAAE,OAAO;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAErC,cAAc,CAACsC;MAC9B,CAAC;MACDhC,IAAI,EAAE,CAAC,CAAC;MACRiC,IAAI,EAAE;QACJC,OAAO,EAAE;MACX;IACF,CAAiB;IACjBC,YAAY,EAAG;MACbtC,IAAI,EAAE;QACJ4B,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE,EAAE;QAChBE,WAAW,EAAE,OAAO;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAErC,cAAc,CAACsC;MAC9B,CAAC;MACDhC,IAAI,EAAE;QACJO,QAAQ,EAAE;MACZ,CAAC;MACD0B,IAAI,EAAG;QACLnC,KAAK,EAAEJ,cAAc,CAACK,YAAY;QAClCqC,OAAO,EAAE;MACX;IACN;EACF,CAAC,CAAC;EAEAzC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLC,KAAK,EAAEJ,cAAc,CAAC2C,oBAAoB;MAC1CH,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFvC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -15,6 +15,7 @@ import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.c
15
15
  import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
16
16
  import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
17
17
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
18
+ import { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';
18
19
  export class WmSelectState extends BaseDatasetState {
19
20
  constructor(...args) {
20
21
  super(...args);
@@ -90,6 +91,7 @@ export default class WmSelect extends BaseDatasetComponent {
90
91
  }
91
92
  renderSelect() {
92
93
  const props = this.state.props;
94
+ const select = this.styles.root;
93
95
  return (
94
96
  /*#__PURE__*/
95
97
  /*
@@ -104,7 +106,16 @@ export default class WmSelect extends BaseDatasetComponent {
104
106
  this.view = ref;
105
107
  },
106
108
  onLayout: () => {}
107
- }, /*#__PURE__*/React.createElement(Text, _extends({
109
+ }, select.backgroundImage ? /*#__PURE__*/React.createElement(BackgroundComponent, {
110
+ image: select.backgroundImage,
111
+ position: select.backgroundPosition || 'center',
112
+ size: select.backgroundSize || 'contain',
113
+ repeat: select.backgroundRepeat || 'no-repeat',
114
+ resizeMode: select.backgroundResizeMode,
115
+ style: {
116
+ borderRadius: this.styles.root.borderRadius
117
+ }
118
+ }) : null, /*#__PURE__*/React.createElement(Text, _extends({
108
119
  style: [this.styles.text, this.state.props.displayValue ? {} : {
109
120
  color: this.styles.placeholderText.color
110
121
  }],
@@ -132,14 +143,17 @@ export default class WmSelect extends BaseDatasetComponent {
132
143
  }
133
144
  renderSelectItem(item, index, isPlaceholder, isLast) {
134
145
  let selected = this.isSelected(item);
135
- return /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(index + ''), {
136
- onTap: this.onItemSelect.bind(this, item, isPlaceholder)
137
- }, getAccessibilityProps(AccessibilityWidgetType.SELECT, {
138
- ...this.props,
139
- expanded: this.state.isOpened
140
- })), /*#__PURE__*/React.createElement(View, {
146
+ return /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction('selectitem' + index), {
147
+ onTap: this.onItemSelect.bind(this, item, isPlaceholder),
148
+ accessibilityProps: {
149
+ ...getAccessibilityProps(AccessibilityWidgetType.SELECT, {
150
+ ...this.props,
151
+ expanded: this.state.isOpened
152
+ })
153
+ }
154
+ }), /*#__PURE__*/React.createElement(View, {
141
155
  style: [this.styles.selectItem, isLast ? this.styles.lastSelectItem : null, selected ? this.styles.selectedItem : null]
142
- }, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel(index + ''), {
156
+ }, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('label' + index), {
143
157
  style: [this.styles.selectItemText, {
144
158
  color: isPlaceholder ? this.styles.placeholderText.color : selected ? this.styles.selectedItemText.color : this.styles.selectItemText.color
145
159
  }]
@@ -172,7 +186,7 @@ export default class WmSelect extends BaseDatasetComponent {
172
186
  this.updateDefaultQueryModel();
173
187
  }
174
188
  renderWidget(props) {
175
- return /*#__PURE__*/React.createElement(View, null, this.renderSelect(), this.state.isOpened ? /*#__PURE__*/React.createElement(ModalConsumer, null, modalService => {
189
+ return /*#__PURE__*/React.createElement(View, null, this._background, this.renderSelect(), this.state.isOpened ? /*#__PURE__*/React.createElement(ModalConsumer, null, modalService => {
176
190
  const items = this.state.dataItems;
177
191
  modalService.showModal(this.prepareModalOptions( /*#__PURE__*/React.createElement(ScrollView, {
178
192
  style: {