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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/actions/notification-action.js.map +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
  7. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
  9. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel.component.js +214 -69
  11. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
  13. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel.styles.js +22 -10
  15. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  16. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  17. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  18. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  19. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  20. app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
  21. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
  23. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  24. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  25. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  26. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  27. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  28. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  29. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  30. app-rn-runtime/components/basic/button/button.component.js +20 -7
  31. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  32. app-rn-runtime/components/basic/button/button.styles.js +15 -5
  33. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
  35. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  36. app-rn-runtime/components/basic/icon/icon.component.js +11 -5
  37. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  38. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  39. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  40. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  41. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  42. app-rn-runtime/components/basic/label/label.component.js +79 -11
  43. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  44. app-rn-runtime/components/basic/label/label.props.js +1 -0
  45. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  46. app-rn-runtime/components/basic/label/label.styles.js +5 -0
  47. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  48. app-rn-runtime/components/basic/message/message.component.js +6 -3
  49. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  50. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  51. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
  53. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  54. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  55. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  57. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  58. app-rn-runtime/components/basic/search/search.component.js +12 -6
  59. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  60. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  61. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  62. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  63. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  64. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  65. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/video/video.component.js +2 -1
  67. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  68. app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  70. app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
  71. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
  75. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  76. app-rn-runtime/components/chart/basechart.component.js +158 -46
  77. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  78. app-rn-runtime/components/chart/basechart.props.js +18 -4
  79. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  80. app-rn-runtime/components/chart/basechart.styles.js +44 -2
  81. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
  83. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  84. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
  85. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
  87. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  89. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  90. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
  91. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  92. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  93. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  94. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +275 -0
  95. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
  96. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +17 -0
  97. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
  98. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
  99. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
  100. app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
  101. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  102. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
  103. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/container.component.js +14 -4
  105. app-rn-runtime/components/container/container.component.js.map +1 -1
  106. app-rn-runtime/components/container/container.props.js +1 -0
  107. app-rn-runtime/components/container/container.props.js.map +1 -1
  108. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  109. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  110. app-rn-runtime/components/container/panel/panel.component.js +44 -62
  111. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  112. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  113. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  114. app-rn-runtime/components/container/partial-host.component.js +1 -1
  115. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
  117. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  118. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
  119. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  120. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  121. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  122. app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
  123. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  124. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
  125. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  126. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  127. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  128. app-rn-runtime/components/container/wizard/wizard.component.js +139 -22
  129. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  130. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  131. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  132. app-rn-runtime/components/container/wizard/wizard.styles.js +117 -6
  133. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  134. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
  135. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  136. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
  137. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  138. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  139. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  140. app-rn-runtime/components/data/card/card.component.js +3 -2
  141. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  143. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  144. app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
  145. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  146. app-rn-runtime/components/data/form/form.component.js +12 -6
  147. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  150. app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
  151. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.component.js +93 -31
  153. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.props.js +7 -0
  155. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  156. app-rn-runtime/components/data/list/list.styles.js +12 -5
  157. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  158. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  159. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  160. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  161. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  162. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  163. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  164. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  165. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  166. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  167. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  168. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  169. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  170. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  171. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  172. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  173. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  174. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  175. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  176. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
  177. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  178. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
  179. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  180. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
  181. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  182. app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
  183. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  184. app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
  185. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  186. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  187. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  188. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  189. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  190. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  191. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  192. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  193. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  194. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  195. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  196. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
  197. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  198. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
  199. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  200. app-rn-runtime/components/input/chips/chips.component.js +15 -4
  201. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  202. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  203. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  204. app-rn-runtime/components/input/composite/composite.component.js +8 -1
  205. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  206. app-rn-runtime/components/input/composite/composite.props.js +1 -0
  207. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  208. app-rn-runtime/components/input/composite/composite.styles.js +16 -1
  209. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  210. app-rn-runtime/components/input/currency/currency.component.js +21 -3
  211. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  212. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  213. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  214. app-rn-runtime/components/input/currency/currency.styles.js +31 -5
  215. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  216. app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
  217. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  218. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  219. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  220. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  221. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  222. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  223. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  224. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  225. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  226. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  227. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  228. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  229. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  230. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  231. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  232. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  233. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  234. app-rn-runtime/components/input/number/number.component.js +16 -2
  235. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  236. app-rn-runtime/components/input/number/number.props.js +1 -0
  237. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  238. app-rn-runtime/components/input/number/number.styles.js +23 -2
  239. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  240. app-rn-runtime/components/input/radioset/radioset.component.js +13 -6
  241. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  242. app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
  243. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  244. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -9
  245. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  246. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  247. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  248. app-rn-runtime/components/input/select/select.component.js +17 -13
  249. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  250. app-rn-runtime/components/input/select/select.styles.js +8 -4
  251. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  252. app-rn-runtime/components/input/slider/slider.component.js +99 -23
  253. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  254. app-rn-runtime/components/input/slider/slider.styles.js +30 -3
  255. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  256. app-rn-runtime/components/input/switch/switch.component.js +11 -5
  257. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  258. app-rn-runtime/components/input/switch/switch.styles.js +15 -9
  259. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  260. app-rn-runtime/components/input/text/text.component.js +12 -1
  261. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  262. app-rn-runtime/components/input/text/text.props.js +1 -0
  263. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  264. app-rn-runtime/components/input/text/text.styles.js +22 -1
  265. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  266. app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
  267. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  268. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  269. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  270. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  271. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  272. app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
  273. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  274. app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
  275. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  276. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
  277. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  278. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  279. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  280. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
  281. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  282. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  283. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  284. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  285. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  286. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  287. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  288. app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
  289. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  290. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  291. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  292. app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
  293. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  294. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  295. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  296. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  297. app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
  298. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  299. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  300. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  301. app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
  302. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  303. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  304. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  305. app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
  306. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  307. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  308. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  309. app-rn-runtime/components/page/tabbar/tabbar.styles.js +76 -1
  310. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  311. app-rn-runtime/core/base.component.js +84 -37
  312. app-rn-runtime/core/base.component.js.map +1 -1
  313. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  314. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  315. app-rn-runtime/core/components/textinput.component.js +25 -2
  316. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  317. app-rn-runtime/core/constant.service.js +22 -0
  318. app-rn-runtime/core/constant.service.js.map +1 -0
  319. app-rn-runtime/core/formatters.js +9 -2
  320. app-rn-runtime/core/formatters.js.map +1 -1
  321. app-rn-runtime/core/imageSizeEstimator.js +4 -0
  322. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  323. app-rn-runtime/core/key.extractor.js +22 -0
  324. app-rn-runtime/core/key.extractor.js.map +1 -0
  325. app-rn-runtime/core/tappable.component.js +49 -12
  326. app-rn-runtime/core/tappable.component.js.map +1 -1
  327. app-rn-runtime/core/testid.provider.js +5 -0
  328. app-rn-runtime/core/testid.provider.js.map +1 -0
  329. app-rn-runtime/core/utils.js +16 -0
  330. app-rn-runtime/core/utils.js.map +1 -1
  331. app-rn-runtime/gestures/swipe.animation.js +90 -16
  332. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  333. app-rn-runtime/package.json +6 -3
  334. app-rn-runtime/runtime/App.js +55 -22
  335. app-rn-runtime/runtime/App.js.map +1 -1
  336. app-rn-runtime/runtime/base-fragment.component.js +27 -6
  337. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  338. app-rn-runtime/runtime/base-page.component.js +25 -2
  339. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  340. app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
  341. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  342. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  343. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  344. app-rn-runtime/runtime/services/app-security.service.js +14 -3
  345. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  346. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  347. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  348. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  349. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  350. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  351. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  352. app-rn-runtime/styles/theme.js +66 -1
  353. app-rn-runtime/styles/theme.js.map +1 -1
  354. app-rn-runtime/styles/theme.variables.js +24 -3
  355. app-rn-runtime/styles/theme.variables.js.map +1 -1
  356. app-rn-runtime/variables/http.service.js +1 -1
  357. app-rn-runtime/variables/http.service.js.map +1 -1
  358. app-rn-runtime/variables/live-variable.js +1 -0
  359. app-rn-runtime/variables/live-variable.js.map +1 -1
  360. app-rn-runtime/variables/model-variable.js +13 -1
  361. app-rn-runtime/variables/model-variable.js.map +1 -1
  362. app-rn-runtime/variables/service-variable.js +1 -0
  363. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -5,6 +5,7 @@ export const DEFAULT_CLASS = 'app-currency';
5
5
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
6
6
  const defaultStyles = defineStyles({
7
7
  root: {
8
+ minHeight: 42,
8
9
  borderWidth: 1,
9
10
  borderStyle: 'solid',
10
11
  borderColor: themeVariables.inputBorderColor,
@@ -16,22 +17,29 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
16
17
  fontSize: 16
17
18
  },
18
19
  input: {
19
- height: '100%',
20
- padding: 12,
20
+ minHeight: 42,
21
+ paddingTop: 8,
22
+ paddingBottom: 8,
23
+ paddingLeft: 16,
24
+ paddingRight: 16,
21
25
  flex: 1,
22
26
  borderWidth: 1,
23
27
  borderColor: themeVariables.transparent,
24
28
  borderStyle: 'solid'
25
29
  },
26
30
  labelWrapper: {
27
- height: '100%',
31
+ minHeight: 42,
28
32
  backgroundColor: themeVariables.primaryColor,
29
33
  borderTopLeftRadius: 6,
30
34
  borderBottomLeftRadius: 6,
31
35
  width: 48,
32
- padding: 12
36
+ paddingTop: 8,
37
+ paddingBottom: 8,
38
+ paddingLeft: 16,
39
+ paddingRight: 16
33
40
  },
34
41
  label: {
42
+ marginVertical: 0.7,
35
43
  color: themeVariables.primaryContrastColor,
36
44
  textAlignVertical: 'center',
37
45
  textAlign: 'center',
@@ -44,7 +52,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
44
52
  },
45
53
  placeholderText: {
46
54
  color: themeVariables.inputPlaceholderColor
47
- }
55
+ },
56
+ floatingLabel: {},
57
+ activeFloatingLabel: {}
48
58
  });
49
59
  addStyle(DEFAULT_CLASS, '', defaultStyles);
50
60
  addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
@@ -60,5 +70,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
60
70
  backgroundColor: themeVariables.inputDisabledBgColor
61
71
  }
62
72
  });
73
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
74
+ root: {
75
+ minHeight: 48
76
+ },
77
+ floatingLabel: {
78
+ position: 'absolute',
79
+ top: 12,
80
+ left: 16,
81
+ fontSize: 14,
82
+ textAlign: 'left',
83
+ color: themeVariables.floatingLabelColor
84
+ },
85
+ activeFloatingLabel: {
86
+ color: themeVariables.activeFloatingLabelColor
87
+ }
88
+ });
63
89
  });
64
90
  //# sourceMappingURL=currency.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","height","padding","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","label","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","inputPlaceholderColor","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor"],"sources":["currency.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 { Platform } from 'react-native';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n height: '100%',\n padding: 12,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n height: '100%',\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n padding: 12,\n },\n label: {\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;AAQvC,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEN,cAAc,CAACO,gBAAgB;MAC5CC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WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLK,eAAe,EAAER,cAAc,CAACwC;IAClC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","paddingTop","paddingBottom","paddingLeft","paddingRight","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","label","marginVertical","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","inputPlaceholderColor","floatingLabel","activeFloatingLabel","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["currency.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 { Platform } from 'react-native';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n minHeight: 42,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n minHeight: 42,\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16\n },\n label: {\n marginVertical: 0.7,\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n textAlign: 'left',\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;AAUvC,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,C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AM,EAAE,EAAE,EAAED,QAAQ,CAAC8C,EAAE,IAAE,KAAK,GAAC;IACtDrB,YAAY,EAAC;MACXE,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBmB,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACL5C,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAAC8C;IAClC;EACJ,CAAC,CAAC;EACF7C,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDqC,aAAa,EAAE;MACbM,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRnC,QAAQ,EAAE,EAAE;MACZkB,SAAS,EAAE,MAAM;MACjBH,KAAK,EAAE7B,cAAc,CAACkD;IACxB,CAAC;IACDR,mBAAmB,EAAE;MACnBb,KAAK,EAAE7B,cAAc,CAACmD;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -13,6 +14,8 @@ import WebDatePicker from './date-picker.component';
13
14
  import { isNumber, isString } from 'lodash-es';
14
15
  import { ModalConsumer } from '@wavemaker/app-rn-runtime/core/modal.service';
15
16
  import { validateField } from '@wavemaker/app-rn-runtime/core/utils';
17
+ import { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';
18
+ import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';
16
19
  export class BaseDatetimeState extends BaseComponentState {
17
20
  constructor() {
18
21
  super(...arguments);
@@ -72,6 +75,17 @@ export default class BaseDatetime extends BaseComponent {
72
75
  clearInterval(this.state.timerId);
73
76
  }
74
77
  }
78
+ convertTimezone(date) {
79
+ const timezone = AppI18nService.getTimezone();
80
+ if (timezone) {
81
+ const parsedDateString = new Date(date).toLocaleString(this.props.locale ? this.props.locale : 'en-us', {
82
+ timeZone: timezone
83
+ });
84
+ return moment(parsedDateString, 'M/D/YYYY, h:mm:ss A');
85
+ } else {
86
+ return date;
87
+ }
88
+ }
75
89
  onPropertyChange(name, $new, $old) {
76
90
  super.onPropertyChange(name, $new, $old);
77
91
  const props = this.state.props;
@@ -86,13 +100,14 @@ export default class BaseDatetime extends BaseComponent {
86
100
  case 'datepattern':
87
101
  case 'outputformat':
88
102
  if (props.datavalue && props.outputformat && props.datepattern) {
89
- if (props.datavalue === CURRENT_DATE || props.datavalue === CURRENT_TIME) {
90
- props.datavalue = this.format(new Date(), props.outputformat);
103
+ let datavalue = props.datavalue;
104
+ if (datavalue === CURRENT_DATE || datavalue === CURRENT_TIME) {
105
+ datavalue = new Date();
91
106
  }
92
- const date = isString(props.datavalue) ? this.parse(props.datavalue, props.outputformat) : props.datavalue;
107
+ const date = isString(datavalue) ? this.parse(datavalue, props.outputformat) : datavalue;
93
108
  this.updateState({
94
109
  dateValue: date,
95
- displayValue: this.format(date, props.datepattern)
110
+ displayValue: this.format(this.convertTimezone(datavalue), props.datepattern)
96
111
  });
97
112
  } else {
98
113
  this.updateState({
@@ -222,7 +237,7 @@ export default class BaseDatetime extends BaseComponent {
222
237
  });
223
238
  }
224
239
  addTouchableOpacity(props, children, styles) {
225
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
240
+ return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction(), {
226
241
  style: styles,
227
242
  onPress: () => {
228
243
  if (!props.readonly) {
@@ -230,7 +245,7 @@ export default class BaseDatetime extends BaseComponent {
230
245
  }
231
246
  this.invokeEventCallback('onTap', [null, this]);
232
247
  }
233
- }, children);
248
+ }), children);
234
249
  }
235
250
  getIcon() {
236
251
  if (this.state.props.mode === 'time') {
@@ -241,11 +256,18 @@ export default class BaseDatetime extends BaseComponent {
241
256
  renderWidget(props) {
242
257
  return this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(View, {
243
258
  style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]
244
- }, this._background, /*#__PURE__*/React.createElement(View, {
259
+ }, this._background, props.floatinglabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
260
+ moveUp: !!(props.datavalue || this.state.isFocused),
261
+ label: props.floatinglabel ?? props.placeholder,
262
+ style: {
263
+ ...(this.styles.floatingLabel || []),
264
+ ...(this.state.isFocused ? this.styles.activeFloatingLabel || {} : {})
265
+ }
266
+ }) : null, /*#__PURE__*/React.createElement(View, {
245
267
  style: this.styles.container
246
- }, this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(Text, {
268
+ }, this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(Text, _extends({
247
269
  style: [this.styles.text, this.state.displayValue ? {} : this.styles.placeholderText]
248
- }, this.state.displayValue || this.state.props.placeholder), [{
270
+ }, this.getTestPropsForLabel()), this.state.displayValue || (props.floatinglabel ? '' : this.state.props.placeholder)), [{
249
271
  flex: 1
250
272
  }, this.isRTL ? {
251
273
  flexDirection: 'row',
@@ -256,6 +278,7 @@ export default class BaseDatetime extends BaseComponent {
256
278
  color: this.styles.text.color,
257
279
  ...this.styles.clearIcon
258
280
  },
281
+ id: this.getTestId('clearicon'),
259
282
  onTap: () => {
260
283
  this.onDateChange(null, null);
261
284
  this.clearBtnClicked = true;
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","TouchableOpacity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","validateField","BaseDatetimeState","constructor","arguments","_defineProperty","CURRENT_DATE","CURRENT_TIME","BaseDatetime","props","defaultClass","length","undefined","defaultProps","defaultState","format","date","Date","getTime","parse","parseInt","toDate","monitorAndUpdateCurrentTime","stopCurrentTimeMonitor","timerId","setInterval","updateState","readonly","datavalue","now","state","clearInterval","onPropertyChange","name","$new","$old","invokeEventCallback","prevDatavalue","outputformat","datepattern","dateValue","displayValue","onFieldChange","minDateVal","mindate","maxDateVal","maxdate","disabled","onDateChange","$event","validate","modes","shift","isFocused","showDatePicker","timestamp","onBlur","OS","setTimeout","triggerValidation","onFocus","mode","value","validationObj","setState","isValid","errorType","componentWillUnmount","renderWebWidget","createElement","locale","onDismiss","minimumDate","maximumDate","renderNativeWidget","is24Hour","display","onChange","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeWidgetWithModal","modalService","nativeModalOptions","content","Fragment","hideModal","centered","onClose","showModal","addTouchableOpacity","children","styles","style","onPress","getIcon","renderWidget","root","invalid","focused","_background","container","text","placeholderText","placeholder","flex","isRTL","flexDirection","textAlign","iconclass","color","clearIcon","onTap","clearBtnClicked","calendarIcon"],"sources":["base-datetime.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, TouchableOpacity } from 'react-native';\nimport moment from 'moment';\nimport DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmDatetimeProps from './datetime/datetime.props';\nimport { DEFAULT_CLASS, WmDatetimeStyles } from './datetime/datetime.styles';\nimport WebDatePicker from './date-picker.component';\nimport { isNumber, isString } from 'lodash-es';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseDatetimeState extends BaseComponentState<WmDatetimeProps> {\n showDatePicker = false;\n dateValue: Date = null as any;\n displayValue: string = null as any;\n isFocused = false;\n timerId: NodeJS.Timer = null as any;\n isValid: boolean = true;\n errorType = '';\n}\n\nconst CURRENT_DATE = 'CURRENT_DATE';\nconst CURRENT_TIME = 'CURRENT_TIME';\n\nexport default abstract class BaseDatetime extends BaseComponent<WmDatetimeProps, BaseDatetimeState, WmDatetimeStyles> {\n clearBtnClicked = false;\n modes = [] as string[];\n nativeModalOptions: ModalOptions = {} as any;\n prevDatavalue: any;\n\n constructor(props: WmDatetimeProps, defaultClass = DEFAULT_CLASS, defaultProps = new WmDatetimeProps(), defaultState= new BaseDatetimeState()) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n format(date: Date | number | undefined, format: string) {\n if (format === 'timestamp') {\n return date instanceof Date ? '' + date.getTime() : date;\n }\n return date && moment(date).format(format);\n }\n\n parse(date: string | number, format: string) {\n if (format === 'timestamp') {\n if (isString(date)) {\n return new Date(parseInt(date));\n }\n if (isNumber(date)) {\n return new Date(date);\n }\n }\n return date && moment(date, format).toDate();\n }\n\n private monitorAndUpdateCurrentTime() {\n this.stopCurrentTimeMonitor();\n const timerId = setInterval(() => {\n this.updateState({\n props: {\n readonly: true,\n datavalue: Date.now()\n },\n timerId: timerId\n } as any as BaseDatetimeState);\n }, 1000);\n }\n\n private stopCurrentTimeMonitor() {\n if (this.state.timerId) {\n clearInterval(this.state.timerId as any);\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n //@ts-ignore\n case 'datavalue':\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n this.prevDatavalue = $old;\n if (props.datavalue === CURRENT_TIME) {\n this.monitorAndUpdateCurrentTime();\n }\n case 'datepattern':\n case 'outputformat':\n if (props.datavalue && props.outputformat && props.datepattern) {\n if (props.datavalue === CURRENT_DATE || props.datavalue === CURRENT_TIME) {\n props.datavalue = this.format(new Date(), props.outputformat);\n }\n const date = isString(props.datavalue) ? this.parse(props.datavalue as string, props.outputformat) : props.datavalue;\n this.updateState({\n dateValue : date,\n displayValue: this.format(date as any, props.datepattern)\n } as BaseDatetimeState);\n } else {\n this.updateState({\n dateValue : null as any,\n displayValue: null as any\n } as BaseDatetimeState);\n }\n this.props.onFieldChange && this.props.onFieldChange('datavalue', props.datavalue, this.prevDatavalue);\n break;\n case 'mindate':\n if (isString($new)) {\n const minDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.mindate;\n this.updateState({\n props: {\n mindate: moment(minDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'maxdate':\n if (isString($new)) {\n const maxDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.maxdate;\n this.updateState({\n props: {\n maxdate: moment(maxDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'readonly':\n this.updateState({\n props: {\n disabled: $new\n }\n } as BaseDatetimeState)\n break;\n }\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date) {\n this.validate(date);\n this.modes.shift();\n this.updateState({\n isFocused: false,\n showDatePicker: !!this.modes.length,\n props: {\n datavalue: this.format(date, this.state.props.outputformat as string),\n timestamp: this.format(date, 'timestamp')\n }\n } as BaseDatetimeState);\n }\n\n onBlur() {\n if (Platform.OS === 'web') {\n this.validate(this.state.props.datavalue);\n setTimeout(() => this.props.triggerValidation && this.props.triggerValidation());\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n onFocus() {\n if (!this.state.props.readonly) {\n if (Platform.OS !== 'web' && this.state.props.mode === 'datetime') {\n this.modes = ['date', 'time'];\n } else {\n this.modes = [this.state.props.mode];\n }\n this.updateState({showDatePicker: true, isFocused: true} as BaseDatetimeState);\n this.invokeEventCallback('onFocus', [null, this]);\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.setState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as BaseDatetimeState)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.stopCurrentTimeMonitor();\n }\n\n renderWebWidget(props: WmDatetimeProps) {\n return (<WebDatePicker\n mode={this.state.props.mode}\n locale={props.locale}\n value={this.state.dateValue || new Date()}\n onDateChange={(date: Date) => this.onDateChange(null as any, date)}\n onDismiss={() =>\n this.updateState({\n isFocused: false,\n showDatePicker: false\n } as BaseDatetimeState, () => this.onBlur())}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}/>);\n }\n\n renderNativeWidget(props: WmDatetimeProps, onDismiss?: Function) {\n return (<DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display={Platform.OS === 'ios' ? 'spinner': 'default'}\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n this.onDateChange(event, date || this.state.dateValue);\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n );\n }\n\n renderNativeWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n addTouchableOpacity(props: WmDatetimeProps, children: React.ReactNode, styles?: any) : React.ReactNode{\n return (\n <TouchableOpacity style={styles} onPress={() => {\n if (!props.readonly) {\n this.onFocus();\n }\n this.invokeEventCallback('onTap', [null, this]);\n }}>\n {children}\n </TouchableOpacity>\n );\n }\n\n getIcon() {\n if (this.state.props.mode === 'time') {\n return 'wm-sl-l sl-time'\n }\n return 'wm-sl-l sl-calendar';\n }\n\n renderWidget(props: WmDatetimeProps) {\n return ( \n this.addTouchableOpacity(props, (\n <View style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]}>\n {this._background}\n <View style={this.styles.container}>\n {this.addTouchableOpacity(props, (\n <Text style={[\n this.styles.text,\n this.state.displayValue ? {} : this.styles.placeholderText\n ]}>{this.state.displayValue || this.state.props.placeholder}</Text>\n ), [{ flex: 1}, this.isRTL?{flexDirection:'row', textAlign:'right'}:{}] )}\n {(!props.readonly && props.datavalue &&\n (<WmIcon iconclass=\"wi wi-clear\"\n styles={{color: this.styles.text.color, ...this.styles.clearIcon}}\n onTap={() => {\n this.onDateChange(null as any, null as any);\n this.clearBtnClicked = true;\n }}/>)) || null}\n {this.addTouchableOpacity(props, (\n <WmIcon iconclass={this.getIcon()} styles={{color: this.styles.text.color, ...this.styles.calendarIcon}}/>\n ))}\n </View>\n {\n this.state.showDatePicker\n && ((Platform.OS === 'web' && this.renderWebWidget(props))\n || (Platform.OS === 'android' && this.renderNativeWidget(props))\n || (Platform.OS === 'ios' && this.renderNativeWidget(props)))\n }\n </View>\n ))\n );\n }\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,gBA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,EAAE,IAAI,CAACd,OAAO,CAAC,CAAE;MAACH,MAAM,EAAE;QAACkB,KAAK,EAAE,IAAI,CAAClB,MAAM,CAACU,IAAI,CAACQ,KAAK;QAAE,GAAG,IAAI,CAAClB,MAAM,CAACsB;MAAY;IAAE,CAAC,CAC1G,CACG,CAAC,EAEP,IAAI,CAACvF,KAAK,CAACwB,cAAc,KACpBlE,QAAQ,CAACqE,EAAE,KAAK,KAAK,IAAI,IAAI,CAACW,eAAe,CAAC3D,KAAK,CAAC,IACnDrB,QAAQ,CAACqE,EAAE,KAAK,SAAS,IAAI,IAAI,CAACiB,kBAAkB,CAACjE,KAAK,CAAE,IAC5DrB,QAAQ,CAACqE,EAAE,KAAK,KAAK,IAAI,IAAI,CAACiB,kBAAkB,CAACjE,KAAK,CAAE,CAE5D,CACL,CAAC;EAER;AACF"}
1
+ {"version":3,"names":["React","View","Text","Platform","TouchableOpacity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","validateField","FloatingLabel","AppI18nService","BaseDatetimeState","constructor","arguments","_defineProperty","CURRENT_DATE","CURRENT_TIME","BaseDatetime","props","defaultClass","length","undefined","defaultProps","defaultState","format","date","Date","getTime","parse","parseInt","toDate","monitorAndUpdateCurrentTime","stopCurrentTimeMonitor","timerId","setInterval","updateState","readonly","datavalue","now","state","clearInterval","convertTimezone","timezone","getTimezone","parsedDateString","toLocaleString","locale","timeZone","onPropertyChange","name","$new","$old","invokeEventCallback","prevDatavalue","outputformat","datepattern","dateValue","displayValue","onFieldChange","minDateVal","mindate","maxDateVal","maxdate","disabled","onDateChange","$event","validate","modes","shift","isFocused","showDatePicker","timestamp","onBlur","OS","setTimeout","triggerValidation","onFocus","mode","value","validationObj","setState","isValid","errorType","componentWillUnmount","renderWebWidget","createElement","onDismiss","minimumDate","maximumDate","renderNativeWidget","is24Hour","display","onChange","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeWidgetWithModal","modalService","nativeModalOptions","content","Fragment","hideModal","centered","onClose","showModal","addTouchableOpacity","children","styles","_extends","getTestPropsForAction","style","onPress","getIcon","renderWidget","root","invalid","focused","_background","floatinglabel","moveUp","label","placeholder","floatingLabel","activeFloatingLabel","container","text","placeholderText","getTestPropsForLabel","flex","isRTL","flexDirection","textAlign","iconclass","color","clearIcon","id","getTestId","onTap","clearBtnClicked","calendarIcon"],"sources":["base-datetime.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, TouchableOpacity, ViewStyle } from 'react-native';\nimport moment from 'moment';\nimport DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmDatetimeProps from './datetime/datetime.props';\nimport { DEFAULT_CLASS, WmDatetimeStyles } from './datetime/datetime.styles';\nimport WebDatePicker from './date-picker.component';\nimport { isNumber, isString } from 'lodash-es';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\nimport { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';\nimport AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';\n\nexport class BaseDatetimeState extends BaseComponentState<WmDatetimeProps> {\n showDatePicker = false;\n dateValue: Date = null as any;\n displayValue: string = null as any;\n isFocused = false;\n timerId: NodeJS.Timer = null as any;\n isValid: boolean = true;\n errorType = '';\n}\n\nconst CURRENT_DATE = 'CURRENT_DATE';\nconst CURRENT_TIME = 'CURRENT_TIME';\n\nexport default abstract class BaseDatetime extends BaseComponent<WmDatetimeProps, BaseDatetimeState, WmDatetimeStyles> {\n clearBtnClicked = false;\n modes = [] as string[];\n nativeModalOptions: ModalOptions = {} as any;\n prevDatavalue: any;\n\n constructor(props: WmDatetimeProps, defaultClass = DEFAULT_CLASS, defaultProps = new WmDatetimeProps(), defaultState= new BaseDatetimeState()) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n format(date: Date | number | undefined, format: string) {\n if (format === 'timestamp') {\n return date instanceof Date ? '' + date.getTime() : date;\n }\n return date && moment(date).format(format);\n }\n\n parse(date: string | number, format: string) {\n if (format === 'timestamp') {\n if (isString(date)) {\n return new Date(parseInt(date));\n }\n if (isNumber(date)) {\n return new Date(date);\n }\n }\n return date && moment(date, format).toDate();\n }\n\n private monitorAndUpdateCurrentTime() {\n this.stopCurrentTimeMonitor();\n const timerId = setInterval(() => {\n this.updateState({\n props: {\n readonly: true,\n datavalue: Date.now()\n },\n timerId: timerId\n } as any as BaseDatetimeState);\n }, 1000);\n }\n\n private stopCurrentTimeMonitor() {\n if (this.state.timerId) {\n clearInterval(this.state.timerId as any);\n }\n }\n\n convertTimezone(date: any){ \n const timezone = AppI18nService.getTimezone();\n if (timezone) {\n const parsedDateString = new Date(date).toLocaleString(this.props.locale ? this.props.locale : 'en-us', { timeZone: timezone });\n return moment(parsedDateString, 'M/D/YYYY, h:mm:ss A');\n }\n else {\n return date;\n }\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n //@ts-ignore\n case 'datavalue':\n this.invokeEventCallback('onChange', [null, this, $new, $old]);\n this.prevDatavalue = $old;\n if (props.datavalue === CURRENT_TIME) {\n this.monitorAndUpdateCurrentTime();\n }\n case 'datepattern':\n case 'outputformat':\n if (props.datavalue && props.outputformat && props.datepattern) {\n let datavalue = props.datavalue;\n if (datavalue === CURRENT_DATE || datavalue === CURRENT_TIME) {\n datavalue = new Date() as any;\n }\n const date = isString(datavalue) ? this.parse(datavalue as string, props.outputformat) : datavalue;\n this.updateState({\n dateValue : date,\n displayValue: this.format(this.convertTimezone(datavalue) as any, props.datepattern)\n } as BaseDatetimeState);\n } else {\n this.updateState({\n dateValue : null as any,\n displayValue: null as any\n } as BaseDatetimeState);\n }\n this.props.onFieldChange && this.props.onFieldChange('datavalue', props.datavalue, this.prevDatavalue);\n break;\n case 'mindate':\n if (isString($new)) {\n const minDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.mindate;\n this.updateState({\n props: {\n mindate: moment(minDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'maxdate':\n if (isString($new)) {\n const maxDateVal = ($new === CURRENT_DATE || $new === CURRENT_TIME) ? new Date() : props.maxdate;\n this.updateState({\n props: {\n maxdate: moment(maxDateVal, props.datepattern).toDate()\n }\n } as BaseDatetimeState);\n }\n break;\n case 'readonly':\n this.updateState({\n props: {\n disabled: $new\n }\n } as BaseDatetimeState)\n break;\n }\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date) {\n this.validate(date);\n this.modes.shift();\n this.updateState({\n isFocused: false,\n showDatePicker: !!this.modes.length,\n props: {\n datavalue: this.format(date, this.state.props.outputformat as string),\n timestamp: this.format(date, 'timestamp')\n }\n } as BaseDatetimeState);\n }\n\n onBlur() {\n if (Platform.OS === 'web') {\n this.validate(this.state.props.datavalue);\n setTimeout(() => this.props.triggerValidation && this.props.triggerValidation());\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n onFocus() {\n if (!this.state.props.readonly) {\n if (Platform.OS !== 'web' && this.state.props.mode === 'datetime') {\n this.modes = ['date', 'time'];\n } else {\n this.modes = [this.state.props.mode];\n }\n this.updateState({showDatePicker: true, isFocused: true} as BaseDatetimeState);\n this.invokeEventCallback('onFocus', [null, this]);\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.setState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as BaseDatetimeState)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.stopCurrentTimeMonitor();\n }\n\n renderWebWidget(props: WmDatetimeProps) {\n return (<WebDatePicker\n mode={this.state.props.mode}\n locale={props.locale}\n value={this.state.dateValue || new Date()}\n onDateChange={(date: Date) => this.onDateChange(null as any, date)}\n onDismiss={() =>\n this.updateState({\n isFocused: false,\n showDatePicker: false\n } as BaseDatetimeState, () => this.onBlur())}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}/>);\n }\n\n renderNativeWidget(props: WmDatetimeProps, onDismiss?: Function) {\n return (<DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display={Platform.OS === 'ios' ? 'spinner': 'default'}\n onChange={(event: DateTimePickerEvent, date?: Date) => {\n if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {\n const dateSelected = this.state.dateValue;\n date = moment(date)\n .set('month', dateSelected.getMonth())\n .set('year', dateSelected.getFullYear())\n .set('date', dateSelected.getDate())\n .toDate();\n }\n this.onDateChange(event, date || this.state.dateValue);\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n );\n }\n\n renderNativeWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeWidget(props, () => modalService.hideModal(this.nativeModalOptions))}\n </>);\n this.nativeModalOptions.centered = true;\n this.nativeModalOptions.onClose = () => {\n this.onBlur();\n };\n modalService.showModal(this.nativeModalOptions);\n return null;\n }}</ModalConsumer>);\n }\n\n addTouchableOpacity(props: WmDatetimeProps, children: React.ReactNode, styles?: any) : React.ReactNode{\n return (\n <TouchableOpacity \n {...this.getTestPropsForAction()} \n style={styles} onPress={() => {\n if (!props.readonly) {\n this.onFocus();\n }\n this.invokeEventCallback('onTap', [null, this]);\n }}>\n {children}\n </TouchableOpacity>\n );\n }\n\n getIcon() {\n if (this.state.props.mode === 'time') {\n return 'wm-sl-l sl-time'\n }\n return 'wm-sl-l sl-calendar';\n }\n\n renderWidget(props: WmDatetimeProps) {\n return ( \n this.addTouchableOpacity(props, (\n <View style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]}>\n {this._background}\n {props.floatinglabel ? (\n <FloatingLabel\n moveUp={!!(props.datavalue || this.state.isFocused)}\n label={props.floatinglabel ?? props.placeholder} \n style={{\n ...(this.styles.floatingLabel || []),\n ...(this.state.isFocused ? (this.styles.activeFloatingLabel || {}) : {})\n }}\n />\n ) : null}\n <View style={this.styles.container}>\n {this.addTouchableOpacity(props, (\n <Text style={[\n this.styles.text,\n this.state.displayValue ? {} : this.styles.placeholderText\n ]}\n {...this.getTestPropsForLabel()}>\n {this.state.displayValue \n || (props.floatinglabel ? '' : this.state.props.placeholder)}\n </Text>\n ), [{ flex: 1}, this.isRTL?{flexDirection:'row', textAlign:'right'}:{}] )}\n {(!props.readonly && props.datavalue &&\n (<WmIcon iconclass=\"wi wi-clear\"\n styles={{color: this.styles.text.color, ...this.styles.clearIcon}}\n id={this.getTestId('clearicon')}\n onTap={() => {\n this.onDateChange(null as any, null as any);\n this.clearBtnClicked = true;\n }}/>)) || null}\n {this.addTouchableOpacity(props, (\n <WmIcon iconclass={this.getIcon()} styles={{color: this.styles.text.color, ...this.styles.calendarIcon}}/>\n ))}\n </View>\n {\n this.state.showDatePicker\n && ((Platform.OS === 'web' && this.renderWebWidget(props))\n || (Platform.OS === 'android' && this.renderNativeWidget(props))\n || (Platform.OS === 'ios' && this.renderNativeWidget(props)))\n }\n </View>\n ))\n );\n }\n}\n\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,gBAAgB,QAAmB,cAAc;AAChF,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAOC,cAAc,MAA+B,wCAAwC;AAC5F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,eAAe,MAAM,2BAA2B;AAC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AC8E,EAAE,KAAK,KAAK,IAAI,IAAI,CAACW,eAAe,CAAClE,KAAK,CAAC,IACnDvB,QAAQ,CAAC8E,EAAE,KAAK,SAAS,IAAI,IAAI,CAACgB,kBAAkB,CAACvE,KAAK,CAAE,IAC5DvB,QAAQ,CAAC8E,EAAE,KAAK,KAAK,IAAI,IAAI,CAACgB,kBAAkB,CAACvE,KAAK,CAAE,CAE5D,CACL,CAAC;EAER;AACF"}
@@ -5,6 +5,14 @@ export default class WmDate extends BaseDatetime {
5
5
  constructor(props) {
6
6
  super(props, DEFAULT_CLASS, new WmDateProps());
7
7
  }
8
+ getStyleClassName() {
9
+ const classes = [];
10
+ if (this.state.props.floatinglabel) {
11
+ classes.push('app-date-with-label');
12
+ }
13
+ classes.push(super.getStyleClassName());
14
+ return classes.join(' ');
15
+ }
8
16
  renderWidget(props) {
9
17
  return super.renderWidget(props);
10
18
  }
@@ -1 +1 @@
1
- {"version":3,"names":["WmDateProps","DEFAULT_CLASS","BaseDatetime","WmDate","constructor","props","renderWidget"],"sources":["date.component.tsx"],"sourcesContent":["import WmDateProps from './date.props';\nimport { DEFAULT_CLASS } from './date.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDate extends BaseDatetime {\n\n constructor(props: WmDateProps) {\n super(props, DEFAULT_CLASS, new WmDateProps());\n }\n\n renderWidget(props: WmDateProps) {\n return super.renderWidget(props);\n }\n}\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,CAAC;EAChD;EAEAM,YAAYA,CAACD,KAAkB,EAAE;IAC/B,OAAO,KAAK,CAACC,YAAY,CAACD,KAAK,CAAC;EAClC;AACF"}
1
+ {"version":3,"names":["WmDateProps","DEFAULT_CLASS","BaseDatetime","WmDate","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget"],"sources":["date.component.tsx"],"sourcesContent":["import WmDateProps from './date.props';\nimport { DEFAULT_CLASS } from './date.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDate extends BaseDatetime {\n\n constructor(props: WmDateProps) {\n super(props, DEFAULT_CLASS, new WmDateProps());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-date-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmDateProps) {\n return super.renderWidget(props);\n }\n}\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,CAAC;EAChD;EAEOM,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,qBAAqB,CAAC;IACrC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAkB,EAAE;IAC/B,OAAO,KAAK,CAACO,YAAY,CAACP,KAAK,CAAC;EAClC;AACF"}
@@ -17,5 +17,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
17
17
  }
18
18
  }
19
19
  } : {});
20
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
21
+ root: {
22
+ minHeight: 48,
23
+ paddingVertical: 16
24
+ },
25
+ floatingLabel: {
26
+ position: 'absolute',
27
+ top: 12,
28
+ left: 16,
29
+ fontSize: 14,
30
+ color: themeVariables.floatingLabelColor
31
+ },
32
+ activeFloatingLabel: {
33
+ color: themeVariables.activeFloatingLabelColor
34
+ }
35
+ });
20
36
  });
21
37
  //# sourceMappingURL=date.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","Platform","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor","OS","clearIcon","marginLeft","marginRight"],"sources":["date.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\nimport { Platform } from 'react-native';\n\nexport type WmDateStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-date';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;AACxG,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACL,aAAa,EAAEC,uBAAuB,EAAE,CAAC,CAAC,CAAC;EACpDI,QAAQ,CAACL,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCM,IAAI,EAAG;MACLC,eAAe,EAAEH,cAAc,CAACI;IAClC;EACJ,CAAC,CAAC;EACFH,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACO,EAAE,IAAE,KAAK,GAAC;IACtDC,SAAS,EAAE;MACPJ,IAAI,EAAE;QACFK,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","Platform","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor","OS","clearIcon","marginLeft","marginRight","minHeight","paddingVertical","floatingLabel","position","top","left","fontSize","color","floatingLabelColor","activeFloatingLabel","activeFloatingLabelColor"],"sources":["date.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\nimport { Platform } from 'react-native';\n\nexport type WmDateStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-date';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root:{\n minHeight: 48,\n paddingVertical: 16\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n } as any as WmDatetimeStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;AACxG,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACL,aAAa,EAAEC,uBAAuB,EAAE,CAAC,CAAC,CAAC;EACpDI,QAAQ,CAACL,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCM,IAAI,EAAG;MACLC,eAAe,EAAEH,cAAc,CAACI;IAClC;EACJ,CAAC,CAAC;EACFH,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACO,EAAE,IAAE,KAAK,GAAC;IACtDC,SAAS,EAAE;MACPJ,IAAI,EAAE;QACFK,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLP,QAAQ,CAACL,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CM,IAAI,EAAC;MACHO,SAAS,EAAE,EAAE;MACbC,eAAe,EAAE;IACnB,CAAC;IACDC,aAAa,EAAE;MACbC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEhB,cAAc,CAACiB;IACxB,CAAC;IACDC,mBAAmB,EAAE;MACnBF,KAAK,EAAEhB,cAAc,CAACmB;IACxB;EACF,CAA4B,CAAC;AAC/B,CAAC,CAAC"}
@@ -5,6 +5,14 @@ export default class WmDatetime extends BaseDatetime {
5
5
  constructor(props) {
6
6
  super(props, DEFAULT_CLASS, new WmDatetimeProps());
7
7
  }
8
+ getStyleClassName() {
9
+ const classes = [];
10
+ if (this.state.props.floatinglabel) {
11
+ classes.push('app-datetime-with-label');
12
+ }
13
+ classes.push(super.getStyleClassName());
14
+ return classes.join(' ');
15
+ }
8
16
  renderWidget(props) {
9
17
  return super.renderWidget(props);
10
18
  }
@@ -1 +1 @@
1
- {"version":3,"names":["WmDatetimeProps","DEFAULT_CLASS","BaseDatetime","WmDatetime","constructor","props","renderWidget"],"sources":["datetime.component.tsx"],"sourcesContent":["import WmDatetimeProps from './datetime.props';\nimport { DEFAULT_CLASS, } from './datetime.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDatetime extends BaseDatetime {\n\n constructor(props: WmDatetimeProps) {\n super(props, DEFAULT_CLASS, new WmDatetimeProps());\n }\n\n renderWidget(props: WmDatetimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAS,mBAAmB;AAClD,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,UAAU,SAASD,YAAY,CAAC;EAEnDE,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAM,YAAYA,CAACD,KAAsB,EAAE;IACnC,OAAO,KAAK,CAACC,YAAY,CAACD,KAAK,CAAC;EAClC;AACF"}
1
+ {"version":3,"names":["WmDatetimeProps","DEFAULT_CLASS","BaseDatetime","WmDatetime","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget"],"sources":["datetime.component.tsx"],"sourcesContent":["import WmDatetimeProps from './datetime.props';\nimport { DEFAULT_CLASS, } from './datetime.styles';\nimport BaseDatetime from '../base-datetime.component';\n\nexport default class WmDatetime extends BaseDatetime {\n\n constructor(props: WmDatetimeProps) {\n super(props, DEFAULT_CLASS, new WmDatetimeProps());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-datetime-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmDatetimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAS,mBAAmB;AAClD,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAe,MAAMC,UAAU,SAASD,YAAY,CAAC;EAEnDE,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEOM,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,yBAAyB,CAAC;IACzC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAsB,EAAE;IACnC,OAAO,KAAK,CAACO,YAAY,CAACP,KAAK,CAAC;EAClC;AACF"}
@@ -17,6 +17,7 @@ export default class WmDatetimeProps extends BaseProps {
17
17
  _defineProperty(this, "locale", '');
18
18
  _defineProperty(this, "timestamp", void 0);
19
19
  _defineProperty(this, "triggerValidation", void 0);
20
+ _defineProperty(this, "floatinglabel", void 0);
20
21
  }
21
22
  }
22
23
  //# sourceMappingURL=datetime.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmDatetimeProps","constructor","arguments","_defineProperty","undefined"],"sources":["datetime.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmDatetimeProps extends BaseProps {\n mode = 'datetime';\n datavalue?: string | Date | number = undefined as any;\n datepattern?: string = '';\n outputformat?: string = 'timestamp';\n mindate?: string | Date = undefined as any;\n maxdate?: string | Date = undefined as any;\n placeholder? = 'Select date time';\n readonly? = false;\n onFieldChange?: any;\n locale: string = '';\n timestamp?: any;\n triggerValidation?: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eAC9C,UAAU;IAAAA,eAAA,oBACoBC,SAAS;IAAAD,eAAA,sBACvB,EAAE;IAAAA,eAAA,uBACD,WAAW;IAAAA,eAAA,kBACTC,SAAS;IAAAD,eAAA,kBACTC,SAAS;IAAAD,eAAA,sBACpB,kBAAkB;IAAAA,eAAA,mBACrB,KAAK;IAAAA,eAAA;IAAAA,eAAA,iBAEA,EAAE;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAGrB"}
1
+ {"version":3,"names":["BaseProps","WmDatetimeProps","constructor","arguments","_defineProperty","undefined"],"sources":["datetime.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmDatetimeProps extends BaseProps {\n mode = 'datetime';\n datavalue?: string | Date | number = undefined as any;\n datepattern?: string = '';\n outputformat?: string = 'timestamp';\n mindate?: string | Date = undefined as any;\n maxdate?: string | Date = undefined as any;\n placeholder? = 'Select date time';\n readonly? = false;\n onFieldChange?: any;\n locale: string = '';\n timestamp?: any;\n triggerValidation?: any;\n floatinglabel?: string;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,eAC9C,UAAU;IAAAA,eAAA,oBACoBC,SAAS;IAAAD,eAAA,sBACvB,EAAE;IAAAA,eAAA,uBACD,WAAW;IAAAA,eAAA,kBACTC,SAAS;IAAAD,eAAA,kBACTC,SAAS;IAAAD,eAAA,sBACpB,kBAAkB;IAAAA,eAAA,mBACrB,KAAK;IAAAA,eAAA;IAAAA,eAAA,iBAEA,EAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAIrB"}
@@ -5,7 +5,10 @@ export const DEFAULT_CLASS = 'app-datetime';
5
5
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
6
6
  const defaultStyles = defineStyles({
7
7
  root: {
8
- padding: 12,
8
+ paddingTop: 8,
9
+ paddingBottom: 8,
10
+ paddingLeft: 16,
11
+ paddingRight: 16,
9
12
  borderWidth: 1,
10
13
  borderStyle: 'solid',
11
14
  borderRadius: 6,
@@ -49,6 +52,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
49
52
  },
50
53
  icon: {
51
54
  fontSize: 16,
55
+ paddingRight: 0,
52
56
  fontWeight: 'bold'
53
57
  }
54
58
  }
@@ -67,5 +71,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
67
71
  }
68
72
  }
69
73
  } : {});
74
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
75
+ root: {
76
+ minHeight: 48,
77
+ paddingVertical: 16
78
+ },
79
+ floatingLabel: {
80
+ position: 'absolute',
81
+ top: 12,
82
+ left: 16,
83
+ fontSize: 14,
84
+ color: themeVariables.floatingLabelColor
85
+ },
86
+ activeFloatingLabel: {
87
+ color: themeVariables.activeFloatingLabelColor
88
+ }
89
+ });
70
90
  });
71
91
  //# sourceMappingURL=datetime.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderRadius","backgroundColor","inputBackgroundColor","borderColor","inputBorderColor","justifyContent","width","focused","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","container","flexDirection","alignItems","text","fontSize","inputTextColor","calendarIcon","alignSelf","icon","clearIcon","marginRight","height","inputDisabledBgColor","fontWeight","OS","marginLeft"],"sources":["datetime.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle, Platform } from 'react-native';\n\nexport type WmDatetimeStyles = BaseStyles & {\n focused: AllStyle,\n container: AllStyle,\n placeholderText: TextStyle,\n invalid: AllStyle,\n clearIcon: WmIconStyles,\n calendarIcon: WmIconStyles\n};\n\nexport const DEFAULT_CLASS = 'app-datetime';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDatetimeStyles = defineStyles({\n root: {\n padding: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderRadius: 6,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderColor: themeVariables.inputBorderColor,\n justifyContent: 'center',\n width: '100%'\n },\n focused: {\n\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n container: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n text: {\n fontSize: 16,\n color: themeVariables.inputTextColor\n },\n calendarIcon: {\n root: {\n alignSelf: 'center'\n },\n icon: {\n fontSize: 24\n }\n },\n clearIcon: {\n root : {\n alignSelf: 'center',\n justifyContent: 'center',\n marginRight: 4,\n height: 24,\n width: 24,\n borderRadius: 16,\n backgroundColor: themeVariables.inputDisabledBgColor\n },\n icon: {\n fontSize: 16,\n fontWeight: 'bold'\n }\n } as WmIconStyles\n }) as any as WmDatetimeStyles;\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,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AChB;IACJ;EACJ,CAAC,CAA4B;EAE7BjC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACPK,eAAe,EAAER,cAAc,CAACiC;IAChC;EACJ,CAAC,CAAC;EACFhC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACsC,EAAE,IAAE,KAAK,GAAC;IACpDL,SAAS,EAAE;MACX3B,IAAI,EAAE;QACFiC,UAAU,EAAE,CAAC;QACbL,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","paddingTop","paddingBottom","paddingLeft","paddingRight","borderWidth","borderStyle","borderRadius","backgroundColor","inputBackgroundColor","borderColor","inputBorderColor","justifyContent","width","focused","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","container","flexDirection","alignItems","text","fontSize","inputTextColor","calendarIcon","alignSelf","icon","clearIcon","marginRight","height","inputDisabledBgColor","fontWeight","OS","marginLeft","minHeight","paddingVertical","floatingLabel","position","top","left","floatingLabelColor","activeFloatingLabel","activeFloatingLabelColor"],"sources":["datetime.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle, Platform, ViewStyle } from 'react-native';\n\nexport type WmDatetimeStyles = BaseStyles & {\n focused: AllStyle,\n container: AllStyle,\n placeholderText: TextStyle,\n invalid: AllStyle,\n clearIcon: WmIconStyles,\n calendarIcon: WmIconStyles,\n floatingLabel: ViewStyle,\n activeFloatingLabel: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-datetime';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDatetimeStyles = defineStyles({\n root: {\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n borderWidth: 1,\n borderStyle: 'solid',\n borderRadius: 6,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderColor: themeVariables.inputBorderColor,\n justifyContent: 'center',\n width: '100%'\n },\n focused: {\n\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n container: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n text: {\n fontSize: 16,\n color: themeVariables.inputTextColor\n },\n calendarIcon: {\n root: {\n alignSelf: 'center'\n },\n icon: {\n fontSize: 24\n }\n },\n clearIcon: {\n root : {\n alignSelf: 'center',\n justifyContent: 'center',\n marginRight: 4,\n height: 24,\n width: 24,\n borderRadius: 16,\n backgroundColor: themeVariables.inputDisabledBgColor\n },\n icon: {\n fontSize: 16,\n paddingRight: 0,\n fontWeight: 'bold'\n }\n } as WmIconStyles\n }) as any as WmDatetimeStyles;\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root:{\n minHeight: 48,\n paddingVertical: 16\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n } as any as WmDatetimeStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAA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MACDJ,IAAI,EAAE;QACFJ,QAAQ,EAAE,EAAE;QACZrB,YAAY,EAAE,CAAC;QACf8B,UAAU,EAAE;MAChB;IACJ;EACJ,CAAC,CAA4B;EAE7BpC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACPQ,eAAe,EAAEX,cAAc,CAACoC;IAChC;EACJ,CAAC,CAAC;EACFnC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACyC,EAAE,IAAE,KAAK,GAAC;IACpDL,SAAS,EAAE;MACX9B,IAAI,EAAE;QACFoC,UAAU,EAAE,CAAC;QACbL,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLjC,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAC;MACDqC,SAAS,EAAE,EAAE;MACbC,eAAe,EAAE;IACrB,CAAC;IACDC,aAAa,EAAE;MACXC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRjB,QAAQ,EAAE,EAAE;MACZN,KAAK,EAAEtB,cAAc,CAAC8C;IAC1B,CAAC;IACDC,mBAAmB,EAAE;MACjBzB,KAAK,EAAEtB,cAAc,CAACgD;IAC1B;EACF,CAA4B,CAAC;AAC/B,CAAC,CAAC"}
@@ -5,6 +5,14 @@ export default class WmTime extends BaseDatetime {
5
5
  constructor(props) {
6
6
  super(props, DEFAULT_CLASS, new WmTimeProps());
7
7
  }
8
+ getStyleClassName() {
9
+ const classes = [];
10
+ if (this.state.props.floatinglabel) {
11
+ classes.push('app-time-with-label');
12
+ }
13
+ classes.push(super.getStyleClassName());
14
+ return classes.join(' ');
15
+ }
8
16
  onDateChange($event, date) {
9
17
  super.onDateChange($event, date);
10
18
  }
@@ -1 +1 @@
1
- {"version":3,"names":["WmTimeProps","DEFAULT_CLASS","BaseDatetime","WmTime","constructor","props","onDateChange","$event","date","timestamp","state","dateValue","renderWidget"],"sources":["time.component.tsx"],"sourcesContent":["import WmTimeProps from './time.props';\nimport { DEFAULT_CLASS, } from './time.styles';\nimport BaseDatetime from '../base-datetime.component';\nimport { DateTimePickerEvent } from '@react-native-community/datetimepicker';\n\nexport default class WmTime extends BaseDatetime {\n\n constructor(props: WmTimeProps) {\n super(props, DEFAULT_CLASS, new WmTimeProps());\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date): void {\n super.onDateChange($event, date);\n }\n\n get timestamp() {\n return this.state.dateValue;\n }\n\n renderWidget(props: WmTimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAS,eAAe;AAC9C,OAAOC,YAAY,MAAM,4BAA4B;AAGrD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,CAAC;EAChD;EAEAM,YAAYA,CAACC,MAA2B,EAAEC,IAAW,EAAQ;IAC3D,KAAK,CAACF,YAAY,CAACC,MAAM,EAAEC,IAAI,CAAC;EAClC;EAEA,IAAIC,SAASA,CAAA,EAAG;IACd,OAAO,IAAI,CAACC,KAAK,CAACC,SAAS;EAC7B;EAEAC,YAAYA,CAACP,KAAkB,EAAE;IAC/B,OAAO,KAAK,CAACO,YAAY,CAACP,KAAK,CAAC;EAClC;AACF"}
1
+ {"version":3,"names":["WmTimeProps","DEFAULT_CLASS","BaseDatetime","WmTime","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","onDateChange","$event","date","timestamp","dateValue","renderWidget"],"sources":["time.component.tsx"],"sourcesContent":["import WmTimeProps from './time.props';\nimport { DEFAULT_CLASS, } from './time.styles';\nimport BaseDatetime from '../base-datetime.component';\nimport { DateTimePickerEvent } from '@react-native-community/datetimepicker';\n\nexport default class WmTime extends BaseDatetime {\n\n constructor(props: WmTimeProps) {\n super(props, DEFAULT_CLASS, new WmTimeProps());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-time-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n onDateChange($event: DateTimePickerEvent, date?: Date): void {\n super.onDateChange($event, date);\n }\n\n get timestamp() {\n return this.state.dateValue;\n }\n\n renderWidget(props: WmTimeProps) {\n return super.renderWidget(props);\n }\n}"],"mappings":"AAAA,OAAOA,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAS,eAAe;AAC9C,OAAOC,YAAY,MAAM,4BAA4B;AAGrD,eAAe,MAAMC,MAAM,SAASD,YAAY,CAAC;EAE/CE,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,CAAC;EAChD;EAEOM,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,qBAAqB,CAAC;IACrC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACC,MAA2B,EAAEC,IAAW,EAAQ;IAC3D,KAAK,CAACF,YAAY,CAACC,MAAM,EAAEC,IAAI,CAAC;EAClC;EAEA,IAAIC,SAASA,CAAA,EAAG;IACd,OAAO,IAAI,CAACP,KAAK,CAACQ,SAAS;EAC7B;EAEAC,YAAYA,CAACZ,KAAkB,EAAE;IAC/B,OAAO,KAAK,CAACY,YAAY,CAACZ,KAAK,CAAC;EAClC;AACF"}
@@ -17,5 +17,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
17
17
  }
18
18
  }
19
19
  } : {});
20
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
21
+ root: {
22
+ minHeight: 48,
23
+ paddingVertical: 16
24
+ },
25
+ floatingLabel: {
26
+ position: 'absolute',
27
+ top: 12,
28
+ left: 16,
29
+ fontSize: 14,
30
+ color: themeVariables.floatingLabelColor
31
+ },
32
+ activeFloatingLabel: {
33
+ color: themeVariables.activeFloatingLabelColor
34
+ }
35
+ });
20
36
  });
21
37
  //# sourceMappingURL=time.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","Platform","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor","OS","clearIcon","marginLeft","marginRight"],"sources":["time.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\nimport { Platform } from 'react-native';\n\nexport type WmTimeStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-time';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;AACxG,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACL,aAAa,EAAEC,uBAAuB,EAAE,CAAC,CAAC,CAAC;EACpDI,QAAQ,CAACL,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCM,IAAI,EAAG;MACLC,eAAe,EAAEH,cAAc,CAACI;IAClC;EACJ,CAAC,CAAC;EACFH,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACO,EAAE,IAAE,KAAK,GAAC;IACtDC,SAAS,EAAE;MACPJ,IAAI,EAAE;QACFK,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","DATE_TIME_DEFAUlT_CLASS","Platform","registerStyle","themeVariables","addStyle","root","backgroundColor","inputDisabledBgColor","OS","clearIcon","marginLeft","marginRight","minHeight","paddingVertical","floatingLabel","position","top","left","fontSize","color","floatingLabelColor","activeFloatingLabel","activeFloatingLabelColor"],"sources":["time.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmDatetimeStyles, DEFAULT_CLASS as DATE_TIME_DEFAUlT_CLASS } from '../datetime/datetime.styles';\nimport { Platform } from 'react-native';\n\nexport type WmTimeStyles = WmDatetimeStyles;\n\nexport const DEFAULT_CLASS = 'app-time';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n addStyle(DEFAULT_CLASS, DATE_TIME_DEFAUlT_CLASS, {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n clearIcon: {\n root: {\n marginLeft: 4,\n marginRight: 0\n }\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root:{\n minHeight: 48,\n paddingVertical: 16\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n } as any as WmDatetimeStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAA2BC,aAAa,IAAIC,uBAAuB,QAAQ,6BAA6B;AACxG,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMF,aAAa,GAAG,UAAU;AACvCD,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrDA,QAAQ,CAACL,aAAa,EAAEC,uBAAuB,EAAE,CAAC,CAAC,CAAC;EACpDI,QAAQ,CAACL,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCM,IAAI,EAAG;MACLC,eAAe,EAAEH,cAAc,CAACI;IAClC;EACJ,CAAC,CAAC;EACFH,QAAQ,CAACL,aAAa,GAAG,MAAM,EAAE,EAAE,EAAEE,QAAQ,CAACO,EAAE,IAAE,KAAK,GAAC;IACtDC,SAAS,EAAE;MACPJ,IAAI,EAAE;QACFK,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLP,QAAQ,CAACL,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CM,IAAI,EAAC;MACHO,SAAS,EAAE,EAAE;MACbC,eAAe,EAAE;IACnB,CAAC;IACDC,aAAa,EAAE;MACXC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEhB,cAAc,CAACiB;IAC1B,CAAC;IACDC,mBAAmB,EAAE;MACjBF,KAAK,EAAEhB,cAAc,CAACmB;IAC1B;EACF,CAA4B,CAAC;AAC/B,CAAC,CAAC"}
@@ -44,6 +44,7 @@ export default class WmFileupload extends BaseComponent {
44
44
  return /*#__PURE__*/React.createElement(View, {
45
45
  style: this.styles.root
46
46
  }, this._background, /*#__PURE__*/React.createElement(WmButton, {
47
+ id: this.getTestId(),
47
48
  iconclass: props.iconclass,
48
49
  caption: props.caption,
49
50
  styles: this.styles.button,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","View","DocumentPicker","BaseComponent","BaseComponentState","WmFileuploadProps","DEFAULT_CLASS","WmButton","WmFileuploadState","constructor","arguments","_defineProperty","namedParameters","copyToCacheDirectory","multiple","type","WmFileupload","props","onTap","getDocumentAsync","then","response","selectedFile","OS","mimeType","file","invokeEventCallback","proxy","updateState","selectedFiles","bind","renderWidget","createElement","style","styles","root","_background","iconclass","caption","button","iconsize"],"sources":["fileupload.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, View } from 'react-native';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFileuploadProps from './fileupload.props';\nimport { DEFAULT_CLASS, WmFileuploadStyles } from './fileupload.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\n\nexport interface SelectFileOutput {\n mimeType: string;\n name: string;\n size: number;\n type: 'cancel' | 'success';\n uri: string;\n}\n\nexport class WmFileuploadState extends BaseComponentState<WmFileuploadProps> {\n selectedFiles: any;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport default class WmFileupload extends BaseComponent<WmFileuploadProps, WmFileuploadState, WmFileuploadStyles> {\n\n constructor(props: WmFileuploadProps) {\n super(props, DEFAULT_CLASS, new WmFileuploadProps());\n }\n\n onTap() {\n DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n let selectedFile;\n if (Platform.OS !== 'web') {\n selectedFile = response;\n selectedFile.type = selectedFile.mimeType;\n } else {\n selectedFile = response.file;\n }\n this.invokeEventCallback('onBeforeselect', [null, this.proxy, selectedFile]);\n\n this.updateState({\n props: {\n selectedFiles: selectedFile\n }\n } as WmFileuploadState, this.invokeEventCallback.bind(this, 'onSelect', [null, this.proxy, selectedFile]));\n });\n }\n\n renderWidget(props: WmFileuploadProps) {\n return <View style={this.styles.root}>\n {this._background}\n <WmButton iconclass={props.iconclass} caption={props.caption} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onTap.bind(this)}></WmButton>\n </View>\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAEtD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AACvE,OAAOC,QAAQ,MAAM,oEAAoE;AAWzF,OAAO,MAAMC,iBAAiB,SAASJ,kBAAkB,CAAoB;EAAAK,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;EAAA;AAE7E;AAEA,MAAMC,eAAe,GAAG;EACtBC,oBAAoB,EAAE,KAAK;EAC3BC,QAAQ,EAAE,KAAK;EACfC,IAAI,EAAE;AACR,CAAC;AAED,eAAe,MAAMC,YAAY,SAASb,aAAa,CAA2D;EAEhHM,WAAWA,CAACQ,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,CAAC;EACtD;EAEAa,KAAKA,CAAA,EAAG;IACNhB,cAAc,CAACiB,gBAAgB,CAACP,eAAe,CAAC,CAACQ,IAAI,CAAEC,QAAa,IAAK;MACvE,IAAIC,YAAY;MAChB,IAAItB,QAAQ,CAACuB,EAAE,KAAK,KAAK,EAAE;QACzBD,YAAY,GAAGD,QAAQ;QACvBC,YAAY,CAACP,IAAI,GAAGO,YAAY,CAACE,QAAQ;MAC3C,CAAC,MAAM;QACLF,YAAY,GAAGD,QAAQ,CAACI,IAAI;MAC9B;MACA,IAAI,CAACC,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,EAAEL,YAAY,CAAC,CAAC;MAE5E,IAAI,CAACM,WAAW,CAAC;QACbX,KAAK,EAAE;UACPY,aAAa,EAAEP;QACjB;MACF,CAAC,EAAuB,IAAI,CAACI,mBAAmB,CAACI,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACH,KAAK,EAAEL,YAAY,CAAC,CAAC,CAAC;IAC5G,CAAC,CAAC;EACJ;EAEAS,YAAYA,CAACd,KAAwB,EAAE;IACrC,oBAAOlB,KAAA,CAAAiC,aAAA,CAAC/B,IAAI;MAACgC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAClC,IAAI,CAACC,WAAW,eACjBrC,KAAA,CAAAiC,aAAA,CAACzB,QAAQ;MAAC8B,SAAS,EAAEpB,KAAK,CAACoB,SAAU;MAACC,OAAO,EAAErB,KAAK,CAACqB,OAAQ;MAACJ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACK,MAAO;MAACC,QAAQ,EAAEvB,KAAK,CAACuB,QAAS;MAACtB,KAAK,EAAE,IAAI,CAACA,KAAK,CAACY,IAAI,CAAC,IAAI;IAAE,CAAW,CACxJ,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","Platform","View","DocumentPicker","BaseComponent","BaseComponentState","WmFileuploadProps","DEFAULT_CLASS","WmButton","WmFileuploadState","constructor","arguments","_defineProperty","namedParameters","copyToCacheDirectory","multiple","type","WmFileupload","props","onTap","getDocumentAsync","then","response","selectedFile","OS","mimeType","file","invokeEventCallback","proxy","updateState","selectedFiles","bind","renderWidget","createElement","style","styles","root","_background","id","getTestId","iconclass","caption","button","iconsize"],"sources":["fileupload.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, View } from 'react-native';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmFileuploadProps from './fileupload.props';\nimport { DEFAULT_CLASS, WmFileuploadStyles } from './fileupload.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\n\nexport interface SelectFileOutput {\n mimeType: string;\n name: string;\n size: number;\n type: 'cancel' | 'success';\n uri: string;\n}\n\nexport class WmFileuploadState extends BaseComponentState<WmFileuploadProps> {\n selectedFiles: any;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport default class WmFileupload extends BaseComponent<WmFileuploadProps, WmFileuploadState, WmFileuploadStyles> {\n\n constructor(props: WmFileuploadProps) {\n super(props, DEFAULT_CLASS, new WmFileuploadProps());\n }\n\n onTap() {\n DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n let selectedFile;\n if (Platform.OS !== 'web') {\n selectedFile = response;\n selectedFile.type = selectedFile.mimeType;\n } else {\n selectedFile = response.file;\n }\n this.invokeEventCallback('onBeforeselect', [null, this.proxy, selectedFile]);\n\n this.updateState({\n props: {\n selectedFiles: selectedFile\n }\n } as WmFileuploadState, this.invokeEventCallback.bind(this, 'onSelect', [null, this.proxy, selectedFile]));\n });\n }\n\n renderWidget(props: WmFileuploadProps) {\n return <View style={this.styles.root}>\n {this._background}\n <WmButton id={this.getTestId()} iconclass={props.iconclass} caption={props.caption} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onTap.bind(this)}></WmButton>\n </View>\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAEtD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AACvE,OAAOC,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