@wavemaker/app-rn-runtime 12.0.0-next.45752 → 12.0.0-next.46502

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -2
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  8. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  11. app-rn-runtime/components/basic/audio/audio.component.js +9 -2
  12. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  13. app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
  14. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +15 -2
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  18. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  19. app-rn-runtime/components/basic/icon/icon.component.js +10 -2
  20. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.component.js +13 -3
  22. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  23. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  24. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  25. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  26. app-rn-runtime/components/basic/search/search.component.js +10 -1
  27. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  28. app-rn-runtime/components/basic/search/search.props.js +3 -0
  29. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  30. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  31. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  32. app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
  33. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  34. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  35. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  36. app-rn-runtime/components/basic/video/video.component.js +6 -0
  37. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  38. app-rn-runtime/components/basic/video/video.styles.js +7 -1
  39. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  40. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  41. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  42. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  43. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  44. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  45. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  46. app-rn-runtime/components/chart/basechart.component.js +23 -0
  47. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  48. app-rn-runtime/components/chart/basechart.props.js +2 -2
  49. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  50. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  51. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
  52. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  53. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  54. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  55. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  56. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  57. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  58. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  59. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  60. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  61. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  62. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  63. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
  64. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  65. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  66. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  67. app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
  68. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  69. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  70. app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
  71. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  72. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  73. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  74. app-rn-runtime/components/container/container.component.js +44 -3
  75. app-rn-runtime/components/container/container.component.js.map +1 -1
  76. app-rn-runtime/components/container/container.props.js +1 -0
  77. app-rn-runtime/components/container/container.props.js.map +1 -1
  78. app-rn-runtime/components/container/container.styles.js +7 -0
  79. app-rn-runtime/components/container/container.styles.js.map +1 -1
  80. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  81. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  82. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  83. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  84. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  85. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  86. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  87. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  88. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  89. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  90. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  91. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  92. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  93. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  94. app-rn-runtime/components/container/panel/panel.component.js +43 -4
  95. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  96. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  97. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  98. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  99. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  100. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
  101. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  102. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  103. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  105. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  106. app-rn-runtime/components/container/tabs/tabs.component.js +41 -6
  107. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  108. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  109. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  110. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  111. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  112. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  113. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  114. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  115. app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
  116. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  117. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  118. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  119. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  120. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +8 -1
  121. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  122. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  123. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  124. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  125. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  126. app-rn-runtime/components/data/card/card.component.js +18 -0
  127. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  128. app-rn-runtime/components/data/card/card.styles.js +3 -0
  129. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  130. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
  131. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  132. app-rn-runtime/components/data/form/form.component.js +1 -1
  133. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  134. app-rn-runtime/components/data/form/form.props.js +1 -0
  135. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  136. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  137. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  138. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  139. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  140. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  141. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  142. app-rn-runtime/components/data/list/list.component.js +32 -24
  143. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  144. app-rn-runtime/components/data/list/list.props.js +1 -0
  145. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  146. app-rn-runtime/components/data/list/list.styles.js +9 -0
  147. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  148. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  149. app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
  150. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  151. app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
  152. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  153. app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
  154. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  155. app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
  156. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  157. app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
  158. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  159. app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
  160. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  161. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
  162. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  163. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  164. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  165. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  166. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  167. app-rn-runtime/components/input/chips/chips.component.js +16 -2
  168. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  169. app-rn-runtime/components/input/chips/chips.styles.js +8 -0
  170. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  171. app-rn-runtime/components/input/currency/currency.component.js +14 -4
  172. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  173. app-rn-runtime/components/input/currency/currency.styles.js +43 -1
  174. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  175. app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
  176. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  177. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
  178. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  179. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
  180. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  181. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
  182. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  183. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
  184. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  185. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
  186. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
  187. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
  188. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
  189. app-rn-runtime/components/input/number/number.component.js +17 -3
  190. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  191. app-rn-runtime/components/input/number/number.styles.js +24 -1
  192. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  193. app-rn-runtime/components/input/radioset/radioset.component.js +33 -8
  194. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  195. app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
  196. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  197. app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
  198. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  199. app-rn-runtime/components/input/select/select.component.js +11 -3
  200. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  201. app-rn-runtime/components/input/select/select.styles.js +24 -0
  202. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  203. app-rn-runtime/components/input/switch/switch.component.js +13 -3
  204. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  205. app-rn-runtime/components/input/switch/switch.styles.js +15 -0
  206. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  207. app-rn-runtime/components/input/text/text.component.js +26 -2
  208. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  209. app-rn-runtime/components/input/text/text.props.js +3 -0
  210. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  211. app-rn-runtime/components/input/text/text.styles.js +3 -0
  212. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  213. app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
  214. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  215. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  216. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  217. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  218. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  219. app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
  220. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  221. app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
  222. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  223. app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
  224. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  225. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  226. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  227. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  228. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  229. app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
  230. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  231. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  232. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  233. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  234. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  235. app-rn-runtime/components/page/page.component.js.map +1 -1
  236. app-rn-runtime/components/page/page.props.js.map +1 -1
  237. app-rn-runtime/components/page/page.styles.js +7 -1
  238. app-rn-runtime/components/page/page.styles.js.map +1 -1
  239. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  240. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  241. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  242. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  243. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  244. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  245. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  246. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  247. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  248. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  249. app-rn-runtime/core/AppConfig.js.map +1 -1
  250. app-rn-runtime/core/base.component.js +33 -6
  251. app-rn-runtime/core/base.component.js.map +1 -1
  252. app-rn-runtime/core/components/textinput.component.js +9 -7
  253. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  254. app-rn-runtime/core/props.provider.js +0 -1
  255. app-rn-runtime/core/props.provider.js.map +1 -1
  256. app-rn-runtime/core/storage.service.js +15 -0
  257. app-rn-runtime/core/storage.service.js.map +1 -1
  258. app-rn-runtime/core/tappable.component.js +10 -4
  259. app-rn-runtime/core/tappable.component.js.map +1 -1
  260. app-rn-runtime/core/utils.js +5 -0
  261. app-rn-runtime/core/utils.js.map +1 -1
  262. app-rn-runtime/core/wm-component-tree.js +58 -0
  263. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  264. app-rn-runtime/package.json +13 -6
  265. app-rn-runtime/runtime/App.js +23 -9
  266. app-rn-runtime/runtime/App.js.map +1 -1
  267. app-rn-runtime/runtime/App.navigator.js +1 -0
  268. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  269. app-rn-runtime/runtime/base-fragment.component.js +46 -13
  270. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  271. app-rn-runtime/runtime/base-page.component.js +38 -2
  272. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  273. app-rn-runtime/runtime/base-partial.component.js +3 -0
  274. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  275. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  276. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  277. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  278. app-rn-runtime/runtime/services/app-modal.service.js +4 -4
  279. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  280. app-rn-runtime/runtime/services/app-security.service.js +17 -1
  281. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  282. app-rn-runtime/styles/theme.js +10 -0
  283. app-rn-runtime/styles/theme.js.map +1 -1
  284. app-rn-runtime/styles/theme.variables.js +2 -1
  285. app-rn-runtime/styles/theme.variables.js.map +1 -1
  286. app-rn-runtime/variables/http.service.js +5 -1
  287. app-rn-runtime/variables/http.service.js.map +1 -1
  288. app-rn-runtime/variables/live-variable.js +14 -0
  289. app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["includes","intersection","isNaN","isFinite","toArray","isNil","BaseComponent","BaseComponentState","DEFAULT_CLASS","Platform","countDecimalDigits","validateField","BaseNumberState","constructor","args","_defineProperty","BaseNumberComponent","props","defaultClass","defaultProps","defaultState","DECIMAL","GROUP","onChange","event","state","updateon","updateDatavalue","target","value","focus","_this$widgetRef","widgetRef","validateOnDevice","type","_value$match","isCurrencyField","isValidText","test","Number","match","length","onChangeText","shouldFormateToNumber","newValue","parseNumber","replace","isValidTextOnDevice","decimalPlacesInNumber","decimalPlaces","updateState","textValue","validate","invokeChange","e","OS","cursor","selectionStart","setState","validationObj","isValid","errorType","handleValidation","regexp","condition","RegExp","val","parts","split","NaN","number","join","decimal","sum","parseFloat","toFixed","Object","is","source","model","toString","oldValue","datavalue","validNumber","isValidNumber","invokeEventCallback","proxy","Promise","resolve","hastwowaybinding","setProp","then","onFieldChange","onBlur","isDisplayValuePresent","newVal","undefined","setTimeout","triggerValidation","oldVal","onFocus","countDecimals","decimalValue","validateInputEntry","$event","ctrlKey","key","validity","inputValue","step","preventDefault","getValueInRange","minvalue","maxvalue","required","isInteger","resetValidations","onPropertyChange","name","$new","$old","isDefault","bind","displayValue"],"sources":["basenumber.component.ts"],"sourcesContent":["import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';\nimport BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\nimport { BaseComponent, BaseComponentState } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { BaseNumberStyles } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.styles';\nimport { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { Platform, TextInput } from 'react-native';\nimport { countDecimalDigits, validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseNumberState <T extends BaseNumberProps> extends BaseComponentState<T> {\n isValid: boolean = true;\n textValue: string = '';\n isDefault = false;\n errorType = '';\n}\n\nexport abstract class BaseNumberComponent< T extends BaseNumberProps, S extends BaseNumberState<T>, L extends BaseNumberStyles> extends BaseComponent<T, S, L> {\n private DECIMAL;\n private GROUP;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.DECIMAL = '.';\n this.GROUP = ',';\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n validateOnDevice(value: string, type: 'number' | 'currency') {\n const isCurrencyField = type === 'currency';\n let isValidText = true;\n\n // * no alphabets except E, may contain E only once\n if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {\n isValidText = false;\n }\n\n // * currency only: check for negative number\n if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {\n isValidText = false;\n }\n\n // * number only: not more than one minus and doesn't end with minus (-)\n if (!isCurrencyField && (Number(value.match(/-/g)?.length) > 1) || /\\w-/.test(value)) {\n isValidText = false;\n }\n\n // * check for more than one decimal point\n if (/^\\d*\\.\\d*\\..*$/.test(value)) {\n isValidText = false;\n }\n\n // * check for spaces and comma\n if (/[\\s,]/.test(value)) {\n isValidText = false;\n }\n\n return isValidText;\n }\n\n onChangeText(value: string, type: 'number' | 'currency', shouldFormateToNumber?: boolean) {\n const newValue = shouldFormateToNumber ? `${this.parseNumber(value.replace(/[^0-9.]/g, ''))}` : value;\n const isValidTextOnDevice = this.validateOnDevice(newValue, type);\n if (!isValidTextOnDevice) {\n return;\n }\n\n const decimalPlacesInNumber = countDecimalDigits(newValue);\n\n if (this.props.decimalPlaces < decimalPlacesInNumber) {\n return;\n }\n\n this.updateState({\n textValue: newValue\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(newValue);\n this.updateDatavalue(newValue, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n\n }\n\n handleValidation(value: any) {\n const props = this.state.props;\n if (props.regexp) {\n const condition = new RegExp(props.regexp, 'g');\n return condition.test(value);\n }\n return true;\n }\n\n /**\n * Method parses the Localized number(string) to a valid number.\n * if the string dose not result to a valid number then returns NaN.\n * @param {string} val Localized number.\n * @returns {number}\n */\n private parseNumber(val: string): any {\n // splits string into two parts. decimal and number.\n const parts = val.split(this.DECIMAL);\n if (!parts.length) {\n return;\n }\n if (parts.length > 2) {\n return NaN;\n }\n // If number have decimal point and not have a decimal value then return.\n if (parts[1] === '') {\n return NaN;\n }\n // replaces all group separators form the number.\n const number = Number(parts[0].split(this.GROUP).join(''));\n const decimal = Number(`0.${parts[1] || 0}`);\n if (Number.isNaN(number) || Number.isNaN(decimal)) {\n return NaN;\n }\n const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;\n // if the number is negative then calculate the number as number - decimal\n // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45\n // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal\n // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1\n if (number === 0) {\n return Object.is(0, number) ? sum : number - decimal;\n }\n return number > 0 ? sum : number - decimal;\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const model = value && this.parseNumber(value.toString());\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n const validNumber = this.isValidNumber(model) || value == oldValue + '.';\n if (!validNumber) {\n this.invokeEventCallback('onError', [ event, this.proxy, value, oldValue ]);\n return;\n }\n\n new Promise((resolve) => {\n if (props.hastwowaybinding) {\n this.setProp(\"datavalue\", value);\n resolve(true);\n } else {\n this.updateState({\n props: {\n datavalue: model || Number(value)\n }\n } as S, () => resolve(true));\n }\n }).then(() => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, model, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n });\n }\n\n onBlur(event: any, isDisplayValuePresent?: boolean) {\n let newVal = isDisplayValuePresent ? this.state.textValue : event.target.value || this.state.textValue;\n this.validate(newVal);\n if (newVal === '' || newVal == undefined) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n },10)\n }\n if (this.state.props.updateon === 'blur') {\n let oldVal = this.state.props.datavalue || '';\n if (oldVal !== newVal) {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n }\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n }\n\n /**\n * returns the number of decimal places a number have.\n * @param value: number\n * @returns {number}\n */\n private countDecimals(value: any) {\n if (value && ((value % 1) !== 0)) {\n const decimalValue = value.toString().split('.')[1];\n return decimalValue && decimalValue.length;\n }\n return 0;\n }\n\n public validateInputEntry($event: any) {\n const props = this.state.props;\n\n // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).\n if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {\n return;\n }\n\n const validity = new RegExp(`^[\\\\d\\\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');\n const inputValue = $event.target.value;\n // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).\n if (inputValue && this.countDecimals(props.step) && (this.countDecimals(inputValue) >= this.countDecimals(props.step))) {\n $event.preventDefault();\n }\n // validates if user entered an invalid character.\n if (!validity.test($event.key)) {\n $event.preventDefault();\n }\n // a decimal value can be entered only once in the input.\n if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {\n $event.preventDefault();\n }\n // 'e' can be entered only once in the input.\n if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {\n $event.preventDefault();\n }\n if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {\n $event.preventDefault();\n }\n this.invokeEventCallback('onKeypress', [ $event, this.proxy]);\n }\n\n /**\n * returns a valid number by validating the minimum and maximum values.\n * @param {number} value\n * @returns {number}\n */\n private getValueInRange(value: number): number {\n const props = this.state.props;\n if (!isNil(value) && !isNaN(props.minvalue) && value < props.minvalue) {\n this.updateState({ errorType: 'minvalue'} as S);\n return props.minvalue;\n }\n if (!isNil(value) && !isNaN(props.maxvalue) && value > props.maxvalue) {\n this.updateState({ errorType: 'maxvalue'} as S);\n return props.maxvalue;\n }\n return value;\n }\n\n /**\n * Adds validations for the number before updating the widget model. like validating min and max value for the widget.\n * @param {number} val number to be validated\n * @returns {number}\n */\n private isValidNumber(val: number): boolean {\n const props = this.state.props;\n\n //empty number widget should not show validation error when required is false\n // @ts-ignore\n if (this.state.props.required === false && val === '') {\n return true;\n }\n // id number is infinite then consider it as invalid value\n if (isNaN(val) || !isFinite(val) || (!Number.isInteger(props.step) &&\n this.countDecimals(val) > this.countDecimals(props.step))) {\n this.updateState({\n isValid: false,\n } as S);\n return false;\n }\n if (val !== this.getValueInRange(val)) {\n this.updateState({\n isValid: false,\n } as S);\n return true;\n }\n this.resetValidations();\n return true;\n }\n\n // resets all the flags related to the widget's validation.\n protected resetValidations() {\n this.updateState({\n isValid: true,\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'minvalue':\n case 'maxvalue':\n if ($new|| $old) {\n this.isValidNumber($new);\n }\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new,\n } as S);\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n break;\n case 'displayValue': \n this.updateState({\n displayValue: $new,\n } as any)\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AAEhF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,aAAa,QA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AAK,CAAC2E,aAAa,CAAC8B,IAAI,CAAC,IAAI,EAAE,WAAW,EAAEH,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC,CAAC;QAClJ,CAAC,MAAM;UACL,IAAI,CAACxG,KAAK,CAAC2E,aAAa,IAAI,IAAI,CAAC3E,KAAK,CAAC2E,aAAa,CAAC,WAAW,EAAE2B,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC;QAC1F;QACA;MACF,KAAK,cAAc;QACjB,IAAI,CAACvE,WAAW,CAAC;UACfyE,YAAY,EAAEJ;QAChB,CAAQ,CAAC;IACb;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["includes","intersection","isNaN","isFinite","toArray","isNil","BaseComponent","BaseComponentState","DEFAULT_CLASS","Platform","countDecimalDigits","validateField","BaseNumberState","constructor","args","_defineProperty","BaseNumberComponent","props","defaultClass","defaultProps","defaultState","DECIMAL","GROUP","onChange","event","state","updateon","updateDatavalue","target","value","focus","_this$widgetRef","widgetRef","validateOnDevice","type","_value$match","isCurrencyField","isValidText","test","Number","match","length","onChangeText","shouldFormateToNumber","newValue","parseNumber","replace","isValidTextOnDevice","decimalPlacesInNumber","decimalPlaces","updateState","textValue","validate","invokeChange","e","OS","cursor","selectionStart","setState","validationObj","isValid","errorType","handleValidation","regexp","condition","RegExp","val","parts","split","NaN","number","join","decimal","sum","parseFloat","toFixed","Object","is","source","model","toString","oldValue","datavalue","validNumber","isValidNumber","invokeEventCallback","proxy","Promise","resolve","hastwowaybinding","setProp","setTimeout","then","onFieldChange","onBlur","isDisplayValuePresent","textVal","newVal","undefined","triggerValidation","oldVal","isInputFocused","onFocus","countDecimals","decimalValue","validateInputEntry","$event","ctrlKey","key","validity","inputValue","step","preventDefault","getValueInRange","minvalue","maxvalue","required","isInteger","resetValidations","onPropertyChange","name","$new","$old","isDefault","bind","displayValue"],"sources":["basenumber.component.ts"],"sourcesContent":["import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';\nimport BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\nimport { BaseComponent, BaseComponentState } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { BaseNumberStyles } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.styles';\nimport { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { Platform, TextInput } from 'react-native';\nimport { countDecimalDigits, validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseNumberState <T extends BaseNumberProps> extends BaseComponentState<T> {\n isValid: boolean = true;\n isInputFocused: boolean = false;\n textValue: string = '';\n isDefault = false;\n errorType = '';\n}\n\nexport abstract class BaseNumberComponent< T extends BaseNumberProps, S extends BaseNumberState<T>, L extends BaseNumberStyles> extends BaseComponent<T, S, L> {\n private DECIMAL;\n private GROUP;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.DECIMAL = '.';\n this.GROUP = ',';\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n validateOnDevice(value: string, type: 'number' | 'currency') {\n const isCurrencyField = type === 'currency';\n let isValidText = true;\n\n // * no alphabets except E, may contain E only once\n if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {\n isValidText = false;\n }\n\n // * currency only: check for negative number\n if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {\n isValidText = false;\n }\n\n // * number only: not more than one minus and doesn't end with minus (-)\n if (!isCurrencyField && (Number(value.match(/-/g)?.length) > 1) || /\\w-/.test(value)) {\n isValidText = false;\n }\n\n // * check for more than one decimal point\n if (/^\\d*\\.\\d*\\..*$/.test(value)) {\n isValidText = false;\n }\n\n // * check for spaces and comma\n if (/[\\s,]/.test(value)) {\n isValidText = false;\n }\n\n return isValidText;\n }\n\n onChangeText(value: string, type: 'number' | 'currency', shouldFormateToNumber?: boolean) {\n const newValue = shouldFormateToNumber ? `${this.parseNumber(value.replace(/[^0-9.]/g, ''))}` : value;\n const isValidTextOnDevice = this.validateOnDevice(newValue, type);\n if (!isValidTextOnDevice) {\n return;\n }\n\n const decimalPlacesInNumber = countDecimalDigits(newValue);\n\n if (this.props.decimalPlaces < decimalPlacesInNumber) {\n return;\n }\n\n this.updateState({\n textValue: newValue\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(newValue);\n this.updateDatavalue(newValue, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n\n }\n\n handleValidation(value: any) {\n const props = this.state.props;\n if (props.regexp) {\n const condition = new RegExp(props.regexp, 'g');\n return condition.test(value);\n }\n return true;\n }\n\n /**\n * Method parses the Localized number(string) to a valid number.\n * if the string dose not result to a valid number then returns NaN.\n * @param {string} val Localized number.\n * @returns {number}\n */\n private parseNumber(val: string): any {\n // splits string into two parts. decimal and number.\n const parts = val.split(this.DECIMAL);\n if (!parts.length) {\n return;\n }\n if (parts.length > 2) {\n return NaN;\n }\n // If number have decimal point and not have a decimal value then return.\n if (parts[1] === '') {\n return NaN;\n }\n // replaces all group separators form the number.\n const number = Number(parts[0].split(this.GROUP).join(''));\n const decimal = Number(`0.${parts[1] || 0}`);\n if (Number.isNaN(number) || Number.isNaN(decimal)) {\n return NaN;\n }\n const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;\n // if the number is negative then calculate the number as number - decimal\n // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45\n // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal\n // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1\n if (number === 0) {\n return Object.is(0, number) ? sum : number - decimal;\n }\n return number > 0 ? sum : number - decimal;\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const model = value && this.parseNumber(value.toString());\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n const validNumber = this.isValidNumber(model) || value === oldValue + '.';\n if (!validNumber) {\n this.invokeEventCallback('onError', [ event, this.proxy, value, oldValue ]);\n return;\n }\n\n new Promise((resolve) => {\n if (props.hastwowaybinding) {\n this.setProp(\"datavalue\", value);\n setTimeout(()=>this.updateState({props: { \"datavalue\": value }} as S), 0);\n resolve(true);\n } else {\n this.updateState({\n props: {\n datavalue: model || Number(value)\n }\n } as S, () => resolve(true));\n }\n }).then(() => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, model, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n });\n }\n\n onBlur(event: any, isDisplayValuePresent?: boolean) {\n const textVal = this.state.textValue || '';\n let newVal = isDisplayValuePresent ? textVal : event.target.value || textVal;\n this.validate(newVal);\n if (newVal === '' || newVal == undefined) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n },10)\n }\n if (this.state.props.updateon === 'blur' || this.state.props.updateon === 'default') {\n let oldVal = this.state.props.datavalue || '';\n if (oldVal !== newVal && this.state.props.updateon === 'blur') {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n this.setState({ isInputFocused: false});\n }\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n this.setState({ isInputFocused: true});\n }\n\n /**\n * returns the number of decimal places a number have.\n * @param value: number\n * @returns {number}\n */\n private countDecimals(value: any) {\n if (value && ((value % 1) !== 0)) {\n const decimalValue = value.toString().split('.')[1];\n return decimalValue && decimalValue.length;\n }\n return 0;\n }\n\n public validateInputEntry($event: any) {\n const props = this.state.props;\n\n // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).\n if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {\n return;\n }\n\n const validity = new RegExp(`^[\\\\d\\\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');\n const inputValue = $event.target.value;\n // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).\n if (inputValue && this.countDecimals(props.step) && (this.countDecimals(inputValue) >= this.countDecimals(props.step))) {\n $event.preventDefault();\n }\n // validates if user entered an invalid character.\n if (!validity.test($event.key)) {\n $event.preventDefault();\n }\n // a decimal value can be entered only once in the input.\n if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {\n $event.preventDefault();\n }\n // 'e' can be entered only once in the input.\n if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {\n $event.preventDefault();\n }\n if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {\n $event.preventDefault();\n }\n this.invokeEventCallback('onKeypress', [ $event, this.proxy]);\n }\n\n /**\n * returns a valid number by validating the minimum and maximum values.\n * @param {number} value\n * @returns {number}\n */\n private getValueInRange(value: number): number {\n const props = this.state.props;\n if (props.minvalue && !isNil(value) && !isNaN(props.minvalue) && value < props.minvalue) {\n this.updateState({ errorType: 'minvalue'} as S);\n return props.minvalue;\n }\n if (props.maxvalue && !isNil(value) && !isNaN(props.maxvalue) && value > props.maxvalue) {\n this.updateState({ errorType: 'maxvalue'} as S);\n return props.maxvalue;\n }\n return value;\n }\n\n /**\n * Adds validations for the number before updating the widget model. like validating min and max value for the widget.\n * @param {number} val number to be validated\n * @returns {number}\n */\n private isValidNumber(val: number): boolean {\n const props = this.state.props;\n\n //empty number widget should not show validation error when required is false\n // @ts-ignore\n if (this.state.props.required === false && val === '') {\n return true;\n }\n // id number is infinite then consider it as invalid value\n if (isNaN(val) || !isFinite(val) || (!Number.isInteger(props.step) &&\n this.countDecimals(val) > this.countDecimals(props.step))) {\n this.updateState({\n isValid: false,\n } as S);\n return false;\n }\n if (val !== this.getValueInRange(val)) {\n this.updateState({\n isValid: false,\n } as S);\n return true;\n }\n this.resetValidations();\n return true;\n }\n\n // resets all the flags related to the widget's validation.\n protected resetValidations() {\n this.updateState({\n isValid: true,\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'minvalue':\n case 'maxvalue':\n if ($new|| $old) {\n this.isValidNumber($new);\n }\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new,\n } as S);\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n break;\n case 'displayValue': \n this.updateState({\n displayValue: $new,\n } as any)\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AAEhF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,aAAa,QAAQ,wEAAwE;AACtG,SAASC,QAAQ,QAAmB,cAAc;AAClD,SAASC,kBAAkB,EAAEC,aAAa,QAAQ,sCAAsC;AAExF,OAAO,MAAMC,eAAe,SAAqCL,kBAAkB,CAAI;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAClE,IAAI;IAAAA,eAAA,yBACG,KAAK;IAAAA,eAAA,oBACX,EAAE;IAAAA,eAAA,oBACV,KAAK;IAAAA,eAAA,oBACL,EAAE;EAAA;AAChB;AAEA,OAAO,MAAeC,mBAAmB,SAA+FV,aAA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IA,SAAS,EAAE;UACb,IAAI,CAACzE,WAAW,CAAC;YAAEyE,SAAS,EAAE;UAAM,CAAC,EAAO,IAAI,CAAC1G,KAAK,CAAC4E,aAAa,IAAI,IAAI,CAAC5E,KAAK,CAAC4E,aAAa,CAAC+B,IAAI,CAAC,IAAI,EAAE,WAAW,EAAEH,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC,CAAC;QAClJ,CAAC,MAAM;UACL,IAAI,CAAC1G,KAAK,CAAC4E,aAAa,IAAI,IAAI,CAAC5E,KAAK,CAAC4E,aAAa,CAAC,WAAW,EAAE4B,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC;QAC1F;QACA;MACF,KAAK,cAAc;QACjB,IAAI,CAACzE,WAAW,CAAC;UACf2E,YAAY,EAAEJ;QAChB,CAAQ,CAAC;IACb;EACF;AACF","ignoreList":[]}
@@ -10,6 +10,7 @@ import { MonthView } from './views/month-view';
10
10
  import WmCalendarProps from './calendar.props';
11
11
  import { DEFAULT_CLASS } from './calendar.styles';
12
12
  import WmIcon from '../../basic/icon/icon.component';
13
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
13
14
  export class WmCalendarState extends BaseComponentState {
14
15
  constructor(...args) {
15
16
  super(...args);
@@ -91,6 +92,30 @@ export default class WmCalendar extends BaseComponent {
91
92
  super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);
92
93
  this.invokeEventCallback('onViewrender', [this, null]);
93
94
  }
95
+ renderSkeleton(props) {
96
+ return /*#__PURE__*/React.createElement(View, {
97
+ style: [this.styles.root, this.styles.skeleton.root]
98
+ }, /*#__PURE__*/React.createElement(View, {
99
+ style: this.styles.headerSkeleton.root
100
+ }, createSkeleton(this.theme, {}, {
101
+ width: '10%',
102
+ height: 28,
103
+ borderRadius: 4
104
+ }), createSkeleton(this.theme, {}, {
105
+ width: '68%',
106
+ height: 16,
107
+ borderRadius: 4
108
+ }), createSkeleton(this.theme, {}, {
109
+ width: '10%',
110
+ height: 28,
111
+ borderRadius: 4
112
+ })), createSkeleton(this.theme, {}, {
113
+ width: '96%',
114
+ margin: 8,
115
+ height: 320,
116
+ borderRadius: 4
117
+ }));
118
+ }
94
119
  renderWidget(props) {
95
120
  this.invokeEventCallback('onBeforerender', [null, this]);
96
121
  return /*#__PURE__*/React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","isString","moment","BaseComponent","BaseComponentState","MonthView","WmCalendarProps","DEFAULT_CLASS","WmIcon","WmCalendarState","constructor","args","_defineProperty","Map","DEFAULT_DATE_FORMAT","WmCalendar","props","date","d","format","dateWindow","state","calendar","get","updateState","datavalue","selectedDate","invokeEventCallback","events","createElement","iconclass","iconsize","styles","root","marginTop","alignSelf","icon","Math","min","length","Fragment","prepareDataset","dataset","eventStartKey","eventstart","forEach","startDate","has","set","push","onPropertyChange","name","$new","$old","componentDidUpdate","prevProps","prevState","snapshot","renderWidget","style","_background","selectDate","onDateChange","renderChildDay","renderDay","containerStyle","dateSelectedWarpDayStyle","selectedDay","selectedDayTextStyle","selectedDayText","warpRowWeekdays","weekDay","warpRowControlMonthYear","calendarHeader","weekdayStyle","weekDayText","warpDayStyle","dayWrapper","textDayStyle","day","yearTextStyle","yearText","monthTextStyle","monthText","currentDayStyle","today","currentDayTextStyle","todayText","notDayOfCurrentMonthStyle","notDayOfCurrentMonth","renderPrevYearButton","id","getTestId","prevYearBtn","renderPrevMonthButton","prevMonthBtn","renderNextMonthButton","nextMonthBtn","renderNextYearButton","nextYearBtn"],"sources":["calendar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isString } from 'lodash';\nimport moment, { Moment } from 'moment';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { MonthView } from './views/month-view';\nimport WmCalendarProps from './calendar.props';\nimport { DEFAULT_CLASS, WmCalendarStyles } from './calendar.styles';\nimport WmIcon from '../../basic/icon/icon.component';\n\nexport class WmCalendarState extends BaseComponentState<WmCalendarProps> {\n selectedDate: Moment = moment();\n calendar: Map<String, { date: number, events: any []}> = new Map();\n}\n\nconst DEFAULT_DATE_FORMAT = 'DD-MM-YYYY';\n\nexport default class WmCalendar extends BaseComponent<WmCalendarProps, WmCalendarState, WmCalendarStyles> {\n\n constructor(props: WmCalendarProps) {\n super(props, DEFAULT_CLASS, new WmCalendarProps(), new WmCalendarState());\n }\n\n onDateChange = (date: Moment) => {\n const d = moment(date).format(DEFAULT_DATE_FORMAT);\n const dateWindow = this.state.calendar.get(d);\n this.updateState({\n props: {datavalue: d},\n selectedDate: date\n } as WmCalendarState);\n this.invokeEventCallback('onSelect', [d, d, this, dateWindow?.events]);\n }\n\n prepareDataset(dataset: any[]) {\n if (!dataset) {\n return;\n }\n const state = {\n calendar: new Map()\n } as WmCalendarState;\n const eventStartKey = this.state.props.eventstart;\n dataset.forEach(d => {\n let startDate = d[eventStartKey];\n if (!isString(startDate)) {\n startDate = moment(startDate).format(DEFAULT_DATE_FORMAT);\n }\n if (!state.calendar.has(startDate)) {\n state.calendar.set(startDate, {\n date: moment(startDate, DEFAULT_DATE_FORMAT).get('milliseconds'),\n events: []\n });\n }\n const dateWindow = state.calendar.get(startDate);\n dateWindow?.events.push(d);\n });\n this.updateState(state);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset':\n this.prepareDataset($new);\n break;\n case 'datavalue':\n if ($new) {\n this.updateState({\n selectedDate: isString($new) ? moment($new, DEFAULT_DATE_FORMAT) : moment($new)\n } as WmCalendarState)\n }\n }\n }\n\n renderDay = (date: Moment) => {\n const dateWindow = this.state.calendar.get(moment(date).format(DEFAULT_DATE_FORMAT));\n if (dateWindow) {\n return (\n <WmIcon\n iconclass=\"fa fa-circle\"\n iconsize={8}\n styles={{\n root: {marginTop: -8, alignSelf: 'flexStart'},\n icon: this.styles['eventDay' + Math.min(3, dateWindow.events.length)]}}></WmIcon>\n );\n }\n return (<></>);\n }\n\n componentDidUpdate(prevProps: WmCalendarProps, prevState: WmCalendarState, snapshot: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onViewrender', [this, null]);\n }\n\n renderWidget(props: WmCalendarProps) {\n this.invokeEventCallback('onBeforerender', [null, this]);\n return (\n <View style={this.styles.root}>\n {this._background}\n <MonthView\n date={this.state.selectedDate}\n selectDate={this.onDateChange}\n format={DEFAULT_DATE_FORMAT}\n renderChildDay={this.renderDay}\n containerStyle={this.styles.calendar}\n dateSelectedWarpDayStyle={this.styles.selectedDay}\n selectedDayTextStyle={this.styles.selectedDayText}\n warpRowWeekdays={this.styles.weekDay}\n warpRowControlMonthYear={this.styles.calendarHeader}\n weekdayStyle={this.styles.weekDayText}\n warpDayStyle={this.styles.dayWrapper}\n textDayStyle={this.styles.day}\n yearTextStyle={this.styles.yearText}\n monthTextStyle={this.styles.monthText}\n currentDayStyle={this.styles.today}\n currentDayTextStyle={this.styles.todayText}\n notDayOfCurrentMonthStyle={this.styles.notDayOfCurrentMonth}\n renderPrevYearButton={() =>\n (<WmIcon id={this.getTestId('prevyearicon')} iconclass=\"wi wi-angle-double-left\" styles={this.styles.prevYearBtn}/>)}\n renderPrevMonthButton={() =>\n (<WmIcon id={this.getTestId('prevmonthicon')} iconclass=\"wi wi-chevron-left fa-2x\" styles={this.styles.prevMonthBtn}/>)}\n renderNextMonthButton={() =>\n (<WmIcon id={this.getTestId('nextmonthicon')} iconclass=\"wi wi-chevron-right fa-2x\" styles={this.styles.nextMonthBtn}/>)}\n renderNextYearButton={() =>\n (<WmIcon id={this.getTestId('nextyearicon')} iconclass=\"wi wi-angle-double-right\" styles={this.styles.nextYearBtn}/>)}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAkB,QAAQ;AACvC,SAAS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,qBAAqB,EAAEA,CAAA,kBAClBjG,KAAA,CAAA8B,aAAA,CAACrB,MAAM;QAACmF,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,eAAe,CAAE;QAAC9D,SAAS,EAAC,2BAA2B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAACiE;MAAa,CAAC,CAAG;MAC7HC,oBAAoB,EAAEA,CAAA,kBACjBnG,KAAA,CAAA8B,aAAA,CAACrB,MAAM;QAAEmF,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,cAAc,CAAE;QAAC9D,SAAS,EAAC,0BAA0B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAACmE;MAAY,CAAC;IAAG,CAC5H,CACC,CAAC;EAEX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","isString","moment","BaseComponent","BaseComponentState","MonthView","WmCalendarProps","DEFAULT_CLASS","WmIcon","createSkeleton","WmCalendarState","constructor","args","_defineProperty","Map","DEFAULT_DATE_FORMAT","WmCalendar","props","date","d","format","dateWindow","state","calendar","get","updateState","datavalue","selectedDate","invokeEventCallback","events","createElement","iconclass","iconsize","styles","root","marginTop","alignSelf","icon","Math","min","length","Fragment","prepareDataset","dataset","eventStartKey","eventstart","forEach","startDate","has","set","push","onPropertyChange","name","$new","$old","componentDidUpdate","prevProps","prevState","snapshot","renderSkeleton","style","skeleton","headerSkeleton","theme","width","height","borderRadius","margin","renderWidget","_background","selectDate","onDateChange","renderChildDay","renderDay","containerStyle","dateSelectedWarpDayStyle","selectedDay","selectedDayTextStyle","selectedDayText","warpRowWeekdays","weekDay","warpRowControlMonthYear","calendarHeader","weekdayStyle","weekDayText","warpDayStyle","dayWrapper","textDayStyle","day","yearTextStyle","yearText","monthTextStyle","monthText","currentDayStyle","today","currentDayTextStyle","todayText","notDayOfCurrentMonthStyle","notDayOfCurrentMonth","renderPrevYearButton","id","getTestId","prevYearBtn","renderPrevMonthButton","prevMonthBtn","renderNextMonthButton","nextMonthBtn","renderNextYearButton","nextYearBtn"],"sources":["calendar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, View } from 'react-native';\nimport { isString } from 'lodash';\nimport moment, { Moment } from 'moment';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { MonthView } from './views/month-view';\nimport WmCalendarProps from './calendar.props';\nimport { DEFAULT_CLASS, WmCalendarStyles } from './calendar.styles';\nimport WmIcon from '../../basic/icon/icon.component';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component'\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport class WmCalendarState extends BaseComponentState<WmCalendarProps> {\n selectedDate: Moment = moment();\n calendar: Map<String, { date: number, events: any []}> = new Map();\n}\n\nconst DEFAULT_DATE_FORMAT = 'DD-MM-YYYY';\n\nexport default class WmCalendar extends BaseComponent<WmCalendarProps, WmCalendarState, WmCalendarStyles> {\n\n constructor(props: WmCalendarProps) {\n super(props, DEFAULT_CLASS, new WmCalendarProps(), new WmCalendarState());\n }\n\n onDateChange = (date: Moment) => {\n const d = moment(date).format(DEFAULT_DATE_FORMAT);\n const dateWindow = this.state.calendar.get(d);\n this.updateState({\n props: {datavalue: d},\n selectedDate: date\n } as WmCalendarState);\n this.invokeEventCallback('onSelect', [d, d, this, dateWindow?.events]);\n }\n\n prepareDataset(dataset: any[]) {\n if (!dataset) {\n return;\n }\n const state = {\n calendar: new Map()\n } as WmCalendarState;\n const eventStartKey = this.state.props.eventstart;\n dataset.forEach(d => {\n let startDate = d[eventStartKey];\n if (!isString(startDate)) {\n startDate = moment(startDate).format(DEFAULT_DATE_FORMAT);\n }\n if (!state.calendar.has(startDate)) {\n state.calendar.set(startDate, {\n date: moment(startDate, DEFAULT_DATE_FORMAT).get('milliseconds'),\n events: []\n });\n }\n const dateWindow = state.calendar.get(startDate);\n dateWindow?.events.push(d);\n });\n this.updateState(state);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset':\n this.prepareDataset($new);\n break;\n case 'datavalue':\n if ($new) {\n this.updateState({\n selectedDate: isString($new) ? moment($new, DEFAULT_DATE_FORMAT) : moment($new)\n } as WmCalendarState)\n }\n }\n }\n\n renderDay = (date: Moment) => {\n const dateWindow = this.state.calendar.get(moment(date).format(DEFAULT_DATE_FORMAT));\n if (dateWindow) {\n return (\n <WmIcon\n iconclass=\"fa fa-circle\"\n iconsize={8}\n styles={{\n root: {marginTop: -8, alignSelf: 'flexStart'},\n icon: this.styles['eventDay' + Math.min(3, dateWindow.events.length)]}}></WmIcon>\n );\n }\n return (<></>);\n }\n\n componentDidUpdate(prevProps: WmCalendarProps, prevState: WmCalendarState, snapshot: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onViewrender', [this, null]);\n }\n\n public renderSkeleton(props: WmCalendarProps): React.ReactNode {\n return (\n <View style={[this.styles.root, this.styles.skeleton.root]}>\n <View style={this.styles.headerSkeleton.root}>\n {createSkeleton(this.theme, {} as WmSkeletonStyles, {width: '10%', height: 28,borderRadius: 4})}\n {createSkeleton(this.theme, {} as WmSkeletonStyles, {width: '68%', height: 16, borderRadius: 4})}\n {createSkeleton(this.theme, {}as WmSkeletonStyles, {width: '10%', height: 28, borderRadius: 4})}\n </View>\n {createSkeleton(this.theme, {} as WmSkeletonStyles, {width: '96%', margin: 8, height: 320, borderRadius: 4})}\n </View>)\n } \n\n renderWidget(props: WmCalendarProps) {\n this.invokeEventCallback('onBeforerender', [null, this]);\n return (\n <View style={this.styles.root}>\n {this._background}\n <MonthView\n date={this.state.selectedDate}\n selectDate={this.onDateChange}\n format={DEFAULT_DATE_FORMAT}\n renderChildDay={this.renderDay}\n containerStyle={this.styles.calendar}\n dateSelectedWarpDayStyle={this.styles.selectedDay}\n selectedDayTextStyle={this.styles.selectedDayText}\n warpRowWeekdays={this.styles.weekDay}\n warpRowControlMonthYear={this.styles.calendarHeader}\n weekdayStyle={this.styles.weekDayText}\n warpDayStyle={this.styles.dayWrapper}\n textDayStyle={this.styles.day}\n yearTextStyle={this.styles.yearText}\n monthTextStyle={this.styles.monthText}\n currentDayStyle={this.styles.today}\n currentDayTextStyle={this.styles.todayText}\n notDayOfCurrentMonthStyle={this.styles.notDayOfCurrentMonth}\n renderPrevYearButton={() =>\n (<WmIcon id={this.getTestId('prevyearicon')} iconclass=\"wi wi-angle-double-left\" styles={this.styles.prevYearBtn}/>)}\n renderPrevMonthButton={() =>\n (<WmIcon id={this.getTestId('prevmonthicon')} iconclass=\"wi wi-chevron-left fa-2x\" styles={this.styles.prevMonthBtn}/>)}\n renderNextMonthButton={() =>\n (<WmIcon id={this.getTestId('nextmonthicon')} iconclass=\"wi wi-chevron-right fa-2x\" styles={this.styles.nextMonthBtn}/>)}\n renderNextYearButton={() =>\n (<WmIcon id={this.getTestId('nextyearicon')} iconclass=\"wi wi-angle-double-right\" styles={this.styles.nextYearBtn}/>)}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAQ,cAAc;AACnD,SAASC,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAkB,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,OAAOC,MAAM,MAAM,iCAAiC;AACpD,SAASC,cAAc,QAAQ,wEAAwE;AAGvG,OAAO,MAAMC,eAAe,SAASN,kBAAkB,CAAkB;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAChDX,MAAM,CAAC,CAAC;IAAAW,eAAA,mBAC0B,IAAIC,GAAG,CAAC,CAAC;EAAA;AACpE;AAEA,MAAMC,mBAAmB,GAAG,YAAY;AAExC,eAAe,MAAMC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nCC,mBAAmB,EAAE,IAAI,CAAC9D,MAAM,CAAC+D,SAAU;MAC3CC,yBAAyB,EAAE,IAAI,CAAChE,MAAM,CAACiE,oBAAqB;MAC5DC,oBAAoB,EAAEA,CAAA,kBACnBpG,KAAA,CAAA+B,aAAA,CAACtB,MAAM;QAAC4F,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,cAAc,CAAE;QAACtE,SAAS,EAAC,yBAAyB;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqE;MAAY,CAAC,CAAG;MACvHC,qBAAqB,EAAEA,CAAA,kBACpBxG,KAAA,CAAA+B,aAAA,CAACtB,MAAM;QAAC4F,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,eAAe,CAAE;QAACtE,SAAS,EAAC,0BAA0B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAACuE;MAAa,CAAC,CAAG;MAC1HC,qBAAqB,EAAEA,CAAA,kBAClB1G,KAAA,CAAA+B,aAAA,CAACtB,MAAM;QAAC4F,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,eAAe,CAAE;QAACtE,SAAS,EAAC,2BAA2B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAACyE;MAAa,CAAC,CAAG;MAC7HC,oBAAoB,EAAEA,CAAA,kBACjB5G,KAAA,CAAA+B,aAAA,CAACtB,MAAM;QAAE4F,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,cAAc,CAAE;QAACtE,SAAS,EAAC,0BAA0B;QAACE,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC2E;MAAY,CAAC;IAAG,CAC5H,CACC,CAAC;EAEX;AACF","ignoreList":[]}
@@ -114,6 +114,25 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
114
114
  root: {
115
115
  color: themeVariables.calendarNextYearIconColor
116
116
  }
117
+ },
118
+ skeleton: {
119
+ root: {
120
+ display: 'flex',
121
+ justifyContent: 'center',
122
+ backgroundColor: '#fff',
123
+ paddingHorizontal: 8,
124
+ alignItems: 'center'
125
+ }
126
+ },
127
+ headerSkeleton: {
128
+ root: {
129
+ width: '100%',
130
+ display: 'flex',
131
+ flexDirection: 'row',
132
+ alignItems: 'center',
133
+ justifyContent: 'space-around',
134
+ marginBottom: 16
135
+ }
117
136
  }
118
137
  });
119
138
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","transform","rotateY"],"sources":["calendar.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 } from 'react-native';\n\nexport type WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n }\n } as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA0BxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAmB;IACnEM,IAAI,EAAE;MACFC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE,GAAG;MACdC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;M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KAAK,EAAER,cAAc,CAAC6D;MAC1B;IACJ;EACJ,CAAC,CAAC;EAEF5D,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCwD,YAAY,EAAE;MACVnD,IAAI,EAAE;QACF2D,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBP,YAAY,EAAE;MACVrD,IAAI,EAAE;QACF2D,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBzB,SAAS,EAAE;MACPd,OAAO,EAAE;IACb,CAAC;IACDgB,QAAQ,EAAE;MACNhB,OAAO,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","skeleton","display","justifyContent","paddingHorizontal","alignItems","headerSkeleton","flexDirection","marginBottom","transform","rotateY"],"sources":["calendar.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 } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle,\n skeleton: WmSkeletonStyles;\n headerSkeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n display:'flex', \n justifyContent: 'center',\n backgroundColor:'#fff',\n paddingHorizontal: 8,\n alignItems: 'center',\n },\n } as any as WmSkeletonStyles ,\n headerSkeleton: {\n root: {\n width: '100%',\n display:'flex', \n flexDirection:'row', \n alignItems: 'center',\n justifyContent: 'space-around',\n marginBottom: 16\n } \n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n }\n } as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA6BxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAmB;IACnEM,IAAI,EAAE;MACFC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE,GAAG;MACdC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAER,cAAc,CAACS;IAC1B,CAAC;IACDC,QAAQ,EAAG;MACPC,eAAe,EAAEX,cAAc,CAACY,eAAe;MAC/CC,WAAW,EAAEb,cAAc,CAACc,qBAAqB;MACjDC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,SAAS,EAAE,CAAC;MACZC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,SAAS,EAAE;IACf,CAAC;IACDC,cAAc,EAAG;MACbV,eAAe,EAAEX,cAAc,CAACc,qBAAqB;MACrDD,WAAW,EAAEb,cAAc,CAACc,qBAAqB;MACjDQ,iBAAiB,EAAE,CAAC;MACpBN,WAAW,EAAE,OAAO;MACpBE,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE;IACnB,CAAC;IACDI,OAAO,EAAE;MACLZ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,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCwD,YAAY,EAAE;MACVnD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBf,YAAY,EAAE;MACVrD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBjC,SAAS,EAAE;MACPd,OAAO,EAAE;IACb,CAAC;IACDgB,QAAQ,EAAE;MACNhB,OAAO,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -3,13 +3,14 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
6
- import { Text, TouchableOpacity } from 'react-native';
6
+ import { Text, TouchableOpacity, View } from 'react-native';
7
7
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
8
8
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
9
9
  import { unStringify, validateField } from '@wavemaker/app-rn-runtime/core/utils';
10
10
  import WmCheckboxProps from './checkbox.props';
11
11
  import { DEFAULT_CLASS } from './checkbox.styles';
12
12
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
13
+ import WmLabel from '../../basic/label/label.component';
13
14
  export class WmCheckboxState extends BaseComponentState {
14
15
  constructor(...args) {
15
16
  super(...args);
@@ -78,9 +79,28 @@ export default class WmCheckbox extends BaseComponent {
78
79
  this.invokeEventCallback('onBlur', [null, this.proxy]);
79
80
  });
80
81
  }
82
+ renderSkeleton(props) {
83
+ return /*#__PURE__*/React.createElement(View, {
84
+ style: [this.styles.root, this.styles.skeleton.root]
85
+ }, /*#__PURE__*/React.createElement(WmIcon, {
86
+ styles: {
87
+ root: {
88
+ ...this.styles.checkicon,
89
+ ...this.styles.iconSkeleton.root
90
+ }
91
+ }
92
+ }), /*#__PURE__*/React.createElement(WmLabel, {
93
+ styles: {
94
+ root: {
95
+ ...this.styles.text,
96
+ ...this.styles.labelSkeleton.root
97
+ }
98
+ }
99
+ }));
100
+ }
81
101
  renderWidget(props) {
82
102
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction(), {
83
- style: this.styles.root,
103
+ style: [this.styles.root, this.state.isChecked ? this.styles.checkedItem : null],
84
104
  onPress: this.onPress.bind(this)
85
105
  }, getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {
86
106
  hint: props === null || props === void 0 ? void 0 : props.hint,
@@ -94,7 +114,7 @@ export default class WmCheckbox extends BaseComponent {
94
114
  disabled: props.readonly || props.disabled,
95
115
  id: this.getTestId('checkbox')
96
116
  }), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel(), {
97
- style: this.styles.text
117
+ style: [this.styles.text, this.state.isChecked ? this.styles.selectedLabel : null]
98
118
  }), props.caption));
99
119
  }
100
120
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","TouchableOpacity","BaseComponent","BaseComponentState","WmIcon","unStringify","validateField","WmCheckboxProps","DEFAULT_CLASS","AccessibilityWidgetType","getAccessibilityProps","WmCheckboxState","constructor","args","_defineProperty","WmCheckbox","props","setChecked","dataValue","checkedvalue","value","updateState","isChecked","onPropertyChange","name","$new","$old","state","datavalue","updateDatavalue","validate","validationObj","isValid","errorType","onPress","disabled","readonly","invokeEventCallback","proxy","oldValue","uncheckedvalue","onFieldChange","renderWidget","createElement","_extends","getTestPropsForAction","style","styles","root","bind","CHECKBOX","hint","checked","accessibilityRole","accessibilityLabel","caption","_background","iconclass","checkicon","uncheckicon","id","getTestId","getTestPropsForLabel","text"],"sources":["checkbox.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmCheckboxProps from './checkbox.props';\nimport { DEFAULT_CLASS, WmCheckboxStyles } from './checkbox.styles';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmCheckboxState extends BaseComponentState<WmCheckboxProps> {\n isChecked: boolean = false;\n isValid: boolean = true;\n errorType = '';\n}\n\nexport default class WmCheckbox extends BaseComponent<WmCheckboxProps, WmCheckboxState, WmCheckboxStyles> {\n\n constructor(props: WmCheckboxProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxProps(), new WmCheckboxState());\n }\n\n setChecked(dataValue: any, checkedvalue: any) {\n const value = unStringify(dataValue) === unStringify(checkedvalue, true);\n this.updateState({ isChecked: value } as WmCheckboxState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'checkedvalue':\n this.setChecked(this.state.props.datavalue, $new);\n break;\n case 'datavalue':\n this.setChecked($new, this.state.props.checkedvalue);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxState);\n }\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as WmCheckboxState);\n }\n\n onPress() {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onFocus', [null, this.proxy]);\n this.invokeEventCallback('onTap', [null, this.proxy]);\n const oldValue = this.state.props.datavalue;\n const value = !this.state.isChecked;\n this.validate(value);\n this.updateState({ isChecked: value } as WmCheckboxState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n this.updateState({ props: { datavalue: dataValue } } as WmCheckboxState,\n () => {\n if (!this.props.onFieldChange) {\n this.invokeEventCallback('onChange', [null, this.proxy, dataValue, oldValue]);\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', dataValue, oldValue);\n }\n this.invokeEventCallback('onBlur', [ null, this.proxy ]);\n });\n }\n\n renderWidget(props: WmCheckboxProps) {\n return (\n <TouchableOpacity {...this.getTestPropsForAction()} style={this.styles.root} onPress={this.onPress.bind(this)} {...getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {hint: props?.hint, checked: this.state.isChecked})} accessibilityRole='checkbox' accessibilityLabel={`Checkbox for ${props.caption}`}>\n {this._background}\n <WmIcon iconclass=\"wi wi-check\" styles={this.state.isChecked ? this.styles.checkicon : this.styles.uncheckicon} disabled={props.readonly || props.disabled} id={this.getTestId('checkbox')}/>\n <Text {...this.getTestPropsForLabel()} style={this.styles.text}>{props.caption}</Text>\n </TouchableOpacity>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAAQC,WAAW,EAAEC,aAAa,QAAO,sCAAsC;AAE/E,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,eAAe,SAASR,kBAAkB,CAAkB;EAAAS,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAClD,KAAK;IAAAA,eAAA,kBACP,IAAI;IAAAA,eAAA,oBACX,EAAE;EAAA;AAChB;AAEA,eAAe,MAAMC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KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,IAAK;MAACd,OAAO,EAAE,IAAI,CAACA,OAAO,CAACe,IAAI,CAAC,IAAI;IAAE,GAAKvC,qBAAqB,CAACD,uBAAuB,CAACyC,QAAQ,EAAE;MAACC,IAAI,EAAEnC,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEmC,IAAI;MAAEC,OAAO,EAAE,IAAI,CAACzB,KAAK,CAACL;IAAS,CAAC,CAAC;MAAE+B,iBAAiB,EAAC,UAAU;MAACC,kBAAkB,EAAE,gBAAgBtC,KAAK,CAACuC,OAAO;IAAG,IAC5S,IAAI,CAACC,WAAW,eACjBzD,KAAA,CAAA4C,aAAA,CAACvC,MAAM;MAACqD,SAAS,EAAC,aAAa;MAACV,MAAM,EAAE,IAAI,CAACpB,KAAK,CAACL,SAAS,GAAG,IAAI,CAACyB,MAAM,CAACW,SAAS,GAAG,IAAI,CAACX,MAAM,CAACY,WAAY;MAACxB,QAAQ,EAAEnB,KAAK,CAACoB,QAAQ,IAAIpB,KAAK,CAACmB,QAAS;MAACyB,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,UAAU;IAAE,CAAC,CAAC,eAC7L9D,KAAA,CAAA4C,aAAA,CAAC3C,IAAI,EAAA4C,QAAA,KAAK,IAAI,CAACkB,oBAAoB,CAAC,CAAC;MAAEhB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACgB;IAAK,IAAE/C,KAAK,CAACuC,OAAc,CACvE,CAAC;EAEvB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","TouchableOpacity","View","BaseComponent","BaseComponentState","WmIcon","unStringify","validateField","WmCheckboxProps","DEFAULT_CLASS","AccessibilityWidgetType","getAccessibilityProps","WmLabel","WmCheckboxState","constructor","args","_defineProperty","WmCheckbox","props","setChecked","dataValue","checkedvalue","value","updateState","isChecked","onPropertyChange","name","$new","$old","state","datavalue","updateDatavalue","validate","validationObj","isValid","errorType","onPress","disabled","readonly","invokeEventCallback","proxy","oldValue","uncheckedvalue","onFieldChange","renderSkeleton","createElement","style","styles","root","skeleton","checkicon","iconSkeleton","text","labelSkeleton","renderWidget","_extends","getTestPropsForAction","checkedItem","bind","CHECKBOX","hint","checked","accessibilityRole","accessibilityLabel","caption","_background","iconclass","uncheckicon","id","getTestId","getTestPropsForLabel","selectedLabel"],"sources":["checkbox.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, TouchableOpacity, View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmCheckboxProps from './checkbox.props';\nimport { DEFAULT_CLASS, WmCheckboxStyles } from './checkbox.styles';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport WmLabel from '../../basic/label/label.component';\n\nexport class WmCheckboxState extends BaseComponentState<WmCheckboxProps> {\n isChecked: boolean = false;\n isValid: boolean = true;\n errorType = '';\n}\n\nexport default class WmCheckbox extends BaseComponent<WmCheckboxProps, WmCheckboxState, WmCheckboxStyles> {\n\n constructor(props: WmCheckboxProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxProps(), new WmCheckboxState());\n }\n\n setChecked(dataValue: any, checkedvalue: any) {\n const value = unStringify(dataValue) === unStringify(checkedvalue, true);\n this.updateState({ isChecked: value } as WmCheckboxState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'checkedvalue':\n this.setChecked(this.state.props.datavalue, $new);\n break;\n case 'datavalue':\n this.setChecked($new, this.state.props.checkedvalue);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxState);\n }\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as WmCheckboxState);\n }\n\n onPress() {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onFocus', [null, this.proxy]);\n this.invokeEventCallback('onTap', [null, this.proxy]);\n const oldValue = this.state.props.datavalue;\n const value = !this.state.isChecked;\n this.validate(value);\n this.updateState({ isChecked: value } as WmCheckboxState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n this.updateState({ props: { datavalue: dataValue } } as WmCheckboxState,\n () => {\n if (!this.props.onFieldChange) {\n this.invokeEventCallback('onChange', [null, this.proxy, dataValue, oldValue]);\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', dataValue, oldValue);\n }\n this.invokeEventCallback('onBlur', [ null, this.proxy ]);\n });\n }\n\n public renderSkeleton(props: WmCheckboxProps): React.ReactNode {\n return <View style={[this.styles.root, this.styles.skeleton.root]}>\n <WmIcon styles={{ root: {...this.styles.checkicon, ...this.styles.iconSkeleton.root} }}/>\n <WmLabel styles={{ root: {...this.styles.text, ...this.styles.labelSkeleton.root} }}/>\n </View>\n }\n\n renderWidget(props: WmCheckboxProps) {\n return (\n <TouchableOpacity {...this.getTestPropsForAction()} style={[this.styles.root, this.state.isChecked ? this.styles.checkedItem : null]} onPress={this.onPress.bind(this)} {...getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {hint: props?.hint, checked: this.state.isChecked})} accessibilityRole='checkbox' accessibilityLabel={`Checkbox for ${props.caption}`}>\n {this._background}\n <WmIcon iconclass=\"wi wi-check\" styles={this.state.isChecked ? this.styles.checkicon : this.styles.uncheckicon} disabled={props.readonly || props.disabled} id={this.getTestId('checkbox')}/>\n <Text {...this.getTestPropsForLabel()} style={[this.styles.text, this.state.isChecked ? this.styles.selectedLabel: null]}>{props.caption}</Text>\n </TouchableOpacity>\n );\n }\n}\n\n\n\n"],"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
17
  skeleton: {
18
18
  root: {
19
- width: '100%',
19
+ width: 20,
20
+ height: 20,
21
+ borderRadius: 4
22
+ }
23
+ },
24
+ iconSkeleton: {
25
+ root: {
26
+ width: 20,
27
+ height: 20,
28
+ borderRadius: 4
29
+ }
30
+ },
31
+ labelSkeleton: {
32
+ root: {
33
+ width: 200,
34
+ borderRadius: 4,
20
35
  height: 16
21
36
  }
22
37
  },
@@ -51,7 +66,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
51
66
  icon: {
52
67
  color: 'transparent'
53
68
  }
54
- }
69
+ },
70
+ checkedItem: {},
71
+ selectedLabel: {}
55
72
  });
56
73
  addStyle(DEFAULT_CLASS + '-disabled', '', {
57
74
  root: {
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignContent","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","skeleton","width","height","checkicon","borderRadius","backgroundColor","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","uncheckedBgColor","opacity","checkedDisabledColor"],"sources":["checkbox.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\nimport { WmIconStyles } from '../../basic/icon/icon.styles';\n\nexport type WmCheckboxStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkbox';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignContent: 'center',\n },\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n backgroundColor: themeVariables.uncheckedBgColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n });\n\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n });\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAER,cAAc,CAACS,QAAQ;MACnCC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEX,cAAc,CAACY,iBAAiB;MACvCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRX,IAAI,EAAE;QACJY,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE;MACV;IACF,CAA4B;IAC5BC,SAAS,EAAG;MACVd,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVE,YAAY,EAAE,CAAC;QACfC,eAAe,EAAEnB,cAAc,CAACoB,YAAY;QAC5CC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBC,WAAW,EAAEvB,cAAc,CAACwB;MAC9B,CAAC;MACDlB,IAAI,EAAE;QACJI,QAAQ,EAAE;MACZ,CAAC;MACDe,IAAI,EAAG;QACLd,KAAK,EAAEX,cAAc,CAAC0B,gBAAgB;QACtCC,OAAO,EAAE;MACX;IACJ,CAAiB;IACfC,WAAW,EAAG;MACZzB,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVa,WAAW,EAAE,CAAC;QACdX,YAAY,EAAE,CAAC;QACfK,WAAW,EAAEvB,cAAc,CAAC8B,oBAAoB;QAChDX,eAAe,EAAEnB,cAAc,CAAC+B;MAClC,CAAC;MACDzB,IAAI,EAAE,CAAC,CAAC;MACRmB,IAAI,EAAG;QACLd,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAGJV,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACL6B,OAAO,EAAE;IACX,CAAC;IACD1B,IAAI,EAAG;MACLK,KAAK,EAAEX,cAAc,CAACiC;IACxB;EACF,CAAC,CAAC;EAEFhC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignContent","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","skeleton","width","height","borderRadius","iconSkeleton","labelSkeleton","checkicon","backgroundColor","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","uncheckedBgColor","checkedItem","selectedLabel","opacity","checkedDisabledColor"],"sources":["checkbox.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCheckboxStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n uncheckicon: WmIconStyles;\n iconSkeleton: WmSkeletonStyles;\n labelSkeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkbox';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignContent: 'center',\n },\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n },\n skeleton: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n },\n } as any as WmSkeletonStyles,\n iconSkeleton: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n }\n } as any as WmSkeletonStyles,\n labelSkeleton: {\n root: {\n width: 200,\n borderRadius: 4,\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n backgroundColor: themeVariables.uncheckedBgColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n checkedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n });\n\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n });\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAYxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAER,cAAc,CAACS,QAAQ;MACnCC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEX,cAAc,CAACY,iBAAiB;MACvCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRX,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BC,YAAY,EAAE;MACZf,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BE,aAAa,EAAE;MACbhB,IAAI,EAAE;QACJY,KAAK,EAAE,GAAG;QACVE,YAAY,EAAE,CAAC;QACfD,MAAM,EAAE;MACV;IACF,CAA4B;IAC5BI,SAAS,EAAG;MACVjB,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE,CAAC;QACfI,eAAe,EAAErB,cAAc,CAACsB,YAAY;QAC5CC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBC,WAAW,EAAEzB,cAAc,CAAC0B;MAC9B,CAAC;MACDpB,IAAI,EAAE;QACJI,QAAQ,EAAE;MACZ,CAAC;MACDiB,IAAI,EAAG;QACLhB,KAAK,EAAEX,cAAc,CAAC4B,gBAAgB;QACtCC,OAAO,EAAE;MACX;IACJ,CAAiB;IACfC,WAAW,EAAG;MACZ3B,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVe,WAAW,EAAE,CAAC;QACdd,YAAY,EAAE,CAAC;QACfQ,WAAW,EAAEzB,cAAc,CAACgC,oBAAoB;QAChDX,eAAe,EAAErB,cAAc,CAACiC;MAClC,CAAC;MACD3B,IAAI,EAAE,CAAC,CAAC;MACRqB,IAAI,EAAG;QACLhB,KAAK,EAAE;MACT;IACJ,CAAiB;IACjBuB,WAAW,EAAE,CAAC,CAAa;IAC3BC,aAAa,EAAE,CAAC;EAChB,CAAC,CAAC;EAGJlC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLiC,OAAO,EAAE;IACX,CAAC;IACD9B,IAAI,EAAG;MACLK,KAAK,EAAEX,cAAc,CAACqC;IACxB;EACF,CAAC,CAAC;EAEFpC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -11,6 +11,8 @@ import { DEFAULT_CLASS } from './checkboxset.styles';
11
11
  import { BaseDatasetComponent, BaseDatasetState } from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';
12
12
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
13
13
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
14
+ import { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';
15
+ import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
14
16
  export class WmCheckboxsetState extends BaseDatasetState {
15
17
  constructor(...args) {
16
18
  super(...args);
@@ -68,7 +70,7 @@ export default class WmCheckboxset extends BaseDatasetComponent {
68
70
  disabled: props.readonly || props.disabled,
69
71
  id: this.getTestId('item' + index)
70
72
  }), !isEmpty(this.state.template) && this.props.renderitempartial ? this.props.renderitempartial(item.dataObject, index, this.state.template) : /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel(index + ''), {
71
- style: this.styles.text
73
+ style: [this.styles.text, item.selected ? this.styles.selectedLabel : null]
72
74
  }), displayText));
73
75
  }
74
76
  computeDisplayValue() {
@@ -112,6 +114,24 @@ export default class WmCheckboxset extends BaseDatasetComponent {
112
114
  }
113
115
  }, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null);
114
116
  }
117
+ renderSkeleton(props) {
118
+ var _ref;
119
+ const noOfColumns = props.itemsperrow.xs || 1;
120
+ const colWidth = Math.round(100 / noOfColumns) + '%';
121
+ return [...getNumberOfEmptyObjects((_ref = props.numberofskeletonitems) !== null && _ref !== void 0 ? _ref : 3)].map(_ => {
122
+ return /*#__PURE__*/React.createElement(View, {
123
+ style: [this.styles.item, {
124
+ width: colWidth
125
+ }]
126
+ }, /*#__PURE__*/React.createElement(WmIcon, {
127
+ styles: this.styles.checkicon
128
+ }), /*#__PURE__*/React.createElement(WmLabel, {
129
+ styles: {
130
+ root: this.styles.text
131
+ }
132
+ }));
133
+ });
134
+ }
115
135
  renderWidget(props) {
116
136
  const items = this.state.dataItems;
117
137
  return /*#__PURE__*/React.createElement(ScrollView, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","ScrollView","find","forEach","isEqual","isEmpty","WmCheckboxsetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","WmCheckboxsetState","constructor","args","_defineProperty","WmCheckboxset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","push","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","createElement","_extends","getTestPropsForAction","style","styles","checkedItem","width","bind","CHECKBOX","hint","checked","accessibilityRole","accessibilityLabel","iconclass","checkicon","uncheckicon","id","getTestId","template","renderitempartial","dataObject","getTestPropsForLabel","text","displayValue","filter","map","updateDatavalue","value","Promise","resolve","setTemplate","partialName","renderGroupby","groupedData","length","groupObj","groupHeaderTitle","renderCheckboxses","data","items","noOfColumns","itemsperrow","xs","Math","round","flexWrap","flexDirection","renderWidget","root","horizontal","groupby"],"sources":["checkboxset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, DimensionValue } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, forEach, isEqual, isEmpty } from 'lodash';\nimport WmCheckboxsetProps from './checkboxset.props';\nimport {\n DEFAULT_CLASS,\n\n WmCheckboxsetStyles,\n} from './checkboxset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState,\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmCheckboxsetState extends BaseDatasetState<WmCheckboxsetProps> {\n isValid: boolean = true;\n template: string = \"\";\n}\n\nexport default class WmCheckboxset extends BaseDatasetComponent<WmCheckboxsetProps, WmCheckboxsetState, WmCheckboxsetStyles> {\n constructor(props: WmCheckboxsetProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxsetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = !item.selected;\n const selectedValue: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n selectedValue.push(item.datafield);\n }\n });\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmCheckboxsetState,\n () => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any,colWidth: DimensionValue) {\n const props = this.state.props;\n const displayText = item.displayexp || item.displayfield;\n return (\n <TouchableOpacity {...this.getTestPropsForAction(index + '')}\n style={[this.styles.item, item.selected ? this.styles.checkedItem : null, {width: colWidth}]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {hint: props?.hint, checked: item.selected})} accessibilityRole='checkbox' accessibilityLabel={`Checkbox for ${displayText}`}>\n <WmIcon iconclass=\"wi wi-check\" styles={item.selected? this.styles.checkicon : this.styles.uncheckicon} disabled={props.readonly || props.disabled} id={this.getTestId('item'+index)}/>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) :\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.text}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmCheckboxsetState);\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxsetState);\n return Promise.resolve();\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmCheckboxsetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderCheckboxses(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderCheckboxses(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return(<View style = { noOfColumns === 1 ? {} : {flexWrap: 'wrap', flexDirection: 'row'}}>\n {items && items.length\n ? items.map((item: any, index: any) => this.renderChild(item, index, colWidth))\n : null}\n </View>)\n }\n renderWidget(props: WmCheckboxsetProps) {\n const items = this.state.dataItems;\n return (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderCheckboxses(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAwB,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAGC,OAAO,QAAQ,QAAQ;AACzD,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SACEC,aAAa,QAGR,sBAAsB;AAC7B,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,kBAAkB,SAASJ,gBAAgB,CAAqB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACxD,IAAI;IAAAA,eAAA,mBACJ,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,aAAa,SAAST,oBAAoB,CAA8D;EAC3HM,WAAWA,CAACI,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,CAAC;EACvD;EAEAa,OAAOA,CAACC,IAAS,EAAE;IACjB,IAAI,IAAI,CAAC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AAO,IAAI,IAAI,CAACb,iBAAiB,CAACE,KAAK,CACrC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","ScrollView","find","forEach","isEqual","isEmpty","WmCheckboxsetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","getNumberOfEmptyObjects","WmLabel","WmCheckboxsetState","constructor","args","_defineProperty","WmCheckboxset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","push","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","createElement","_extends","getTestPropsForAction","style","styles","checkedItem","width","bind","CHECKBOX","hint","checked","accessibilityRole","accessibilityLabel","iconclass","checkicon","uncheckicon","id","getTestId","template","renderitempartial","dataObject","getTestPropsForLabel","text","selectedLabel","displayValue","filter","map","updateDatavalue","value","Promise","resolve","setTemplate","partialName","renderGroupby","groupedData","length","groupObj","groupHeaderTitle","renderCheckboxses","data","items","noOfColumns","itemsperrow","xs","Math","round","flexWrap","flexDirection","renderSkeleton","_ref","numberofskeletonitems","_","root","renderWidget","horizontal","groupby"],"sources":["checkboxset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, DimensionValue } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, forEach, isEqual, isEmpty } from 'lodash';\nimport WmCheckboxsetProps from './checkboxset.props';\nimport {\n DEFAULT_CLASS,\n\n WmCheckboxsetStyles,\n} from './checkboxset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState,\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nexport class WmCheckboxsetState extends BaseDatasetState<WmCheckboxsetProps> {\n isValid: boolean = true;\n template: string = \"\";\n}\n\nexport default class WmCheckboxset extends BaseDatasetComponent<WmCheckboxsetProps, WmCheckboxsetState, WmCheckboxsetStyles> {\n constructor(props: WmCheckboxsetProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxsetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = !item.selected;\n const selectedValue: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n selectedValue.push(item.datafield);\n }\n });\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmCheckboxsetState,\n () => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any,colWidth: DimensionValue) {\n const props = this.state.props;\n const displayText = item.displayexp || item.displayfield;\n return (\n <TouchableOpacity {...this.getTestPropsForAction(index + '')}\n style={[this.styles.item, item.selected ? this.styles.checkedItem : null, {width: colWidth}]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {hint: props?.hint, checked: item.selected})} accessibilityRole='checkbox' accessibilityLabel={`Checkbox for ${displayText}`}>\n <WmIcon iconclass=\"wi wi-check\" styles={item.selected? this.styles.checkicon : this.styles.uncheckicon} disabled={props.readonly || props.disabled} id={this.getTestId('item'+index)}/>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) :\n <Text {...this.getTestPropsForLabel(index + '')} style={[this.styles.text, item.selected ? this.styles.selectedLabel: null]}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmCheckboxsetState);\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxsetState);\n return Promise.resolve();\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmCheckboxsetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderCheckboxses(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderCheckboxses(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return(<View style = {noOfColumns === 1 ? {} : {flexWrap: 'wrap', flexDirection: 'row'}}>\n {items && items.length\n ? items.map((item: any, index: any) => this.renderChild(item, index, colWidth))\n : null}\n </View>)\n }\n\n public renderSkeleton(props: WmCheckboxsetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 3)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkicon}/>\n <WmLabel styles={{ root: this.styles.text }}/>\n </View>\n })\n }\n\n renderWidget(props: WmCheckboxsetProps) {\n const items = this.state.dataItems;\n return (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderCheckboxses(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,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,aAAA,CAAClC,OAAO;QAACsC,MAAM,EAAE;UAAEgD,IAAI,EAAE,IAAI,CAAChD,MAAM,CAACkB;QAAK;MAAE,CAAC,CACzC,CAAC;IACT,CAAC,CAAC;EACJ;EAEA+B,YAAYA,CAACjF,KAAyB,EAAE;IACtC,MAAMoE,KAAK,GAAG,IAAI,CAACjE,KAAK,CAACQ,SAAS;IAClC,oBACElC,KAAA,CAAAmD,aAAA,CAAC/C,UAAU;MAACkD,KAAK,EAAE,IAAI,CAACC,MAAM,CAACgD;IAAK,gBAClCvG,KAAA,CAAAmD,aAAA,CAAC/C,UAAU;MAACqG,UAAU,EAAE;IAAK,GAC1BlF,KAAK,CAACmF,OAAO,IAAI,IAAI,CAACtB,aAAa,CAAC,CAAC,EACrC,CAAC7D,KAAK,CAACmF,OAAO,IAAI,IAAI,CAACjB,iBAAiB,CAACE,KAAK,CACrC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
@@ -15,6 +15,7 @@ export default class WmCheckboxsetProps extends BaseDatasetProps {
15
15
  lg: 1
16
16
  });
17
17
  _defineProperty(this, "renderitempartial", void 0);
18
+ _defineProperty(this, "numberofskeletonitems", void 0);
18
19
  }
19
20
  }
20
21
  //# sourceMappingURL=checkboxset.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmCheckboxsetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["checkboxset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmCheckboxsetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n displayValue: any = '';\n required: boolean = false;\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,kBAAkB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAChD,8BAA8B;IAAAA,eAAA,uBACzB,EAAE;IAAAA,eAAA,mBACF,KAAK;IAAAA,eAAA,sBACV;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;EAAA;AAEF","ignoreList":[]}
1
+ {"version":3,"names":["BaseDatasetProps","WmCheckboxsetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["checkboxset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmCheckboxsetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n displayValue: any = '';\n required: boolean = false;\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n numberofskeletonitems?: number | string\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,kBAAkB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAChD,8BAA8B;IAAAA,eAAA,uBACzB,EAAE;IAAAA,eAAA,mBACF,KAAK;IAAAA,eAAA,sBACV;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;IAAAA,eAAA;EAAA;AAGF","ignoreList":[]}