@wavemaker/app-rn-runtime 11.4.0-next.141708 → 11.4.0-next.1417080

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. app-rn-runtime/actions/base-action.js.map +1 -1
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js.map +1 -1
  4. app-rn-runtime/actions/navigation-action.js +14 -2
  5. app-rn-runtime/actions/navigation-action.js.map +1 -1
  6. app-rn-runtime/actions/notification-action.js +5 -4
  7. app-rn-runtime/actions/notification-action.js.map +1 -1
  8. app-rn-runtime/actions/timer-action.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
  13. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
  15. app-rn-runtime/components/advanced/carousel/carousel.component.js +2 -2
  16. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  18. app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
  19. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  20. app-rn-runtime/components/advanced/login/login.component.js +1 -1
  21. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
  23. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
  24. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  25. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
  26. app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
  27. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  28. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  29. app-rn-runtime/components/basic/anchor/anchor.component.js +2 -1
  30. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  31. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  32. app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
  33. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/animatedview.component.js +1 -3
  35. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  36. app-rn-runtime/components/basic/audio/audio.component.js +232 -0
  37. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
  38. app-rn-runtime/components/basic/audio/audio.props.js +15 -0
  39. app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
  40. app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
  41. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
  42. app-rn-runtime/components/basic/button/button.component.js +1 -1
  43. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  44. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  45. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  46. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
  47. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
  48. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
  49. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  50. app-rn-runtime/components/basic/custom/custom.component.js +25 -0
  51. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
  52. app-rn-runtime/components/basic/custom/custom.props.js +16 -0
  53. app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
  54. app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
  55. app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
  56. app-rn-runtime/components/basic/icon/icon.component.js +1 -1
  57. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  58. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  59. app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
  60. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  61. app-rn-runtime/components/basic/label/label.component.js +3 -2
  62. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  63. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  64. app-rn-runtime/components/basic/label/label.styles.js +8 -0
  65. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
  67. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
  68. app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
  69. app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
  70. app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
  71. app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
  72. app-rn-runtime/components/basic/message/message.component.js +1 -1
  73. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  74. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  75. app-rn-runtime/components/basic/message/message.styles.js +22 -0
  76. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  77. app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
  78. app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
  79. app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
  80. app-rn-runtime/components/basic/picture/picture.component.js +40 -29
  81. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  82. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  83. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  84. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
  85. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  86. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  87. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  88. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
  89. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  90. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  91. app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
  92. app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
  93. app-rn-runtime/components/basic/search/search.component.js +5 -2
  94. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  95. app-rn-runtime/components/basic/search/search.props.js +1 -0
  96. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  97. app-rn-runtime/components/basic/search/search.styles.js +47 -0
  98. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  99. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  100. app-rn-runtime/components/basic/spinner/spinner.component.js +13 -11
  101. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  102. app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
  103. app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
  104. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  105. app-rn-runtime/components/basic/video/video.component.js +56 -0
  106. app-rn-runtime/components/basic/video/video.component.js.map +1 -0
  107. app-rn-runtime/components/basic/video/video.props.js +22 -0
  108. app-rn-runtime/components/basic/video/video.props.js.map +1 -0
  109. app-rn-runtime/components/basic/video/video.styles.js +11 -0
  110. app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
  111. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  112. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  113. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  114. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  115. app-rn-runtime/components/chart/basechart.props.js +1 -0
  116. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  117. app-rn-runtime/components/chart/basechart.styles.js +17 -0
  118. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  119. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  120. app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
  121. app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
  122. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +0 -1
  123. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
  124. app-rn-runtime/components/chart/legend/legend.component.js +36 -0
  125. app-rn-runtime/components/chart/legend/legend.component.js.map +1 -0
  126. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  127. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  128. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +119 -40
  129. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  130. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -2
  131. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  132. app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
  133. app-rn-runtime/components/container/accordion/accordion.component.js +75 -119
  134. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  135. app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
  136. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  137. app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
  138. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  139. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +49 -8
  140. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  141. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
  142. app-rn-runtime/components/container/container.component.js +1 -1
  143. app-rn-runtime/components/container/container.component.js.map +1 -1
  144. app-rn-runtime/components/container/container.props.js.map +1 -1
  145. app-rn-runtime/components/container/container.styles.js.map +1 -1
  146. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
  147. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  148. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
  149. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
  150. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  151. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
  152. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
  153. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  154. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  155. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  156. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
  157. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  158. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  159. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
  160. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  161. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  162. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
  163. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  164. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
  165. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
  166. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  167. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
  168. app-rn-runtime/components/container/panel/panel.component.js +1 -1
  169. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  170. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  171. app-rn-runtime/components/container/panel/panel.styles.js +9 -0
  172. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  173. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  174. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +42 -9
  175. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  176. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  177. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +12 -2
  178. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  179. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +5 -2
  180. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  181. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  182. app-rn-runtime/components/container/tabs/tabs.component.js +84 -65
  183. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  184. app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
  185. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  186. app-rn-runtime/components/container/tabs/tabs.styles.js +40 -1
  187. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  188. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  189. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  190. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  191. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  192. app-rn-runtime/components/container/wizard/wizard.component.js +16 -7
  193. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  194. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  195. app-rn-runtime/components/container/wizard/wizard.styles.js +53 -1
  196. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  197. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  198. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  199. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  200. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  201. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  202. app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
  203. app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
  204. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  205. app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
  206. app-rn-runtime/components/data/card/card.component.js +1 -1
  207. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  208. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  209. app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
  210. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  211. app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
  212. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  213. app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
  214. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  215. app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
  216. app-rn-runtime/components/data/form/form-field/form-field.component.js +3 -3
  217. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  218. app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
  219. app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
  220. app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
  221. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  222. app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
  223. app-rn-runtime/components/data/form/form.component.js +3 -33
  224. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  225. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  226. app-rn-runtime/components/data/form/form.styles.js.map +1 -1
  227. app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
  228. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  229. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  230. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  231. app-rn-runtime/components/data/list/list.component.js +94 -24
  232. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  233. app-rn-runtime/components/data/list/list.props.js +2 -0
  234. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  235. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  236. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +3 -2
  237. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  238. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  239. app-rn-runtime/components/device/camera/camera.component.js +9 -4
  240. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  241. app-rn-runtime/components/device/camera/camera.props.js +0 -1
  242. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  243. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  244. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  245. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  246. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  247. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
  248. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  249. app-rn-runtime/components/dialogs/dialog/dialog.component.js +6 -3
  250. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  251. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  252. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  253. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  254. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
  255. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
  256. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  257. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
  258. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  259. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  260. app-rn-runtime/components/input/baseinput/baseinput.component.js +8 -1
  261. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  262. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  263. app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
  264. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  265. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  266. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  267. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  268. app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
  269. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
  270. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  271. app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
  272. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  273. app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
  274. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  275. app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
  276. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
  277. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  278. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  279. app-rn-runtime/components/input/chips/chips.component.js +1 -0
  280. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  281. app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
  282. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  283. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  284. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  285. app-rn-runtime/components/input/currency/currency.component.js +6 -4
  286. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  287. app-rn-runtime/components/input/currency/currency.props.js +1 -1
  288. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  289. app-rn-runtime/components/input/currency/currency.styles.js +9 -0
  290. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  291. app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -3
  292. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  293. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  294. app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
  295. app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
  296. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  297. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  298. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  299. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  300. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
  301. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  302. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  303. app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
  304. app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
  305. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  306. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  307. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  308. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  309. app-rn-runtime/components/input/number/number.component.js +6 -13
  310. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  311. app-rn-runtime/components/input/number/number.props.js +1 -1
  312. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  313. app-rn-runtime/components/input/number/number.styles.js +5 -0
  314. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  315. app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
  316. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  317. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  318. app-rn-runtime/components/input/rating/rating.component.js +2 -2
  319. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  320. app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
  321. app-rn-runtime/components/input/select/select.component.js +1 -1
  322. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  323. app-rn-runtime/components/input/select/select.props.js.map +1 -1
  324. app-rn-runtime/components/input/select/select.styles.js +10 -0
  325. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  326. app-rn-runtime/components/input/slider/slider.component.js +3 -2
  327. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  328. app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
  329. app-rn-runtime/components/input/switch/switch.component.js +19 -22
  330. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  331. app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
  332. app-rn-runtime/components/input/switch/switch.styles.js +43 -7
  333. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  334. app-rn-runtime/components/input/text/text.component.js +6 -13
  335. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  336. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  337. app-rn-runtime/components/input/text/text.styles.js +5 -0
  338. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  339. app-rn-runtime/components/input/textarea/textarea.component.js +5 -13
  340. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  341. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  342. app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
  343. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  344. app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
  345. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  346. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  347. app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
  348. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  349. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
  350. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  351. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  352. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  353. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  354. app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
  355. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  356. app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
  357. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  358. app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
  359. app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
  360. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  361. app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
  362. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  363. app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
  364. app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
  365. app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
  366. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  367. app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
  368. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  369. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  370. app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
  371. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  372. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  373. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  374. app-rn-runtime/components/page/content/content.component.js +1 -1
  375. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  376. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  377. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  378. app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
  379. app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
  380. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  381. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  382. app-rn-runtime/components/page/page.component.js +1 -1
  383. app-rn-runtime/components/page/page.component.js.map +1 -1
  384. app-rn-runtime/components/page/partial/partial.component.js +1 -1
  385. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  386. app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
  387. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  388. app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
  389. app-rn-runtime/components/page/partial-container/partial-container.styles.js +2 -1
  390. app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
  391. app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
  392. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  393. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  394. app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
  395. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  396. app-rn-runtime/core/asset.provider.js +5 -0
  397. app-rn-runtime/core/asset.provider.js.map +1 -0
  398. app-rn-runtime/core/base.component.js +131 -54
  399. app-rn-runtime/core/base.component.js.map +1 -1
  400. app-rn-runtime/core/components/textinput.component.js +37 -0
  401. app-rn-runtime/core/components/textinput.component.js.map +1 -0
  402. app-rn-runtime/core/device/camera-service.js.map +1 -1
  403. app-rn-runtime/core/device/scan-service.js.map +1 -1
  404. app-rn-runtime/core/display.manager.js.map +1 -1
  405. app-rn-runtime/core/event-notifier.js.map +1 -1
  406. app-rn-runtime/core/fixed-view.component.js.map +1 -1
  407. app-rn-runtime/core/formatters.js.map +1 -1
  408. app-rn-runtime/core/i18n.service.js +2 -0
  409. app-rn-runtime/core/i18n.service.js.map +1 -0
  410. app-rn-runtime/core/if.component.js +3 -3
  411. app-rn-runtime/core/if.component.js.map +1 -1
  412. app-rn-runtime/core/imageSizeEstimator.js +1 -0
  413. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  414. app-rn-runtime/core/injector.js +16 -1
  415. app-rn-runtime/core/injector.js.map +1 -1
  416. app-rn-runtime/core/logger.js +4 -1
  417. app-rn-runtime/core/logger.js.map +1 -1
  418. app-rn-runtime/core/modal.service.js.map +1 -1
  419. app-rn-runtime/core/navigation.service.js.map +1 -1
  420. app-rn-runtime/core/network.service.js +17 -15
  421. app-rn-runtime/core/network.service.js.map +1 -1
  422. app-rn-runtime/core/partial.service.js.map +1 -1
  423. app-rn-runtime/core/props.provider.js.map +1 -1
  424. app-rn-runtime/core/scroll-view.component.js.map +1 -1
  425. app-rn-runtime/core/security.service.js.map +1 -1
  426. app-rn-runtime/core/spinner.service.js.map +1 -1
  427. app-rn-runtime/core/storage.service.js.map +1 -1
  428. app-rn-runtime/core/tappable.component.js +20 -4
  429. app-rn-runtime/core/tappable.component.js.map +1 -1
  430. app-rn-runtime/core/toast.service.js.map +1 -1
  431. app-rn-runtime/core/utils.js +24 -0
  432. app-rn-runtime/core/utils.js.map +1 -1
  433. app-rn-runtime/core/viewport.js.map +1 -1
  434. app-rn-runtime/gestures/swipe.animation.js +110 -0
  435. app-rn-runtime/gestures/swipe.animation.js.map +1 -0
  436. app-rn-runtime/package.json +33 -32
  437. app-rn-runtime/runtime/App.js +38 -22
  438. app-rn-runtime/runtime/App.js.map +1 -1
  439. app-rn-runtime/runtime/App.navigator.js +13 -14
  440. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  441. app-rn-runtime/runtime/base-fragment.component.js +12 -10
  442. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  443. app-rn-runtime/runtime/base-page.component.js +2 -0
  444. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  445. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  446. app-rn-runtime/runtime/base-prefab.component.js +1 -5
  447. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  448. app-rn-runtime/runtime/lib-patch.js.map +1 -1
  449. app-rn-runtime/runtime/memo.component.js.map +1 -1
  450. app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
  451. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  452. app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
  453. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  454. app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
  455. app-rn-runtime/runtime/services/app-i18n.service.js +20 -0
  456. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  457. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  458. app-rn-runtime/runtime/services/app-security.service.js +7 -7
  459. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  460. app-rn-runtime/runtime/services/app-spinner.service.js +8 -3
  461. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  462. app-rn-runtime/runtime/services/app-toast.service.js +1 -1
  463. app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
  464. app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
  465. app-rn-runtime/runtime/services/device/camera-service.js +30 -9
  466. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  467. app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
  468. app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
  469. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  470. app-rn-runtime/runtime/services/device/scan-service.js +15 -14
  471. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  472. app-rn-runtime/runtime/services/partial.service.js.map +1 -1
  473. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  474. app-rn-runtime/runtime/watcher.js.map +1 -1
  475. app-rn-runtime/styles/MediaQueryList.js.map +1 -1
  476. app-rn-runtime/styles/background.component.js +298 -0
  477. app-rn-runtime/styles/background.component.js.map +1 -0
  478. app-rn-runtime/styles/style-prop.validator.js +42 -8
  479. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  480. app-rn-runtime/styles/style-props.js +93 -0
  481. app-rn-runtime/styles/style-props.js.map +1 -0
  482. app-rn-runtime/styles/theme.js +14 -40
  483. app-rn-runtime/styles/theme.js.map +1 -1
  484. app-rn-runtime/styles/theme.variables.js +55 -1
  485. app-rn-runtime/styles/theme.variables.js.map +1 -1
  486. app-rn-runtime/variables/base-variable.js +3 -3
  487. app-rn-runtime/variables/base-variable.js.map +1 -1
  488. app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
  489. app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
  490. app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
  491. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  492. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  493. app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
  494. app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
  495. app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
  496. app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
  497. app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
  498. app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
  499. app-rn-runtime/variables/device/file/upload-file.operation.js +43 -21
  500. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  501. app-rn-runtime/variables/device/operation.provider.js.map +1 -1
  502. app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
  503. app-rn-runtime/variables/device-variable.js.map +1 -1
  504. app-rn-runtime/variables/http.service.js +4 -13
  505. app-rn-runtime/variables/http.service.js.map +1 -1
  506. app-rn-runtime/variables/model-variable.js.map +1 -1
  507. app-rn-runtime/variables/service-variable.js +27 -11
  508. app-rn-runtime/variables/service-variable.js.map +1 -1
  509. app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
  510. app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
  511. app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
@@ -55,7 +55,7 @@ export default class WmCard extends BaseComponent {
55
55
  renderWidget(props) {
56
56
  return /*#__PURE__*/React.createElement(View, {
57
57
  style: this.styles.root
58
- }, /*#__PURE__*/React.createElement(Tappable, {
58
+ }, this._background, /*#__PURE__*/React.createElement(Tappable, {
59
59
  target: this,
60
60
  styles: {
61
61
  width: '100%',
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLabel","WmMenu","WmIcon","Tappable","WmPicture","WmCardProps","DEFAULT_CLASS","WmCardState","WmCard","constructor","props","renderHeader","flexDirection","iconclass","title","subheading","actions","styles","heading","cardIcon","flex","itemlabel","itemlink","itemicon","itembadge","isactive","itemchildren","picturesource","theme","mergeStyle","root","height","imageheight","picture","renderWidget","width","children"],"sources":["card.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmMenu from '@wavemaker/app-rn-runtime/components/navigation/menu/menu.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\n\nimport WmCardProps from './card.props';\nimport { DEFAULT_CLASS, WmCardStyles } from './card.styles';\n\nexport class WmCardState extends BaseComponentState<WmCardProps> {}\n\nexport default class WmCard extends BaseComponent<WmCardProps, WmCardState, WmCardStyles> {\n\n constructor(props: WmCardProps) {\n super(props, DEFAULT_CLASS, new WmCardProps());\n }\n\n renderHeader(props: WmCardProps) {\n return (\n <View style={{flexDirection: 'row'}}>\n {(props.iconclass || props.title || props.subheading || props.actions) ?\n (<View style={this.styles.heading}>\n <WmIcon styles={this.styles.cardIcon} iconclass={props.iconclass}></WmIcon>\n <View style={{flex: 1}}>\n <WmLabel styles={this.styles.title} caption={props.title}></WmLabel>\n <WmLabel styles={this.styles.subheading} caption={props.subheading}></WmLabel>\n </View>\n <WmMenu\n caption=\"\"\n iconclass=\"wm-sl-l sl-more-menu-vertical\"\n dataset={props.actions}\n itemlabel={props.itemlabel}\n itemlink={props.itemlink}\n itemicon={props.itemicon}\n itembadge={props.itembadge}\n isactive={props.isactive}\n itemchildren={props.itemchildren}></WmMenu>\n </View>) : null}\n {props.picturesource &&\n (<WmPicture\n picturesource={props.picturesource}\n styles={this.theme.mergeStyle({root : {height: props.imageheight}}, this.styles.picture)}></WmPicture>\n )}\n </View>);\n }\n\n renderWidget(props: WmCardProps) {\n return (\n <View style={this.styles.root}>\n <Tappable target={this} styles={{width: '100%', height: this.styles.root.height ? '100%' : null}}>\n {this.renderHeader(props)}\n {props.children}\n </Tappable>\n </View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,OAAO,MAAM,kEAAkE;AACtF,OAAOC,MAAM,MAAM,qEAAqE;AACxF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,SAAS,MAAM,sEAAsE;AAG5F,OAAOC,WAAW,MAAM,cAAc;AACtC,SAAS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K,CAACgB;IAAa,EAAU,CACxC,GAAI,IAAI,EACdhB,KAAK,CAACiB,aAAa,iBACjB,oBAAC,SAAS;MACT,aAAa,EAAEjB,KAAK,CAACiB,aAAc;MACnC,MAAM,EAAE,IAAI,CAACC,KAAK,CAACC,UAAU,CAAC;QAACC,IAAI,EAAG;UAACC,MAAM,EAAErB,KAAK,CAACsB;QAAW;MAAC,CAAC,EAAE,IAAI,CAACf,MAAM,CAACgB,OAAO;IAAE,EAC5F,CACI;EACX;EAEAC,YAAY,CAACxB,KAAkB,EAAE;IAC/B,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACO,MAAM,CAACa;IAAK,gBAC5B,oBAAC,QAAQ;MAAC,MAAM,EAAE,IAAK;MAAC,MAAM,EAAE;QAACK,KAAK,EAAE,MAAM;QAAEJ,MAAM,EAAE,IAAI,CAACd,MAAM,CAACa,IAAI,CAACC,MAAM,GAAG,MAAM,GAAG;MAAI;IAAE,GAC5F,IAAI,CAACpB,YAAY,CAACD,KAAK,CAAC,EACxBA,KAAK,CAAC0B,QAAQ,CACR,CACN;EACX;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLabel","WmMenu","WmIcon","Tappable","WmPicture","WmCardProps","DEFAULT_CLASS","WmCardState","WmCard","constructor","props","renderHeader","createElement","style","flexDirection","iconclass","title","subheading","actions","styles","heading","cardIcon","flex","caption","dataset","itemlabel","itemlink","itemicon","itembadge","isactive","itemchildren","picturesource","theme","mergeStyle","root","height","imageheight","picture","renderWidget","_background","target","width","children"],"sources":["card.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmMenu from '@wavemaker/app-rn-runtime/components/navigation/menu/menu.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\n\nimport WmCardProps from './card.props';\nimport { DEFAULT_CLASS, WmCardStyles } from './card.styles';\n\nexport class WmCardState extends BaseComponentState<WmCardProps> {}\n\nexport default class WmCard extends BaseComponent<WmCardProps, WmCardState, WmCardStyles> {\n\n constructor(props: WmCardProps) {\n super(props, DEFAULT_CLASS, new WmCardProps());\n }\n\n renderHeader(props: WmCardProps) {\n return (\n <View style={{flexDirection: 'row'}}>\n {(props.iconclass || props.title || props.subheading || props.actions) ?\n (<View style={this.styles.heading}>\n <WmIcon styles={this.styles.cardIcon} iconclass={props.iconclass}></WmIcon>\n <View style={{flex: 1}}>\n <WmLabel styles={this.styles.title} caption={props.title}></WmLabel>\n <WmLabel styles={this.styles.subheading} caption={props.subheading}></WmLabel>\n </View>\n <WmMenu\n caption=\"\"\n iconclass=\"wm-sl-l sl-more-menu-vertical\"\n dataset={props.actions}\n itemlabel={props.itemlabel}\n itemlink={props.itemlink}\n itemicon={props.itemicon}\n itembadge={props.itembadge}\n isactive={props.isactive}\n itemchildren={props.itemchildren}></WmMenu>\n </View>) : null}\n {props.picturesource &&\n (<WmPicture\n picturesource={props.picturesource}\n styles={this.theme.mergeStyle({root : {height: props.imageheight}}, this.styles.picture)}></WmPicture>\n )}\n </View>);\n }\n\n renderWidget(props: WmCardProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Tappable target={this} styles={{width: '100%', height: this.styles.root.height ? '100%' : null}}>\n {this.renderHeader(props)}\n {props.children}\n </Tappable>\n </View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,OAAO,MAAM,kEAAkE;AACtF,OAAOC,MAAM,MAAM,qEAAqE;AACxF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,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AO,EAAC,EAAE;MACVR,SAAS,EAAC,+BAA+B;MACzCS,OAAO,EAAEd,KAAK,CAACQ,OAAQ;MACvBO,SAAS,EAAEf,KAAK,CAACe,SAAU;MAC3BC,QAAQ,EAAEhB,KAAK,CAACgB,QAAS;MACzBC,QAAQ,EAAEjB,KAAK,CAACiB,QAAS;MACzBC,SAAS,EAAElB,KAAK,CAACkB,SAAU;MAC3BC,QAAQ,EAAEnB,KAAK,CAACmB,QAAS;MACzBC,YAAY,EAAEpB,KAAK,CAACoB;IAAa,CAAS,CACxC,CAAC,GAAI,IAAI,EACdpB,KAAK,CAACqB,aAAa,iBACjBnC,KAAA,CAAAgB,aAAA,CAACR,SAAS;MACT2B,aAAa,EAAErB,KAAK,CAACqB,aAAc;MACnCZ,MAAM,EAAE,IAAI,CAACa,KAAK,CAACC,UAAU,CAAC;QAACC,IAAI,EAAG;UAACC,MAAM,EAAEzB,KAAK,CAAC0B;QAAW;MAAC,CAAC,EAAE,IAAI,CAACjB,MAAM,CAACkB,OAAO;IAAE,CAAY,CAErG,CAAC;EACX;EAEAC,YAAYA,CAAC5B,KAAkB,EAAE;IAC/B,oBACEd,KAAA,CAAAgB,aAAA,CAACf,IAAI;MAACgB,KAAK,EAAE,IAAI,CAACM,MAAM,CAACe;IAAK,GAC3B,IAAI,CAACK,WAAW,eACjB3C,KAAA,CAAAgB,aAAA,CAACT,QAAQ;MAACqC,MAAM,EAAE,IAAK;MAACrB,MAAM,EAAE;QAACsB,KAAK,EAAE,MAAM;QAAEN,MAAM,EAAE,IAAI,CAAChB,MAAM,CAACe,IAAI,CAACC,MAAM,GAAG,MAAM,GAAG;MAAI;IAAE,GAC5F,IAAI,CAACxB,YAAY,CAACD,KAAK,CAAC,EACxBA,KAAK,CAACgC,QACD,CACN,CAAC;EACX;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmCardProps"],"sources":["card.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCardProps extends BaseProps {\n children? = null as any;\n actions?: string = null as any;\n itemlabel?: string = null as any;\n itemlink?: string = null as any;\n itemicon?: string = null as any;\n itembadge?: string = null as any;\n isactive?: string = null as any;\n itemchildren?: string = null as any;\n iconclass?: string = null as any;\n imageheight?: number = 200;\n picturesource?: string = null as any;\n subheading?: string = null as any;\n title?: string = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,kCACrC,IAAI;IAAA,iCACG,IAAI;IAAA,mCACF,IAAI;IAAA,kCACL,IAAI;IAAA,kCACJ,IAAI;IAAA,mCACH,IAAI;IAAA,kCACL,IAAI;IAAA,sCACA,IAAI;IAAA,mCACP,IAAI;IAAA,qCACF,GAAG;IAAA,uCACD,IAAI;IAAA,oCACP,IAAI;IAAA,+BACT,IAAI;EAAA;AACvB"}
1
+ {"version":3,"names":["BaseProps","WmCardProps","constructor","arguments","_defineProperty"],"sources":["card.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCardProps extends BaseProps {\n children? = null as any;\n actions?: string = null as any;\n itemlabel?: string = null as any;\n itemlink?: string = null as any;\n itemicon?: string = null as any;\n itembadge?: string = null as any;\n isactive?: string = null as any;\n itemchildren?: string = null as any;\n iconclass?: string = null as any;\n imageheight?: number = 200;\n picturesource?: string = null as any;\n subheading?: string = null as any;\n title?: string = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACrC,IAAI;IAAAA,eAAA,kBACG,IAAI;IAAAA,eAAA,oBACF,IAAI;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,mBACJ,IAAI;IAAAA,eAAA,oBACH,IAAI;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,uBACA,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,sBACF,GAAG;IAAAA,eAAA,wBACD,IAAI;IAAAA,eAAA,qBACP,IAAI;IAAAA,eAAA,gBACT,IAAI;EAAA;AACvB"}
@@ -7,7 +7,6 @@ import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.c
7
7
  import WmFormActionProps from './form-action.props';
8
8
  import { DEFAULT_CLASS } from './form-action.styles';
9
9
  import { debounce } from "lodash";
10
- import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
11
10
  export class WmFormActionState extends BaseComponentState {}
12
11
  export default class WmFormAction extends BaseComponent {
13
12
  constructor(props) {
@@ -17,11 +16,6 @@ export default class WmFormAction extends BaseComponent {
17
16
  onClick($event, cb) {
18
17
  cb && cb($event);
19
18
  }
20
- renderSkeleton(props) {
21
- return createSkeleton(this.theme, this.styles.skeleton, {
22
- ...this.styles.root
23
- });
24
- }
25
19
  renderWidget(props) {
26
20
  return /*#__PURE__*/React.createElement(WmButton, {
27
21
  disabled: props.disabled,
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseComponent","BaseComponentState","WmButton","WmFormActionProps","DEFAULT_CLASS","debounce","createSkeleton","WmFormActionState","WmFormAction","constructor","props","onClick","$event","cb","renderSkeleton","theme","styles","skeleton","root","renderWidget","disabled","displayName","name","iconclass","_debouncedFormAction","formAction"],"sources":["form-action.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { TapEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmFormActionProps from './form-action.props';\nimport { DEFAULT_CLASS, WmFormActionStyles } from './form-action.styles';\nimport {debounce} from \"lodash\";\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { ThemeConsumer } from '@wavemaker/app-rn-runtime/styles/theme';\n\nexport class WmFormActionState extends BaseComponentState<WmFormActionProps> {}\n\nexport default class WmFormAction extends BaseComponent<WmFormActionProps, WmFormActionState, WmFormActionStyles> {\n\n constructor(props: WmFormActionProps) {\n super(props, DEFAULT_CLASS, new WmFormActionProps());\n }\n\n private _debouncedFormAction = debounce(this.onClick, 250);\n\n onClick($event: TapEvent, cb: Function | undefined) {\n cb && cb($event);\n }\n\n public renderSkeleton(props: WmFormActionProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root\n });\n }\n\n renderWidget(props: WmFormActionProps) {\n return (\n <WmButton\n disabled={props.disabled}\n caption={props.displayName}\n styles={this.styles}\n name={props.name}\n iconclass={props.iconclass}\n onTap={($event: any) => {\n this._debouncedFormAction($event, props.formAction);\n }}\n />\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,QAAQ,MAAM,oEAAoE;AAGzF,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AACxE,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAqBC,cAAc,QAAQ,wEAAwE;AAGnH,OAAO,MAAMC,iBAAiB,SAASN,kBAAkB,CAAoB;AAE7E,eAAe,MAAMO,YAAY,SAASR,aAAa,CAA2D;EAEhHS,WAAW,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,iBAAiB,EAAE,CAAC;IAAC,8CAGxBE,QAAQ,CAAC,IAAI,CAACM,OAAO,EAAE,GAAG,CAAC;EAF1D;EAIAA,OAAO,CAACC,MAAgB,EAAEC,EAAwB,EAAE;IAClDA,EAAE,IAAIA,EAAE,CAACD,MAAM,CAAC;EAClB;EAEOE,cAAc,CAACJ,KAAwB,EAAC;IAC7C,OAAOJ,cAAc,CAAC,IAAI,CAACS,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,QAAQ,EAAE;MACtD,GAAG,IAAI,CAACD,MAAM,CAACE;IACjB,CAAC,CAAC;EACJ;EAEAC,YAAY,CAACT,KAAwB,EAAE;IACrC,oBACE,oBAAC,QAAQ;MACP,QAAQ,EAAEA,KAAK,CAACU,QAAS;MACzB,OAAO,EAAEV,KAAK,CAACW,WAAY;MAC3B,MAAM,EAAE,IAAI,CAACL,MAAO;MACpB,IAAI,EAAEN,KAAK,CAACY,IAAK;MACjB,SAAS,EAAEZ,KAAK,CAACa,SAAU;MAC3B,KAAK,EAAGX,MAAW,IAAK;QACtB,IAAI,CAACY,oBAAoB,CAACZ,MAAM,EAAEF,KAAK,CAACe,UAAU,CAAC;MACrD;IAAE,EACF;EAEN;AACF"}
1
+ {"version":3,"names":["React","BaseComponent","BaseComponentState","WmButton","WmFormActionProps","DEFAULT_CLASS","debounce","WmFormActionState","WmFormAction","constructor","props","_defineProperty","onClick","$event","cb","renderWidget","createElement","disabled","caption","displayName","styles","name","iconclass","onTap","_debouncedFormAction","formAction"],"sources":["form-action.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { TapEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmFormActionProps from './form-action.props';\nimport { DEFAULT_CLASS, WmFormActionStyles } from './form-action.styles';\nimport {debounce} from \"lodash\";\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { ThemeConsumer } from '@wavemaker/app-rn-runtime/styles/theme';\n\nexport class WmFormActionState extends BaseComponentState<WmFormActionProps> {}\n\nexport default class WmFormAction extends BaseComponent<WmFormActionProps, WmFormActionState, WmFormActionStyles> {\n\n constructor(props: WmFormActionProps) {\n super(props, DEFAULT_CLASS, new WmFormActionProps());\n }\n\n private _debouncedFormAction = debounce(this.onClick, 250);\n\n onClick($event: TapEvent, cb: Function | undefined) {\n cb && cb($event);\n }\n\n renderWidget(props: WmFormActionProps) {\n return (\n <WmButton\n disabled={props.disabled}\n caption={props.displayName}\n styles={this.styles}\n name={props.name}\n iconclass={props.iconclass}\n onTap={($event: any) => {\n this._debouncedFormAction($event, props.formAction);\n }}\n />\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,QAAQ,MAAM,oEAAoE;AAGzF,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AACxE,SAAQC,QAAQ,QAAO,QAAQ;AAI/B,OAAO,MAAMC,iBAAiB,SAASL,kBAAkB,CAAoB;AAE7E,eAAe,MAAMM,YAAY,SAASP,aAAa,CAA2D;EAEhHQ,WAAWA,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,CAAC;IAACO,eAAA,+BAGxBL,QAAQ,CAAC,IAAI,CAACM,OAAO,EAAE,GAAG,CAAC;EAF1D;EAIAA,OAAOA,CAACC,MAAgB,EAAEC,EAAwB,EAAE;IAClDA,EAAE,IAAIA,EAAE,CAACD,MAAM,CAAC;EAClB;EAEAE,YAAYA,CAACL,KAAwB,EAAE;IACrC,oBACEV,KAAA,CAAAgB,aAAA,CAACb,QAAQ;MACPc,QAAQ,EAAEP,KAAK,CAACO,QAAS;MACzBC,OAAO,EAAER,KAAK,CAACS,WAAY;MAC3BC,MAAM,EAAE,IAAI,CAACA,MAAO;MACpBC,IAAI,EAAEX,KAAK,CAACW,IAAK;MACjBC,SAAS,EAAEZ,KAAK,CAACY,SAAU;MAC3BC,KAAK,EAAGV,MAAW,IAAK;QACtB,IAAI,CAACW,oBAAoB,CAACX,MAAM,EAAEH,KAAK,CAACe,UAAU,CAAC;MACrD;IAAE,CACH,CAAC;EAEN;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFormActionProps"],"sources":["form-action.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormActionProps extends BaseProps {\n displayName: string = '';\n formkey: string = '';\n action: any = '';\n iconclass: any;\n formAction: Function = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,qCACjC,EAAE;IAAA,iCACN,EAAE;IAAA,gCACN,EAAE;IAAA;IAAA,oCAEO,IAAI;EAAA;AAC7B"}
1
+ {"version":3,"names":["BaseProps","WmFormActionProps","constructor","arguments","_defineProperty"],"sources":["form-action.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormActionProps extends BaseProps {\n displayName: string = '';\n formkey: string = '';\n action: any = '';\n iconclass: any;\n formAction: Function = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBACjC,EAAE;IAAAA,eAAA,kBACN,EAAE;IAAAA,eAAA,iBACN,EAAE;IAAAA,eAAA;IAAAA,eAAA,qBAEO,IAAI;EAAA;AAC7B"}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","marginTop","marginLeft","marginRight","marginBottom","flex","text","icon","fontSize","skeleton","width","height","opacity"],"sources":["form-action.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmFormActionStyles = WmButtonStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-form-action';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmFormActionStyles = defineStyles({\n root: {\n marginTop: 0,\n marginLeft: 4,\n marginRight: 4,\n marginBottom: 0,\n flex: 1\n },\n text: {},\n icon : {\n icon: {\n fontSize: 20\n }\n },\n skeleton: {\n root: {\n width: 96,\n height: 48\n }\n } as WmSkeletonStyles\n } as WmFormActionStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAiC,GAAGL,YAAY,CAAC;IACrDM,IAAI,EAAE;MACJC,SAAS,EAAE,CAAC;MACZC,UAAU,EAAE,CAAC;MACbC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,IAAI,EAAE;IACR,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAG;MACLA,IAAI,EAAE;QACJC,QAAQ,EAAE;MACZ;IACF,CAAC;IACDC,QAAQ,EAAE;MACRT,IAAI,EAAE;QACJU,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE;MACV;IACF;EACF,CAAC,CAAuB;EACxBb,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLY,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","marginTop","marginLeft","marginRight","marginBottom","flex","text","icon","fontSize","skeleton","width","height","opacity"],"sources":["form-action.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmFormActionStyles = WmButtonStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-form-action';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmFormActionStyles = defineStyles({\n root: {\n marginTop: 0,\n marginLeft: 4,\n marginRight: 4,\n marginBottom: 0,\n flex: 1\n },\n text: {},\n icon : {\n icon: {\n fontSize: 20\n }\n },\n skeleton: {\n root: {\n width: 96,\n height: 48\n }\n } as WmSkeletonStyles\n } as WmFormActionStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAiC,GAAGL,YAAY,CAAC;IACrDM,IAAI,EAAE;MACJC,SAAS,EAAE,CAAC;MACZC,UAAU,EAAE,CAAC;MACbC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,IAAI,EAAE;IACR,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAG;MACLA,IAAI,EAAE;QACJC,QAAQ,EAAE;MACZ;IACF,CAAC;IACDC,QAAQ,EAAE;MACRT,IAAI,EAAE;QACJU,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE;MACV;IACF;EACF,CAAuB,CAAC;EACxBb,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLY,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
@@ -11,7 +11,7 @@ export default class WmFormBody extends BaseComponent {
11
11
  renderWidget(props) {
12
12
  return /*#__PURE__*/React.createElement(View, {
13
13
  style: this.styles.root
14
- }, props.children);
14
+ }, this._background, props.children);
15
15
  }
16
16
  }
17
17
  //# sourceMappingURL=form-body.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmFormBodyProps","DEFAULT_CLASS","WmFormBodyState","WmFormBody","constructor","props","renderWidget","styles","root","children"],"sources":["form-body.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFormBodyProps from './form-body.props';\nimport { DEFAULT_CLASS, WmFormBodyStyles } from './form-body.styles';\n\nexport class WmFormBodyState extends BaseComponentState<WmFormBodyProps> {}\n\nexport default class WmFormBody extends BaseComponent<WmFormBodyProps, WmFormBodyState, WmFormBodyStyles> {\n\n constructor(props: WmFormBodyProps) {\n super(props, DEFAULT_CLASS, new WmFormBodyProps());\n }\n\n renderWidget(props: WmFormBodyProps) {\n return (<View style={this.styles.root}>{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,OAAO,MAAMC,eAAe,SAASH,kBAAkB,CAAkB;AAEzE,eAAe,MAAMI,UAAU,SAASL,aAAa,CAAqD;EAExGM,WAAW,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,eAAe,EAAE,CAAC;EACpD;EAEAM,YAAY,CAACD,KAAsB,EAAE;IACnC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAEH,KAAK,CAACI,QAAQ,CAAQ;EAChE;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmFormBodyProps","DEFAULT_CLASS","WmFormBodyState","WmFormBody","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["form-body.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFormBodyProps from './form-body.props';\nimport { DEFAULT_CLASS, WmFormBodyStyles } from './form-body.styles';\n\nexport class WmFormBodyState extends BaseComponentState<WmFormBodyProps> {}\n\nexport default class WmFormBody extends BaseComponent<WmFormBodyProps, WmFormBodyState, WmFormBodyStyles> {\n\n constructor(props: WmFormBodyProps) {\n super(props, DEFAULT_CLASS, new WmFormBodyProps());\n }\n\n renderWidget(props: WmFormBodyProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,OAAO,MAAMC,eAAe,SAASH,kBAAkB,CAAkB;AAEzE,eAAe,MAAMI,UAAU,SAASL,aAAa,CAAqD;EAExGM,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAM,YAAYA,CAACD,KAAsB,EAAE;IACnC,oBAAQT,KAAA,CAAAW,aAAA,CAACV,IAAI;MAACW,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEN,KAAK,CAACO,QAAe,CAAC;EAClF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFormBodyProps"],"sources":["form-body.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormBodyProps extends BaseProps {\n children: any = [] as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,kCACnC,EAAE;EAAA;AACtB"}
1
+ {"version":3,"names":["BaseProps","WmFormBodyProps","constructor","arguments","_defineProperty"],"sources":["form-body.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormBodyProps extends BaseProps {\n children: any = [] as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACnC,EAAE;EAAA;AACtB"}
@@ -148,8 +148,8 @@ export default class WmFormField extends BaseComponent {
148
148
  validateFormField() {
149
149
  var _this$formwidget, _this$_syncValidators;
150
150
  if (((_this$formwidget = this.formwidget) === null || _this$formwidget === void 0 ? void 0 : _this$formwidget.state.isValid) === false) {
151
- var _this$formwidget2, _this$formwidget2$sta;
152
- const errorType = (_this$formwidget2 = this.formwidget) === null || _this$formwidget2 === void 0 ? void 0 : (_this$formwidget2$sta = _this$formwidget2.state) === null || _this$formwidget2$sta === void 0 ? void 0 : _this$formwidget2$sta.errorType;
151
+ var _this$formwidget2;
152
+ const errorType = (_this$formwidget2 = this.formwidget) === null || _this$formwidget2 === void 0 || (_this$formwidget2 = _this$formwidget2.state) === null || _this$formwidget2 === void 0 ? void 0 : _this$formwidget2.errorType;
153
153
  let validationMsg = get(this.defaultValidatorMessages, errorType);
154
154
  if (validationMsg) {
155
155
  if (validationMsg instanceof Function) {
@@ -196,7 +196,7 @@ export default class WmFormField extends BaseComponent {
196
196
  });
197
197
  return /*#__PURE__*/React.createElement(View, {
198
198
  style: this.styles.root
199
- }, childrenWithProps, this.state.isValid === false && /*#__PURE__*/React.createElement(Text, {
199
+ }, this._background, childrenWithProps, this.state.isValid === false && /*#__PURE__*/React.createElement(Text, {
200
200
  style: this.styles.errorMsg
201
201
  }, props.validationmessage));
202
202
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","isEqual","get","find","cloneDeep","forEach","keys","WmFormFieldProps","DEFAULT_CLASS","PERFORMANCE_LOGGER","WmFormFieldState","WmFormField","constructor","props","onFieldChangeEvt","name","$new","$old","isDefault","notifyChanges","validateFormField","updateState","datavalue","invokeEventCallback","undefined","form","updateDataOutput","call","observeOn","fields","field","formfield","formFields","f","proxy","notifyForFields","push","formwidget","validate","setTimeout","getPromiseList","validators","arr","fn","promise","Function","bind","Promise","setAsyncValidators","_asyncValidatorFn","all","then","err","validationMsg","hasOwnProperty","messageKeys","toString","setInvalidState","setValidators","_cloneValidators","_syncValidators","obj","index","key","defaultValidatorMessages","value","propsObj","msg","isValid","validationmessage","onPropertyChange","debug","applyDefaultValue","state","errorType","errormsg","errorMessage","renderWidget","childrenWithProps","Children","map","renderFormFields","children","child","cloneElement","invokeEvent","triggerValidation","onFieldChange","formRef","styles","root","errorMsg"],"sources":["form-field.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { widgetsWithUndefinedValue } from '@wavemaker/app-rn-runtime/core/utils';\nimport { isEqual, get, find, cloneDeep, forEach, keys } from 'lodash';\n\nimport WmFormFieldProps from './form-field.props';\nimport { DEFAULT_CLASS, WmFormFieldStyles } from './form-field.styles';\nimport {PERFORMANCE_LOGGER} from \"@wavemaker/app-rn-runtime/core/logger\";\n\nexport class WmFormFieldState extends BaseComponentState<WmFormFieldProps> {\n isValid = true;\n}\n\nexport default class WmFormField extends BaseComponent<WmFormFieldProps, WmFormFieldState, WmFormFieldStyles> {\n public form: any;\n public formwidget: any;\n public _syncValidators: any;\n public defaultValidatorMessages: any = [];\n private notifyForFields: any = [];\n private _asyncValidatorFn: any;\n constructor(props: WmFormFieldProps) {\n super(props, DEFAULT_CLASS, new WmFormFieldProps(), new WmFormFieldState());\n }\n\n onFieldChangeEvt(name: string, $new: any, $old: any, isDefault: boolean) {\n this.notifyChanges();\n this.validateFormField();\n if (!isEqual($old, $new)) {\n this.updateState({ props: { datavalue: $new }} as WmFormFieldState, () => {\n !isDefault && this.invokeEventCallback('onChange', [undefined, this, $new, $old]);\n });\n if (this.form) {\n this.form.updateDataOutput.call(this.form, get(this.props, 'formKey', this.props.name), $new);\n }\n }\n }\n\n // Registers observer of validation fields\n observeOn(fields: any) {\n forEach(fields, (field) => {\n const formfield = find(this.form.formFields, (f) => f.proxy.name === field);\n if (formfield) {\n formfield.notifyForFields.push(this);\n }\n });\n }\n\n // Notifies changes to observing validation fields\n notifyChanges() {\n forEach(this.notifyForFields, (field) => {\n field.formwidget.validate(field.formwidget.datavalue);\n setTimeout(() => field.validateFormField());\n });\n }\n\n getPromiseList(validators: any) {\n const arr: any = [];\n forEach(validators, (fn) => {\n let promise = fn;\n if (fn instanceof Function && fn.bind) {\n promise = fn(this.formwidget.proxy, this.form);\n }\n if (promise instanceof Promise) {\n arr.push(promise);\n }\n });\n return arr;\n }\n\n // this method sets the asyncValidation on the form field. Assigns validationmessages from the returned response\n setAsyncValidators(validators: any) {\n this._asyncValidatorFn = () => {\n return Promise.all(this.getPromiseList(validators)).then(() => {\n return null;\n }, err => {\n let validationMsg: string;\n // if err obj has validationMessage key, then set validationMessage using this value\n // else return the value of the first key in the err object as validation message.\n if (err.hasOwnProperty('errorMessage')) {\n validationMsg = get(err, 'errorMessage');\n } else {\n const messageKeys = keys(err);\n validationMsg = (err[messageKeys[0]]).toString();\n }\n this.setInvalidState(validationMsg);\n return err;\n })\n };\n }\n\n // sets the default validation on the form field\n setValidators(validators: any) {\n let _cloneValidators = cloneDeep(validators);\n this._syncValidators = [];\n forEach(_cloneValidators, (obj, index) => {\n // custom validation is bound to function.\n if (obj && obj instanceof Function) {\n // passing formwidget and form as arguments to the obj (i.e. validator function)\n _cloneValidators[index] = obj.bind(undefined, this.formwidget.proxy, this.form);\n this._syncValidators.push(_cloneValidators[index]);\n } else {\n // checks for default validator like required, maxchars etc.\n const key = get(obj, 'type');\n this.defaultValidatorMessages[key] = get(obj, 'errorMessage');\n const value = get(obj, 'validator');\n let propsObj: any = {\n props: {}\n };\n propsObj.props[key] = value;\n key === 'required' && this.updateState(propsObj as WmFormFieldState);\n this.formwidget.updateState(propsObj as WmFormFieldState);\n }\n });\n }\n\n setInvalidState(msg: string) {\n this.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState)\n this.formwidget.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n if (!isEqual($old, $new)) {\n PERFORMANCE_LOGGER.debug(`form field ${this.props.name} changed from ${$old} to ${$new}`);\n }\n break;\n case 'defaultvalue':\n if (!isEqual($old, $new)) {\n get(this, 'form') && this.form.applyDefaultValue(this);\n }\n break;\n }\n }\n\n validateFormField() {\n if (this.formwidget?.state.isValid === false) {\n const errorType = this.formwidget?.state?.errorType;\n let validationMsg = get(this.defaultValidatorMessages, errorType);\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.updateState({ props: {\n validationmessage: validationMsg\n }} as WmFormFieldState);\n }\n this.updateState({ isValid: false} as WmFormFieldState);\n } else {\n this.updateState({ isValid: true } as WmFormFieldState);\n }\n\n this._syncValidators?.forEach((fn: any) => {\n const errormsg = fn();\n let validationMsg = errormsg?.errorMessage;\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.setInvalidState(validationMsg);\n }\n })\n\n this._asyncValidatorFn && this._asyncValidatorFn();\n\n }\n\n renderWidget(props: WmFormFieldProps) {\n var childrenWithProps = React.Children.map(props.renderFormFields(this.proxy).props.children, (child) => {\n return React.cloneElement(child, {\n datavalue: props.datavalue,\n isValid: this.state.isValid,\n invokeEvent: this.invokeEventCallback.bind(this),\n triggerValidation: this.validateFormField.bind(this),\n onFieldChange: this.onFieldChangeEvt.bind(this),\n formRef: props.formRef });\n });\n return (\n <View style={this.styles.root}>{childrenWithProps}\n {this.state.isValid === false && <Text style={this.styles.errorMsg}>{props.validationmessage}</Text>}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,OAAO,EAAEC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAErE,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAAQC,kBAAkB,QAAO,uCAAuC;AAExE,OAAO,MAAMC,gBAAgB,SAASV,kBAAkB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CAAC0B,IAAI,CAAC,IAAI,CAAC;QACpDyC,aAAa,EAAE,IAAI,CAACzE,gBAAgB,CAACgC,IAAI,CAAC,IAAI,CAAC;QAC/C0C,OAAO,EAAE3E,KAAK,CAAC2E;MAAQ,CAAC,CAAC;IAC/B,CAAC,CAAC;IACF,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAEZ,iBAAiB,EAC9C,IAAI,CAACL,KAAK,CAACL,OAAO,KAAK,KAAK,iBAAI,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACqB,MAAM,CAACE;IAAS,GAAE9E,KAAK,CAACwD,iBAAiB,CAAQ,CAC/F;EAEX;AACF"}
1
+ {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","isEqual","get","find","cloneDeep","forEach","keys","WmFormFieldProps","DEFAULT_CLASS","PERFORMANCE_LOGGER","WmFormFieldState","constructor","arguments","_defineProperty","WmFormField","props","onFieldChangeEvt","name","$new","$old","isDefault","notifyChanges","validateFormField","updateState","datavalue","invokeEventCallback","undefined","form","updateDataOutput","call","observeOn","fields","field","formfield","formFields","f","proxy","notifyForFields","push","formwidget","validate","setTimeout","getPromiseList","validators","arr","fn","promise","Function","bind","Promise","setAsyncValidators","_asyncValidatorFn","all","then","err","validationMsg","hasOwnProperty","messageKeys","toString","setInvalidState","setValidators","_cloneValidators","_syncValidators","obj","index","key","defaultValidatorMessages","value","propsObj","msg","isValid","validationmessage","onPropertyChange","debug","applyDefaultValue","_this$formwidget","_this$_syncValidators","state","_this$formwidget2","errorType","errormsg","errorMessage","renderWidget","childrenWithProps","Children","map","renderFormFields","children","child","cloneElement","invokeEvent","triggerValidation","onFieldChange","formRef","createElement","style","styles","root","_background","errorMsg"],"sources":["form-field.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { widgetsWithUndefinedValue } from '@wavemaker/app-rn-runtime/core/utils';\nimport { isEqual, get, find, cloneDeep, forEach, keys } from 'lodash';\n\nimport WmFormFieldProps from './form-field.props';\nimport { DEFAULT_CLASS, WmFormFieldStyles } from './form-field.styles';\nimport {PERFORMANCE_LOGGER} from \"@wavemaker/app-rn-runtime/core/logger\";\n\nexport class WmFormFieldState extends BaseComponentState<WmFormFieldProps> {\n isValid = true;\n}\n\nexport default class WmFormField extends BaseComponent<WmFormFieldProps, WmFormFieldState, WmFormFieldStyles> {\n public form: any;\n public formwidget: any;\n public _syncValidators: any;\n public defaultValidatorMessages: any = [];\n private notifyForFields: any = [];\n private _asyncValidatorFn: any;\n constructor(props: WmFormFieldProps) {\n super(props, DEFAULT_CLASS, new WmFormFieldProps(), new WmFormFieldState());\n }\n\n onFieldChangeEvt(name: string, $new: any, $old: any, isDefault: boolean) {\n this.notifyChanges();\n this.validateFormField();\n if (!isEqual($old, $new)) {\n this.updateState({ props: { datavalue: $new }} as WmFormFieldState, () => {\n !isDefault && this.invokeEventCallback('onChange', [undefined, this, $new, $old]);\n });\n if (this.form) {\n this.form.updateDataOutput.call(this.form, get(this.props, 'formKey', this.props.name), $new);\n }\n }\n }\n\n // Registers observer of validation fields\n observeOn(fields: any) {\n forEach(fields, (field) => {\n const formfield = find(this.form.formFields, (f) => f.proxy.name === field);\n if (formfield) {\n formfield.notifyForFields.push(this);\n }\n });\n }\n\n // Notifies changes to observing validation fields\n notifyChanges() {\n forEach(this.notifyForFields, (field) => {\n field.formwidget.validate(field.formwidget.datavalue);\n setTimeout(() => field.validateFormField());\n });\n }\n\n getPromiseList(validators: any) {\n const arr: any = [];\n forEach(validators, (fn) => {\n let promise = fn;\n if (fn instanceof Function && fn.bind) {\n promise = fn(this.formwidget.proxy, this.form);\n }\n if (promise instanceof Promise) {\n arr.push(promise);\n }\n });\n return arr;\n }\n\n // this method sets the asyncValidation on the form field. Assigns validationmessages from the returned response\n setAsyncValidators(validators: any) {\n this._asyncValidatorFn = () => {\n return Promise.all(this.getPromiseList(validators)).then(() => {\n return null;\n }, err => {\n let validationMsg: string;\n // if err obj has validationMessage key, then set validationMessage using this value\n // else return the value of the first key in the err object as validation message.\n if (err.hasOwnProperty('errorMessage')) {\n validationMsg = get(err, 'errorMessage');\n } else {\n const messageKeys = keys(err);\n validationMsg = (err[messageKeys[0]]).toString();\n }\n this.setInvalidState(validationMsg);\n return err;\n })\n };\n }\n\n // sets the default validation on the form field\n setValidators(validators: any) {\n let _cloneValidators = cloneDeep(validators);\n this._syncValidators = [];\n forEach(_cloneValidators, (obj, index) => {\n // custom validation is bound to function.\n if (obj && obj instanceof Function) {\n // passing formwidget and form as arguments to the obj (i.e. validator function)\n _cloneValidators[index] = obj.bind(undefined, this.formwidget.proxy, this.form);\n this._syncValidators.push(_cloneValidators[index]);\n } else {\n // checks for default validator like required, maxchars etc.\n const key = get(obj, 'type');\n this.defaultValidatorMessages[key] = get(obj, 'errorMessage');\n const value = get(obj, 'validator');\n let propsObj: any = {\n props: {}\n };\n propsObj.props[key] = value;\n key === 'required' && this.updateState(propsObj as WmFormFieldState);\n this.formwidget.updateState(propsObj as WmFormFieldState);\n }\n });\n }\n\n setInvalidState(msg: string) {\n this.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState)\n this.formwidget.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n if (!isEqual($old, $new)) {\n PERFORMANCE_LOGGER.debug(`form field ${this.props.name} changed from ${$old} to ${$new}`);\n }\n break;\n case 'defaultvalue':\n if (!isEqual($old, $new)) {\n get(this, 'form') && this.form.applyDefaultValue(this);\n }\n break;\n }\n }\n\n validateFormField() {\n if (this.formwidget?.state.isValid === false) {\n const errorType = this.formwidget?.state?.errorType;\n let validationMsg = get(this.defaultValidatorMessages, errorType);\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.updateState({ props: {\n validationmessage: validationMsg\n }} as WmFormFieldState);\n }\n this.updateState({ isValid: false} as WmFormFieldState);\n } else {\n this.updateState({ isValid: true } as WmFormFieldState);\n }\n\n this._syncValidators?.forEach((fn: any) => {\n const errormsg = fn();\n let validationMsg = errormsg?.errorMessage;\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.setInvalidState(validationMsg);\n }\n })\n\n this._asyncValidatorFn && this._asyncValidatorFn();\n\n }\n\n renderWidget(props: WmFormFieldProps) {\n var childrenWithProps = React.Children.map(props.renderFormFields(this.proxy).props.children, (child) => {\n return React.cloneElement(child, {\n datavalue: props.datavalue,\n isValid: this.state.isValid,\n invokeEvent: this.invokeEventCallback.bind(this),\n triggerValidation: this.validateFormField.bind(this),\n onFieldChange: this.onFieldChangeEvt.bind(this),\n formRef: props.formRef });\n });\n return (\n <View style={this.styles.root}>{this._background}{childrenWithProps}\n {this.state.isValid === false && <Text style={this.styles.errorMsg}>{props.validationmessage}</Text>}\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,OAAO,EAAEC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAErE,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAAQC,kBAAkB,QAAO,uCAAuC;AAExE,OAAO,MAAMC,gBAAgB,SAASV,kBAAkB,CAAmB;EAAAW,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,kBAC/D,IAAI;EAAA;AAChB;AAEA,eAAe,MAAM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,KAAK,EAAE;QAC7BhE,SAAS,EAAET,KAAK,CAACS,SAAS;QAC1B8C,OAAO,EAAE,IAAI,CAACO,KAAK,CAACP,OAAO;QAC3BoB,WAAW,EAAE,IAAI,CAACjE,mBAAmB,CAACuB,IAAI,CAAC,IAAI,CAAC;QAChD2C,iBAAiB,EAAE,IAAI,CAACrE,iBAAiB,CAAC0B,IAAI,CAAC,IAAI,CAAC;QACpD4C,aAAa,EAAE,IAAI,CAAC5E,gBAAgB,CAACgC,IAAI,CAAC,IAAI,CAAC;QAC/C6C,OAAO,EAAE9E,KAAK,CAAC8E;MAAQ,CAAC,CAAC;IAC/B,CAAC,CAAC;IACF,oBACEjG,KAAA,CAAAkG,aAAA,CAAChG,IAAI;MAACiG,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEf,iBAAiB,EAChE,IAAI,CAACN,KAAK,CAACP,OAAO,KAAK,KAAK,iBAAI1E,KAAA,CAAAkG,aAAA,CAACjG,IAAI;MAACkG,KAAK,EAAE,IAAI,CAACC,MAAM,CAACG;IAAS,GAAEpF,KAAK,CAACwD,iBAAwB,CAC/F,CAAC;EAEX;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFormFieldProps"],"sources":["form-field.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormFieldProps extends BaseProps {\n children: any;\n formRef: any;\n defaultvalue: any;\n datavalue: any;\n onChange: any;\n renderFormFields: any;\n validationmessage: any;\n required: Boolean = false;\n widget: any;\n onFieldChange: any;\n formKey: string = '';\n onValidate?: Function;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,gBAAgB,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,kCAQlC,KAAK;IAAA;IAAA;IAAA,iCAGP,EAAE;IAAA;EAAA;AAEtB"}
1
+ {"version":3,"names":["BaseProps","WmFormFieldProps","constructor","arguments","_defineProperty"],"sources":["form-field.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormFieldProps extends BaseProps {\n children: any;\n formRef: any;\n defaultvalue: any;\n datavalue: any;\n onChange: any;\n renderFormFields: any;\n validationmessage: any;\n required: Boolean = false;\n widget: any;\n onFieldChange: any;\n formKey: string = '';\n onValidate?: Function;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,gBAAgB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,mBAQlC,KAAK;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,kBAGP,EAAE;IAAAA,eAAA;EAAA;AAEtB"}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","marginBottom","text","errorMsg","color","fontSize","paddingTop","fontFamily","baseFont","paddingBottom","defaultTextColor","heading5FontSize"],"sources":["form-field.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle } from 'react-native';\n\nexport type WmFormFieldStyles = BaseStyles & {\n errorMsg: TextStyle\n};\n\nexport const DEFAULT_CLASS = 'app-form-field';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmFormFieldStyles = defineStyles({\n root: {\n marginBottom: 24\n },\n text: {},\n errorMsg: {\n color: 'red',\n fontSize: 13,\n paddingTop: 6,\n fontFamily: themeVariables.baseFont\n }\n });\n addStyle('form-label', '', {\n root : {\n paddingBottom: 5\n },\n text: {\n color: themeVariables.defaultTextColor,\n fontSize: themeVariables.heading5FontSize\n }\n } as BaseStyles);\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,gBAAgB;AAC7CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAgC,GAAGL,YAAY,CAAC;IAClDM,IAAI,EAAE;MACFC,YAAY,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNC,KAAK,EAAE,KAAK;MACZC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE,CAAC;MACbC,UAAU,EAAEV,cAAc,CAACW;IAC/B;EACJ,CAAC,CAAC;EACFV,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACvBE,IAAI,EAAG;MACHS,aAAa,EAAE;IACnB,CAAC;IACDP,IAAI,EAAE;MACFE,KAAK,EAAEP,cAAc,CAACa,gBAAgB;MACtCL,QAAQ,EAAER,cAAc,CAACc;IAC7B;EACJ,CAAC,CAAe;EAChBb,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","marginBottom","text","errorMsg","color","fontSize","paddingTop","fontFamily","baseFont","paddingBottom","defaultTextColor","heading5FontSize"],"sources":["form-field.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle } from 'react-native';\n\nexport type WmFormFieldStyles = BaseStyles & {\n errorMsg: TextStyle\n};\n\nexport const DEFAULT_CLASS = 'app-form-field';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmFormFieldStyles = defineStyles({\n root: {\n marginBottom: 24\n },\n text: {},\n errorMsg: {\n color: 'red',\n fontSize: 13,\n paddingTop: 6,\n fontFamily: themeVariables.baseFont\n }\n });\n addStyle('form-label', '', {\n root : {\n paddingBottom: 5\n },\n text: {\n color: themeVariables.defaultTextColor,\n fontSize: themeVariables.heading5FontSize\n }\n } as BaseStyles);\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,gBAAgB;AAC7CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAgC,GAAGL,YAAY,CAAC;IAClDM,IAAI,EAAE;MACFC,YAAY,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNC,KAAK,EAAE,KAAK;MACZC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE,CAAC;MACbC,UAAU,EAAEV,cAAc,CAACW;IAC/B;EACJ,CAAC,CAAC;EACFV,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACvBE,IAAI,EAAG;MACHS,aAAa,EAAE;IACnB,CAAC;IACDP,IAAI,EAAE;MACFE,KAAK,EAAEP,cAAc,CAACa,gBAAgB;MACtCL,QAAQ,EAAER,cAAc,CAACc;IAC7B;EACJ,CAAe,CAAC;EAChBb,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -11,7 +11,7 @@ export default class WmFormFooter extends BaseComponent {
11
11
  renderWidget(props) {
12
12
  return /*#__PURE__*/React.createElement(View, {
13
13
  style: this.styles.root
14
- }, props.children);
14
+ }, this._background, props.children);
15
15
  }
16
16
  }
17
17
  //# sourceMappingURL=form-footer.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmFormFooterProps","DEFAULT_CLASS","WmFormFooterState","WmFormFooter","constructor","props","renderWidget","styles","root","children"],"sources":["form-footer.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFormFooterProps from './form-footer.props';\nimport { DEFAULT_CLASS, WmFormFooterStyles } from './form-footer.styles';\n\nexport class WmFormFooterState extends BaseComponentState<WmFormFooterProps> {}\n\nexport default class WmFormFooter extends BaseComponent<WmFormFooterProps, WmFormFooterState, WmFormFooterStyles> {\n\n constructor(props: WmFormFooterProps) {\n super(props, DEFAULT_CLASS, new WmFormFooterProps());\n }\n\n renderWidget(props: WmFormFooterProps) {\n return (<View style={this.styles.root}>{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AAExE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAE7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAW,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,EAAE,CAAC;EACtD;EAEAM,YAAY,CAACD,KAAwB,EAAE;IACrC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAEH,KAAK,CAACI,QAAQ,CAAQ;EAChE;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmFormFooterProps","DEFAULT_CLASS","WmFormFooterState","WmFormFooter","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["form-footer.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFormFooterProps from './form-footer.props';\nimport { DEFAULT_CLASS, WmFormFooterStyles } from './form-footer.styles';\n\nexport class WmFormFooterState extends BaseComponentState<WmFormFooterProps> {}\n\nexport default class WmFormFooter extends BaseComponent<WmFormFooterProps, WmFormFooterState, WmFormFooterStyles> {\n\n constructor(props: WmFormFooterProps) {\n super(props, DEFAULT_CLASS, new WmFormFooterProps());\n }\n\n renderWidget(props: WmFormFooterProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AAExE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAE7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAWA,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,CAAC;EACtD;EAEAM,YAAYA,CAACD,KAAwB,EAAE;IACrC,oBAAQT,KAAA,CAAAW,aAAA,CAACV,IAAI;MAACW,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEN,KAAK,CAACO,QAAe,CAAC;EAClF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFormFooterProps"],"sources":["form-footer.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormFooterProps extends BaseProps {\n children: any = [] as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,kCACrC,EAAE;EAAA;AACtB"}
1
+ {"version":3,"names":["BaseProps","WmFormFooterProps","constructor","arguments","_defineProperty"],"sources":["form-footer.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormFooterProps extends BaseProps {\n children: any = [] as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBACrC,EAAE;EAAA;AACtB"}
@@ -12,7 +12,6 @@ import WmMessage from '@wavemaker/app-rn-runtime/components/basic/message/messag
12
12
  import { ToastConsumer } from '@wavemaker/app-rn-runtime/core/toast.service';
13
13
  import WmFormProps from './form.props';
14
14
  import { DEFAULT_CLASS } from './form.styles';
15
- import { createSkeleton } from '../../basic/skeleton/skeleton.component';
16
15
  export class WmFormState extends BaseComponentState {
17
16
  constructor() {
18
17
  super(...arguments);
@@ -23,12 +22,11 @@ export class WmFormState extends BaseComponentState {
23
22
  }
24
23
  }
25
24
  export default class WmForm extends BaseComponent {
26
- // contains array of direct widget elements [WmText, WmNumber, WmCurrent]
27
-
28
25
  // object containing key as name of formField and value as WmFormField proxy.
29
26
  constructor(props) {
30
27
  super(props, DEFAULT_CLASS, new WmFormProps());
31
28
  _defineProperty(this, "formFields", []);
29
+ // contains array of direct widget elements [WmText, WmNumber, WmCurrent]
32
30
  _defineProperty(this, "parentFormRef", void 0);
33
31
  _defineProperty(this, "formfields", {});
34
32
  _defineProperty(this, "formdataoutput", void 0);
@@ -54,7 +52,7 @@ export default class WmForm extends BaseComponent {
54
52
  forEach(formFields, w => {
55
53
  if (!w.form) {
56
54
  w.form = this;
57
- w.formwidget = w.props.name && formWidgets[w.props.name];
55
+ w.formwidget = w.props.formKey && formWidgets[w.props.formKey] || w.props.name && formWidgets[w.props.name];
58
56
  }
59
57
  });
60
58
  this.formFields = formFields;
@@ -274,40 +272,12 @@ export default class WmForm extends BaseComponent {
274
272
  showInlineMsg: false
275
273
  });
276
274
  }
277
- renderSkeleton(props) {
278
- return /*#__PURE__*/React.createElement(View, {
279
- style: this.styles.root
280
- }, this.props.iconclass || this.props.title || this.props.subheading ? /*#__PURE__*/React.createElement(View, {
281
- style: this.styles.heading
282
- }, /*#__PURE__*/React.createElement(View, {
283
- style: {
284
- flex: 1,
285
- flexDirection: 'row'
286
- }
287
- }, /*#__PURE__*/React.createElement(WmIcon, {
288
- styles: this.styles.listIcon,
289
- iconclass: this.props.iconclass
290
- }), /*#__PURE__*/React.createElement(View, null, createSkeleton(this.theme, {}, {
291
- ...this.styles.title.root,
292
- width: 96,
293
- height: this.styles.title.text.fontSize
294
- }), createSkeleton(this.theme, {}, {
295
- ...this.styles.subheading.root,
296
- width: 160,
297
- height: this.styles.subheading.text.fontSize
298
- })))) : null, this.state.showInlineMsg ? /*#__PURE__*/React.createElement(WmMessage, {
299
- type: this.state.type,
300
- caption: this.state.message,
301
- hideclose: false,
302
- onClose: this.onMsgClose.bind(this)
303
- }) : null, this.props.children);
304
- }
305
275
  renderWidget(props) {
306
276
  return /*#__PURE__*/React.createElement(ToastConsumer, null, toastService => {
307
277
  this.toaster = toastService;
308
278
  return /*#__PURE__*/React.createElement(View, {
309
279
  style: this.styles.root
310
- }, props.iconclass || props.title || props.subheading ? /*#__PURE__*/React.createElement(View, {
280
+ }, this._background, props.iconclass || props.title || props.subheading ? /*#__PURE__*/React.createElement(View, {
311
281
  style: this.styles.heading
312
282
  }, /*#__PURE__*/React.createElement(View, {
313
283
  style: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","isDefined","debounce","find","forEach","get","set","WmLabel","WmIcon","WmMessage","ToastConsumer","WmFormProps","DEFAULT_CLASS","createSkeleton","WmFormState","WmForm","constructor","props","handleSubmit","componentDidMount","getParentFormRef","parentForm","pformName","current","parent","parentFormRef","registerFormFields","formFields","formWidgets","w","form","formwidget","name","f","formfields","applyFormData","applyDefaultValue","formdataoutput","datavalue","formData","state","formdata","formField","fw","key","setState","isDefault","updateState","updateFormFieldDefaultValue","dv","defaultvalue","field","invokeEventCallback","bind","undefined","formreset","ff","id","formKey","widget","isValid","reset","submit","_debouncedSubmitForm","onPropertyChange","$new","$old","validateFieldsOnSubmit","val","onValidate","required","msg","defaultValidatorMessages","validationmessage","validate","event","preventDefault","dataoutput","onBeforesubmit","proxy","formSubmit","data","onResultCb","error","response","status","onSuccess","postmessage","toggleMessage","onError","errormessage","updateDataOutput","Object","assign","type","message","messagelayout","showInlineMsg","toaster","showToast","placement","styles","bottom","text","hideOnClick","onMsgClose","renderSkeleton","root","iconclass","title","subheading","heading","flex","flexDirection","listIcon","theme","width","height","fontSize","children","renderWidget","toastService"],"sources":["form.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isDefined, widgetsWithUndefinedValue } from '@wavemaker/app-rn-runtime/core/utils';\nimport { debounce, find, forEach, get, set } from 'lodash';\n\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmFormField, { WmFormFieldState } from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmMessage from '@wavemaker/app-rn-runtime/components/basic/message/message.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nimport WmFormProps from './form.props';\nimport { DEFAULT_CLASS, WmFormStyles } from './form.styles';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport class WmFormState extends BaseComponentState<WmFormProps> {\n isValid = false;\n type: 'success' | 'warning' | 'error' | 'info' | 'loading' | undefined = 'success';\n message: string = '';\n showInlineMsg: boolean = false;\n}\nexport default class WmForm extends BaseComponent<WmFormProps, WmFormState, WmFormStyles> {\n public formFields: Array<WmFormField> = []; // contains array of direct widget elements [WmText, WmNumber, WmCurrent]\n public parentFormRef: any;\n public formfields: {[key: string]: WmFormField} = {};\n private formdataoutput: any;\n private toaster: any;\n formWidgets: { [key: string]: BaseComponent<any, any, any> } = {}; // object containing key as name of formField and value as WmFormField proxy.\n constructor(props: WmFormProps) {\n super(props, DEFAULT_CLASS, new WmFormProps());\n }\n\n private _debouncedSubmitForm = debounce(this.handleSubmit, 250);\n\n componentDidMount() {\n super.componentDidMount();\n this.getParentFormRef(this.props.parentForm);\n }\n\n getParentFormRef(pformName: string) {\n let current = this.parent;\n while (current) {\n if (get(current, 'props.name') === pformName) {\n this.parentFormRef = current;\n break;\n }\n current = current.parent;\n }\n }\n\n registerFormFields(\n formFields: Array<WmFormField>,\n formWidgets: { [key: string]: BaseComponent<any, any, any> }\n ) {\n forEach(formFields, (w: WmFormField) => {\n if (!w.form) {\n w.form = this;\n w.formwidget = w.props.name && formWidgets[w.props.name];\n }\n });\n\n this.formFields = formFields;\n this.formWidgets = formWidgets;\n\n formFields.forEach((f: WmFormField) => {\n if (f.props.name) {\n set(this.formfields, f.props.name, f);\n }\n })\n\n this.applyFormData();\n this.applyDefaultValue();\n\n // setting default form dataoutput.\n if (!this.formdataoutput) {\n this.formdataoutput = {};\n formFields.forEach((w: WmFormField) => {\n const name = get(w.props, 'formKey') || w.props.name;\n if (name) {\n set(this.formdataoutput, name, w.props.datavalue);\n }\n });\n }\n }\n\n applyFormData() {\n let formData = this.state.props.formdata || this.parentFormRef?.state.props.formdata;\n if (!formData || (this.parentFormRef && this.state.props.formdata)) {\n return;\n }\n forEach(this.formFields, (formField: WmFormField) => {\n let fw = formField.props?.name && this.formWidgets[formField.props.name];\n if (!fw) {\n fw = find(this.formWidgets, (fw: BaseComponent<any, any, any>) => {\n return get(fw, 'formfieldname') === formField.props.name\n });\n }\n let key = get(formField, 'formKey') || get(fw, 'props.name');\n fw && fw.setState({ isDefault: true });\n formField.updateState({\n props: {\n datavalue: get(formData, key)\n }\n } as WmFormFieldState);\n });\n }\n\n updateFormFieldDefaultValue(formField: WmFormField) {\n if (formField) {\n const dv = formField.state.props.defaultvalue;\n if (isDefined(dv) && dv !== null && this.formFields) {\n let field = formField.props?.name && this.formWidgets[formField.props.name];\n if (!field) {\n field = find(this.formWidgets, (fw: BaseComponent<any, any, any>) => {\n return get(fw, 'formfieldname') === formField.props.name\n });\n }\n if (field) {\n field.setState({ isDefault: true });\n field.updateState({\n props: {\n datavalue: dv\n }\n }, this.invokeEventCallback.bind(formField, 'onFieldChange', [undefined, formField, dv]));\n }\n }\n }\n }\n\n applyDefaultValue(formField?: WmFormField) {\n if (formField) {\n this.updateFormFieldDefaultValue(formField);\n return;\n }\n forEach(this.formFields, (w: WmFormField) => {\n this.updateFormFieldDefaultValue(w);\n });\n }\n\n formreset() {\n forEach(this.formFields, (ff: WmFormField) => {\n ff.updateState({\n props : {\n datavalue: ''\n }\n } as WmFormFieldState, () => {\n const id = ff.props.formKey || ff.props.name;\n if (id) {\n let widget: BaseComponent<any, any, any> | undefined | any = this.formWidgets[id];\n if (!widget) {\n widget = find(this.formWidgets, (fw: BaseComponent<any, any, any>) => {\n return get(fw, 'formfieldname') === ff.props.name\n });\n }\n widget.updateState({\n isValid: true,\n props : {\n datavalue: ''\n }\n }, () => ff.updateState({\n isValid: true\n } as WmFormFieldState));\n widget?.reset();\n }\n }\n );\n });\n }\n\n submit() {\n this._debouncedSubmitForm();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'formdata':\n if ($new) {\n this.applyFormData();\n }\n }\n }\n // Disable the form submit if form is in invalid state. Highlight all the invalid fields if validation type is default\n validateFieldsOnSubmit() {\n let isValid = true;\n forEach(this.formFields, (field) => {\n const val = field?.state.props.datavalue;\n\n const onValidate = get(field, 'props.onValidate');\n onValidate && onValidate(field);\n if (!val && field?.state.props.required) {\n isValid = false;\n const msg = get(field.defaultValidatorMessages, 'required') || field.state.props.validationmessage;\n field.updateState({ isValid: isValid, props: {\n validationmessage: msg\n }} as WmFormFieldState);\n field.formwidget.validate && field.formwidget.validate(val);\n }\n // check for isvalid state of formwidget\n if (field.formwidget.state.isValid === false) {\n isValid = false;\n }\n });\n return isValid;\n }\n\n // @ts-ignore\n handleSubmit(event?: any) {\n event?.preventDefault();\n const formData = this.state.props.dataoutput || this.formdataoutput;\n\n if (!this.validateFieldsOnSubmit()) {\n return false;\n }\n if (this.props.onBeforesubmit) {\n this.invokeEventCallback('onBeforesubmit', [ null, this.proxy, formData ]);\n }\n if (this.props.formSubmit) {\n this.props.formSubmit(formData, ((data: any) => {\n this.invokeEventCallback('onSubmit', [ null, this.proxy, formData ]);\n this.onResultCb(get(data, 'params'), 'success');\n }), ((error: any) => {\n this.invokeEventCallback('onSubmit', [ null, this.proxy, formData ]);\n this.onResultCb(error, '');\n }));\n } else {\n this.invokeEventCallback('onSubmit', [ null, this.proxy, formData ]);\n }\n }\n\n onResultCb(response: any, status: string, event?: any) {\n this.invokeEventCallback('onResult', [ null, this.proxy, response ]);\n if (status) {\n this.invokeEventCallback('onSuccess', [ null, this.proxy, response ]);\n !this.props.onSuccess && this.state.props.postmessage && this.toggleMessage('success', this.state.props.postmessage);\n } else {\n this.invokeEventCallback('onError', [ null, this.proxy, response ]);\n !this.props.onError && this.toggleMessage('error', this.state.props.errormessage || get(response, 'message'));\n }\n }\n\n updateDataOutput(key: string, val: any) {\n const current = this.formdataoutput || {};\n if (key) {\n set(current, key, val);\n } else {\n Object.assign(current, val)\n }\n this.formdataoutput = current;\n this.updateState({ props: { dataoutput: current }} as WmFormState);\n this.parentFormRef && this.parentFormRef.updateDataOutput(undefined, this.formdataoutput);\n }\n\n toggleMessage(\n type: 'success' | 'warning' | 'error' | 'info' | 'loading' | undefined,\n message: string\n ) {\n if (this.state.props.messagelayout === 'Inline') {\n this.setState({\n type: type,\n message: message,\n showInlineMsg: true\n } as WmFormState)\n return;\n }\n this.toaster.showToast({\n name: this, placement: \"\", styles: {bottom: 0},\n text: message,\n type: type,\n hideOnClick: true\n });\n }\n\n onMsgClose() {\n this.setState({\n showInlineMsg: false\n } as WmFormState)\n }\n\n public renderSkeleton(props: WmFormProps){\n return(\n <View style={this.styles.root}>\n {this.props.iconclass || this.props.title || this.props.subheading ? (\n <View style={this.styles.heading}>\n <View style={{flex: 1, flexDirection: 'row'}}>\n <WmIcon styles={this.styles.listIcon} iconclass={this.props.iconclass}></WmIcon>\n <View>\n {\n createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.title.root,\n width: 96,\n height: this.styles.title.text.fontSize\n })\n }\n {\n createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.subheading.root,\n width: 160,\n height: this.styles.subheading.text.fontSize\n })\n }\n </View>\n </View>\n </View>\n ) : null}\n {this.state.showInlineMsg ? <WmMessage type={this.state.type} caption={this.state.message} hideclose={false} onClose={this.onMsgClose.bind(this)}></WmMessage> : null\n }\n {this.props.children}\n </View>\n )\n }\n\n renderWidget(props: WmFormProps) {\n return (\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return <View style={this.styles.root}>\n {props.iconclass || props.title || props.subheading ? (\n <View style={this.styles.heading}>\n <View style={{flex: 1, flexDirection: 'row'}}>\n <WmIcon styles={this.styles.listIcon} iconclass={props.iconclass}></WmIcon>\n <View>\n <WmLabel styles={this.styles.title} caption={props.title}></WmLabel>\n <WmLabel styles={this.styles.subheading} caption={props.subheading}></WmLabel>\n </View>\n </View>\n </View>\n ) : null}\n {this.state.showInlineMsg ? <WmMessage type={this.state.type} caption={this.state.message} hideclose={false} onClose={this.onMsgClose.bind(this)}></WmMessage> : null\n }\n {props.children}\n </View>\n }\n }\n </ToastConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK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,GAAG,IAAI,EAEpKpC,KAAK,CAACsG,QAAQ,CACV;IACT,CAAC,CAEa;EAEpB;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","isDefined","debounce","find","forEach","get","set","WmLabel","WmIcon","WmMessage","ToastConsumer","WmFormProps","DEFAULT_CLASS","WmFormState","constructor","arguments","_defineProperty","WmForm","props","handleSubmit","componentDidMount","getParentFormRef","parentForm","pformName","current","parent","parentFormRef","registerFormFields","formFields","formWidgets","w","form","formwidget","formKey","name","f","formfields","applyFormData","applyDefaultValue","formdataoutput","datavalue","_this$parentFormRef","formData","state","formdata","formField","_formField$props","fw","key","setState","isDefault","updateState","updateFormFieldDefaultValue","dv","defaultvalue","_formField$props2","field","invokeEventCallback","bind","undefined","formreset","ff","id","_widget","widget","isValid","reset","submit","_debouncedSubmitForm","onPropertyChange","$new","$old","validateFieldsOnSubmit","val","onValidate","required","msg","defaultValidatorMessages","validationmessage","validate","event","preventDefault","dataoutput","onBeforesubmit","proxy","formSubmit","data","onResultCb","error","response","status","onSuccess","postmessage","toggleMessage","onError","errormessage","updateDataOutput","Object","assign","type","message","messagelayout","showInlineMsg","toaster","showToast","placement","styles","bottom","text","hideOnClick","onMsgClose","renderWidget","createElement","toastService","style","root","_background","iconclass","title","subheading","heading","flex","flexDirection","listIcon","caption","hideclose","onClose","children"],"sources":["form.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isDefined, widgetsWithUndefinedValue } from '@wavemaker/app-rn-runtime/core/utils';\nimport { debounce, find, forEach, get, set } from 'lodash';\n\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmFormField, { WmFormFieldState } from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmMessage from '@wavemaker/app-rn-runtime/components/basic/message/message.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nimport WmFormProps from './form.props';\nimport { DEFAULT_CLASS, WmFormStyles } from './form.styles';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport class WmFormState extends BaseComponentState<WmFormProps> {\n isValid = false;\n type: 'success' | 'warning' | 'error' | 'info' | 'loading' | undefined = 'success';\n message: string = '';\n showInlineMsg: boolean = false;\n}\nexport default class WmForm extends BaseComponent<WmFormProps, WmFormState, WmFormStyles> {\n public formFields: Array<WmFormField> = []; // contains array of direct widget elements [WmText, WmNumber, WmCurrent]\n public parentFormRef: any;\n public formfields: {[key: string]: WmFormField} = {};\n private formdataoutput: any;\n private toaster: any;\n formWidgets: { [key: string]: BaseComponent<any, any, any> } = {}; // object containing key as name of formField and value as WmFormField proxy.\n constructor(props: WmFormProps) {\n super(props, DEFAULT_CLASS, new WmFormProps());\n }\n\n private _debouncedSubmitForm = debounce(this.handleSubmit, 250);\n\n componentDidMount() {\n super.componentDidMount();\n this.getParentFormRef(this.props.parentForm);\n }\n\n getParentFormRef(pformName: string) {\n let current = this.parent;\n while (current) {\n if (get(current, 'props.name') === pformName) {\n this.parentFormRef = current;\n break;\n }\n current = current.parent;\n }\n }\n\n registerFormFields(\n formFields: Array<WmFormField>,\n formWidgets: { [key: string]: BaseComponent<any, any, any> }\n ) {\n forEach(formFields, (w: WmFormField) => {\n if (!w.form) {\n w.form = this;\n w.formwidget = (w.props.formKey && formWidgets[w.props.formKey]) \n || (w.props.name && formWidgets[w.props.name]);\n }\n });\n\n this.formFields = formFields;\n this.formWidgets = formWidgets;\n\n formFields.forEach((f: WmFormField) => {\n if (f.props.name) {\n set(this.formfields, f.props.name, f);\n }\n })\n\n this.applyFormData();\n this.applyDefaultValue();\n\n // setting default form dataoutput.\n if (!this.formdataoutput) {\n this.formdataoutput = {};\n formFields.forEach((w: WmFormField) => {\n const name = get(w.props, 'formKey') || w.props.name;\n if (name) {\n set(this.formdataoutput, name, w.props.datavalue);\n }\n });\n }\n }\n\n applyFormData() {\n let formData = this.state.props.formdata || this.parentFormRef?.state.props.formdata;\n if (!formData || (this.parentFormRef && this.state.props.formdata)) {\n return;\n }\n forEach(this.formFields, (formField: WmFormField) => {\n let fw = formField.props?.name && this.formWidgets[formField.props.name];\n if (!fw) {\n fw = find(this.formWidgets, (fw: BaseComponent<any, any, any>) => {\n return get(fw, 'formfieldname') === formField.props.name\n });\n }\n let key = get(formField, 'formKey') || get(fw, 'props.name');\n fw && fw.setState({ isDefault: true });\n formField.updateState({\n props: {\n datavalue: get(formData, key)\n }\n } as WmFormFieldState);\n });\n }\n\n updateFormFieldDefaultValue(formField: WmFormField) {\n if (formField) {\n const dv = formField.state.props.defaultvalue;\n if (isDefined(dv) && dv !== null && this.formFields) {\n let field = formField.props?.name && this.formWidgets[formField.props.name];\n if (!field) {\n field = find(this.formWidgets, (fw: BaseComponent<any, any, any>) => {\n return get(fw, 'formfieldname') === formField.props.name\n });\n }\n if (field) {\n field.setState({ isDefault: true });\n field.updateState({\n props: {\n datavalue: dv\n }\n }, this.invokeEventCallback.bind(formField, 'onFieldChange', [undefined, formField, dv]));\n }\n }\n }\n }\n\n applyDefaultValue(formField?: WmFormField) {\n if (formField) {\n this.updateFormFieldDefaultValue(formField);\n return;\n }\n forEach(this.formFields, (w: WmFormField) => {\n this.updateFormFieldDefaultValue(w);\n });\n }\n\n formreset() {\n forEach(this.formFields, (ff: WmFormField) => {\n ff.updateState({\n props : {\n datavalue: ''\n }\n } as WmFormFieldState, () => {\n const id = ff.props.formKey || ff.props.name;\n if (id) {\n let widget: BaseComponent<any, any, any> | undefined | any = this.formWidgets[id];\n if (!widget) {\n widget = find(this.formWidgets, (fw: BaseComponent<any, any, any>) => {\n return get(fw, 'formfieldname') === ff.props.name\n });\n }\n widget.updateState({\n isValid: true,\n props : {\n datavalue: ''\n }\n }, () => ff.updateState({\n isValid: true\n } as WmFormFieldState));\n widget?.reset();\n }\n }\n );\n });\n }\n\n submit() {\n this._debouncedSubmitForm();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'formdata':\n if ($new) {\n this.applyFormData();\n }\n }\n }\n // Disable the form submit if form is in invalid state. Highlight all the invalid fields if validation type is default\n validateFieldsOnSubmit() {\n let isValid = true;\n forEach(this.formFields, (field) => {\n const val = field?.state.props.datavalue;\n\n const onValidate = get(field, 'props.onValidate');\n onValidate && onValidate(field);\n if (!val && field?.state.props.required) {\n isValid = false;\n const msg = get(field.defaultValidatorMessages, 'required') || field.state.props.validationmessage;\n field.updateState({ isValid: isValid, props: {\n validationmessage: msg\n }} as WmFormFieldState);\n field.formwidget.validate && field.formwidget.validate(val);\n }\n // check for isvalid state of formwidget\n if (field.formwidget.state.isValid === false) {\n isValid = false;\n }\n });\n return isValid;\n }\n\n // @ts-ignore\n handleSubmit(event?: any) {\n event?.preventDefault();\n const formData = this.state.props.dataoutput || this.formdataoutput;\n\n if (!this.validateFieldsOnSubmit()) {\n return false;\n }\n if (this.props.onBeforesubmit) {\n this.invokeEventCallback('onBeforesubmit', [ null, this.proxy, formData ]);\n }\n if (this.props.formSubmit) {\n this.props.formSubmit(formData, ((data: any) => {\n this.invokeEventCallback('onSubmit', [ null, this.proxy, formData ]);\n this.onResultCb(get(data, 'params'), 'success');\n }), ((error: any) => {\n this.invokeEventCallback('onSubmit', [ null, this.proxy, formData ]);\n this.onResultCb(error, '');\n }));\n } else {\n this.invokeEventCallback('onSubmit', [ null, this.proxy, formData ]);\n }\n }\n\n onResultCb(response: any, status: string, event?: any) {\n this.invokeEventCallback('onResult', [ null, this.proxy, response ]);\n if (status) {\n this.invokeEventCallback('onSuccess', [ null, this.proxy, response ]);\n !this.props.onSuccess && this.state.props.postmessage && this.toggleMessage('success', this.state.props.postmessage);\n } else {\n this.invokeEventCallback('onError', [ null, this.proxy, response ]);\n !this.props.onError && this.toggleMessage('error', this.state.props.errormessage || get(response, 'message'));\n }\n }\n\n updateDataOutput(key: string, val: any) {\n const current = this.formdataoutput || {};\n if (key) {\n set(current, key, val);\n } else {\n Object.assign(current, val)\n }\n this.formdataoutput = current;\n this.updateState({ props: { dataoutput: current }} as WmFormState);\n this.parentFormRef && this.parentFormRef.updateDataOutput(undefined, this.formdataoutput);\n }\n\n toggleMessage(\n type: 'success' | 'warning' | 'error' | 'info' | 'loading' | undefined,\n message: string\n ) {\n if (this.state.props.messagelayout === 'Inline') {\n this.setState({\n type: type,\n message: message,\n showInlineMsg: true\n } as WmFormState)\n return;\n }\n this.toaster.showToast({\n name: this, placement: \"\", styles: {bottom: 0},\n text: message,\n type: type,\n hideOnClick: true\n });\n }\n\n onMsgClose() {\n this.setState({\n showInlineMsg: false\n } as WmFormState)\n }\n\n renderWidget(props: WmFormProps) {\n return (\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return <View style={this.styles.root}>\n {this._background}\n {props.iconclass || props.title || props.subheading ? (\n <View style={this.styles.heading}>\n <View style={{flex: 1, flexDirection: 'row'}}>\n <WmIcon styles={this.styles.listIcon} iconclass={props.iconclass}></WmIcon>\n <View>\n <WmLabel styles={this.styles.title} caption={props.title}></WmLabel>\n <WmLabel styles={this.styles.subheading} caption={props.subheading}></WmLabel>\n </View>\n </View>\n </View>\n ) : null}\n {this.state.showInlineMsg ? <WmMessage type={this.state.type} caption={this.state.message} hideclose={false} onClose={this.onMsgClose.bind(this)}></WmMessage> : null\n }\n {props.children}\n </View>\n }\n }\n </ToastConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,SAAS,QAAmC,sCAAsC;AAC3F,SAASC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,GAAG,EAAEC,GAAG,QAAQ,QAAQ;AAE1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E,IAAI,CAACA,MAAM,CAACa,UAAW;QAACK,OAAO,EAAE1G,KAAK,CAACqG;MAAW,CAAU,CACzE,CACF,CACF,CAAC,GACL,IAAI,EACP,IAAI,CAAC5E,KAAK,CAAC2D,aAAa,gBAAGzG,KAAA,CAAAmH,aAAA,CAACvG,SAAS;QAAC0F,IAAI,EAAE,IAAI,CAACxD,KAAK,CAACwD,IAAK;QAACyB,OAAO,EAAE,IAAI,CAACjF,KAAK,CAACyD,OAAQ;QAACyB,SAAS,EAAE,KAAM;QAACC,OAAO,EAAE,IAAI,CAAChB,UAAU,CAACpD,IAAI,CAAC,IAAI;MAAE,CAAY,CAAC,GAAG,IAAI,EAEpKxC,KAAK,CAAC6G,QACH,CAAC;IACT,CAEa,CAAC;EAEpB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFormProps"],"sources":["form.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormProps extends BaseProps {\n children: any;\n dataoutput: any;\n onBeforesubmit: any;\n formdata: any;\n parentForm: string = '';\n title: any;\n subheading: any;\n iconclass: any;\n postmessage: string = 'Data posted successfully';\n errormessage: string = 'An error occured. Please try again!';\n messagelayout: string = 'Inline';\n formSubmit: Function = () => {};\n onSuccess: Function = () => {};\n onError: Function = () => {};\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,oCAK5B,EAAE;IAAA;IAAA;IAAA;IAAA,qCAID,0BAA0B;IAAA,sCACzB,qCAAqC;IAAA,uCACpC,QAAQ;IAAA,oCACT,MAAM,CAAC,CAAC;IAAA,mCACT,MAAM,CAAC,CAAC;IAAA,iCACV,MAAM,CAAC,CAAC;EAAA;AAC9B"}
1
+ {"version":3,"names":["BaseProps","WmFormProps","constructor","arguments","_defineProperty"],"sources":["form.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmFormProps extends BaseProps {\n children: any;\n dataoutput: any;\n onBeforesubmit: any;\n formdata: any;\n parentForm: string = '';\n title: any;\n subheading: any;\n iconclass: any;\n postmessage: string = 'Data posted successfully';\n errormessage: string = 'An error occured. Please try again!';\n messagelayout: string = 'Inline';\n formSubmit: Function = () => {};\n onSuccess: Function = () => {};\n onError: Function = () => {};\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,qBAK5B,EAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAID,0BAA0B;IAAAA,eAAA,uBACzB,qCAAqC;IAAAA,eAAA,wBACpC,QAAQ;IAAAA,eAAA,qBACT,MAAM,CAAC,CAAC;IAAAA,eAAA,oBACT,MAAM,CAAC,CAAC;IAAAA,eAAA,kBACV,MAAM,CAAC,CAAC;EAAA;AAC9B"}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","heading","paddingTop","paddingBottom","paddingLeft","paddingRight","borderBottomWidth","borderStyle","borderColor","formBorderColor","title","fontSize","heading4FontSize","color","formTitleColor","fontWeight","subheading","lineHeight","formSubTitleColor","marginLeft"],"sources":["form.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 {WmLabelStyles} from \"@wavemaker/app-rn-runtime/components/basic/label/label.styles\";\nimport ThemeVariables from \"@wavemaker/app-rn-runtime/styles/theme.variables\";\n\nexport type WmFormStyles = BaseStyles & {\n heading: AllStyle,\n title: WmLabelStyles,\n subheading: WmLabelStyles\n};\n\nexport const DEFAULT_CLASS = 'app-form';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmFormStyles = defineStyles({\n root: {},\n text: {},\n heading : {\n paddingTop: 12,\n paddingBottom: 12,\n paddingLeft: 0,\n paddingRight: 0,\n borderBottomWidth: 0,\n borderStyle: 'solid',\n borderColor: themeVariables.formBorderColor\n },\n title: {\n text: {\n fontSize: themeVariables.heading4FontSize,\n color: themeVariables.formTitleColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles,\n subheading: {\n text: {\n fontSize: 12,\n lineHeight: 18,\n color: themeVariables.formSubTitleColor\n }\n } as WmLabelStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('form-action', '', {\n root: {\n marginLeft: 12\n }\n } as BaseStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,OAAO,EAAG;MACRC,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,EAAE;MACjBC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,iBAAiB,EAAE,CAAC;MACpBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEZ,cAAc,CAACa;IAC9B,CAAC;IACDC,KAAK,EAAE;MACLV,IAAI,EAAE;QACJW,QAAQ,EAAEf,cAAc,CAACgB,gBAAgB;QACzCC,KAAK,EAAEjB,cAAc,CAACkB,cAAc;QACpCC,UAAU,EAAE;MACd;IACF,CAAkB;IAClBC,UAAU,EAAE;MACVhB,IAAI,EAAE;QACJW,QAAQ,EAAE,EAAE;QACZM,UAAU,EAAE,EAAE;QACdJ,KAAK,EAAEjB,cAAc,CAACsB;MACxB;IACF;EACF,CAAC,CAAC;EAEFrB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE;IAC1BE,IAAI,EAAE;MACJoB,UAAU,EAAE;IACd;EACF,CAAC,CAAe;AAClB,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","heading","paddingTop","paddingBottom","paddingLeft","paddingRight","borderBottomWidth","borderStyle","borderColor","formBorderColor","title","fontSize","heading4FontSize","color","formTitleColor","fontWeight","subheading","lineHeight","formSubTitleColor","marginLeft"],"sources":["form.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 {WmLabelStyles} from \"@wavemaker/app-rn-runtime/components/basic/label/label.styles\";\nimport ThemeVariables from \"@wavemaker/app-rn-runtime/styles/theme.variables\";\n\nexport type WmFormStyles = BaseStyles & {\n heading: AllStyle,\n title: WmLabelStyles,\n subheading: WmLabelStyles\n};\n\nexport const DEFAULT_CLASS = 'app-form';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmFormStyles = defineStyles({\n root: {},\n text: {},\n heading : {\n paddingTop: 12,\n paddingBottom: 12,\n paddingLeft: 0,\n paddingRight: 0,\n borderBottomWidth: 0,\n borderStyle: 'solid',\n borderColor: themeVariables.formBorderColor\n },\n title: {\n text: {\n fontSize: themeVariables.heading4FontSize,\n color: themeVariables.formTitleColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles,\n subheading: {\n text: {\n fontSize: 12,\n lineHeight: 18,\n color: themeVariables.formSubTitleColor\n }\n } as WmLabelStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('form-action', '', {\n root: {\n marginLeft: 12\n }\n } as BaseStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,OAAO,EAAG;MACRC,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,EAAE;MACjBC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,iBAAiB,EAAE,CAAC;MACpBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEZ,cAAc,CAACa;IAC9B,CAAC;IACDC,KAAK,EAAE;MACLV,IAAI,EAAE;QACJW,QAAQ,EAAEf,cAAc,CAACgB,gBAAgB;QACzCC,KAAK,EAAEjB,cAAc,CAACkB,cAAc;QACpCC,UAAU,EAAE;MACd;IACF,CAAkB;IAClBC,UAAU,EAAE;MACVhB,IAAI,EAAE;QACJW,QAAQ,EAAE,EAAE;QACZM,UAAU,EAAE,EAAE;QACdJ,KAAK,EAAEjB,cAAc,CAACsB;MACxB;IACF;EACF,CAAC,CAAC;EAEFrB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE;IAC1BE,IAAI,EAAE;MACJoB,UAAU,EAAE;IACd;EACF,CAAe,CAAC;AAClB,CAAC,CAAC"}
@@ -11,7 +11,7 @@ export default class WmListTemplate extends BaseComponent {
11
11
  renderWidget(props) {
12
12
  return /*#__PURE__*/React.createElement(View, {
13
13
  style: this.styles.root
14
- }, props.children);
14
+ }, this._background, props.children);
15
15
  }
16
16
  }
17
17
  //# sourceMappingURL=list-template.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmListTemplateProps","DEFAULT_CLASS","WmListTemplateState","WmListTemplate","constructor","props","renderWidget","styles","root","children"],"sources":["list-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmListTemplateProps from './list-template.props';\nimport { DEFAULT_CLASS, WmListTemplateStyles } from './list-template.styles';\n\nexport class WmListTemplateState extends BaseComponentState<WmListTemplateProps> {\n\n}\n\nexport default class WmListTemplate extends BaseComponent<WmListTemplateProps, WmListTemplateState, WmListTemplateStyles> {\n\n constructor(props: WmListTemplateProps) {\n super(props, DEFAULT_CLASS, new WmListTemplateProps());\n }\n\n renderWidget(props: WmListTemplateProps) {\n return (\n <View style={this.styles.root}>{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,aAAa,QAA8B,wBAAwB;AAE5E,OAAO,MAAMC,mBAAmB,SAASH,kBAAkB,CAAsB;AAIjF,eAAe,MAAMI,cAAc,SAASL,aAAa,CAAiE;EAExHM,WAAW,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,mBAAmB,EAAE,CAAC;EACxD;EAEAM,YAAY,CAACD,KAA0B,EAAE;IACvC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAEH,KAAK,CAACI,QAAQ,CAAQ;EAE1D;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmListTemplateProps","DEFAULT_CLASS","WmListTemplateState","WmListTemplate","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["list-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmListTemplateProps from './list-template.props';\nimport { DEFAULT_CLASS, WmListTemplateStyles } from './list-template.styles';\n\nexport class WmListTemplateState extends BaseComponentState<WmListTemplateProps> {\n\n}\n\nexport default class WmListTemplate extends BaseComponent<WmListTemplateProps, WmListTemplateState, WmListTemplateStyles> {\n\n constructor(props: WmListTemplateProps) {\n super(props, DEFAULT_CLASS, new WmListTemplateProps());\n }\n\n renderWidget(props: WmListTemplateProps) {\n return (\n <View style={this.styles.root}>{this._background}{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,aAAa,QAA8B,wBAAwB;AAE5E,OAAO,MAAMC,mBAAmB,SAASH,kBAAkB,CAAsB;AAIjF,eAAe,MAAMI,cAAc,SAASL,aAAa,CAAiE;EAExHM,WAAWA,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,mBAAmB,CAAC,CAAC,CAAC;EACxD;EAEAM,YAAYA,CAACD,KAA0B,EAAE;IACvC,oBACET,KAAA,CAAAW,aAAA,CAACV,IAAI;MAACW,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEN,KAAK,CAACO,QAAe,CAAC;EAE5E;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmListTemplateProps"],"sources":["list-template.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmListTemplateProps extends BaseProps {\n children: any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,mBAAmB,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;EAAA;AAE3D"}
1
+ {"version":3,"names":["BaseProps","WmListTemplateProps","constructor","arguments","_defineProperty"],"sources":["list-template.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmListTemplateProps extends BaseProps {\n children: any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,mBAAmB,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;EAAA;AAE3D"}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flex","text","borderBottomWidth"],"sources":["list-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmListTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-list-template';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListTemplateStyles = defineStyles<WmListTemplateStyles>({\n root: {\n flex: 1\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('list-card-template', '', {\n root : {\n borderBottomWidth: 0\n }\n } as WmListTemplateStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,mBAAmB;AAChDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAmC,GAAGL,YAAY,CAAuB;IAC3EM,IAAI,EAAE;MACFC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IAC/BE,IAAI,EAAG;MACHG,iBAAiB,EAAE;IACvB;EACJ,CAAC,CAAyB;AAC9B,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flex","text","borderBottomWidth"],"sources":["list-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmListTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-list-template';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListTemplateStyles = defineStyles<WmListTemplateStyles>({\n root: {\n flex: 1\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('list-card-template', '', {\n root : {\n borderBottomWidth: 0\n }\n } as WmListTemplateStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,mBAAmB;AAChDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAmC,GAAGL,YAAY,CAAuB;IAC3EM,IAAI,EAAE;MACFC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IAC/BE,IAAI,EAAG;MACHG,iBAAiB,EAAE;IACvB;EACJ,CAAyB,CAAC;AAC9B,CAAC,CAAC"}