@wavemaker/app-rn-runtime 12.0.0-next.45102 → 12.0.0-next.45128

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +31 -5
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  9. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  11. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  12. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  13. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  14. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +20 -6
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/icon/icon.component.js +14 -6
  18. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  19. app-rn-runtime/components/basic/label/label.component.js +13 -3
  20. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  22. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  23. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  24. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  25. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  26. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  27. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  28. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  29. app-rn-runtime/components/basic/search/search.component.js +9 -0
  30. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  31. app-rn-runtime/components/basic/search/search.props.js +2 -0
  32. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  33. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  34. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  35. app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
  36. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  37. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  38. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  39. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  40. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  41. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  42. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  44. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  45. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  46. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  47. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  48. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  49. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  50. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  51. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  52. app-rn-runtime/components/chart/basechart.component.js +54 -2
  53. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  54. app-rn-runtime/components/chart/basechart.props.js +3 -2
  55. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  56. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  57. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  58. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  59. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  60. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  61. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  62. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  63. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  64. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  65. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  66. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  67. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  68. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  69. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  70. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +6 -2
  71. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  72. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  73. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  74. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  75. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  76. app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
  77. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  78. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  79. app-rn-runtime/components/container/accordion/accordion.styles.js +5 -0
  80. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  81. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  82. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  83. app-rn-runtime/components/container/container.component.js +36 -2
  84. app-rn-runtime/components/container/container.component.js.map +1 -1
  85. app-rn-runtime/components/container/container.styles.js +7 -0
  86. app-rn-runtime/components/container/container.styles.js.map +1 -1
  87. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  88. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  89. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  90. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  91. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  92. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  93. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  94. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  95. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  96. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  97. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  98. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  99. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  100. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  101. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  102. app-rn-runtime/components/container/panel/panel.component.js +47 -6
  103. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  104. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  105. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  106. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  107. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  108. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +3 -4
  109. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  110. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  111. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  112. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  113. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  114. app-rn-runtime/components/container/tabs/tabs.component.js +41 -5
  115. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  117. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  118. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  119. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  120. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  121. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  122. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  123. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  124. app-rn-runtime/components/container/wizard/wizard.component.js +62 -13
  125. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  126. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  127. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  128. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  129. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
  130. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  131. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  132. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  133. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  134. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  135. app-rn-runtime/components/data/card/card.component.js +18 -0
  136. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  137. app-rn-runtime/components/data/card/card.styles.js +3 -0
  138. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  139. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  140. app-rn-runtime/components/data/form/form.component.js +1 -1
  141. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form.props.js +1 -0
  143. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  144. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  145. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  146. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  147. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  150. app-rn-runtime/components/data/list/list.component.js +54 -33
  151. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.props.js +1 -0
  153. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.styles.js +9 -0
  155. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  156. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  157. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  158. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  159. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  160. app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
  161. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  162. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  163. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  164. app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
  165. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  166. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  167. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  168. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
  169. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  170. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  171. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
  172. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  173. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  174. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  175. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  176. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  177. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  178. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  179. app-rn-runtime/components/input/currency/currency.component.js +16 -1
  180. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  181. app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
  182. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  183. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  184. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  185. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  187. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  189. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  190. app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
  191. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  192. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
  193. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  194. app-rn-runtime/components/input/number/number.component.js +6 -3
  195. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  196. app-rn-runtime/components/input/radioset/radioset.component.js +27 -7
  197. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  198. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  199. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  200. app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
  201. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  202. app-rn-runtime/components/input/select/select.component.js +23 -9
  203. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  204. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  205. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  206. app-rn-runtime/components/input/text/text.component.js +21 -0
  207. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  208. app-rn-runtime/components/input/text/text.props.js +2 -0
  209. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  210. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  211. app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
  212. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  213. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  214. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  215. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  216. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  217. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  218. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  219. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  220. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  221. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  222. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  223. app-rn-runtime/components/page/content/content.component.js +19 -4
  224. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  225. app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
  226. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  227. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  228. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  229. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  230. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  231. app-rn-runtime/components/page/page.component.js.map +1 -1
  232. app-rn-runtime/components/page/page.props.js.map +1 -1
  233. app-rn-runtime/components/page/page.styles.js +7 -1
  234. app-rn-runtime/components/page/page.styles.js.map +1 -1
  235. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  236. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  237. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  238. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  239. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  240. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  241. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  242. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  243. app-rn-runtime/components/page/tabbar/tabbar.props.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/base.component.js +5 -3
  250. app-rn-runtime/core/base.component.js.map +1 -1
  251. app-rn-runtime/core/components/textinput.component.js +4 -3
  252. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  253. app-rn-runtime/core/formatters.js.map +1 -1
  254. app-rn-runtime/core/key.extractor.js.map +1 -1
  255. app-rn-runtime/core/props.provider.js +4 -1
  256. app-rn-runtime/core/props.provider.js.map +1 -1
  257. app-rn-runtime/core/storage.service.js.map +1 -1
  258. app-rn-runtime/core/tappable.component.js +34 -27
  259. app-rn-runtime/core/tappable.component.js.map +1 -1
  260. app-rn-runtime/core/ui-preferences.context.js +7 -0
  261. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  262. app-rn-runtime/core/utils.js +87 -4
  263. app-rn-runtime/core/utils.js.map +1 -1
  264. app-rn-runtime/package.json +30 -7
  265. app-rn-runtime/runtime/App.js +4 -8
  266. app-rn-runtime/runtime/App.js.map +1 -1
  267. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  268. app-rn-runtime/runtime/base-fragment.component.js +43 -13
  269. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  270. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  271. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  272. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  273. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  274. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  275. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  276. app-rn-runtime/runtime/services/app-security.service.js +42 -2
  277. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  278. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  279. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  280. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  281. app-rn-runtime/runtime/watcher.js.map +1 -1
  282. app-rn-runtime/styles/background.component.js +1 -0
  283. app-rn-runtime/styles/background.component.js.map +1 -1
  284. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  285. app-rn-runtime/styles/theme.js +5 -0
  286. app-rn-runtime/styles/theme.js.map +1 -1
  287. app-rn-runtime/styles/theme.variables.js +1 -0
  288. app-rn-runtime/styles/theme.variables.js.map +1 -1
  289. app-rn-runtime/variables/base-variable.js.map +1 -1
  290. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  291. app-rn-runtime/variables/device-variable.js.map +1 -1
  292. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -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","invokeEventCallback","proxy","state","disabled","readonly","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","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 this.invokeEventCallback('onTap', [null, this.proxy]);\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\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}/>\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,KA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,CAAC,CAAC,EACrC,CAAC1D,KAAK,CAAC4E,OAAO,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 </Scr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ACU;MAAU,CAAC,CAAC,eACxCjE,KAAA,CAAAmD,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":[]}
@@ -20,6 +20,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
20
20
  fontFamily: themeVariables.baseFont
21
21
  },
22
22
  checkedItem: {},
23
+ selectedLabel: {},
23
24
  item: {
24
25
  flexDirection: 'row',
25
26
  alignContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","groupHeaderTitle","backgroundColor","groupHeadingBgColor","paddingLeft","paddingRight","lineHeight","checkedItem","item","flexDirection","alignContent","marginRight","marginTop","skeleton","width","height","checkicon","borderRadius","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","opacity","checkedDisabledColor"],"sources":["checkboxset.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 WmCheckboxsetStyles = BaseStyles & {\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n checkedItem: AllStyle;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkboxset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxsetStyles = defineStyles({\n root: {},\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8,\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n checkedItem: {} as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\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 },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\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;AAaxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE;MACJC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAEN,cAAc,CAACO,QAAQ;MACnCC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAET,cAAc,CAACU,iBAAiB;MACvCC,UAAU,EAAE;IACd,CAAC;IACHC,gBAAgB,EAAE;MAChBC,eAAe,EAAEb,cAAc,CAACc,mBAAmB;MACnDN,QAAQ,EAAE,EAAE;MACZO,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdX,UAAU,EAAEN,cAAc,CAACO;IAC7B,CAAa;IACbW,WAAW,EAAE,CAAC,CAAa;IAC3BC,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE,QAAQ;MACtBC,WAAW,EAAE,CAAC,EAAE;MAChBC,SAAS,EAAE;IACb,CAAa;IACbC,QAAQ,EAAE;MACRrB,IAAI,EAAE;QACJsB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE;MACV;IACF,CAA4B;IAC5BC,SAAS,EAAG;MACVxB,IAAI,EAAE;QACJsB,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVE,YAAY,EAAE,CAAC;QACff,eAAe,EAAEb,cAAc,CAAC6B,YAAY;QAC5CC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBC,WAAW,EAAEhC,cAAc,CAACiC;MAC9B,CAAC;MACD7B,IAAI,EAAE;QACJI,QAAQ,EAAE;MACZ,CAAC;MACD0B,IAAI,EAAG;QACLzB,KAAK,EAAET,cAAc,CAACmC,gBAAgB;QACtCC,OAAO,EAAE;MACX;IACJ,CAAiB;IACfC,WAAW,EAAG;MACZlC,IAAI,EAAE;QACJsB,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVY,WAAW,EAAE,CAAC;QACdV,YAAY,EAAE,CAAC;QACfI,WAAW,EAAEhC,cAAc,CAACuC;MAC9B,CAAC;MACDnC,IAAI,EAAE,CAAC,CAAC;MACR8B,IAAI,EAAG;QACLzB,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE;MACJqC,OAAO,EAAE;IACX,CAAC;IACDpC,IAAI,EAAG;MACLK,KAAK,EAAET,cAAc,CAACyC;IACxB;EACF,CAAC,CAAC;EAEFxC,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","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","groupHeaderTitle","backgroundColor","groupHeadingBgColor","paddingLeft","paddingRight","lineHeight","checkedItem","selectedLabel","item","flexDirection","alignContent","marginRight","marginTop","skeleton","width","height","checkicon","borderRadius","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","opacity","checkedDisabledColor"],"sources":["checkboxset.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 WmCheckboxsetStyles = BaseStyles & {\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n checkedItem: AllStyle;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkboxset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxsetStyles = defineStyles({\n root: {},\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8,\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n checkedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\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 },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\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;AAaxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE;MACJC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAEN,cAAc,CAACO,QAAQ;MACnCC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAET,cAAc,CAACU,iBAAiB;MACvCC,UAAU,EAAE;IACd,CAAC;IACHC,gBAAgB,EAAE;MAChBC,eAAe,EAAEb,cAAc,CAACc,mBAAmB;MACnDN,QAAQ,EAAE,EAAE;MACZO,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdX,UAAU,EAAEN,cAAc,CAACO;IAC7B,CAAa;IACbW,WAAW,EAAE,CAAC,CAAa;IAC3BC,aAAa,EAAE,CAAC,CAAa;IAC7BC,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE,QAAQ;MACtBC,WAAW,EAAE,CAAC,EAAE;MAChBC,SAAS,EAAE;IACb,CAAa;IACbC,QAAQ,EAAE;MACRtB,IAAI,EAAE;QACJuB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE;MACV;IACF,CAA4B;IAC5BC,SAAS,EAAG;MACVzB,IAAI,EAAE;QACJuB,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVE,YAAY,EAAE,CAAC;QACfhB,eAAe,EAAEb,cAAc,CAAC8B,YAAY;QAC5CC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBC,WAAW,EAAEjC,cAAc,CAACkC;MAC9B,CAAC;MACD9B,IAAI,EAAE;QACJI,QAAQ,EAAE;MACZ,CAAC;MACD2B,IAAI,EAAG;QACL1B,KAAK,EAAET,cAAc,CAACoC,gBAAgB;QACtCC,OAAO,EAAE;MACX;IACJ,CAAiB;IACfC,WAAW,EAAG;MACZnC,IAAI,EAAE;QACJuB,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVY,WAAW,EAAE,CAAC;QACdV,YAAY,EAAE,CAAC;QACfI,WAAW,EAAEjC,cAAc,CAACwC;MAC9B,CAAC;MACDpC,IAAI,EAAE,CAAC,CAAC;MACR+B,IAAI,EAAG;QACL1B,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE;MACJsC,OAAO,EAAE;IACX,CAAC;IACDrC,IAAI,EAAG;MACLK,KAAK,EAAET,cAAc,CAAC0C;IACxB;EACF,CAAC,CAAC;EAEFzC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -173,7 +173,7 @@ export default class WmChips extends BaseDatasetComponent {
173
173
  style: [this.styles.chip, isSelected ? this.styles.activeChip : null],
174
174
  key: 'chipitem_' + index,
175
175
  onPress: () => {
176
- if (this.state.props.disabled) {
176
+ if (this.state.props.disabled || this.state.props.readonly) {
177
177
  return;
178
178
  }
179
179
  if (this.isDefaultView()) {
@@ -190,6 +190,7 @@ export default class WmChips extends BaseDatasetComponent {
190
190
  }
191
191
  }
192
192
  }), isSelected && this.isDefaultView() ? /*#__PURE__*/React.createElement(WmIcon, {
193
+ id: this.getTestId('checkicon'),
193
194
  iconclass: 'wm-sl-l sl-check',
194
195
  iconsize: 16,
195
196
  styles: merge({}, this.styles.doneIcon, {
@@ -198,7 +199,7 @@ export default class WmChips extends BaseDatasetComponent {
198
199
  }
199
200
  })
200
201
  }) : null, /*#__PURE__*/React.createElement(WmPicture, {
201
- id: this.getTestId('picture'),
202
+ id: this.getTestId('chip' + index + 'picture'),
202
203
  styles: this.styles.imageStyles,
203
204
  picturesource: item.imgSrc,
204
205
  shape: "circle"
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","reset","_this$searchRef","state","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","dataItems","item","selected","map","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","datafield","updateDatavalue","updateMaxSize","prevDatavalue","createCustomDataModel","dataObject","isCustom","clearSearch","chipListLength","saturate","removeItem","index","allowRemove","isDefaultView","_this$state$dataItems","searchable","renderChip","isSelected","createElement","_extends","getTestPropsForAction","CHIPS","style","styles","chip","activeChip","onPress","disabled","iconclass","iconsize","doneIcon","icon","color","activeChipLabel","id","getTestId","imageStyles","picturesource","imgSrc","shape","chipLabel","clearIcon","onTap","selectedItems","componentDidMount","componentDidUpdate","prevProps","prevState","_this$searchRef2","computePosition","renderWidget","chips","root","chipsWrapper","searchContainer","flexDirection","inputposition","search","placeholder","maxSizeReached","listener","dataset","searchkey","minchars","autofocus","readonly","displayexpression","getDisplayExpression","displayimagesrc","onSubmit","bind","onChange","_this$props$listener","_this$props$listener2","onComponentChange","showSearchIcon","showclear","type","flexWrap"],"sources":["chips.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity, Text } from 'react-native';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge } from 'lodash';\nimport WmChipsProps from './chips.props';\nimport { DEFAULT_CLASS, WmChipsStyles } from './chips.styles';\nimport WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';\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 WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmChipsState extends BaseDatasetState<WmChipsProps> {\n chipsList: any = [];\n saturate: any;\n}\n\nexport default class WmChips extends BaseDatasetComponent<WmChipsProps, WmChipsState, WmChipsStyles> {\n constructor(props: WmChipsProps) {\n super(props, DEFAULT_CLASS, new WmChipsProps(), new WmChipsState());\n }\n\n private searchRef: WmSearch = null as any;\n private maxSizeReached = 'Max size reached';\n private isDefaultQuery: boolean = true;\n private prevDatavalue: any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmSearch) {\n this.searchRef = c;\n }\n }\n };\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (!$new || $new.length === 0) {\n this.updateState({\n chipsList : []\n } as WmChipsState);\n }\n }\n }\n\n reset() {\n if (this.searchRef?.state.props.query) {\n this.searchRef.reset();\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isDefaultQuery = true;\n this.updateDefaultQueryModel();\n }\n\n addItem($event: any, widget: any) {\n let newChipList = clone(this.state.chipsList),\n allowAdd;\n newChipList.push(widget.queryModel);\n const isFormFieldWidget = get(this.props, 'formfield');\n if (this.isDuplicate(widget.queryModel)) {\n this.resetSearchModel();\n return;\n }\n\n // @ts-ignore\n allowAdd = isFormFieldWidget ? this.props?.invokeEvent('onBeforeadd', [null, this, widget.queryModel]) : this.invokeEventCallback('onBeforeadd', [null, this, widget.queryModel]);\n\n if (!isUndefined(allowAdd) && !this.toBoolean(allowAdd)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n\n // @ts-ignore\n isFormFieldWidget ? this.props?.invokeEvent('onAdd', [null, this, widget.queryModel]) : this.invokeEventCallback('onAdd', [null, this, widget.queryModel]);\n this.resetSearchModel();\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 WmChipsState);\n }\n\n selectChip(chipItem: any) {\n if (!chipItem.selected && this.state.props.maxsize > 0 && (this.state.chipsList.length === this.state.props.maxsize)) {\n return;\n }\n chipItem.selected = !chipItem.selected;\n const newChipList: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, chipItem.key));\n selectedItem.selected = chipItem.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n newChipList.push(item);\n }\n });\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n }\n\n setDatavalue(newChipList: any) {\n const dataValue = newChipList.map((item: any) => item.datafield);\n this.updateDatavalue(dataValue);\n this.updateMaxSize(newChipList.length);\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [null, this, dataValue, this.prevDatavalue])\n }\n this.prevDatavalue = dataValue;\n }\n\n toBoolean = (val: any) => ((val && val !== 'false') ? true : false);\n\n // Prepare datavalue object from a string(junk) value when datafield is allFields.\n createCustomDataModel(val: string) {\n return {\n key: `${this.state.props.name}_item${this.state.chipsList.length}`,\n dataObject: val,\n displayfield: val,\n datafield: val,\n isCustom: true\n }\n }\n\n resetSearchModel() {\n (this as any).searchRef.isDefaultQuery = false;\n this.searchRef.clearSearch();\n }\n\n isDuplicate(item: any) {\n return findIndex(this.state.chipsList, {datafield: item.datafield}) > -1;\n }\n\n // Check if max size is reached\n private updateMaxSize(chipListLength: number) {\n const saturate = this.state.props.maxsize > 0 && (chipListLength || this.state.chipsList.length) === this.state.props.maxsize;\n this.updateState({\n saturate: saturate\n } as WmChipsState);\n }\n\n removeItem(item: any, index: any) {\n let newChipList = clone(this.state.chipsList);\n const isFormFieldWidget = get(this.props, 'formfield');\n newChipList = pull(newChipList, item);\n // prevent deletion if the before-remove event callback returns false\n // @ts-ignore\n const allowRemove = isFormFieldWidget ? this.props.invokeEvent('onBeforeremove',[null, this, item]) : this.invokeEventCallback('onBeforeremove',[null, this, item]);\n if (!isUndefined(allowRemove) && !this.toBoolean(allowRemove)) {\n return;\n }\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n this.setDatavalue(newChipList);\n // @ts-ignore\n isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);\n }\n\n private isDefaultView() {\n return !this.state.props.searchable && this.state.dataItems?.length <= 10;\n }\n\n renderChip(item: any, index: any) {\n const isSelected = this.isDefaultView() ? item.selected : true;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction('chip'+ index)}\n {...getAccessibilityProps(AccessibilityWidgetType.CHIPS, {...this.state.props, selected: isSelected})}\n style={[this.styles.chip, isSelected ? this.styles.activeChip : null]}\n key={'chipitem_'+ index}\n onPress={() => {\n if (this.state.props.disabled) {\n return;\n }\n if (this.isDefaultView()) {\n this.selectChip(item);\n }\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onChipclick', [null, this, item]);\n // @ts-ignore\n this.props.invokeEvent('onChipselect', [null, this, item]);\n } else {\n this.invokeEventCallback('onChipclick', [null, this, item]);\n this.invokeEventCallback('onChipselect', [null, this, item]);\n }\n }}>\n {isSelected && this.isDefaultView() ? <WmIcon iconclass={'wm-sl-l sl-check'} iconsize={16} styles={merge({}, this.styles.doneIcon, {icon: {color: isSelected ? this.styles.activeChipLabel.color : null}})}></WmIcon> : null}\n <WmPicture id={this.getTestId('picture')} styles={this.styles.imageStyles} picturesource={item.imgSrc} shape='circle'></WmPicture>\n <Text {...this.getTestPropsForAction('chip'+ index+'label')}style={[this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]}>{item.displayexp || item.displayfield}</Text>\n {!this.isDefaultView() && !this.state.props.disabled ? <WmIcon id={this.getTestId('clearbtn')} iconclass={'wi wi-clear'} iconsize={16} styles={this.styles.clearIcon} onTap={() => this.removeItem(item, index)}></WmIcon> : null}\n </TouchableOpacity>\n )\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItems = filter(this.state.dataItems, (item) => item.selected);\n if (selectedItems.length) {\n this.updateState({\n chipsList: selectedItems\n } as WmChipsState);\n }\n this.isDefaultQuery = false;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n componentDidUpdate(prevProps: WmChipsProps, prevState: WmChipsState) {\n super.componentDidUpdate(prevProps, prevState);\n if (prevState.chipsList !== this.state.chipsList) {\n this.searchRef?.computePosition();\n }\n }\n\n renderWidget(props: WmChipsProps) {\n const chips = this.state.chipsList;\n return (<View style={this.styles.root}>\n\n <View style={this.styles.chipsWrapper}>\n {\n this.isDefaultView() ? this.state.dataItems.map((item: any, index: any) => this.renderChip(item, index)) : null\n }\n { props.searchable || !this.isDefaultView() ?\n <View style={[this.styles.searchContainer, {flexDirection: props.inputposition === 'first' ? 'column' : 'column-reverse'}]}>\n <WmSearch\n id={this.getTestId('search')}\n name=\"app-chip-search\"\n styles={this.styles.search}\n placeholder={this.state.saturate ? this.maxSizeReached : props.placeholder}\n listener={this.listener}\n dataset={props.dataset}\n searchkey={props.searchkey}\n minchars={props.minchars}\n autofocus={props.autofocus}\n disabled={props.disabled || props.readonly || this.state.saturate}\n readonly={props.readonly}\n displayexpression={props.displayexpression}\n getDisplayExpression={props.getDisplayExpression}\n displayimagesrc={props.displayimagesrc}\n displayfield={props.displayfield}\n datafield={props.datafield}\n onSubmit={this.addItem.bind(this)}\n onChange={() => {\n this.isDefaultQuery = false;\n this.props.listener?.onComponentChange && this.props.listener?.onComponentChange(this)\n }}\n showSearchIcon={false}\n showclear={false}\n type={props.minchars === 0 ? 'autocomplete' : 'search'}/>\n <View style={{ flexDirection: 'row', flexWrap: 'wrap'}}>\n {chips && chips.length ?\n chips.map((item: any, index: any) => this.renderChip(item, index))\n : null}\n </View>\n </View>\n : null }\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAE3D,SAASC,KAAK,EAAEC,SAAS,EAAEC,GAAG,EAAEC,WAAW,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACxG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,uBAA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,KAAK,IAAIA,KAAK,CAAC5F,MAAM,GACtB4F,KAAK,CAAC7D,GAAG,CAAC,CAACF,IAAS,EAAEuB,KAAU,KAAK,IAAI,CAACK,UAAU,CAAC5B,IAAI,EAAEuB,KAAK,CAAC,CAAC,GAChE,IACE,CACJ,CAAC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","reset","_this$searchRef","state","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","dataItems","item","selected","map","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","datafield","updateDatavalue","updateMaxSize","prevDatavalue","createCustomDataModel","dataObject","isCustom","clearSearch","chipListLength","saturate","removeItem","index","allowRemove","isDefaultView","_this$state$dataItems","searchable","renderChip","isSelected","createElement","_extends","getTestPropsForAction","CHIPS","style","styles","chip","activeChip","onPress","disabled","readonly","id","getTestId","iconclass","iconsize","doneIcon","icon","color","activeChipLabel","imageStyles","picturesource","imgSrc","shape","chipLabel","clearIcon","onTap","selectedItems","componentDidMount","componentDidUpdate","prevProps","prevState","_this$searchRef2","computePosition","renderWidget","chips","root","chipsWrapper","searchContainer","flexDirection","inputposition","search","placeholder","maxSizeReached","listener","dataset","searchkey","minchars","autofocus","displayexpression","getDisplayExpression","displayimagesrc","onSubmit","bind","onChange","_this$props$listener","_this$props$listener2","onComponentChange","showSearchIcon","showclear","type","flexWrap"],"sources":["chips.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity, Text } from 'react-native';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge } from 'lodash';\nimport WmChipsProps from './chips.props';\nimport { DEFAULT_CLASS, WmChipsStyles } from './chips.styles';\nimport WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';\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 WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmChipsState extends BaseDatasetState<WmChipsProps> {\n chipsList: any = [];\n saturate: any;\n}\n\nexport default class WmChips extends BaseDatasetComponent<WmChipsProps, WmChipsState, WmChipsStyles> {\n constructor(props: WmChipsProps) {\n super(props, DEFAULT_CLASS, new WmChipsProps(), new WmChipsState());\n }\n\n private searchRef: WmSearch = null as any;\n private maxSizeReached = 'Max size reached';\n private isDefaultQuery: boolean = true;\n private prevDatavalue: any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmSearch) {\n this.searchRef = c;\n }\n }\n };\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (!$new || $new.length === 0) {\n this.updateState({\n chipsList : []\n } as WmChipsState);\n }\n }\n }\n\n reset() {\n if (this.searchRef?.state.props.query) {\n this.searchRef.reset();\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isDefaultQuery = true;\n this.updateDefaultQueryModel();\n }\n\n addItem($event: any, widget: any) {\n let newChipList = clone(this.state.chipsList),\n allowAdd;\n newChipList.push(widget.queryModel);\n const isFormFieldWidget = get(this.props, 'formfield');\n if (this.isDuplicate(widget.queryModel)) {\n this.resetSearchModel();\n return;\n }\n\n // @ts-ignore\n allowAdd = isFormFieldWidget ? this.props?.invokeEvent('onBeforeadd', [null, this, widget.queryModel]) : this.invokeEventCallback('onBeforeadd', [null, this, widget.queryModel]);\n\n if (!isUndefined(allowAdd) && !this.toBoolean(allowAdd)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n\n // @ts-ignore\n isFormFieldWidget ? this.props?.invokeEvent('onAdd', [null, this, widget.queryModel]) : this.invokeEventCallback('onAdd', [null, this, widget.queryModel]);\n this.resetSearchModel();\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 WmChipsState);\n }\n\n selectChip(chipItem: any) {\n if (!chipItem.selected && this.state.props.maxsize > 0 && (this.state.chipsList.length === this.state.props.maxsize)) {\n return;\n }\n chipItem.selected = !chipItem.selected;\n const newChipList: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, chipItem.key));\n selectedItem.selected = chipItem.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n newChipList.push(item);\n }\n });\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n }\n\n setDatavalue(newChipList: any) {\n const dataValue = newChipList.map((item: any) => item.datafield);\n this.updateDatavalue(dataValue);\n this.updateMaxSize(newChipList.length);\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [null, this, dataValue, this.prevDatavalue])\n }\n this.prevDatavalue = dataValue;\n }\n\n toBoolean = (val: any) => ((val && val !== 'false') ? true : false);\n\n // Prepare datavalue object from a string(junk) value when datafield is allFields.\n createCustomDataModel(val: string) {\n return {\n key: `${this.state.props.name}_item${this.state.chipsList.length}`,\n dataObject: val,\n displayfield: val,\n datafield: val,\n isCustom: true\n }\n }\n\n resetSearchModel() {\n (this as any).searchRef.isDefaultQuery = false;\n this.searchRef.clearSearch();\n }\n\n isDuplicate(item: any) {\n return findIndex(this.state.chipsList, {datafield: item.datafield}) > -1;\n }\n\n // Check if max size is reached\n private updateMaxSize(chipListLength: number) {\n const saturate = this.state.props.maxsize > 0 && (chipListLength || this.state.chipsList.length) === this.state.props.maxsize;\n this.updateState({\n saturate: saturate\n } as WmChipsState);\n }\n\n removeItem(item: any, index: any) {\n let newChipList = clone(this.state.chipsList);\n const isFormFieldWidget = get(this.props, 'formfield');\n newChipList = pull(newChipList, item);\n // prevent deletion if the before-remove event callback returns false\n // @ts-ignore\n const allowRemove = isFormFieldWidget ? this.props.invokeEvent('onBeforeremove',[null, this, item]) : this.invokeEventCallback('onBeforeremove',[null, this, item]);\n if (!isUndefined(allowRemove) && !this.toBoolean(allowRemove)) {\n return;\n }\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n this.setDatavalue(newChipList);\n // @ts-ignore\n isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);\n }\n\n private isDefaultView() {\n return !this.state.props.searchable && this.state.dataItems?.length <= 10;\n }\n\n renderChip(item: any, index: any) {\n const isSelected = this.isDefaultView() ? item.selected : true;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction('chip'+ index)}\n {...getAccessibilityProps(AccessibilityWidgetType.CHIPS, {...this.state.props, selected: isSelected})}\n style={[this.styles.chip, isSelected ? this.styles.activeChip : null]}\n key={'chipitem_'+ index}\n onPress={() => {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n if (this.isDefaultView()) {\n this.selectChip(item);\n }\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onChipclick', [null, this, item]);\n // @ts-ignore\n this.props.invokeEvent('onChipselect', [null, this, item]);\n } else {\n this.invokeEventCallback('onChipclick', [null, this, item]);\n this.invokeEventCallback('onChipselect', [null, this, item]);\n }\n }}>\n {isSelected && this.isDefaultView() ? <WmIcon id={this.getTestId('checkicon')} iconclass={'wm-sl-l sl-check'} iconsize={16} styles={merge({}, this.styles.doneIcon, {icon: {color: isSelected ? this.styles.activeChipLabel.color : null}})}></WmIcon> : null}\n <WmPicture id={this.getTestId('chip'+ index + 'picture')} styles={this.styles.imageStyles} picturesource={item.imgSrc} shape='circle'></WmPicture>\n <Text {...this.getTestPropsForAction('chip'+ index+'label')}style={[this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]}>{item.displayexp || item.displayfield}</Text>\n {!this.isDefaultView() && !this.state.props.disabled ? <WmIcon id={this.getTestId('clearbtn')} iconclass={'wi wi-clear'} iconsize={16} styles={this.styles.clearIcon} onTap={() => this.removeItem(item, index)}></WmIcon> : null}\n </TouchableOpacity>\n )\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItems = filter(this.state.dataItems, (item) => item.selected);\n if (selectedItems.length) {\n this.updateState({\n chipsList: selectedItems\n } as WmChipsState);\n }\n this.isDefaultQuery = false;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n componentDidUpdate(prevProps: WmChipsProps, prevState: WmChipsState) {\n super.componentDidUpdate(prevProps, prevState);\n if (prevState.chipsList !== this.state.chipsList) {\n this.searchRef?.computePosition();\n }\n }\n\n renderWidget(props: WmChipsProps) {\n const chips = this.state.chipsList;\n return (<View style={this.styles.root}>\n\n <View style={this.styles.chipsWrapper}>\n {\n this.isDefaultView() ? this.state.dataItems.map((item: any, index: any) => this.renderChip(item, index)) : null\n }\n { props.searchable || !this.isDefaultView() ?\n <View style={[this.styles.searchContainer, {flexDirection: props.inputposition === 'first' ? 'column' : 'column-reverse'}]}>\n <WmSearch\n id={this.getTestId('search')}\n name=\"app-chip-search\"\n styles={this.styles.search}\n placeholder={this.state.saturate ? this.maxSizeReached : props.placeholder}\n listener={this.listener}\n dataset={props.dataset}\n searchkey={props.searchkey}\n minchars={props.minchars}\n autofocus={props.autofocus}\n disabled={props.disabled || props.readonly || this.state.saturate}\n readonly={props.readonly}\n displayexpression={props.displayexpression}\n getDisplayExpression={props.getDisplayExpression}\n displayimagesrc={props.displayimagesrc}\n displayfield={props.displayfield}\n datafield={props.datafield}\n onSubmit={this.addItem.bind(this)}\n onChange={() => {\n this.isDefaultQuery = false;\n this.props.listener?.onComponentChange && this.props.listener?.onComponentChange(this)\n }}\n showSearchIcon={false}\n showclear={false}\n type={props.minchars === 0 ? 'autocomplete' : 'search'}/>\n <View style={{ flexDirection: 'row', flexWrap: 'wrap'}}>\n {chips && chips.length ?\n chips.map((item: any, index: any) => this.renderChip(item, index))\n : null}\n </View>\n </View>\n : null }\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAE3D,SAASC,KAAK,EAAEC,SAAS,EAAEC,GAAG,EAAEC,WAAW,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACxG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,YAAY,SAASL,gBAAgB,CAAe;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC9C,EAAE;IAAAA,eAAA;EAAA;AAErB;AAEA,eAAe,MAAMC,OAAO,SAASV,oBA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AEuB,KAAU,KAAK,IAAI,CAACK,UAAU,CAAC5B,IAAI,EAAEuB,KAAK,CAAC,CAAC,GAChE,IACE,CACJ,CAAC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
@@ -11,6 +11,7 @@ import { DEFAULT_CLASS } from './currency.styles';
11
11
  import { BaseNumberComponent, BaseNumberState } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';
12
12
  import { isNull } from "lodash";
13
13
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
14
+ import { countDecimalDigits, validateInputOnDevice } from '@wavemaker/app-rn-runtime/core/utils';
14
15
  export class WmCurrencyState extends BaseNumberState {
15
16
  constructor(...args) {
16
17
  super(...args);
@@ -78,7 +79,21 @@ export default class WmCurrency extends BaseNumberComponent {
78
79
  onFocus: this.onFocus.bind(this),
79
80
  onKeyPress: this.validateInputEntry.bind(this),
80
81
  onChangeText: text => {
81
- this.onChangeText.bind(this)(text, 'currency');
82
+ const {
83
+ isValidText,
84
+ validText
85
+ } = validateInputOnDevice(text, "currency");
86
+ const decimalPlaces = props.decimalPlaces;
87
+ const decimalPlacesInNumber = countDecimalDigits(validText);
88
+ const restrictDecimalRegex = new RegExp(`(\\.\\d{${decimalPlaces}})\\d*`);
89
+ const updatedCurrencyText = validText.replace(restrictDecimalRegex, '$1');
90
+ if (!isValidText || decimalPlaces < decimalPlacesInNumber) {
91
+ var _this$widgetRef;
92
+ (_this$widgetRef = this.widgetRef) === null || _this$widgetRef === void 0 || _this$widgetRef.setNativeProps({
93
+ text: updatedCurrencyText
94
+ });
95
+ }
96
+ this.onChangeText.bind(this)(updatedCurrencyText, 'currency');
82
97
  },
83
98
  onChange: this.invokeChange.bind(this),
84
99
  allowContentSelection: this.styles.text.userSelect === 'text'
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","AccessibilityWidgetType","getAccessibilityProps","WmCurrencyState","constructor","args","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","style","styles","root","labelWrapper","label","flex","_extends","getTestPropsForInput","CURRENCY","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","input","text","isValid","invalid","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","editable","disabled","readonly","placeholder","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-currency-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={this.styles.labelWrapper}>\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text>\n </View>\n <View style={{flex: 1}}>\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.CURRENCY, props)}\n ref={(ref: any) => {\n this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }\n }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n this.onChangeText.bind(this)(text, 'currency');\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAEnD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,mDAAmD;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,mBAAmB,EACnB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K,CAACgC,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAACnB,MAAM,CAACoB,OAAO;IAAE,GACxF3B,IAAI;MACR4B,aAAa,EAAE5C,KAAK,CAACW,aAAc;MACnCkC,kBAAkB,EAAE,IAAI,CAACtB,MAAM,CAACqB,aAAc;MAC9CE,wBAAwB,EAAE,IAAI,CAACvB,MAAM,CAACwB,mBAAoB;MAC1DC,QAAQ,EAAEhD,KAAK,CAACiD,QAAQ,IAAIjD,KAAK,CAACkD,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,WAAW,EAAEnD,KAAK,CAACmD,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACC,kBAAkB,CAACH,IAAI,CAAC,IAAI,CAAE;MAC/CI,YAAY,EAAGhB,IAAI,IAAK;QACtB,IAAI,CAACgB,YAAY,CAACJ,IAAI,CAAC,IAAI,CAAC,CAACZ,IAAI,EAAE,UAAU,CAAC;MAChD,CAAE;MACFiB,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACN,IAAI,CAAC,IAAI,CAAE;MACvCO,qBAAqB,EAAE,IAAI,CAACrC,MAAM,CAACkB,IAAI,CAACoB,UAAU,KAAK;IAAO,EAC/D,CACK,CACF,CAAC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","AccessibilityWidgetType","getAccessibilityProps","countDecimalDigits","validateInputOnDevice","WmCurrencyState","constructor","args","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","style","styles","root","labelWrapper","label","flex","_extends","getTestPropsForInput","CURRENCY","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","input","text","isValid","invalid","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","editable","disabled","readonly","placeholder","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","isValidText","validText","decimalPlaces","decimalPlacesInNumber","restrictDecimalRegex","RegExp","updatedCurrencyText","replace","_this$widgetRef","setNativeProps","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { countDecimalDigits, validateInputOnDevice } from '@wavemaker/app-rn-runtime/core/utils';\nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-currency-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={this.styles.labelWrapper}>\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text>\n </View>\n <View style={{flex: 1}}>\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.CURRENCY, props)}\n ref={(ref: any) => {\n this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }\n }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n const {isValidText, validText} = validateInputOnDevice(text, \"currency\");\n const decimalPlaces = props.decimalPlaces;\n const decimalPlacesInNumber = countDecimalDigits(validText);\n const restrictDecimalRegex = new RegExp(`(\\\\.\\\\d{${decimalPlaces}})\\\\d*`);\n const updatedCurrencyText = validText.replace(restrictDecimalRegex, '$1');\n\n if (!isValidText || decimalPlaces < decimalPlacesInNumber) {\n (this.widgetRef as any)?.setNativeProps({ text: updatedCurrencyText });\n }\n\n this.onChangeText.bind(this)(updatedCurrencyText, 'currency');\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OA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S,CAACM,OAAO,CAACH,oBAAoB,EAAE,IAAI,CAAC;QAEzE,IAAI,CAACJ,WAAW,IAAIE,aAAa,GAAGC,qBAAqB,EAAE;UAAA,IAAAK,eAAA;UACzD,CAAAA,eAAA,GAAC,IAAI,CAAClC,SAAS,cAAAkC,eAAA,eAAfA,eAAA,CAAyBC,cAAc,CAAC;YAAE1B,IAAI,EAAEuB;UAAoB,CAAC,CAAC;QACxE;QAEA,IAAI,CAACP,YAAY,CAACJ,IAAI,CAAC,IAAI,CAAC,CAACW,mBAAmB,EAAE,UAAU,CAAC;MAC/D,CAAE;MACFI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAAChB,IAAI,CAAC,IAAI,CAAE;MACvCiB,qBAAqB,EAAE,IAAI,CAAC/C,MAAM,CAACkB,IAAI,CAAC8B,UAAU,KAAK;IAAO,EAC/D,CACK,CACF,CAAC;EACT;AACF","ignoreList":[]}
@@ -13,7 +13,7 @@ import { DEFAULT_CLASS } from './datetime/datetime.styles';
13
13
  import WebDatePicker from './date-picker.component';
14
14
  import { isNumber, isString } from 'lodash-es';
15
15
  import { ModalConsumer } from '@wavemaker/app-rn-runtime/core/modal.service';
16
- import { validateField } from '@wavemaker/app-rn-runtime/core/utils';
16
+ import { isDateFormatAsPerPattern, validateField } from '@wavemaker/app-rn-runtime/core/utils';
17
17
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
18
18
  import { FloatingLabel } from '@wavemaker/app-rn-runtime/core/components/floatinglabel.component';
19
19
  import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';
@@ -127,9 +127,15 @@ export default class BaseDatetime extends BaseComponent {
127
127
  case 'mindate':
128
128
  if (isString($new)) {
129
129
  const minDateVal = $new === CURRENT_DATE || $new === CURRENT_TIME ? new Date() : props.mindate;
130
+ // * check if supplied mindate is as per datepattern
131
+ const isMinMatchingPattern = minDateVal ? isDateFormatAsPerPattern(this.momentPattern(props.datepattern), minDateVal) : false;
132
+ // * min date formatted as per datepattern
133
+ const minDatePatternFormatted = minDateVal && isMinMatchingPattern ? moment(moment(minDateVal, this.momentPattern(props.datepattern)).format('YYYY-MM-DD')) : null;
134
+ // * min date formatted as per ISO, if mindate supplied is not as per datepattern
135
+ const formattedMinDate = minDatePatternFormatted && isMinMatchingPattern ? minDatePatternFormatted.toDate() : moment(minDateVal).toDate();
130
136
  this.updateState({
131
137
  props: {
132
- mindate: moment(minDateVal, this.momentPattern(props.datepattern)).toDate()
138
+ mindate: formattedMinDate
133
139
  }
134
140
  });
135
141
  }
@@ -137,9 +143,15 @@ export default class BaseDatetime extends BaseComponent {
137
143
  case 'maxdate':
138
144
  if (isString($new)) {
139
145
  const maxDateVal = $new === CURRENT_DATE || $new === CURRENT_TIME ? new Date() : props.maxdate;
146
+ // * check if supplied maxdate is as per datepattern
147
+ const isMaxMatchingPattern = maxDateVal ? isDateFormatAsPerPattern(this.momentPattern(props.datepattern), maxDateVal) : false;
148
+ // * max date formatted as per datepattern
149
+ const maxDatePatternFormatted = maxDateVal && isMaxMatchingPattern ? moment(moment(maxDateVal, this.momentPattern(props.datepattern)).format('YYYY-MM-DD')) : null;
150
+ // * max date formatted as per ISO, if maxdate supplied is not as per datepattern
151
+ const formattedMaxDate = maxDatePatternFormatted && isMaxMatchingPattern ? maxDatePatternFormatted.toDate() : moment(maxDateVal).toDate();
140
152
  this.updateState({
141
153
  props: {
142
- maxdate: moment(maxDateVal, this.momentPattern(props.datepattern)).toDate()
154
+ maxdate: formattedMaxDate
143
155
  }
144
156
  });
145
157
  }
@@ -338,6 +350,8 @@ export default class BaseDatetime extends BaseComponent {
338
350
  }
339
351
  renderWidget(props) {
340
352
  var _props$floatinglabel;
353
+ const is12HourFormat = (props === null || props === void 0 ? void 0 : props.datepattern) && /hh:mm(:ss|:sss)? a/.test(props.datepattern);
354
+ const is24Hour = is12HourFormat ? false : props.is24hour;
341
355
  return this.addTouchableOpacity(props, /*#__PURE__*/React.createElement(View, {
342
356
  style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isFocused ? this.styles.focused : null]
343
357
  }, this._background, props.floatinglabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
@@ -374,12 +388,15 @@ export default class BaseDatetime extends BaseComponent {
374
388
  color: this.styles.text.color,
375
389
  ...this.styles.calendarIcon
376
390
  },
377
- hint: props === null || props === void 0 ? void 0 : props.hint
391
+ hint: props === null || props === void 0 ? void 0 : props.hint,
392
+ id: this.getTestId('calendericon')
378
393
  }))), this.state.showDatePicker && (Platform.OS === 'web' && this.renderWebWidget(props) || !props.iswheelpicker && Platform.OS === 'android' && this.renderNativeWidget(props) || !props.iswheelpicker && Platform.OS === 'ios' && this.renderNativeIOSWidgetWithModal(props)), Platform.OS !== 'web' && props.iswheelpicker && this.state.showDatePickerModal && /*#__PURE__*/React.createElement(WmDatePickerModal, {
379
394
  isVisible: this.state.showDatePickerModal,
380
395
  onClose: () => this.updateState({
381
396
  showDatePickerModal: false
382
397
  }),
398
+ minDate: props.mindate,
399
+ maxDate: props.maxdate,
383
400
  selectedDate: this.state.dateValue,
384
401
  onSelect: date => {
385
402
  this.onDateChange(null, date);
@@ -406,7 +423,7 @@ export default class BaseDatetime extends BaseComponent {
406
423
  }
407
424
  }), Platform.OS !== 'web' && props.iswheelpicker && this.state.showTimePickerModal && /*#__PURE__*/React.createElement(WmTimePickerModal, {
408
425
  selectedDateTime: this.state.dateValue,
409
- is24Hour: props.is24hour,
426
+ is24Hour: is24Hour,
410
427
  isVisible: this.state.showTimePickerModal,
411
428
  onClose: () => this.updateState({
412
429
  isFocused: false,