@wavemaker/app-rn-runtime 11.6.0-rc.5488 → 11.7.0-next.42251

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -9
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.styles.js +6 -3
  4. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  5. app-rn-runtime/components/advanced/webview/webview.component.js +33 -14
  6. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.props.js +3 -1
  8. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.component.js +22 -8
  10. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  11. app-rn-runtime/components/basic/anchor/anchor.props.js +7 -0
  12. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  13. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -1
  14. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/animatedview.component.js +5 -3
  16. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  17. app-rn-runtime/components/basic/button/button.component.js +41 -8
  18. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  19. app-rn-runtime/components/basic/button/button.props.js +7 -0
  20. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  21. app-rn-runtime/components/basic/button/button.styles.js +9 -10
  22. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  23. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +13 -5
  24. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  25. app-rn-runtime/components/basic/icon/icon.component.js +64 -12
  26. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  27. app-rn-runtime/components/basic/icon/icon.props.js +7 -0
  28. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  29. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  30. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/label/label.component.js +34 -25
  32. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  33. app-rn-runtime/components/basic/label/label.props.js +4 -0
  34. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  35. app-rn-runtime/components/basic/label/label.styles.js +4 -5
  36. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  37. app-rn-runtime/components/basic/message/message.component.js +3 -2
  38. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  39. app-rn-runtime/components/basic/message/message.props.js +3 -0
  40. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  41. app-rn-runtime/components/basic/message/message.styles.js +3 -1
  42. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/picture/picture.component.js +4 -2
  44. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  45. app-rn-runtime/components/basic/picture/picture.props.js +3 -0
  46. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  47. app-rn-runtime/components/basic/picture/picture.styles.js +3 -1
  48. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -3
  50. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  51. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +2 -0
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  53. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  54. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  55. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +2 -0
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  57. app-rn-runtime/components/basic/search/search.component.js +2 -1
  58. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  59. app-rn-runtime/components/basic/search/search.props.js +3 -0
  60. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  61. app-rn-runtime/components/basic/search/search.styles.js +6 -5
  62. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  63. app-rn-runtime/components/basic/skeleton/skeleton.component.js +0 -1
  64. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  65. app-rn-runtime/components/basic/video/video.component.js +4 -2
  66. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  67. app-rn-runtime/components/basic/video/video.props.js +3 -0
  68. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js +34 -24
  70. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  71. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +29 -16
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +0 -2
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  75. app-rn-runtime/components/chart/basechart.component.js +33 -7
  76. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  77. app-rn-runtime/components/chart/basechart.props.js +7 -2
  78. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  79. app-rn-runtime/components/chart/basechart.styles.js +9 -2
  80. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  81. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +4 -2
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  83. app-rn-runtime/components/chart/line-chart/line-chart.component.js +27 -20
  84. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  85. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +7 -4
  87. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +33 -10
  89. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  90. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -0
  91. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  92. app-rn-runtime/components/chart/staticdata.js +215 -0
  93. app-rn-runtime/components/chart/staticdata.js.map +1 -0
  94. app-rn-runtime/components/container/container.component.js +11 -2
  95. app-rn-runtime/components/container/container.component.js.map +1 -1
  96. app-rn-runtime/components/container/container.props.js +1 -0
  97. app-rn-runtime/components/container/container.props.js.map +1 -1
  98. app-rn-runtime/components/container/panel/panel.component.js +6 -2
  99. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  100. app-rn-runtime/components/container/panel/panel.props.js +4 -0
  101. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  102. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
  103. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizard.component.js +17 -14
  105. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  106. app-rn-runtime/components/container/wizard/wizard.styles.js +19 -3
  107. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  108. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +27 -2
  109. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  110. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +6 -0
  111. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  112. app-rn-runtime/components/data/card/card.component.js +7 -3
  113. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  114. app-rn-runtime/components/data/card/card.props.js +4 -0
  115. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  116. app-rn-runtime/components/data/form/form-action/form-action.styles.js +2 -1
  117. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  118. app-rn-runtime/components/data/form/form-field/form-field.component.js +5 -1
  119. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  120. app-rn-runtime/components/data/list/list.component.js +136 -25
  121. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  122. app-rn-runtime/components/data/list/list.props.js +4 -1
  123. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  124. app-rn-runtime/components/data/list/list.styles.js +9 -0
  125. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  126. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +4 -1
  127. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  128. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +3 -0
  129. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  130. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +13 -6
  131. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  132. app-rn-runtime/components/device/camera/camera.component.js +4 -1
  133. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  134. app-rn-runtime/components/device/camera/camera.props.js +3 -0
  135. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  136. app-rn-runtime/components/device/camera/camera.styles.js +12 -4
  137. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  138. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -0
  139. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  140. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +4 -0
  141. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  142. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +2 -1
  143. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  144. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +4 -0
  145. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  146. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +4 -0
  147. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  148. app-rn-runtime/components/dialogs/dialog/dialog.component.js +7 -3
  149. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  150. app-rn-runtime/components/dialogs/dialog/dialog.props.js +4 -0
  151. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  152. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +11 -2
  153. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  154. app-rn-runtime/components/input/basedataset/basedataset.props.js +4 -0
  155. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  156. app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
  157. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  158. app-rn-runtime/components/input/baseinput/baseinput.props.js +4 -0
  159. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  160. app-rn-runtime/components/input/basenumber/basenumber.component.js +16 -10
  161. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  162. app-rn-runtime/components/input/basenumber/basenumber.props.js +4 -0
  163. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  164. app-rn-runtime/components/input/checkbox/checkbox.component.js +12 -5
  165. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  166. app-rn-runtime/components/input/checkbox/checkbox.styles.js +35 -5
  167. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  168. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +13 -6
  169. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  170. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +39 -10
  171. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  172. app-rn-runtime/components/input/chips/chips.component.js +5 -1
  173. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  174. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  175. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  176. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  177. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  178. app-rn-runtime/components/input/currency/currency.component.js +18 -3
  179. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  180. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  181. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  182. app-rn-runtime/components/input/currency/currency.styles.js +19 -1
  183. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  184. app-rn-runtime/components/input/epoch/base-datetime.component.js +76 -10
  185. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  187. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  189. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  190. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  191. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  192. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +5 -0
  193. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  194. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +49 -1
  195. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  196. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  197. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  198. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  199. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  200. app-rn-runtime/components/input/fileupload/fileupload.component.js +2 -0
  201. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  202. app-rn-runtime/components/input/fileupload/fileupload.props.js +2 -0
  203. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  204. app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
  205. app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
  206. app-rn-runtime/components/input/number/number.component.js +13 -2
  207. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  208. app-rn-runtime/components/input/number/number.props.js +1 -0
  209. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  210. app-rn-runtime/components/input/number/number.styles.js +17 -0
  211. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  212. app-rn-runtime/components/input/radioset/radioset.component.js +7 -2
  213. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  214. app-rn-runtime/components/input/select/select.component.js +7 -3
  215. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  216. app-rn-runtime/components/input/select/select.styles.js +5 -1
  217. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  218. app-rn-runtime/components/input/slider/slider.styles.js +3 -3
  219. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  220. app-rn-runtime/components/input/switch/switch.component.js +8 -1
  221. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  222. app-rn-runtime/components/input/switch/switch.styles.js +10 -5
  223. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  224. app-rn-runtime/components/input/text/text.component.js +13 -1
  225. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  226. app-rn-runtime/components/input/text/text.props.js +1 -0
  227. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  228. app-rn-runtime/components/input/text/text.styles.js +17 -0
  229. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  230. app-rn-runtime/components/input/textarea/textarea.component.js +13 -1
  231. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  232. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  233. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  234. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  235. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  236. app-rn-runtime/components/input/toggle/toggle.component.js +48 -5
  237. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  238. app-rn-runtime/components/input/toggle/toggle.props.js +4 -0
  239. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  240. app-rn-runtime/components/input/toggle/toggle.styles.js +5 -12
  241. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  242. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +6 -1
  243. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  244. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -0
  245. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  246. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +11 -2
  247. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  248. app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -2
  249. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  250. app-rn-runtime/components/navigation/menu/menu.styles.js +8 -5
  251. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  252. app-rn-runtime/components/navigation/navitem/navitem.component.js +8 -5
  253. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  254. app-rn-runtime/components/navigation/navitem/navitem.props.js +3 -0
  255. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  256. app-rn-runtime/components/navigation/popover/popover.component.js +10 -3
  257. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  258. app-rn-runtime/components/navigation/popover/popover.props.js +7 -0
  259. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  260. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  261. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  262. app-rn-runtime/components/page/page-content/page-content.component.js +7 -1
  263. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  264. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  265. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  266. app-rn-runtime/components/page/tabbar/tabbar.component.js +44 -10
  267. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  268. app-rn-runtime/components/page/tabbar/tabbar.styles.js +82 -15
  269. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  270. app-rn-runtime/core/accessibility.js +149 -0
  271. app-rn-runtime/core/accessibility.js.map +1 -0
  272. app-rn-runtime/core/base.component.js +21 -3
  273. app-rn-runtime/core/base.component.js.map +1 -1
  274. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  275. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  276. app-rn-runtime/core/components/textinput.component.js +25 -2
  277. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  278. app-rn-runtime/core/event-notifier.js +22 -1
  279. app-rn-runtime/core/event-notifier.js.map +1 -1
  280. app-rn-runtime/core/tappable.component.js +37 -10
  281. app-rn-runtime/core/tappable.component.js.map +1 -1
  282. app-rn-runtime/core/utils.js +11 -0
  283. app-rn-runtime/core/utils.js.map +1 -1
  284. app-rn-runtime/gestures/swipe.animation.js +34 -1
  285. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  286. app-rn-runtime/package.json +8 -3
  287. app-rn-runtime/runtime/App.js +12 -7
  288. app-rn-runtime/runtime/App.js.map +1 -1
  289. app-rn-runtime/runtime/base-page.component.js +1 -1
  290. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  291. app-rn-runtime/runtime/services/app-security.service.js +2 -1
  292. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  293. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  294. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  295. app-rn-runtime/styles/background.component.js +1 -1
  296. app-rn-runtime/styles/background.component.js.map +1 -1
  297. app-rn-runtime/styles/theme.js +43 -0
  298. app-rn-runtime/styles/theme.js.map +1 -1
  299. app-rn-runtime/styles/theme.variables.js +30 -6
  300. app-rn-runtime/styles/theme.variables.js.map +1 -1
  301. app-rn-runtime/variables/model-variable.js +2 -1
  302. app-rn-runtime/variables/model-variable.js.map +1 -1
  303. app-rn-runtime/variables/service-variable.js +14 -6
  304. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","WmCurrencyState","constructor","arguments","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","renderWidget","_this$state$textValue","opts","valueExpr","OS","state","textValue","toString","createElement","style","styles","root","labelWrapper","label","_extends","getTestPropsForInput","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","input","text","isValid","invalid","editable","disabled","readonly","placeholder","value","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={this.styles.labelWrapper}>\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text></View>\n <WMTextInput\n {...this.getTestPropsForInput()}\n ref={(ref: any) => {\n this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }\n }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n {...opts}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n value={this.state.textValue}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n this.onChangeText.bind(this)(text, 'currency');\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAEnD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,mDAAmD;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,mBAAmB,EACnBC,eAAe,QACV,4EAA4E;AACnF,SAASC,MAAM,QAAQ,QAAQ;AAC/B,OAAO,MAAM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AU,CAAC;MAChD,CAAE;MACFc,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACN,IAAI,CAAC,IAAI,CAAE;MACvCO,qBAAqB,EAAE,IAAI,CAAChC,MAAM,CAACgB,IAAI,CAACiB,UAAU,KAAK;IAAO,EAC/D,CACG,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","AccessibilityWidgetType","getAccessibilityProps","WmCurrencyState","constructor","arguments","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","style","styles","root","labelWrapper","label","flex","_extends","getTestPropsForInput","CURRENCY","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","input","text","isValid","invalid","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","editable","disabled","readonly","placeholder","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-currency-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={this.styles.labelWrapper}>\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text>\n </View>\n <View style={{flex: 1}}>\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.CURRENCY, props)}\n ref={(ref: any) => {\n this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }\n }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n this.onChangeText.bind(this)(text, 'currency');\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === '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seNumberProps {
7
7
  super(...arguments);
8
8
  _defineProperty(this, "currency", void 0);
9
9
  _defineProperty(this, "placeholder", '');
10
+ _defineProperty(this, "floatinglabel", void 0);
10
11
  }
11
12
  }
12
13
  //# sourceMappingURL=currency.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseNumberProps","WmCurrencyProps","constructor","arguments","_defineProperty"],"sources":["currency.props.ts"],"sourcesContent":["import BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\n\nexport default class WmCurrencyProps extends BaseNumberProps {\n currency: any;\n placeholder: string = '';\n}\n"],"mappings":";;;AAAA,OAAOA,eAAe,MAAM,wEAAwE;AAEpG,eAAe,MAAMC,eAAe,SAASD,eAAe,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,sBAErC,EAAE;EAAA;AAC1B"}
1
+ {"version":3,"names":["BaseNumberProps","WmCurrencyProps","constructor","arguments","_defineProperty"],"sources":["currency.props.ts"],"sourcesContent":["import BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\n\nexport default class WmCurrencyProps extends BaseNumberProps {\n currency: any;\n placeholder: string = '';\n floatinglabel?: string;\n}\n"],"mappings":";;;AAAA,OAAOA,eAAe,MAAM,wEAAwE;AAEpG,eAAe,MAAMC,eAAe,SAASD,eAAe,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,sBAErC,EAAE;IAAAA,eAAA;EAAA;AAE1B"}
@@ -52,7 +52,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
52
52
  },
53
53
  placeholderText: {
54
54
  color: themeVariables.inputPlaceholderColor
55
- }
55
+ },
56
+ floatingLabel: {},
57
+ activeFloatingLabel: {}
56
58
  });
57
59
  addStyle(DEFAULT_CLASS, '', defaultStyles);
58
60
  addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS == "web" ? {
@@ -68,5 +70,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
68
70
  backgroundColor: themeVariables.inputDisabledBgColor
69
71
  }
70
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
+ });
71
89
  });
72
90
  //# sourceMappingURL=currency.styles.js.map
@@ -1 +1 @@
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","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 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 });\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,SAAS,EAAE,EAAE;MACbC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,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BC,sBAAsB,EAAE,CAAC;MACzBiB,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACL1C,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAAC4C;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,MA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C,CAAC;IACjBC,mBAAmB,EAAE,CAAC;EAC1B,CAAC,CAAC;EAEFzC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,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"}
@@ -14,7 +14,10 @@ import WebDatePicker from './date-picker.component';
14
14
  import { isNumber, isString } from 'lodash-es';
15
15
  import { ModalConsumer } from '@wavemaker/app-rn-runtime/core/modal.service';
16
16
  import { validateField } from '@wavemaker/app-rn-runtime/core/utils';
17
+ import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
18
+ import { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';
17
19
  import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';
20
+ import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
18
21
  export class BaseDatetimeState extends BaseComponentState {
19
22
  constructor() {
20
23
  super(...arguments);
@@ -77,12 +80,12 @@ export default class BaseDatetime extends BaseComponent {
77
80
  convertTimezone(date) {
78
81
  const timezone = AppI18nService.getTimezone();
79
82
  if (timezone) {
80
- const parsedDateString = new Date(date).toLocaleString(this.props.locale, {
83
+ const parsedDateString = new Date(date).toLocaleString(this.props.locale ? this.props.locale : 'en-us', {
81
84
  timeZone: timezone
82
85
  });
83
86
  return moment(parsedDateString, 'M/D/YYYY, h:mm:ss A');
84
87
  } else {
85
- return date;
88
+ return null;
86
89
  }
87
90
  }
88
91
  onPropertyChange(name, $new, $old) {
@@ -101,12 +104,13 @@ export default class BaseDatetime extends BaseComponent {
101
104
  if (props.datavalue && props.outputformat && props.datepattern) {
102
105
  let datavalue = props.datavalue;
103
106
  if (datavalue === CURRENT_DATE || datavalue === CURRENT_TIME) {
104
- datavalue = this.format(new Date(), props.outputformat);
107
+ datavalue = new Date();
105
108
  }
106
109
  const date = isString(datavalue) ? this.parse(datavalue, props.outputformat) : datavalue;
110
+ datavalue = this.convertTimezone(datavalue);
107
111
  this.updateState({
108
112
  dateValue: date,
109
- displayValue: this.format(this.convertTimezone(date), props.datepattern)
113
+ displayValue: this.format(datavalue ? datavalue : date, props.datepattern)
110
114
  });
111
115
  } else {
112
116
  this.updateState({
@@ -204,11 +208,14 @@ export default class BaseDatetime extends BaseComponent {
204
208
  });
205
209
  }
206
210
  renderNativeWidget(props, onDismiss) {
207
- return /*#__PURE__*/React.createElement(DateTimePicker, {
208
- mode: this.modes[0],
211
+ return /*#__PURE__*/React.createElement(DateTimePicker, _extends({
212
+ mode: this.modes[0]
213
+ }, getAccessibilityProps(AccessibilityWidgetType.DATE, {
214
+ ...this.state.props
215
+ }), {
209
216
  value: this.state.dateValue || new Date(),
210
217
  is24Hour: true,
211
- display: Platform.OS === 'ios' ? 'spinner' : 'default',
218
+ display: "default",
212
219
  onChange: (event, date) => {
213
220
  if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {
214
221
  const dateSelected = this.state.dateValue;
@@ -222,6 +229,58 @@ export default class BaseDatetime extends BaseComponent {
222
229
  },
223
230
  minimumDate: props.mindate,
224
231
  maximumDate: props.maxdate
232
+ }));
233
+ }
234
+ renderNativeIOSWidget(props, onDismiss) {
235
+ let date_change = undefined;
236
+ return /*#__PURE__*/React.createElement(View, {
237
+ style: this.styles.dialog
238
+ }, /*#__PURE__*/React.createElement(DateTimePicker, {
239
+ mode: this.modes[0],
240
+ value: this.state.dateValue || new Date(),
241
+ is24Hour: true,
242
+ display: "spinner",
243
+ onChange: (event, date) => {
244
+ if (date && this.state.props.mode === 'datetime' && this.modes[0] === 'time') {
245
+ const dateSelected = this.state.dateValue;
246
+ date = moment(date).set('month', dateSelected.getMonth()).set('year', dateSelected.getFullYear()).set('date', dateSelected.getDate()).toDate();
247
+ }
248
+ date_change = date;
249
+ },
250
+ minimumDate: props.mindate,
251
+ maximumDate: props.maxdate
252
+ }), /*#__PURE__*/React.createElement(View, {
253
+ style: this.styles.actionWrapper
254
+ }, /*#__PURE__*/React.createElement(WmButton, {
255
+ styles: this.styles.selectBtn,
256
+ caption: "Select",
257
+ onTap: () => {
258
+ this.onDateChange(null, date_change || this.state.dateValue || new Date());
259
+ if (this.modes.length <= 1) {
260
+ this.onBlur();
261
+ onDismiss && onDismiss();
262
+ }
263
+ }
264
+ }), /*#__PURE__*/React.createElement(WmButton, {
265
+ styles: this.styles.cancelBtn,
266
+ caption: "Cancel",
267
+ onTap: () => {
268
+ this.modes.shift();
269
+ this.onDateChange(null, this.state.dateValue || undefined);
270
+ this.onBlur();
271
+ onDismiss && onDismiss();
272
+ }
273
+ })));
274
+ }
275
+ renderNativeIOSWidgetWithModal(props) {
276
+ return /*#__PURE__*/React.createElement(ModalConsumer, null, modalService => {
277
+ this.nativeModalOptions.content = /*#__PURE__*/React.createElement(React.Fragment, null, this.renderNativeIOSWidget(props, () => modalService.hideModal(this.nativeModalOptions)));
278
+ this.nativeModalOptions.centered = true;
279
+ this.nativeModalOptions.onClose = () => {
280
+ this.onBlur();
281
+ };
282
+ modalService.showModal(this.nativeModalOptions);
283
+ return null;
225
284
  });
226
285
  }
227
286
  renderNativeWidgetWithModal(props) {
@@ -255,11 +314,18 @@ export default class BaseDatetime extends BaseComponent {
255
314
  renderWidget(props) {
256
315
  return this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(View, {
257
316
  style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]
258
- }, this._background, /*#__PURE__*/React.createElement(View, {
317
+ }, this._background, props.floatinglabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
318
+ moveUp: !!(props.datavalue || this.state.isFocused),
319
+ label: props.floatinglabel ?? props.placeholder,
320
+ style: {
321
+ ...(this.styles.floatingLabel || []),
322
+ ...(this.state.isFocused ? this.styles.activeFloatingLabel || {} : {})
323
+ }
324
+ }) : null, /*#__PURE__*/React.createElement(View, {
259
325
  style: this.styles.container
260
326
  }, this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(Text, _extends({
261
327
  style: [this.styles.text, this.state.displayValue ? {} : this.styles.placeholderText]
262
- }, this.getTestPropsForLabel()), this.state.displayValue || this.state.props.placeholder), [{
328
+ }, this.getTestPropsForLabel()), this.state.displayValue || (props.floatinglabel ? '' : this.state.props.placeholder)), [{
263
329
  flex: 1
264
330
  }, this.isRTL ? {
265
331
  flexDirection: 'row',
@@ -281,7 +347,7 @@ export default class BaseDatetime extends BaseComponent {
281
347
  color: this.styles.text.color,
282
348
  ...this.styles.calendarIcon
283
349
  }
284
- }))), this.state.showDatePicker && (Platform.OS === 'web' && this.renderWebWidget(props) || Platform.OS === 'android' && this.renderNativeWidget(props) || Platform.OS === 'ios' && this.renderNativeWidget(props))));
350
+ }))), this.state.showDatePicker && (Platform.OS === 'web' && this.renderWebWidget(props) || Platform.OS === 'android' && this.renderNativeWidget(props) || Platform.OS === 'ios' && this.renderNativeIOSWidgetWithModal(props))));
285
351
  }
286
352
  }
287
353
  //# sourceMappingURL=base-datetime.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","TouchableOpacity","moment","DateTimePicker","BaseComponent","BaseComponentState","WmIcon","WmDatetimeProps","DEFAULT_CLASS","WebDatePicker","isNumber","isString","ModalConsumer","validateField","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","container","text","placeholderText","getTestPropsForLabel","placeholder","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 } 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 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, { 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 = this.format(new Date(), props.outputformat) 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(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 \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 <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()}>{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 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,QAAQ,cAAc;AACrE,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;AACvD,SAASC,aAAa,QAA0B,4BAA4B;AAC5E,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAC9C,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,aAAa,QAAQ,sCAAsC;AACpE,OAAOC,cAAc,MAAM,6DAA6D;AAExF,OAAO,MAAMC,iBAAiB,SAASV,kBAAkB,CAAkB;EAAAW,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,yBACxD,KAAK;IAAAA,eAAA,oBACH,IAAI;IAAAA,eAAA,uBACA,IAAI;IAAAA,eAAA,oBACf,KAAK;IAAAA,eAAA,kBACO,IAAI;IAAAA,eAAA,kBACT,IAAI;IAAAA,eAAA,oBACX,EAAE;EAAA;AAChB;AAEA,MAAMC,YAAY,GAAG,cAAc;AACnC,MAAMC,YAAY,GAAG,cAAc;AAEnC,eAAe,MAAeC,YAAY,SAASjB,aAAa,CAAuD;EAMrHY,WAAWA,CAACM,KAAsB,EAA6G;IAAA,IAA3GC,YAAY,GAAAN,SAAA,CAAAO,MAAA,QAAAP,SAAA,QAAAQ,SAA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,CAAClE,KAAK,CAAC,IACnDtB,QAAQ,CAAC6E,EAAE,KAAK,SAAS,IAAI,IAAI,CAACgB,kBAAkB,CAACvE,KAAK,CAAE,IAC5DtB,QAAQ,CAAC6E,EAAE,KAAK,KAAK,IAAI,IAAI,CAACgB,kBAAkB,CAACvE,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","AccessibilityWidgetType","getAccessibilityProps","FloatingLabel","AppI18nService","WmButton","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","_extends","DATE","is24Hour","display","onChange","event","dateSelected","set","getMonth","getFullYear","getDate","renderNativeIOSWidget","date_change","style","styles","dialog","actionWrapper","selectBtn","caption","onTap","cancelBtn","renderNativeIOSWidgetWithModal","modalService","nativeModalOptions","content","Fragment","hideModal","centered","onClose","showModal","renderNativeWidgetWithModal","addTouchableOpacity","children","getTestPropsForAction","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","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 { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';\nimport AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\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 null;\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: any = 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 datavalue = this.convertTimezone(datavalue);\n this.updateState({\n dateValue : date,\n displayValue: this.format(datavalue?datavalue: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 {...getAccessibilityProps(AccessibilityWidgetType.DATE, {...this.state.props})}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display='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 renderNativeIOSWidget(props: WmDatetimeProps, onDismiss?: Function) {\n let date_change : any = undefined;\n return (<View style={this.styles.dialog}>\n <DateTimePicker\n mode={this.modes[0] as any}\n value={this.state.dateValue || new Date()}\n is24Hour={true}\n display='spinner'\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 date_change = date;\n }}\n minimumDate={props.mindate as Date}\n maximumDate={props.maxdate as Date}\n />\n <View style={this.styles.actionWrapper}>\n <WmButton styles={this.styles.selectBtn} caption='Select' onTap={() => {\n this.onDateChange(null as any, date_change || this.state.dateValue || new Date());\n if (this.modes.length <= 1) {\n this.onBlur();\n onDismiss && onDismiss();\n }\n }} />\n <WmButton styles={this.styles.cancelBtn} caption='Cancel' onTap={() => {\n this.modes.shift();\n this.onDateChange(null as any, this.state.dateValue || undefined);\n this.onBlur();\n onDismiss && onDismiss();\n }} />\n </View>\n </View>\n );\n }\n\n renderNativeIOSWidgetWithModal(props: WmDatetimeProps) {\n return (<ModalConsumer>{(modalService: ModalService) => {\n this.nativeModalOptions.content = (<>\n {this.renderNativeIOSWidget(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 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.renderNativeIOSWidgetWithModal(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;AACvD,SAASC,aAAa,QAA0B,4BAA4B;AAC5E,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAC9C,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,mEAAmE;AACjG,OAAOC,cAAc,MAA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;MAAY;IAAE,CAAC,CAC1G,CACG,CAAC,EAEP,IAAI,CAAChH,KAAK,CAAC+B,cAAc,KACpB9E,QAAQ,CAACiF,EAAE,KAAK,KAAK,IAAI,IAAI,CAACW,eAAe,CAAClE,KAAK,CAAC,IACnD1B,QAAQ,CAACiF,EAAE,KAAK,SAAS,IAAI,IAAI,CAACgB,kBAAkB,CAACvE,KAAK,CAAE,IAC5D1B,QAAQ,CAACiF,EAAE,KAAK,KAAK,IAAI,IAAI,CAACsC,8BAA8B,CAAC7F,KAAK,CAAE,CAExE,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,11 @@ 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);
21
+ _defineProperty(this, "accessibilitylabel", undefined);
22
+ _defineProperty(this, "hint", undefined);
23
+ _defineProperty(this, "accessibilityrole", "none");
24
+ _defineProperty(this, "accessibilitylabelledby", undefined);
20
25
  }
21
26
  }
22
27
  //# 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';\nimport { AccessibilityRole } from 'react-native';\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 accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = \"none\";\n accessibilitylabelledby?: string = undefined;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,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;IAAAA,eAAA,6BAIWC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,MAAM;IAAAA,eAAA,kCACXC,SAAS;EAAA;AAC9C"}
@@ -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,8 +52,37 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
49
52
  },
50
53
  icon: {
51
54
  fontSize: 16,
55
+ paddingRight: 0,
52
56
  fontWeight: 'bold'
53
57
  }
58
+ },
59
+ dialog: {
60
+ minWidth: 320,
61
+ paddingTop: 24,
62
+ paddingBottom: 24,
63
+ paddingLeft: 24,
64
+ paddingRight: 24,
65
+ elevation: 6,
66
+ width: '90%',
67
+ maxHeight: themeVariables.maxModalHeight,
68
+ backgroundColor: themeVariables.dialogBackgroundColor,
69
+ borderRadius: 28
70
+ },
71
+ actionWrapper: {
72
+ flexDirection: 'row-reverse',
73
+ marginRight: 20
74
+ },
75
+ selectBtn: {
76
+ root: {
77
+ paddingLeft: 12,
78
+ paddingRight: 12
79
+ }
80
+ },
81
+ cancelBtn: {
82
+ root: {
83
+ paddingLeft: 12,
84
+ paddingRight: 12
85
+ }
54
86
  }
55
87
  });
56
88
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -67,5 +99,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
67
99
  }
68
100
  }
69
101
  } : {});
102
+ addStyle(DEFAULT_CLASS + '-with-label', '', {
103
+ root: {
104
+ minHeight: 48,
105
+ paddingVertical: 16
106
+ },
107
+ floatingLabel: {
108
+ position: 'absolute',
109
+ top: 12,
110
+ left: 16,
111
+ fontSize: 14,
112
+ color: themeVariables.floatingLabelColor
113
+ },
114
+ activeFloatingLabel: {
115
+ color: themeVariables.activeFloatingLabelColor
116
+ }
117
+ });
70
118
  });
71
119
  //# sourceMappingURL=datetime.styles.js.map