@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":["assign","isUndefined","isNil","React","AccessibilityInfo","Platform","Animatable","ThemeVariables","StyleProps","getStyleName","BackgroundComponent","injector","ROOT_LOGGER","deepCopy","BASE_THEME","ThemeConsumer","ThemeEvent","EventNotifier","PropsProvider","assignIn","HideMode","AssetConsumer","FixedView","TextIdPrefixConsumer","isScreenReaderEnabled","TappableContext","WIDGET_LOGGER","extend","ParentContext","createContext","BaseComponentState","constructor","_defineProperty","undefined","defineStyles","styles","text","fontFamily","INSTANCE","baseFont","userSelect","BaseProps","args","BaseComponent","Component","markupProps","defaultClass","defaultProps","defaultState","ADD_TO_DOM","createElement","Fragment","I18nService","get","state","notifier","name","props","propertyProvider","show","$new","$old","debug","initialized","styleName","styleOverrides","setTimeout","cleanRefresh","onPropertyChange","_showView","deferload","check","proxy","Proxy","target","prop","receiver","propName","toString","has","Reflect","set","value","overrideProp","updateState","cleanup","push","updateStateTimeouts","forEach","v","clearTimeout","theme","subscribe","CHANGE","forceUpdate","addEventListener","remove","destroyParentListeners","event","fn","notify","emitToParent","isRTL","i18nService","isRTLLocale","animate","setState","animationId","Date","now","animatableProps","setProp","setPropDefault","setDefault","getDefaultStyles","getStyle","reset","newPartialState","callback","destroyed","stateFn","oldState","oldProps","newState","Object","keys","k","onUpdateState","_this$props$listener","_this$props$listener2","listener","onComponentChange","timeoutId","splice","indexOf","shouldComponentUpdate","nextProps","nextState","nextContext","key","componentDidMount","onComponentInit","componentWillAttach","isFixed","hide","componentWillDetach","componentWillUnmount","onComponentDestroy","f","destroy","componentDidUpdate","prevProps","prevState","snapshot","invokeEventCallback","eventName","callBack","map","a","apply","e","console","error","showView","isVisible","refresh","renderSkeleton","parentListenerDestroyers","setParent","parent","copyStyles","property","from","to","renderFixedContainer","style","rootStyle","left","top","bottom","right","width","height","root","mergeStyle","addAnimation","renderWidget","n","View","_extends","setBackground","bgStyle","_background","image","backgroundImage","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","getTestId","suffix","id","testIdPrefix","getTestProps","OS","accessibilityLabel","testID","accessible","getStyleClassName","classname","getTestPropsForInput","getTestPropsForAction","getTestPropsForLabel","getDependenciesFromContext","Consumer","tappable","closestTappable","loadAsset","_this$parent","_showSkeleton","showskeleton","Provider","render","selectedLocale","getSelectedLocale","info","hideMode","DONOT_ADD_TO_DOM","disabled","showindevice","d","join","cleanseStyleProperties","hasOwnProperty","backgroundColor","eleToRender"],"sources":["base.component.tsx"],"sourcesContent":["import { assign, isUndefined, isNil } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { AccessibilityInfo, Platform, TextStyle, ViewStyle } from 'react-native';\nimport { AnimatableProps } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport BASE_THEME, { NamedStyles, AllStyle, ThemeConsumer, ThemeEvent, Theme } from '../styles/theme';\nimport EventNotifier from './event-notifier';\nimport { PropsProvider } from './props.provider';\nimport { assignIn } from 'lodash-es';\nimport { HideMode } from './if.component';\nimport { AssetConsumer } from './asset.provider';\nimport { FixedView } from './fixed-view.component';\nimport { TextIdPrefixConsumer } from './testid.provider';\nimport { isScreenReaderEnabled } from './accessibility';\nimport { Tappable, TappableContext } from './tappable.component';\n\nexport const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');\n\nexport const ParentContext = React.createContext(null as any);\n\nexport class BaseComponentState<T extends BaseProps> {\n public animationId?: number = 0;\n public animatableProps?: AnimatableProps<ViewStyle> = undefined;\n public props = {} as T;\n public hide? = false;\n}\n\nexport type BaseStyles = NamedStyles<any> & {\n root: AllStyle,\n text: TextStyle & {userSelect?: 'none'| 'text'}\n}\n\nexport function defineStyles<T>(styles: T): T {\n return deepCopy({\n text: {\n fontFamily: ThemeVariables.INSTANCE.baseFont,\n userSelect: 'text'\n }\n }, styles);\n}\n\nexport interface LifecycleListener {\n onComponentChange?: (c: BaseComponent<any, any, any>) => void;\n onComponentInit?: (c: BaseComponent<any, any, any>) => void;\n onComponentDestroy?: (c: BaseComponent<any, any, any>) => void;\n}\n\nexport class BaseProps extends StyleProps {\n id?: string = null as any;\n name?: string = null as any;\n key?: any = null as any;\n disabled? = false;\n show? = true as Boolean | String | Number;\n styles?: any = null;\n classname?: string = null as any;\n listener?: LifecycleListener = null as any;\n showindevice?: ('xs'|'sm'|'md'|'lg'|'xl'|'xxl')[] = null as any;\n showskeleton?: boolean = false;\n deferload?: boolean = false;\n}\n\nexport abstract class BaseComponent<T extends BaseProps, S extends BaseComponentState<T>, L extends BaseStyles> extends React.Component<T, S> {\n public styles: L = null as any;\n public hideMode = HideMode.ADD_TO_DOM;\n private propertyProvider: PropsProvider<T>;\n public proxy: BaseComponent<T, S, L>;\n public initialized = false;\n public cleanup = [] as Function[];\n public theme = BASE_THEME;\n public updateStateTimeouts= [] as NodeJS.Timeout[];\n public parent: BaseComponent<any, any, any> = null as any;\n public destroyed = false;\n public _showSkeleton = false;\n public isFixed = false;\n private notifier = new EventNotifier();\n private parentListenerDestroyers = [] as Function[];\n public _background = <></>;\n private styleOverrides = {} as any;\n public loadAsset: (path: string) => number | string = null as any;\n private i18nService = injector.I18nService.get();\n public testIdPrefix = '';\n private _showView = true;\n public closestTappable?: Tappable;\n\n constructor(markupProps: T, public defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps);\n this.state = (defaultState || {} as S);\n this.notifier.name = this.props.name || '';\n this.propertyProvider = new PropsProvider<T>(\n assign({show: true}, defaultProps),\n assign({}, markupProps),\n (name: string, $new: any, $old: any) => {\n WIDGET_LOGGER.debug(() => `${this.props.name || this.constructor.name}: ${name} changed from ${$old} to ${$new}`);\n if (this.initialized) {\n const styleName = getStyleName(name);\n if (styleName) {\n if ($new === undefined) {\n delete this.styleOverrides[styleName];\n } else {\n this.styleOverrides[styleName] = $new;\n }\n }\n }\n if (name === 'showskeleton' && this.initialized) {\n setTimeout(() => this.cleanRefresh(), 100);\n }\n this.onPropertyChange(name, $new, $old);\n });\n //@ts-ignore\n this.state.props =this.propertyProvider.get();\n //@ts-ignore\n this._showView = !this.props.deferload;\n this.propertyProvider.check();\n //@ts-ignore\n this.proxy = (new Proxy(this, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n //@ts-ignore\n return this.state.props[propName];\n }\n return Reflect.get(target, prop, receiver);\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n // @ts-ignore\n const props = {} as any;\n this.propertyProvider.overrideProp(propName, value);\n props[propName] = value;\n this.updateState({\n props: props\n } as S);\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n }));\n this.cleanup.push(() => {\n this.updateStateTimeouts.forEach(v => clearTimeout(v));\n });\n this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {\n this.forceUpdate();\n }));\n this.cleanup.push(AccessibilityInfo.addEventListener('screenReaderChanged',\n () => {\n setTimeout(() => {\n this.forceUpdate();\n }, 100);\n },\n ).remove);\n this.cleanup.push(() => {\n this.destroyParentListeners();\n });\n }\n\n public subscribe(event: string, fn: Function) {\n return this.notifier.subscribe(event, fn);\n }\n\n public notify(event: string, args: any[], emitToParent = false) {\n return this.notifier.notify(event, args, emitToParent);\n }\n\n public get isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n public animate(props: AnimatableProps<ViewStyle>) {\n this.setState({\n animationId: Date.now(),\n animatableProps: props\n });\n }\n\n setProp(propName: string, value: any) {\n this.propertyProvider.set(propName, value);\n this.updateState({props:{}} as S);\n }\n\n setPropDefault(propName: string, value: any) {\n this.propertyProvider.setDefault(propName, value);\n }\n \n onPropertyChange(name: string, $new: any, $old: any) { \n }\n \n getDefaultStyles() {\n return this.theme.getStyle(this.defaultClass);\n }\n\n reset() {\n\n }\n\n updateState(newPartialState: S, callback?: ()=>void) {\n if (this.destroyed) {\n return;\n }\n const stateFn = (oldState: S) => {\n const oldProps = oldState.props;\n const newState = this.initialized ? assignIn({}, oldState, newPartialState) : assignIn(oldState, newPartialState);\n if (newPartialState.props) {\n Object.keys(newPartialState.props).forEach((k) => {\n //@ts-ignore\n oldProps[k] = newState.props[k];\n });\n newState.props = oldProps;\n }\n return newState;\n };\n const onUpdateState = () => {\n callback && callback();\n this.props.listener?.onComponentChange\n && this.props.listener?.onComponentChange(this);\n }\n if (!this.initialized) {\n this.state = stateFn(this.state);\n onUpdateState();\n } else {\n const timeoutId = setTimeout(() => {\n this.setState(stateFn, onUpdateState);\n this.updateStateTimeouts.splice(this.updateStateTimeouts.indexOf(timeoutId), 1);\n });\n this.updateStateTimeouts.push(timeoutId);\n }\n }\n\n shouldComponentUpdate(nextProps: T, nextState: S, nextContext: any) {\n if (this.propertyProvider.check(nextProps)) {\n return true;\n }\n for(let key in nextState) {\n if(key !== 'props' && (!(key in this.state) || nextState[key] !== this.state[key])) {\n return true;\n }\n }\n\n for(let key in this.state) {\n if(key !== 'props' && (!(key in nextState) || this.state[key] !== nextState[key])) {\n return true;\n }\n }\n return false;\n }\n\n componentDidMount() {\n if (this.props.listener && this.props.listener.onComponentInit) {\n this.props.listener.onComponentInit(this.proxy);\n }\n this.initialized = true;\n }\n\n componentWillAttach() {\n if (this.isFixed) {\n this.setState({hide: false});\n }\n }\n\n componentWillDetach() {\n if (this.isFixed) {\n this.setState({hide: true});\n }\n }\n\n componentWillUnmount() {\n this.destroyed = true;\n if (this.props.listener && this.props.listener.onComponentDestroy) {\n this.props.listener.onComponentDestroy(this.proxy);\n }\n this.cleanup.forEach(f => f && f());\n this.notifier.destroy();\n this.notifier.notify('destroy', []);\n }\n \n componentDidUpdate(prevProps: Readonly<T>, prevState: Readonly<S>, snapshot?: any): void {\n if (this.propertyProvider.check(this.props)) {\n this.forceUpdate();\n }\n }\n\n invokeEventCallback(eventName: string, args: any[]) {\n //@ts-ignore\n const callBack: Function = this.props[eventName];\n args = args && args.map(a => (a === this) ? this.proxy : a)\n if (callBack) {\n try {\n return callBack.apply(this.proxy, args);\n } catch(e) {\n console.error(e);\n }\n }\n }\n\n showView() {\n return this.isVisible();\n }\n\n isVisible() {\n const show = this.state.props.show;\n return show !== false && show !== 'false' && show !== '0' && !isNil(show) && show !== \"\";\n }\n\n protected abstract renderWidget(props: T): ReactNode;\n\n public refresh() {\n this.forceUpdate();\n }\n\n public cleanRefresh() {\n this.forceUpdate(() => this.notifier.notify('forceUpdate', []));\n }\n \n public renderSkeleton (props: T): ReactNode {\n return null;\n }\n\n public destroyParentListeners() {\n this.parentListenerDestroyers.map(fn => fn());\n }\n\n private setParent(parent: BaseComponent<any, any, any>) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n this.notifier.setParent(parent.notifier);\n this.parentListenerDestroyers = [\n this.parent.subscribe('forceUpdate', () => {\n this.cleanRefresh();\n }),\n this.parent.subscribe('destroy', () => {\n this.destroyParentListeners();\n })\n ];\n }\n }\n\n copyStyles(property: string, from: any, to: any) {\n if (!isUndefined(from[property])) {\n to[property] = from[property];\n }\n }\n\n renderFixedContainer(props: T) {\n const style = {} as ViewStyle;\n const rootStyle = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n width: \"100%\",\n height: \"100%\"\n } as ViewStyle;\n this.copyStyles('left', this.styles.root, style);\n this.copyStyles('top', this.styles.root, style);\n this.copyStyles('right', this.styles.root, style);\n this.copyStyles('bottom', this.styles.root, style);\n this.copyStyles('width', this.styles.root, style);\n this.copyStyles('height', this.styles.root, style);\n this.styles = this.theme.mergeStyle(this.styles, {root: rootStyle});\n return (<FixedView style={style} theme={this.theme}>{this.addAnimation(this.renderWidget(props))}</FixedView>);\n }\n\n private addAnimation(n: ReactNode) {\n if (!this.state.animatableProps) {\n return n;\n }\n return (<Animatable.View key={this.state.animationId} {...this.state.animatableProps}>{n}</Animatable.View>);\n }\n \n private setBackground() {\n const bgStyle = this.styles.root as any;\n this._background = (\n <BackgroundComponent \n image={bgStyle.backgroundImage}\n position={bgStyle.backgroundPosition}\n size={bgStyle.backgroundSize}\n repeat={bgStyle.backgroundRepeat}\n resizeMode={bgStyle.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}>\n </BackgroundComponent>\n );\n delete (this.styles.root as any)['backgroundImage'];\n delete (this.styles.root as any)['backgroundPosition'];\n delete (this.styles.root as any)['backgroundResizeMode'];\n delete (this.styles.root as any)['backgroundSize'];\n delete (this.styles.root as any)['backgroundRepeat'];\n }\n\n public getTestId(suffix?: string) {\n let id = this.props.id || this.props.name;\n if (this.testIdPrefix) {\n id = this.testIdPrefix + '_' + id;\n }\n if (suffix) {\n id = id + '_' + suffix;\n }\n return id;\n }\n\n public getTestProps(suffix?: string) {\n let id = this.getTestId(suffix);\n if (isScreenReaderEnabled()) {\n return {};\n }\n if (Platform.OS === 'android' || Platform.OS === 'web') {\n return {\n accessibilityLabel: id,\n testID: id\n };\n }\n return {\n accessible: false,\n testID: id\n };\n }\n\n public getStyleClassName() {\n return this.state.props.classname;\n }\n\n public getTestPropsForInput(suffix?: string) {\n return this.getTestProps(suffix || 'i');\n }\n\n public getTestPropsForAction(suffix?: string) {\n return this.getTestProps(suffix || 'a');\n }\n\n public getTestPropsForLabel(suffix?: string) {\n return this.getTestProps(suffix || 'l');\n }\n\n private getDependenciesFromContext(fn: () => ReactNode) {\n return (\n <TappableContext.Consumer>{(tappable) => {\n this.closestTappable = tappable;\n return (\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (<AssetConsumer>\n {(loadAsset) => {\n this.loadAsset = loadAsset;\n return (<ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.parent?._showSkeleton \n || !!this.state.props.showskeleton;\n return (\n <ParentContext.Provider value={this}>\n <ThemeConsumer>\n {(theme) => { \n this.theme = theme || BASE_THEME;\n return fn();\n }}\n </ThemeConsumer>\n </ParentContext.Provider>);\n }} \n </ParentContext.Consumer>);\n }}\n </AssetConsumer>);\n }}\n </TextIdPrefixConsumer>)}}\n </TappableContext.Consumer>); \n }\n \n public render(): ReactNode {\n const props = this.state.props;\n this.isFixed = false;\n const selectedLocale = this.i18nService.getSelectedLocale();\n return this.getDependenciesFromContext(() => {\n WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);\n this._showView = this._showView || this.showView();\n if (this.state.hide \n || (!this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM)\n || !this._showView) {\n return null;\n }\n const classname = this.getStyleClassName();\n this.styles = this.theme.mergeStyle(\n this.getDefaultStyles(),\n {text: this.theme.getStyle('app-' + selectedLocale)},\n {text: this.theme.getStyle(this.defaultClass + '-' + selectedLocale)},\n props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null,\n this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null,\n classname && this.theme.getStyle(classname),\n props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')),\n this.theme.cleanseStyleProperties(this.props.styles),\n this.theme.cleanseStyleProperties({\n root: this.styleOverrides,\n text: this.styleOverrides\n }));\n if (this.styles.root.hasOwnProperty('_background')) {\n delete this.styles.root.backgroundColor;\n }\n if (!this.isVisible()) {\n assign(this.styles, this.theme.getStyle('hidden'))\n }\n let eleToRender = (this._showSkeleton && this.renderSkeleton(props));\n if (eleToRender) {\n return eleToRender;\n }\n this.setBackground();\n this.isFixed = (this.styles.root.position as any) === 'fixed';\n if (this.isFixed) {\n this.styles.root.position = undefined;\n return this.renderFixedContainer(props);\n }\n return this.addAnimation(this.renderWidget(this.state.props)); \n });\n }\n}\n"],"mappings":";;;;AAAA,SAASA,MAAM,EAAEC,WAAW,EAAEC,KAAK,QAAQ,QAAQ;AACnD,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAASC,iBAAiB,EAAEC,QAAQ,QAA8B,cAAc;AAEhF,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,SAASC,UAAU,EAAEC,YAAY,QAAQ,8CAA8C;AACvF,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,OAAO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AAQ,KAAa,OAAO;MAC7D,IAAI,IAAI,CAACpD,OAAO,EAAE;QACd,IAAI,CAAC5G,MAAM,CAACoJ,IAAI,CAACY,QAAQ,GAAIlK,SAAS;QACtC,OAAO,IAAI,CAAC6I,oBAAoB,CAACrH,KAAK,CAAC;MAC3C;MACA,OAAO,IAAI,CAACgI,YAAY,CAAC,IAAI,CAACC,YAAY,CAAC,IAAI,CAACpI,KAAK,CAACG,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["assign","isUndefined","isNil","React","AccessibilityInfo","Platform","StyleSheet","View","Animatable","ThemeVariables","StyleProps","getStyleName","BackgroundComponent","injector","ROOT_LOGGER","deepCopy","BASE_THEME","ThemeConsumer","ThemeEvent","EventNotifier","PropsProvider","assignIn","HideMode","AssetConsumer","FixedView","TextIdPrefixConsumer","isScreenReaderEnabled","TappableContext","WmComponentNode","WIDGET_LOGGER","extend","ParentContext","createContext","BaseComponentState","constructor","_defineProperty","undefined","defineStyles","styles","text","fontFamily","INSTANCE","baseFont","userSelect","BaseProps","args","BaseComponent","Component","markupProps","defaultClass","defaultProps","defaultState","ADD_TO_DOM","createElement","Fragment","I18nService","get","state","notifier","name","props","componentNode","instance","propertyProvider","show","$new","$old","debug","initialized","styleName","styleOverrides","setTimeout","cleanRefresh","onPropertyChange","_INSTANCE","_showView","deferload","check","proxy","Proxy","target","prop","receiver","propName","toString","has","Reflect","set","value","overrideProp","updateState","cleanup","push","updateStateTimeouts","forEach","v","clearTimeout","theme","subscribe","CHANGE","forceUpdate","addEventListener","remove","destroyParentListeners","event","fn","notify","emitToParent","isRTL","i18nService","isRTLLocale","animate","setState","animationId","Date","now","animatableProps","setProp","setPropDefault","setDefault","getDefaultStyles","getStyle","reset","newPartialState","callback","destroyed","stateFn","oldState","oldProps","newState","Object","keys","k","onUpdateState","_this$props$listener","_this$props$listener2","listener","onComponentChange","timeoutId","splice","indexOf","shouldComponentUpdate","nextProps","nextState","nextContext","key","componentDidMount","onComponentInit","componentWillAttach","isFixed","hide","componentWillDetach","componentWillUnmount","_this$parent","onComponentDestroy","f","parent","destroy","componentDidUpdate","prevProps","prevState","snapshot","invokeEventCallback","eventName","callBack","map","a","apply","e","console","error","showView","isVisible","refresh","renderSkeleton","parentListenerDestroyers","setParent","add","copyStyles","property","from","to","renderFixedContainer","style","rootStyle","left","top","bottom","right","width","height","root","mergeStyle","addAnimation","renderWidget","n","_extends","setBackground","bgStyle","_background","image","backgroundImage","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","highlight","onTouchStart","borderWidth","overflow","backgroundColor","borderColor","borderStyle","zIndex","absoluteFill","getTestId","suffix","id","testIdPrefix","getTestProps","OS","accessibilityLabel","testID","accessible","getStyleClassName","classname","getTestPropsForInput","getTestPropsForAction","getTestPropsForLabel","getDependenciesFromContext","Consumer","tappable","closestTappable","loadAsset","_this$parent2","_showSkeleton","showskeleton","Provider","render","selectedLocale","getSelectedLocale","info","hideMode","DONOT_ADD_TO_DOM","disabled","showindevice","d","join","cleanseStyleProperties","hasOwnProperty","eleToRender"],"sources":["base.component.tsx"],"sourcesContent":["import { assign, isUndefined, isNil } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { AccessibilityInfo, Platform, StyleSheet, TextStyle, View, ViewStyle } from 'react-native';\nimport { AnimatableProps } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport BASE_THEME, { NamedStyles, AllStyle, ThemeConsumer, ThemeEvent, Theme } from '../styles/theme';\nimport EventNotifier from './event-notifier';\nimport { PropsProvider } from './props.provider';\nimport { assignIn } from 'lodash-es';\nimport { HideMode } from './if.component';\nimport { AssetConsumer } from './asset.provider';\nimport { FixedView } from './fixed-view.component';\nimport { TextIdPrefixConsumer } from './testid.provider';\nimport { isScreenReaderEnabled } from './accessibility';\nimport { Tappable, TappableContext } from './tappable.component';\nimport { WmComponentNode } from './wm-component-tree';\n\nexport const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');\n\nexport const ParentContext = React.createContext(null as any);\n\nexport class BaseComponentState<T extends BaseProps> {\n public animationId?: number = 0;\n public animatableProps?: AnimatableProps<ViewStyle> = undefined;\n public props = {} as T;\n public hide? = false;\n public highlight? = false;\n}\n\nexport type BaseStyles = NamedStyles<any> & {\n root: AllStyle,\n text: TextStyle & {userSelect?: 'none'| 'text'}\n}\n\nexport function defineStyles<T>(styles: T): T {\n return deepCopy({\n text: {\n fontFamily: ThemeVariables.INSTANCE.baseFont,\n userSelect: 'text'\n }\n }, styles);\n}\n\nexport interface LifecycleListener {\n onComponentChange?: (c: BaseComponent<any, any, any>) => void;\n onComponentInit?: (c: BaseComponent<any, any, any>) => void;\n onComponentDestroy?: (c: BaseComponent<any, any, any>) => void;\n}\n\nexport class BaseProps extends StyleProps {\n id?: string = null as any;\n name?: string = null as any;\n key?: any = null as any;\n disabled? = false;\n show? = true as Boolean | String | Number;\n styles?: any = null;\n classname?: string = null as any;\n listener?: LifecycleListener = null as any;\n showindevice?: ('xs'|'sm'|'md'|'lg'|'xl'|'xxl')[] = null as any;\n showskeleton?: boolean = undefined;\n deferload?: boolean = false;\n showskeletonchildren?: boolean = true;\n}\n\nexport abstract class BaseComponent<T extends BaseProps, S extends BaseComponentState<T>, L extends BaseStyles> extends React.Component<T, S> {\n public styles: L = null as any;\n public hideMode = HideMode.ADD_TO_DOM;\n private propertyProvider: PropsProvider<T>;\n public proxy: BaseComponent<T, S, L>;\n public _INSTANCE: BaseComponent<T, S, L>;\n public initialized = false;\n public cleanup = [] as Function[];\n public theme = BASE_THEME;\n public updateStateTimeouts= [] as NodeJS.Timeout[];\n public parent: BaseComponent<any, any, any> = null as any;\n public destroyed = false;\n public _showSkeleton = false;\n public isFixed = false;\n private notifier = new EventNotifier();\n private parentListenerDestroyers = [] as Function[];\n public _background = <></>;\n private styleOverrides = {} as any;\n public loadAsset: (path: string) => number | string = null as any;\n private i18nService = injector.I18nService.get();\n public testIdPrefix = '';\n private _showView = true;\n public closestTappable?: Tappable; \n public componentNode: WmComponentNode;\n\n\n constructor(markupProps: T, public defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps);\n this.state = (defaultState || {} as S);\n this.notifier.name = this.props.name || '';\n this.componentNode = new WmComponentNode({\n instance: this\n });\n this.propertyProvider = new PropsProvider<T>(\n assign({show: true}, defaultProps),\n assign({}, markupProps),\n (name: string, $new: any, $old: any) => {\n WIDGET_LOGGER.debug(() => `${this.props.name || this.constructor.name}: ${name} changed from ${$old} to ${$new}`);\n if (this.initialized) {\n const styleName = getStyleName(name);\n if (styleName) {\n if ($new === undefined) {\n delete this.styleOverrides[styleName];\n } else {\n this.styleOverrides[styleName] = $new;\n }\n }\n }\n if (name === 'showskeleton' && this.initialized) {\n setTimeout(() => this.cleanRefresh(), 100);\n }\n this.onPropertyChange(name, $new, $old);\n });\n //@ts-ignore\n this.state.props =this.propertyProvider.get();\n this._INSTANCE = this;\n //@ts-ignore\n this._showView = !this.props.deferload;\n this.propertyProvider.check();\n //@ts-ignore\n this.proxy = (new Proxy(this, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n //@ts-ignore\n return this.state.props[propName];\n }\n return Reflect.get(target, prop, receiver);\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n // @ts-ignore\n const props = {} as any;\n this.propertyProvider.overrideProp(propName, value);\n props[propName] = value;\n this.updateState({\n props: props\n } as S);\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n }));\n this.cleanup.push(() => {\n this.updateStateTimeouts.forEach(v => clearTimeout(v));\n });\n this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {\n this.forceUpdate();\n }));\n this.cleanup.push(AccessibilityInfo.addEventListener('screenReaderChanged',\n () => {\n setTimeout(() => {\n this.forceUpdate();\n }, 100);\n },\n ).remove);\n this.cleanup.push(() => {\n this.destroyParentListeners();\n });\n }\n\n public subscribe(event: string, fn: Function) {\n return this.notifier.subscribe(event, fn);\n }\n\n public notify(event: string, args: any[], emitToParent = false) {\n return this.notifier.notify(event, args, emitToParent);\n }\n\n public get isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n public animate(props: AnimatableProps<ViewStyle>) {\n this.setState({\n animationId: Date.now(),\n animatableProps: props\n });\n }\n\n setProp(propName: string, value: any) {\n this.propertyProvider.set(propName, value);\n this.updateState({props: {}} as S);\n }\n\n setPropDefault(propName: string, value: any) {\n this.propertyProvider.setDefault(propName, value);\n }\n \n onPropertyChange(name: string, $new: any, $old: any) { \n }\n \n getDefaultStyles() {\n return this.theme.getStyle(this.defaultClass);\n }\n\n reset() {\n\n }\n\n updateState(newPartialState: S, callback?: ()=>void) {\n if (this.destroyed) {\n return;\n }\n const stateFn = (oldState: S) => {\n const oldProps = oldState.props;\n const newState = this.initialized ? assignIn({}, oldState, newPartialState) : assignIn(oldState, newPartialState);\n if (newPartialState.props) {\n Object.keys(newPartialState.props).forEach((k) => {\n //@ts-ignore\n oldProps[k] = newState.props[k];\n });\n newState.props = oldProps;\n }\n return newState;\n };\n const onUpdateState = () => {\n callback && callback();\n this.props.listener?.onComponentChange\n && this.props.listener?.onComponentChange(this);\n }\n if (!this.initialized) {\n this.state = stateFn(this.state);\n onUpdateState();\n } else {\n const timeoutId = setTimeout(() => {\n this.setState(stateFn, onUpdateState);\n this.updateStateTimeouts.splice(this.updateStateTimeouts.indexOf(timeoutId), 1);\n });\n this.updateStateTimeouts.push(timeoutId);\n }\n }\n\n shouldComponentUpdate(nextProps: T, nextState: S, nextContext: any) {\n if (this.propertyProvider.check(nextProps)) {\n return true;\n }\n for(let key in nextState) {\n if(key !== 'props' && (!(key in this.state) || nextState[key] !== this.state[key])) {\n return true;\n }\n }\n\n for(let key in this.state) {\n if(key !== 'props' && (!(key in nextState) || this.state[key] !== nextState[key])) {\n return true;\n }\n }\n return false;\n }\n\n componentDidMount() {\n if (this.props.listener && this.props.listener.onComponentInit) {\n this.props.listener.onComponentInit(this.proxy);\n }\n this.initialized = true;\n }\n\n componentWillAttach() {\n if (this.isFixed) {\n this.setState({hide: false});\n }\n }\n\n componentWillDetach() {\n if (this.isFixed) {\n this.setState({hide: true});\n }\n }\n\n componentWillUnmount() {\n this.destroyed = true;\n if (this.props.listener && this.props.listener.onComponentDestroy) {\n this.props.listener.onComponentDestroy(this.proxy);\n }\n this.cleanup.forEach(f => f && f());\n this.parent?.componentNode?.remove(this.componentNode);\n this.notifier.destroy();\n this.notifier.notify('destroy', []);\n }\n \n componentDidUpdate(prevProps: Readonly<T>, prevState: Readonly<S>, snapshot?: any): void {\n if (this.propertyProvider.check(this.props)) {\n this.forceUpdate();\n }\n }\n\n invokeEventCallback(eventName: string, args: any[]) {\n //@ts-ignore\n const callBack: Function = this.props[eventName];\n args = args && args.map(a => (a === this) ? this.proxy : a)\n if (callBack) {\n try {\n return callBack.apply(this.proxy, args);\n } catch(e) {\n console.error(e);\n }\n }\n }\n\n showView() {\n return this.isVisible();\n }\n\n isVisible() {\n const show = this.state.props.show;\n return show !== false && show !== 'false' && show !== '0' && !isNil(show) && show !== \"\";\n }\n\n protected abstract renderWidget(props: T): ReactNode;\n\n public refresh() {\n this.forceUpdate();\n }\n\n public cleanRefresh() {\n this.forceUpdate(() => this.notifier.notify('forceUpdate', []));\n }\n \n public renderSkeleton (props: T): ReactNode {\n return null;\n }\n\n public destroyParentListeners() {\n this.parentListenerDestroyers.map(fn => fn());\n }\n\n protected setParent(parent: BaseComponent<any, any, any>) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n this.parent.componentNode.add(this.componentNode);\n this.notifier.setParent(parent.notifier);\n this.parentListenerDestroyers = [\n this.parent.subscribe('forceUpdate', () => {\n this.cleanRefresh();\n }),\n this.parent.subscribe('destroy', () => {\n this.destroyParentListeners();\n })\n ];\n }\n }\n\n copyStyles(property: string, from: any, to: any) {\n if (!isUndefined(from[property])) {\n to[property] = from[property];\n }\n }\n\n renderFixedContainer(props: T) {\n const style = {} as ViewStyle;\n const rootStyle = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n width: \"100%\",\n height: \"100%\"\n } as ViewStyle;\n this.copyStyles('left', this.styles.root, style);\n this.copyStyles('top', this.styles.root, style);\n this.copyStyles('right', this.styles.root, style);\n this.copyStyles('bottom', this.styles.root, style);\n this.copyStyles('width', this.styles.root, style);\n this.copyStyles('height', this.styles.root, style);\n this.styles = this.theme.mergeStyle(this.styles, {root: rootStyle});\n return (<FixedView style={style} theme={this.theme}>{this.addAnimation(this.renderWidget(props))}</FixedView>);\n }\n\n private addAnimation(n: ReactNode) {\n if (!this.state.animatableProps) {\n return n;\n }\n return (<Animatable.View key={this.state.animationId} {...this.state.animatableProps}>{n}</Animatable.View>);\n }\n \n private setBackground() {\n const bgStyle = this.styles.root as any;\n this._background = (\n <>\n <BackgroundComponent \n image={bgStyle.backgroundImage}\n position={bgStyle.backgroundPosition}\n size={bgStyle.backgroundSize}\n repeat={bgStyle.backgroundRepeat}\n resizeMode={bgStyle.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}>\n </BackgroundComponent>\n {this.state.highlight ? (<View onTouchStart={() => {\n this.setState({\n highlight: false\n })\n }} style={[{\n borderWidth: 2,\n overflow: 'hidden',\n backgroundColor: '#FFFF0033', \n borderColor: 'orange',\n borderStyle: 'dashed',\n zIndex: 1000,\n borderRadius: 0,\n }, StyleSheet.absoluteFill]}></View>) : null}\n </>\n );\n delete (this.styles.root as any)['backgroundImage'];\n delete (this.styles.root as any)['backgroundPosition'];\n delete (this.styles.root as any)['backgroundResizeMode'];\n delete (this.styles.root as any)['backgroundSize'];\n delete (this.styles.root as any)['backgroundRepeat'];\n }\n\n public getTestId(suffix?: string) {\n let id = this.props.id || this.props.name;\n if (this.testIdPrefix) {\n id = this.testIdPrefix + '_' + id;\n }\n if (suffix) {\n id = id + '_' + suffix;\n }\n return id;\n }\n\n public getTestProps(suffix?: string) {\n let id = this.getTestId(suffix);\n if (isScreenReaderEnabled()) {\n return {};\n }\n if (Platform.OS === 'android' || Platform.OS === 'web') {\n return {\n accessibilityLabel: id,\n testID: id\n };\n }\n return {\n accessible: false,\n testID: id\n };\n }\n\n public getStyleClassName() {\n return this.state.props.classname;\n }\n\n public getTestPropsForInput(suffix?: string) {\n return this.getTestProps(suffix || 'i');\n }\n\n public getTestPropsForAction(suffix?: string) {\n return this.getTestProps(suffix || 'a');\n }\n\n public getTestPropsForLabel(suffix?: string) {\n return this.getTestProps(suffix || 'l');\n }\n\n private getDependenciesFromContext(fn: () => ReactNode) {\n return (\n <TappableContext.Consumer>{(tappable) => {\n this.closestTappable = tappable;\n return (\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (<AssetConsumer>\n {(loadAsset) => {\n this.loadAsset = loadAsset;\n return (<ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.state.props.showskeleton !== false \n && (this.parent?._showSkeleton || this.state.props.showskeleton === true);\n return (\n <ParentContext.Provider value={this}>\n <ThemeConsumer>\n {(theme) => { \n this.theme = theme || BASE_THEME;\n return fn();\n }}\n </ThemeConsumer>\n </ParentContext.Provider>);\n }} \n </ParentContext.Consumer>);\n }}\n </AssetConsumer>);\n }}\n </TextIdPrefixConsumer>)}}\n </TappableContext.Consumer>); \n }\n \n public render(): ReactNode {\n const props = this.state.props;\n this.isFixed = false;\n const selectedLocale = this.i18nService.getSelectedLocale();\n return this.getDependenciesFromContext(() => {\n WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);\n this._showView = this._showView || this.showView();\n if (this.state.hide \n || (!this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM)\n || !this._showView) {\n return null;\n }\n const classname = this.getStyleClassName();\n this.styles = this.theme.mergeStyle(\n this.getDefaultStyles(),\n {text: this.theme.getStyle('app-' + selectedLocale)},\n {text: this.theme.getStyle(this.defaultClass + '-' + selectedLocale)},\n props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null,\n this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null,\n classname && this.theme.getStyle(classname),\n props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')),\n this.theme.cleanseStyleProperties(this.props.styles),\n this.theme.cleanseStyleProperties({\n root: this.styleOverrides,\n text: this.styleOverrides\n }));\n if (this.styles.root.hasOwnProperty('_background')) {\n delete this.styles.root.backgroundColor;\n }\n if (!this.isVisible()) {\n assign(this.styles, this.theme.getStyle('hidden'))\n }\n let eleToRender = (this._showSkeleton && this.renderSkeleton(props));\n if (eleToRender) {\n return eleToRender;\n }\n this.setBackground();\n this.isFixed = (this.styles.root.position as any) === 'fixed';\n if (this.isFixed) {\n this.styles.root.position = undefined;\n return this.renderFixedContainer(props);\n }\n return this.addAnimation(this.renderWidget(this.state.props)); \n });\n }\n}\n"],"mappings":";;;;AAAA,SAASA,MAAM,EAAEC,WAAW,EAAEC,KAAK,QAAQ,QAAQ;AACnD,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,UAAU,EAAaC,IAAI,QAAmB,cAAc;AAElG,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,SAASC,UAAU,EAAEC,YAAY,QAAQ,8CAA8C;AACvF,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,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CAACkJ,oBAAoB,CAAC1H,KAAK,CAAC;MAC3C;MACA,OAAO,IAAI,CAACqI,YAAY,CAAC,IAAI,CAACC,YAAY,CAAC,IAAI,CAACzI,KAAK,CAACG,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
@@ -36,7 +36,6 @@ const WmCursor = /*#__PURE__*/React.memo(props => {
36
36
  export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
37
37
  var _props$customDisplayV, _props$floatingLabel;
38
38
  const [selectRange, setSelectRange] = useState(null);
39
- const [isInputFocused, setIsInputFocused] = useState(false);
40
39
  const [iMask, setIMask] = useState(null);
41
40
  const [displayCursor, setDisplayCursor] = useState(false);
42
41
  const value = useRef(props.value || '');
@@ -127,12 +126,12 @@ export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
127
126
  opts[valueExpr] = (_props$customDisplayV = props.customDisplayValue) !== null && _props$customDisplayV !== void 0 ? _props$customDisplayV : value.current;
128
127
  const textStyle = Object.assign({}, ...(isArray(props.style) ? props.style : [props.style]));
129
128
  const hideInput = props.displayformat || props.maskchar;
130
- return /*#__PURE__*/React.createElement(React.Fragment, null, props.floatingLabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
131
- moveUp: !!(value.current || isInputFocused || displayValue),
129
+ return /*#__PURE__*/React.createElement(React.Fragment, null, props.background, props.floatingLabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
130
+ moveUp: !!(value.current || props.isInputFocused || displayValue),
132
131
  label: (_props$floatingLabel = props.floatingLabel) !== null && _props$floatingLabel !== void 0 ? _props$floatingLabel : props.placeholder,
133
132
  style: {
134
133
  ...(props.floatingLabelStyle || []),
135
- ...(isInputFocused ? props.activeFloatingLabelStyle || {} : {})
134
+ ...(props.isInputFocused ? props.activeFloatingLabelStyle || {} : {})
136
135
  }
137
136
  }) : null, /*#__PURE__*/React.createElement(TextInput, _extends({}, props, hideInput || props.customDisplayValue ? opts : {}, {
138
137
  placeholder: props.floatingLabel || displayValue ? '' : props.placeholder,
@@ -145,14 +144,12 @@ export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
145
144
  onFocus: e => {
146
145
  var _props$onFocus;
147
146
  (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, e);
148
- setIsInputFocused(true);
149
147
  setDisplayCursor(true);
150
148
  element.current = e.target;
151
149
  },
152
150
  onBlur: e => {
153
151
  var _props$onBlur;
154
152
  props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
155
- setIsInputFocused(false);
156
153
  setDisplayCursor(false);
157
154
  },
158
155
  ref: ref,
@@ -160,6 +157,10 @@ export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
160
157
  onSelectionChange: onSelectionChange,
161
158
  caretHidden: !!(selectRange !== null && selectRange !== void 0 && selectRange.end),
162
159
  onChangeText: text => {
160
+ if (props.autoCapitalize && props.autoCapitalize === 'characters') {
161
+ onChangeText(text.toUpperCase());
162
+ return;
163
+ }
163
164
  onChangeText(text);
164
165
  }
165
166
  }, hideInput ? {
@@ -167,7 +168,8 @@ export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
167
168
  cursorColor: 'transparent',
168
169
  onChange: () => {}
169
170
  } : {}, {
170
- contextMenuHidden: !props.allowContentSelection
171
+ contextMenuHidden: !props.allowContentSelection,
172
+ autoCapitalize: props.autoCapitalize
171
173
  })), hideInput ? /*#__PURE__*/React.createElement(View, {
172
174
  style: [props.style, {
173
175
  display: 'flex',
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useRef","useState","Animated","Platform","Text","TextInput","View","isArray","IMask","FloatingLabel","WmCursor","memo","props","opacityAnimation","Value","current","runAnimation","timing","toValue","duration","useNativeDriver","start","createElement","testID","style","backgroundColor","color","width","marginHorizontal","height","opacity","WMTextInput","forwardRef","ref","_props$customDisplayV","_props$floatingLabel","selectRange","setSelectRange","isInputFocused","setIsInputFocused","iMask","setIMask","displayCursor","setDisplayCursor","value","x","forceUpdate","displayValue","setDisplayValue","element","displayformat","MaskedPattern","mask","skipInvalid","lazy","definitions","typedValue","defaultValue","onChangeText","setTimeout","OS","maskchar","_element$current","setSelectionRange","length","onSelectionChange","e","_e$nativeEvent","selection","nativeEvent","allowContentSelection","end","text","_value","substring","slice","formattedValue","replace","valueExpr","opts","customDisplayValue","textStyle","Object","assign","hideInput","Fragment","floatingLabel","moveUp","label","placeholder","floatingLabelStyle","activeFloatingLabelStyle","_extends","borderColor","zIndex","onFocus","_props$onFocus","call","target","onBlur","_props$onBlur","caretHidden","selectionColor","cursorColor","onChange","contextMenuHidden","display","flexDirection","alignItems","marginTop","minHeight","undefined","padding","fontFamily","fontSize","fontWeight"],"sources":["textinput.component.tsx"],"sourcesContent":["import React, { ForwardedRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { Animated, Platform, Text, TextInput, TextInputProps, TextStyle, View } from 'react-native';\nimport { isArray } from 'lodash';\nimport IMask from 'imask';\nimport { FloatingLabel } from './floatinglabel.component';\n\ninterface SelectRange {\n start: number,\n end: number\n}\n\nconst WmCursor = React.memo((props: {\n color: string,\n height: number\n}) => {\n const opacityAnimation = useRef(new Animated.Value(0.5)).current;\n const runAnimation = useCallback(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.2,\n duration: 500,\n useNativeDriver: true\n }).start(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.6,\n duration: 500,\n useNativeDriver: true\n }).start(runAnimation);\n });\n }, []);\n useEffect(() => {\n runAnimation();\n }, []);\n return (\n <Animated.View \n testID=\"wm-custom-cursor\"\n style={{\n backgroundColor: props.color,\n width: 2,\n marginHorizontal: 1,\n height: props.height,\n opacity: opacityAnimation\n }}></Animated.View>\n );\n});\n\nexport const WMTextInput = React.forwardRef((props: (TextInputProps & \n {allowContentSelection: boolean,\n displayformat: string,\n maskchar: string,\n floatingLabel: string\n floatingLabelStyle: TextStyle,\n activeFloatingLabelStyle: TextStyle,\n customDisplayValue?: string\n }), \n ref: ForwardedRef<TextInput>) => {\n const [selectRange, setSelectRange] = useState<SelectRange>(null as any);\n const [isInputFocused, setIsInputFocused] = useState(false);\n const [iMask, setIMask] = useState(null as any);\n const [displayCursor, setDisplayCursor] = useState(false);\n const value = useRef(props.value || '');\n const [x, forceUpdate] = useState(1);\n const [displayValue, setDisplayValue] = useState('');\n const element = useRef(null as any);\n // iMask initialization\n useEffect(() => {\n const iMask: any = props.displayformat ? new IMask.MaskedPattern({\n mask: props.displayformat,\n skipInvalid: true,\n lazy: false,\n definitions: {\n '9': /\\d/,\n 'A': /[a-zA-Z]/,\n 'a': /[a-z]/,\n '*': /\\w/\n }\n }) : null;\n if (iMask) {\n iMask.typedValue = value;\n setDisplayValue(iMask.displayValue)\n setIMask(iMask);\n }\n },[props.displayformat]);\n // set default value\n useEffect(() => {\n const defaultValue = props.defaultValue || props.value || '';\n if (defaultValue && !value.current) {\n value.current = defaultValue;\n onChangeText(defaultValue);\n }\n },[props.defaultValue, props.value]);\n // set cursor position in windows\n useEffect(() => {\n setTimeout(() => {\n if (Platform.OS === 'web' && (props.displayformat || props.maskchar)) {\n element?.current?.setSelectionRange(value.current.length, value.current.length);\n }\n }, 100);\n }, [value.current, props]);\n const onSelectionChange = useCallback((e: any) => {\n if (Platform.OS !== 'android') {\n return;\n }\n const selection = e?.nativeEvent?.selection;\n if (!props.allowContentSelection\n && selection\n && selection.end - selection.start > 0) {\n setSelectRange({\n start: value.current.length + 2,\n end: value.current.length + 2\n });\n } else if (selectRange && selectRange.end > 0){\n setSelectRange(null as any);\n }\n }, [props.allowContentSelection, value]);\n // when text changes\n const onChangeText = useCallback((text: string) => {\n if (!(iMask || props.maskchar)) {\n value.current = text;\n props.onChangeText && props.onChangeText(text);\n return;\n }\n let _value = value.current || '';\n if (value.current.length - text.length > 0) {\n _value = _value.substring(0, _value.length - (value.current.length - text.length));\n } else if (text.length - value.current.length > 0) {\n _value += text.slice(-1 * (text.length - value.current.length));\n }\n let formattedValue = _value;\n if(props.maskchar) {\n formattedValue = (_value.replace(/./g, props.maskchar));\n }\n if (iMask) {\n iMask.typedValue = _value;\n formattedValue = iMask.displayValue;\n }\n if (formattedValue !== displayValue) {\n value.current = _value;\n props.onChangeText && props.onChangeText(_value);\n }\n forceUpdate(x+ 1);\n setDisplayValue(formattedValue);\n }, [iMask, value, displayValue, props.onChangeText]);\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n const opts = {} as any;\n opts[valueExpr] = props.customDisplayValue ?? value.current;\n const textStyle = Object.assign({}, ...isArray(props.style) ? props.style: [props.style]);\n const hideInput = props.displayformat || props.maskchar;\n return (\n <>\n {props.floatingLabel ? (\n <FloatingLabel\n moveUp={!!(value.current || isInputFocused || displayValue)}\n label={props.floatingLabel ?? props.placeholder} \n style={{\n ...(props.floatingLabelStyle || []),\n ...(isInputFocused ? (props.activeFloatingLabelStyle || {}) : {})\n }}/>\n ) : null}\n <TextInput\n {...props}\n {...hideInput || props.customDisplayValue ? opts: {}}\n placeholder={props.floatingLabel || displayValue ? '' : props.placeholder }\n style={[props.style, hideInput ? {\n color: 'transparent', \n backgroundColor: 'transparent',\n borderColor: 'transparent',\n zIndex: 1\n } : {}]}\n onFocus={(e) => {\n props.onFocus?.(e);\n setIsInputFocused(true);\n setDisplayCursor(true);\n element.current = e.target;\n }}\n onBlur={(e) => {\n props?.onBlur?.(e);\n setIsInputFocused(false);\n setDisplayCursor(false);\n }}\n ref={ref}\n selection={selectRange}\n onSelectionChange={onSelectionChange}\n caretHidden={!!selectRange?.end}\n onChangeText={(text) => {\n onChangeText(text);\n }}\n {...hideInput ? {\n selectionColor: 'transparent',\n cursorColor: 'transparent',\n onChange : () => {}\n }: {}}\n contextMenuHidden={!props.allowContentSelection}\n ></TextInput>\n {\n hideInput ? (\n <View style={[props.style, {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n marginTop: -1 * (textStyle.height || textStyle.minHeight || 0)\n + (textStyle.marginTop || 0)}]}>\n <Text style={{ \n width: undefined,\n backgroundColor: 'transparent', \n borderColor: 'transparent',\n padding: 0,\n display: 'flex',\n color: textStyle.color,\n fontFamily: textStyle.fontFamily,\n fontSize: textStyle.fontSize,\n fontWeight: textStyle.fontWeight\n }}>\n {displayValue}\n </Text>\n {\n (displayCursor && !props.displayformat) ? React.createElement(WmCursor, {\n color: textStyle.color || '#000000',\n height: textStyle.fontSize || 14\n }) : null\n }\n </View>\n ) : null\n }\n </>\n );\n});"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrF,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAA6BC,IAAI,QAAQ,cAAc;AACnG,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,QAAQ,2BAA2B;AAOzD,MAAMC,QAAQ,gBAAGb,KAAK,CAACc,IAAI,CAAEC,KAG5B,IAAK;EACJ,MAAMC,gBAAgB,GAAGb,MAAM,CAAC,IAAIE,QAAQ,CAACY,KAAK,CAAC,GAAG,CAAC,CAAC,CAACC,OAAO;EAChE,MAAMC,YAAY,GAAGlB,WAAW,CAAC,MAAM;IACrCI,QAAQ,CAACe,MAAM,CAACJ,gBAAgB,EAAE;MAChCK,OAAO,EAAE,GAAG;MACZC,QAAQ,EAAE,GAAG;MACbC,eAAe,EAAE;IACnB,CAAC,CAAC,CAACC,KAAK,CAAC,MAAM;MACbnB,QAAQ,CAACe,MAAM,CAACJ,gBAAgB,EAAE;QAChCK,OAAO,EAAE,GAAG;QACZC,QAAQ,EAAE,GAAG;QACbC,eAAe,EAAE;MACnB,CAAC,CAAC,CAACC,KAAK,CAACL,YAAY,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EACNjB,SAAS,CAAC,MAAM;IACdiB,YAA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BC,SAAS,EAAE,CAAC,CAAC,IAAI5B,SAAS,CAACpD,MAAM,IAAIoD,SAAS,CAAC6B,SAAS,IAAI,CAAC,CAAC,IACzD7B,SAAS,CAAC4B,SAAS,IAAI,CAAC;IAAC,CAAC;EAAE,gBACjChH,KAAA,CAAAyB,aAAA,CAAClB,IAAI;IAACoB,KAAK,EAAE;MACXG,KAAK,EAAEoF,SAAS;MAChBtF,eAAe,EAAE,aAAa;MAC9BoE,WAAW,EAAE,aAAa;MAC1BmB,OAAO,EAAE,CAAC;MACVN,OAAO,EAAE,MAAM;MACfhF,KAAK,EAAEuD,SAAS,CAACvD,KAAK;MACtBuF,UAAU,EAAEhC,SAAS,CAACgC,UAAU;MAChCC,QAAQ,EAAEjC,SAAS,CAACiC,QAAQ;MAC5BC,UAAU,EAAElC,SAAS,CAACkC;IACtB;EAAE,GACDpE,YACG,CAAC,EAEJL,aAAa,IAAI,CAAC9B,KAAK,CAACsC,aAAa,gBAAIrD,KAAK,CAACyB,aAAa,CAACZ,QAAQ,EAAE;IACtEgB,KAAK,EAAEuD,SAAS,CAACvD,KAAK,IAAI,SAAS;IACnCG,MAAM,EAAEoD,SAAS,CAACiC,QAAQ,IAAI;EAChC,CAAC,CAAC,GAAG,IAEH,CAAC,GACL,IAEN,CAAC;AAET,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useRef","useState","Animated","Platform","Text","TextInput","View","isArray","IMask","FloatingLabel","WmCursor","memo","props","opacityAnimation","Value","current","runAnimation","timing","toValue","duration","useNativeDriver","start","createElement","testID","style","backgroundColor","color","width","marginHorizontal","height","opacity","WMTextInput","forwardRef","ref","_props$customDisplayV","_props$floatingLabel","selectRange","setSelectRange","iMask","setIMask","displayCursor","setDisplayCursor","value","x","forceUpdate","displayValue","setDisplayValue","element","displayformat","MaskedPattern","mask","skipInvalid","lazy","definitions","typedValue","defaultValue","onChangeText","setTimeout","OS","maskchar","_element$current","setSelectionRange","length","onSelectionChange","e","_e$nativeEvent","selection","nativeEvent","allowContentSelection","end","text","_value","substring","slice","formattedValue","replace","valueExpr","opts","customDisplayValue","textStyle","Object","assign","hideInput","Fragment","background","floatingLabel","moveUp","isInputFocused","label","placeholder","floatingLabelStyle","activeFloatingLabelStyle","_extends","borderColor","zIndex","onFocus","_props$onFocus","call","target","onBlur","_props$onBlur","caretHidden","autoCapitalize","toUpperCase","selectionColor","cursorColor","onChange","contextMenuHidden","display","flexDirection","alignItems","marginTop","minHeight","undefined","padding","fontFamily","fontSize","fontWeight"],"sources":["textinput.component.tsx"],"sourcesContent":["import React, { ForwardedRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { Animated, Platform, Text, TextInput, TextInputProps, TextStyle, View } from 'react-native';\nimport { isArray } from 'lodash';\nimport IMask from 'imask';\nimport { FloatingLabel } from './floatinglabel.component';\n\ninterface SelectRange {\n start: number,\n end: number\n}\n\nconst WmCursor = React.memo((props: {\n color: string,\n height: number\n}) => {\n const opacityAnimation = useRef(new Animated.Value(0.5)).current;\n const runAnimation = useCallback(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.2,\n duration: 500,\n useNativeDriver: true\n }).start(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.6,\n duration: 500,\n useNativeDriver: true\n }).start(runAnimation);\n });\n }, []);\n useEffect(() => {\n runAnimation();\n }, []);\n return (\n <Animated.View \n testID=\"wm-custom-cursor\"\n style={{\n backgroundColor: props.color,\n width: 2,\n marginHorizontal: 1,\n height: props.height,\n opacity: opacityAnimation\n }}></Animated.View>\n );\n});\n\nexport const WMTextInput = React.forwardRef((props: (TextInputProps & \n {allowContentSelection: boolean,\n displayformat: string,\n maskchar: string,\n floatingLabel: string\n floatingLabelStyle: TextStyle,\n activeFloatingLabelStyle: TextStyle,\n customDisplayValue?: string,\n isInputFocused: boolean\n autoCapitalize?: string,\n background?: React.ReactNode\n }), \n ref: ForwardedRef<TextInput>) => {\n const [selectRange, setSelectRange] = useState<SelectRange>(null as any);\n const [iMask, setIMask] = useState(null as any);\n const [displayCursor, setDisplayCursor] = useState(false);\n const value = useRef(props.value || '');\n const [x, forceUpdate] = useState(1);\n const [displayValue, setDisplayValue] = useState('');\n const element = useRef(null as any);\n // iMask initialization\n useEffect(() => {\n const iMask: any = props.displayformat ? new IMask.MaskedPattern({\n mask: props.displayformat,\n skipInvalid: true,\n lazy: false,\n definitions: {\n '9': /\\d/,\n 'A': /[a-zA-Z]/,\n 'a': /[a-z]/,\n '*': /\\w/\n }\n }) : null;\n if (iMask) {\n iMask.typedValue = value;\n setDisplayValue(iMask.displayValue)\n setIMask(iMask);\n }\n },[props.displayformat]);\n // set default value\n useEffect(() => {\n const defaultValue = props.defaultValue || props.value || '';\n if (defaultValue && !value.current) {\n value.current = defaultValue;\n onChangeText(defaultValue);\n }\n },[props.defaultValue, props.value]);\n // set cursor position in windows\n useEffect(() => {\n setTimeout(() => {\n if (Platform.OS === 'web' && (props.displayformat || props.maskchar)) {\n element?.current?.setSelectionRange(value.current.length, value.current.length);\n }\n }, 100);\n }, [value.current, props]);\n const onSelectionChange = useCallback((e: any) => {\n if (Platform.OS !== 'android') {\n return;\n }\n const selection = e?.nativeEvent?.selection;\n if (!props.allowContentSelection\n && selection\n && selection.end - selection.start > 0) {\n setSelectRange({\n start: value.current.length + 2,\n end: value.current.length + 2\n });\n } else if (selectRange && selectRange.end > 0){\n setSelectRange(null as any);\n }\n }, [props.allowContentSelection, value]);\n // when text changes\n const onChangeText = useCallback((text: string) => {\n if (!(iMask || props.maskchar)) {\n value.current = text;\n props.onChangeText && props.onChangeText(text);\n return;\n }\n let _value = value.current || '';\n if (value.current.length - text.length > 0) {\n _value = _value.substring(0, _value.length - (value.current.length - text.length));\n } else if (text.length - value.current.length > 0) {\n _value += text.slice(-1 * (text.length - value.current.length));\n }\n let formattedValue = _value;\n if(props.maskchar) {\n formattedValue = (_value.replace(/./g, props.maskchar));\n }\n if (iMask) {\n iMask.typedValue = _value;\n formattedValue = iMask.displayValue;\n }\n if (formattedValue !== displayValue) {\n value.current = _value;\n props.onChangeText && props.onChangeText(_value);\n }\n forceUpdate(x+ 1);\n setDisplayValue(formattedValue);\n }, [iMask, value, displayValue, props.onChangeText]);\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n const opts = {} as any;\n opts[valueExpr] = props.customDisplayValue ?? value.current;\n const textStyle = Object.assign({}, ...isArray(props.style) ? props.style: [props.style]);\n const hideInput = props.displayformat || props.maskchar;\n return (\n <>\n {props.background}\n {props.floatingLabel ? (\n <FloatingLabel\n moveUp={!!(value.current || props.isInputFocused || displayValue)}\n label={props.floatingLabel ?? props.placeholder} \n style={{\n ...(props.floatingLabelStyle || []),\n ...(props.isInputFocused ? (props.activeFloatingLabelStyle || {}) : {})\n }}/>\n ) : null}\n <TextInput\n {...props}\n {...hideInput || props.customDisplayValue ? opts: {}}\n placeholder={props.floatingLabel || displayValue ? '' : props.placeholder }\n style={[props.style, hideInput ? {\n color: 'transparent', \n backgroundColor: 'transparent',\n borderColor: 'transparent',\n zIndex: 1\n } : {}]}\n onFocus={(e) => {\n props.onFocus?.(e);\n setDisplayCursor(true);\n element.current = e.target;\n }}\n onBlur={(e) => {\n props?.onBlur?.(e);\n setDisplayCursor(false);\n }}\n ref={ref}\n selection={selectRange}\n onSelectionChange={onSelectionChange}\n caretHidden={!!selectRange?.end}\n onChangeText={(text) => {\n if(props.autoCapitalize && props.autoCapitalize === 'characters') {\n onChangeText(text.toUpperCase());\n return;\n }\n onChangeText(text);\n }}\n {...hideInput ? {\n selectionColor: 'transparent',\n cursorColor: 'transparent',\n onChange : () => {}\n }: {}}\n contextMenuHidden={!props.allowContentSelection}\n autoCapitalize={props.autoCapitalize}\n ></TextInput>\n {\n hideInput ? (\n <View style={[props.style, {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n marginTop: -1 * (textStyle.height || textStyle.minHeight || 0)\n + (textStyle.marginTop || 0)}]}>\n <Text style={{ \n width: undefined,\n backgroundColor: 'transparent', \n borderColor: 'transparent',\n padding: 0,\n display: 'flex',\n color: textStyle.color,\n fontFamily: textStyle.fontFamily,\n fontSize: textStyle.fontSize,\n fontWeight: textStyle.fontWeight\n }}>\n {displayValue}\n </Text>\n {\n (displayCursor && !props.displayformat) ? React.createElement(WmCursor, {\n color: textStyle.color || '#000000',\n height: textStyle.fontSize || 14\n }) : null\n }\n </View>\n ) : null\n }\n </>\n );\n});"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrF,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAA6BC,IAAI,QAAQ,cAAc;AACnG,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,QAAQ,2BAA2B;AAOzD,MAAMC,QAAQ,gBAAGb,KAAK,CAACc,IAAI,CAAEC,KAG5B,IAAK;EACJ,MAAMC,gBAAgB,GAAGb,MAAM,CAAC,IAAIE,QAAQ,CAACY,KAAK,CAAC,GAAG,CAAC,CAAC,CAACC,OAAO;EAChE,MAAMC,YAAY,GAAGlB,WAAW,CAAC,MAAM;IACrCI,QAAQ,CAACe,MAAM,CAACJ,gBAAgB,EAAE;MAChCK,OAAO,EAAE,GAAG;MACZC,QAAQ,EAAE,GAAG;MACbC,eAAe,EAAE;IACnB,CAAC,CAAC,CAACC,KAAK,CAAC,MAAM;MACbnB,QAAQ,CAACe,MAAM,CAACJ,gBAAgB,EAAE;QAChCK,OAAO,EAAE,GAAG;QACZC,QAAQ,EAAE,GAAG;QACbC,eAAe,EAAE;MACnB,CAAC,CAAC,CAACC,KAAK,CAACL,YAAY,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EACNjB,SAAS,CAAC,MAAM;IACdiB,YAAY,CAAC,CAAC;EAChB,CAAC,EAAE,EAAE,CAAC;EACN,oBACEnB,KAAA,CAAAyB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AAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,SAAS,EAAE,CAAC,CAAC,IAAIhC,SAAS,CAAClD,MAAM,IAAIkD,SAAS,CAACiC,SAAS,IAAI,CAAC,CAAC,IACzDjC,SAAS,CAACgC,SAAS,IAAI,CAAC;IAAC,CAAC;EAAE,gBACjClH,KAAA,CAAAyB,aAAA,CAAClB,IAAI;IAACoB,KAAK,EAAE;MACXG,KAAK,EAAEsF,SAAS;MAChBxF,eAAe,EAAE,aAAa;MAC9BoE,WAAW,EAAE,aAAa;MAC1BqB,OAAO,EAAE,CAAC;MACVN,OAAO,EAAE,MAAM;MACflF,KAAK,EAAEqD,SAAS,CAACrD,KAAK;MACtByF,UAAU,EAAEpC,SAAS,CAACoC,UAAU;MAChCC,QAAQ,EAAErC,SAAS,CAACqC,QAAQ;MAC5BC,UAAU,EAAEtC,SAAS,CAACsC;IACtB;EAAE,GACDxE,YACG,CAAC,EAEJL,aAAa,IAAI,CAAC5B,KAAK,CAACoC,aAAa,gBAAInD,KAAK,CAACyB,aAAa,CAACZ,QAAQ,EAAE;IACtEgB,KAAK,EAAEqD,SAAS,CAACrD,KAAK,IAAI,SAAS;IACnCG,MAAM,EAAEkD,SAAS,CAACqC,QAAQ,IAAI;EAChC,CAAC,CAAC,GAAG,IAEH,CAAC,GACL,IAEN,CAAC;AAET,CAAC,CAAC","ignoreList":[]}
@@ -72,7 +72,6 @@ export class PropsProvider {
72
72
 
73
73
  // sets the property. But, value gets overriden when the original prop changes.
74
74
  set(name, value) {
75
- this.oldProps[name] = value;
76
75
  const oldValue = this.oldProps[name];
77
76
  if (oldValue !== value) {
78
77
  this.oldProps[name] = value;
@@ -1 +1 @@
1
- {"version":3,"names":["assign","isNil","PropsProvider","constructor","defaultProps","initprops","onChange","name","$new","$old","_defineProperty","Object","keys","forEach","k","propertyNames","propsProxy","Proxy","get","target","prop","receiver","propName","toString","value","overriddenProps","hasOwnProperty","oldProps","set","has","isDirty","oldValue","setDefault","overrideProp","check","nextProps","result","reduce","b","flag"],"sources":["props.provider.ts"],"sourcesContent":["import { assign, isNil } from \"lodash-es\";\nimport { BaseProps } from \"./base.component\";\n\nexport class PropsProvider<T extends BaseProps> {\n private oldProps: any = {};\n private overriddenProps: any = {};\n private propsProxy: T;\n private isDirty = false;\n private propertyNames = {} as any;\n\n constructor(private defaultProps: T, private initprops: T, private onChange = (name: string, $new: any, $old: any) => {}) {\n this.initprops = this.initprops || {};\n Object.keys(defaultProps).forEach(k => this.propertyNames[k] = true);\n Object.keys(initprops).forEach(k => this.propertyNames[k] = true);\n //@ts-ignore\n this.propsProxy = (new Proxy({}, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n let value = (this.defaultProps as any)[propName];\n if (this.overriddenProps.hasOwnProperty(propName)) {\n value = this.overriddenProps[propName];\n } else if (this.oldProps.hasOwnProperty(propName)) {\n value = this.oldProps[propName];\n }\n return value;\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (!this.has(propName)) {\n return true;\n }\n this.isDirty = this.isDirty || this.overriddenProps[propName] !== value;\n this.overriddenProps[propName] = value;\n if (this.oldProps[propName] !== value) {\n const oldValue = this.oldProps[propName];\n this.onChange(propName, value, oldValue);\n this.oldProps[propName] = value;\n }\n return true;\n }\n }));\n }\n\n setDefault(propName: string, value: any) {\n (this.defaultProps as any)[propName] = value;\n }\n overrideProp(propName: string, value: any) {\n (this.overriddenProps as any)[propName] = value;\n this.isDirty = true;\n }\n\n check(nextProps?: T) {\n if (!nextProps) {\n nextProps = assign({}, this.defaultProps, this.initprops);\n }\n const result = Object.keys(nextProps).reduce((b, k) => {\n let flag = false;\n //@ts-ignore\n const value = nextProps[k];\n const oldValue = this.oldProps[k];\n if (isNil(this.overriddenProps[k])\n && (!this.oldProps.hasOwnProperty(k)\n || this.oldProps[k] !== value)) {\n this.oldProps[k] = value;\n this.onChange(k, value, oldValue);\n flag = true;\n }\n return b || flag;\n }, false) || this.isDirty;\n\n this.isDirty = false;\n return result;\n }\n\n // sets the property. But, value gets overriden when the original prop changes.\n set(name: string, value: any) {\n this.oldProps[name] = value;\n const oldValue = this.oldProps[name];\n if(oldValue !== value) {\n this.oldProps[name] = value;\n this.onChange(name, value, oldValue);\n }\n }\n\n has(propName: string) {\n return !!this.propertyNames[propName];\n }\n\n get() {\n return this.propsProxy;\n }\n}\n"],"mappings":";;;AAAA,SAASA,MAAM,EAAEC,KAAK,QAAQ,WAAW;AAGzC,OAAO,MAAMC,aAAa,CAAsB;EAO5CC,WAAWA,CAASC,YAAe,EAAUC,SAAY,EAAUC,QAAQ,GAAGA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,KAAK,CAAC,CAAC,EAAE;IAAA,KAAtGL,YAAe,GAAfA,YAAe;IAAA,KAAUC,SAAY,GAAZA,SAAY;IAAA,KAAUC,QAAQ,GAARA,QAAQ;IAAAI,eAAA,mBANnD,CAAC,CAAC;IAAAA,eAAA,0BACK,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA,kBAEf,KAAK;IAAAA,eAAA,wBACC,CAAC,CAAC;IAGtB,IAAI,CAACL,SAAS,GAAG,IAAI,CAACA,SAAS,IAAI,CAAC,CAAC;IACrCM,MAAM,CAACC,IAAI,CAACR,YAAY,CAAC,CAACS,OAAO,CAACC,CAAC,IAAI,IAAI,CAACC,aAAa,CAACD,CAAC,CAAC,GAAG,IAAI,CAAC;IACpEH,MAAM,CAACC,IAAI,CAACP,SAAS,CAAC,CAACQ,OAAO,CAACC,CAAC,IAAI,IAAI,CAACC,aAAa,CAACD,CAAC,CAAC,GAAG,IAAI,CAAC;IACjE;IACA,IAAI,CAACE,UAAU,GAAI,IAAIC,KAAK,CAAC,CAAC,CAAC,EAAE;MAC7BC,GAAG,EAAEA,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,KAAU;QAClC,MAAMC,QAAQ,GAAGF,IAAI,CAACG,QAAQ,CAAC,CAAC;QAChC,IAAIC,KAAK,GAAI,IAAI,CAAC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,CAACG,QAAQ,CAACpB,IAAI,CAAC,GAAGiB,KAAK;MAC3B,IAAI,CAAClB,QAAQ,CAACC,IAAI,EAAEiB,KAAK,EAAEO,QAAQ,CAAC;IACxC;EACJ;EAEAF,GAAGA,CAACP,QAAgB,EAAE;IAClB,OAAO,CAAC,CAAC,IAAI,CAACP,aAAa,CAACO,QAAQ,CAAC;EACzC;EAEAJ,GAAGA,CAAA,EAAG;IACF,OAAO,IAAI,CAACF,UAAU;EAC1B;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["assign","isNil","PropsProvider","constructor","defaultProps","initprops","onChange","name","$new","$old","_defineProperty","Object","keys","forEach","k","propertyNames","propsProxy","Proxy","get","target","prop","receiver","propName","toString","value","overriddenProps","hasOwnProperty","oldProps","set","has","isDirty","oldValue","setDefault","overrideProp","check","nextProps","result","reduce","b","flag"],"sources":["props.provider.ts"],"sourcesContent":["import { assign, isNil } from \"lodash-es\";\nimport { BaseProps } from \"./base.component\";\n\nexport class PropsProvider<T extends BaseProps> {\n private oldProps: any = {};\n private overriddenProps: any = {};\n private propsProxy: T;\n private isDirty = false;\n private propertyNames = {} as any;\n\n constructor(private defaultProps: T, private initprops: T, private onChange = (name: string, $new: any, $old: any) => {}) {\n this.initprops = this.initprops || {};\n Object.keys(defaultProps).forEach(k => this.propertyNames[k] = true);\n Object.keys(initprops).forEach(k => this.propertyNames[k] = true);\n //@ts-ignore\n this.propsProxy = (new Proxy({}, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n let value = (this.defaultProps as any)[propName];\n if (this.overriddenProps.hasOwnProperty(propName)) {\n value = this.overriddenProps[propName];\n } else if (this.oldProps.hasOwnProperty(propName)) {\n value = this.oldProps[propName];\n }\n return value;\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (!this.has(propName)) {\n return true;\n }\n this.isDirty = this.isDirty || this.overriddenProps[propName] !== value;\n this.overriddenProps[propName] = value;\n if (this.oldProps[propName] !== value) {\n const oldValue = this.oldProps[propName];\n this.onChange(propName, value, oldValue);\n this.oldProps[propName] = value;\n }\n return true;\n }\n }));\n }\n\n setDefault(propName: string, value: any) {\n (this.defaultProps as any)[propName] = value;\n }\n overrideProp(propName: string, value: any) {\n (this.overriddenProps as any)[propName] = value;\n this.isDirty = true;\n }\n\n check(nextProps?: T) {\n if (!nextProps) {\n nextProps = assign({}, this.defaultProps, this.initprops);\n }\n const result = Object.keys(nextProps).reduce((b, k) => {\n let flag = false;\n //@ts-ignore\n const value = nextProps[k];\n const oldValue = this.oldProps[k];\n if (isNil(this.overriddenProps[k])\n && (!this.oldProps.hasOwnProperty(k)\n || this.oldProps[k] !== value)) {\n this.oldProps[k] = value;\n this.onChange(k, value, oldValue);\n flag = true;\n }\n return b || flag;\n }, false) || this.isDirty;\n\n this.isDirty = false;\n return result;\n }\n\n // sets the property. But, value gets overriden when the original prop changes.\n set(name: string, value: any) {\n const oldValue = this.oldProps[name];\n if(oldValue !== value) {\n this.oldProps[name] = value;\n this.onChange(name, value, oldValue);\n }\n }\n\n has(propName: string) {\n return !!this.propertyNames[propName];\n }\n\n get() {\n return this.propsProxy;\n }\n}\n"],"mappings":";;;AAAA,SAASA,MAAM,EAAEC,KAAK,QAAQ,WAAW;AAGzC,OAAO,MAAMC,aAAa,CAAsB;EAO5CC,WAAWA,CAASC,YAAe,EAAUC,SAAY,EAAUC,QAAQ,GAAGA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,KAAK,CAAC,CAAC,EAAE;IAAA,KAAtGL,YAAe,GAAfA,YAAe;IAAA,KAAUC,SAAY,GAAZA,SAAY;IAAA,KAAUC,QAAQ,GAARA,QAAQ;IAAAI,eAAA,mBANnD,CAAC,CAAC;IAAAA,eAAA,0BACK,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA,kBAEf,KAAK;IAAAA,eAAA,wBACC,CAAC,CAAC;IAGtB,IAAI,CAACL,SAAS,GAAG,IAAI,CAACA,SAAS,IAAI,CAAC,CAAC;IACrCM,MAAM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AAI,CAAClB,QAAQ,CAACQ,CAAC,EAAEU,KAAK,EAAEO,QAAQ,CAAC;QACjCQ,IAAI,GAAG,IAAI;MACf;MACA,OAAOD,CAAC,IAAIC,IAAI;IACpB,CAAC,EAAE,KAAK,CAAC,IAAI,IAAI,CAACT,OAAO;IAE3B,IAAI,CAACA,OAAO,GAAG,KAAK;IACpB,OAAOM,MAAM;EACf;;EAEA;EACAR,GAAGA,CAACrB,IAAY,EAAEiB,KAAU,EAAE;IAC1B,MAAMO,QAAQ,GAAG,IAAI,CAACJ,QAAQ,CAACpB,IAAI,CAAC;IACpC,IAAGwB,QAAQ,KAAKP,KAAK,EAAE;MACnB,IAAI,CAACG,QAAQ,CAACpB,IAAI,CAAC,GAAGiB,KAAK;MAC3B,IAAI,CAAClB,QAAQ,CAACC,IAAI,EAAEiB,KAAK,EAAEO,QAAQ,CAAC;IACxC;EACJ;EAEAF,GAAGA,CAACP,QAAgB,EAAE;IAClB,OAAO,CAAC,CAAC,IAAI,CAACP,aAAa,CAACO,QAAQ,CAAC;EACzC;EAEAJ,GAAGA,CAAA,EAAG;IACF,OAAO,IAAI,CAACF,UAAU;EAC1B;AACJ","ignoreList":[]}
@@ -18,6 +18,21 @@ export class StorageService {
18
18
  removeItem(key, callback) {
19
19
  return AsyncStorage.removeItem(this.getKey(key), callback);
20
20
  }
21
+ async getAll() {
22
+ const keys = await AsyncStorage.getAllKeys();
23
+ const entries = await Promise.all(keys.map(async k => {
24
+ const v = await AsyncStorage.getItem(k);
25
+ return {
26
+ key: k,
27
+ value: v
28
+ };
29
+ }));
30
+ const o = {};
31
+ entries.forEach(e => {
32
+ o[e.key] = e.value;
33
+ });
34
+ return o;
35
+ }
21
36
  }
22
37
  export default new StorageService();
23
38
  //# sourceMappingURL=storage.service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AsyncStorage","StorageService","constructor","_defineProperty","getKey","key","target","getItem","callback","setItem","value","removeItem"],"sources":["storage.service.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\n\nexport class StorageService {\n public target = 'GLOBAL';\n\n private getKey(key: string) {\n return `${this.target}_${key}`;\n }\n \n getItem(key: string, callback?: (error?: Error | null, result?: string | null) => void): Promise<string | null> {\n return AsyncStorage.getItem(this.getKey(key), callback);\n }\n setItem(key: string, value: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.setItem(this.getKey(key), value, callback);\n }\n removeItem(key: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.removeItem(this.getKey(key), callback);\n }\n}\n\nexport default new StorageService();\n"],"mappings":";;;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAEpE,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACV,QAAQ;EAAA;EAEhBC,MAAMA,CAACC,GAAW,EAAE;IAC1B,OAAO,GAAG,IAAI,CAACC,MAAM,IAAID,GAAG,EAAE;EAChC;EAEAE,OAAOA,CAACF,GAAW,EAAEG,QAAiE,EAA0B;IAC9G,OAAOR,YAAY,CAACO,OAAO,CAAC,IAAI,CAACH,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EACzD;EACAC,OAAOA,CAACJ,GAAW,EAAEK,KAAa,EAAEF,QAAyC,EAAiB;IAC5F,OAAOR,YAAY,CAACS,OAAO,CAAC,IAAI,CAACL,MAAM,CAACC,GAAG,CAAC,EAAEK,KAAK,EAAEF,QAAQ,CAAC;EAChE;EACAG,UAAUA,CAACN,GAAW,EAAEG,QAAyC,EAAiB;IAChF,OAAOR,YAAY,CAACW,UAAU,CAAC,IAAI,CAACP,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EAC5D;AACF;AAEA,eAAe,IAAIP,cAAc,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AsyncStorage","StorageService","constructor","_defineProperty","getKey","key","target","getItem","callback","setItem","value","removeItem","getAll","keys","getAllKeys","entries","Promise","all","map","k","v","o","forEach","e"],"sources":["storage.service.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\n\nexport class StorageService {\n public target = 'GLOBAL';\n\n private getKey(key: string) {\n return `${this.target}_${key}`;\n }\n \n getItem(key: string, callback?: (error?: Error | null, result?: string | null) => void): Promise<string | null> {\n return AsyncStorage.getItem(this.getKey(key), callback);\n }\n setItem(key: string, value: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.setItem(this.getKey(key), value, callback);\n }\n removeItem(key: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.removeItem(this.getKey(key), callback);\n }\n\n async getAll() {\n const keys = await AsyncStorage.getAllKeys();\n const entries = await Promise.all(keys.map(async k => {\n const v = await AsyncStorage.getItem(k);\n return {\n key: k,\n value: v\n };\n }));\n const o = {} as any;\n entries.forEach((e) => {\n o[e.key] = e.value;\n });\n return o;\n }\n}\n\nexport default new StorageService();\n"],"mappings":";;;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAEpE,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACV,QAAQ;EAAA;EAEhBC,MAAMA,CAACC,GAAW,EAAE;IAC1B,OAAO,GAAG,IAAI,CAACC,MAAM,IAAID,GAAG,EAAE;EAChC;EAEAE,OAAOA,CAACF,GAAW,EAAEG,QAAiE,EAA0B;IAC9G,OAAOR,YAAY,CAACO,OAAO,CAAC,IAAI,CAACH,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EACzD;EACAC,OAAOA,CAACJ,GAAW,EAAEK,KAAa,EAAEF,QAAyC,EAAiB;IAC5F,OAAOR,YAAY,CAACS,OAAO,CAAC,IAAI,CAACL,MAAM,CAACC,GAAG,CAAC,EAAEK,KAAK,EAAEF,QAAQ,CAAC;EAChE;EACAG,UAAUA,CAACN,GAAW,EAAEG,QAAyC,EAAiB;IAChF,OAAOR,YAAY,CAACW,UAAU,CAAC,IAAI,CAACP,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EAC5D;EAEA,MAAMI,MAAMA,CAAA,EAAG;IACb,MAAMC,IAAI,GAAG,MAAMb,YAAY,CAACc,UAAU,CAAC,CAAC;IAC5C,MAAMC,OAAO,GAAG,MAAMC,OAAO,CAACC,GAAG,CAACJ,IAAI,CAACK,GAAG,CAAC,MAAMC,CAAC,IAAI;MACpD,MAAMC,CAAC,GAAG,MAAMpB,YAAY,CAACO,OAAO,CAACY,CAAC,CAAC;MACvC,OAAO;QACLd,GAAG,EAAEc,CAAC;QACNT,KAAK,EAAEU;MACT,CAAC;IACH,CAAC,CAAC,CAAC;IACH,MAAMC,CAAC,GAAG,CAAC,CAAQ;IACnBN,OAAO,CAACO,OAAO,CAAEC,CAAC,IAAK;MACrBF,CAAC,CAACE,CAAC,CAAClB,GAAG,CAAC,GAAGkB,CAAC,CAACb,KAAK;IACpB,CAAC,CAAC;IACF,OAAOW,CAAC;EACV;AACF;AAEA,eAAe,IAAIpB,cAAc,CAAC,CAAC","ignoreList":[]}
@@ -9,6 +9,7 @@ import injector from "./injector";
9
9
  import { TouchableRipple } from "react-native-paper";
10
10
  export const TappableContext = /*#__PURE__*/React.createContext(null);
11
11
  import { UIPreferencesConsumer } from "./ui-preferences.context";
12
+ export const ParentTappableContext = /*#__PURE__*/React.createContext(null);
12
13
  export class SyntheticEvent {
13
14
  constructor() {
14
15
  // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent
@@ -131,10 +132,15 @@ export class Tappable extends React.Component {
131
132
  };
132
133
  if (target !== null && target !== void 0 && target.props.onTap || target !== null && target !== void 0 && target.props.onLongtap || target !== null && target !== void 0 && target.props.onDoubletap || this.props.onTap || this.props.onLongTap || this.props.onDoubleTap) {
133
134
  return /*#__PURE__*/React.createElement(UIPreferencesConsumer, null, preferences => {
134
- return preferences.enableRipple != false ? /*#__PURE__*/React.createElement(TouchableRipple, _extends({
135
- rippleColor: this.props.rippleColor,
136
- borderless: true
137
- }, commonProps), /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children)) : /*#__PURE__*/React.createElement(TouchableOpacity, commonProps, /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children));
135
+ return preferences.enableRipple != false ? /*#__PURE__*/React.createElement(ParentTappableContext.Consumer, null, parent => {
136
+ this.setParent(parent);
137
+ return /*#__PURE__*/React.createElement(ParentTappableContext.Provider, {
138
+ value: this
139
+ }, /*#__PURE__*/React.createElement(TouchableRipple, _extends({
140
+ rippleColor: this.props.rippleColor,
141
+ borderless: true
142
+ }, commonProps), /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children)));
143
+ }) : /*#__PURE__*/React.createElement(TouchableOpacity, commonProps, /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children));
138
144
  });
139
145
  }
140
146
  return /*#__PURE__*/React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","View","TouchableOpacity","get","injector","TouchableRipple","TappableContext","createContext","UIPreferencesConsumer","SyntheticEvent","constructor","_defineProperty","stopPropagation","propagationEnabled","Tappable","Component","props","triggerTap","e","_this$parent","target","onTap","invokeEventCallback","parent","onPress","_this$props$target","lastPress","Date","now","onTouchStart","currentTime","tapDelta","lastTap","isLongTap","_injector$FOCUSED_ELE","FOCUSED_ELEMENT","blur","lastDoubleTap","onDoubleTap","setTimeout","_this$parent2","onLongTap","_this$props$target2","_this$parent3","onPressOut","onTouchEnd","_this$props$target3","_this$parent4","setParent","render","commonProps","OS","accessibilityLabel","testID","accessibilityProps","disabled","proxy","style","styles","_e$target","tagName","onLongPress","onLongtap","onDoubletap","createElement","preferences","enableRipple","_extends","rippleColor","borderless","Fragment","children"],"sources":["tappable.component.tsx"],"sourcesContent":["import { BaseComponent } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport React from \"react\";\nimport { GestureResponderEvent, Platform, View, TouchableOpacity } from \"react-native\";\nimport { get } from \"lodash\";\nimport injector from \"./injector\";\nimport { TouchableRipple } from \"react-native-paper\";\nimport ThemeVariables from \"../styles/theme.variables\";\nimport { isDefined } from \"./utils\";\n\nexport const TappableContext = React.createContext<Tappable>(null as any);\nimport { UIPreferencesConsumer, UI_PREFERENCES } from \"./ui-preferences.context\";\n\ninterface TappableProps {\n testID?: string;\n children?: any\n styles?: any;\n target?: BaseComponent<any, any, any>;\n onTap?: (e: any) => void;\n onLongTap?: (e: any) => void; \n onDoubleTap?: (e: any) => void;\n onTouchStart? : (e: any) => void;\n onTouchEnd? : (e: any) => void;\n rippleColor?: string;\n accessibilityProps?: any;\n}\n\nexport class SyntheticEvent {\n // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent\n propagationEnabled = true;\n \n constructor() {\n\n }\n\n stopPropagation() {\n this.propagationEnabled = false;\n }\n}\n\nexport class Tappable extends React.Component<TappableProps, any> {\n private lastPress = 0;\n private lastTap = 0;\n private lastDoubleTap = 0;\n private isLongTap = false;\n private parent:Tappable = null as any;\n \n constructor(props: any) {\n super(props);\n }\n\n async triggerTap(e = new SyntheticEvent()) {\n if (!e.propagationEnabled) {\n return;\n }\n const target = this.props.target;\n if (this.props.onTap) {\n await this.props.onTap(e);\n } else {\n await target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.triggerTap(e);\n }\n\n onPress(e: SyntheticEvent): void { \n this.lastPress = Date.now();\n const target = this.props.target;\n this.props.onTouchStart && this.props.onTouchStart(e);\n this.props.target?.invokeEventCallback('onTouchstart', [e, this.props.target]);\n const currentTime = Date.now();\n const tapDelta = currentTime - this.lastTap;\n if (this.isLongTap) {\n this.isLongTap = false;\n return;\n }\n if (e.propagationEnabled) {\n injector.FOCUSED_ELEMENT.get()?.blur();\n if(this.lastDoubleTap !== this.lastTap \n && tapDelta < 500) {\n this.props.onDoubleTap && this.props.onDoubleTap(e);\n setTimeout(() => {\n target?.invokeEventCallback('onDoubletap', [e, target]);\n }, 200);\n this.lastDoubleTap = currentTime;\n }\n setTimeout(() => {\n if (!e.propagationEnabled) {\n return;\n }\n if (this.props.onTap) {\n this.props.onTap(e);\n } else {\n target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.onPress(e);\n }, 200);\n this.lastTap = currentTime;\n }\n }\n\n onLongTap(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n }\n this.props.onLongTap && this.props.onLongTap(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onLongtap', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = true;\n }\n \n onPressOut(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n } \n this.props.onTouchEnd && this.props.onTouchEnd(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onTouchend', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = false;\n }\n private setParent(parent: Tappable) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n }\n }\n\n render() {\n const target = this.props.target;\n const commonProps = {\n ...(Platform.OS === 'android' || Platform.OS === 'web') ? {\n accessibilityLabel: this.props.testID,\n testID: this.props.testID\n }: {\n // accessible: false,\n testID: this.props.testID\n },\n ...this.props.accessibilityProps,\n disabled:get(target?.proxy, 'disabled'),\n style:this.props.styles,\n onPress:(e?: GestureResponderEvent) => {\n if ((e?.target as any)?.tagName === 'INPUT') {\n return;\n }\n this.onPress(new SyntheticEvent())\n },\n onLongPress:(e?: GestureResponderEvent) => this.onLongTap(new SyntheticEvent()),\n onPressOut:(e?: GestureResponderEvent) => this.onPressOut(new SyntheticEvent())\n };\n if (target?.props.onTap \n || target?.props.onLongtap \n || target?.props.onDoubletap \n || this.props.onTap \n || this.props.onLongTap \n || this.props.onDoubleTap) {\n return (\n <UIPreferencesConsumer>\n {(preferences: UI_PREFERENCES) => {\n return preferences.enableRipple != false ? (\n <TouchableRipple rippleColor={this.props.rippleColor} borderless={true} {...commonProps}>\n <>{this.props.children}</>\n </TouchableRipple>): (\n <TouchableOpacity {...commonProps}>\n <>{this.props.children}</>\n </TouchableOpacity>);\n }}\n </U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QAAA,QAAG,IAAI,CAACtD,KAAK,CAACuD,QAAW,CACZ,CAAC,gBAClBxE,KAAA,CAAAiE,aAAA,CAAC9D,gBAAgB,EAAKgD,WAAW,eAC7BnD,KAAA,CAAAiE,aAAA,CAAAjE,KAAA,CAAAuE,QAAA,QAAG,IAAI,CAACtD,KAAK,CAACuD,QAAW,CACX,CAAE;MACxB,CACmB,CAAC;IAE5B;IACA,oBAAQxE,KAAA,CAAAiE,aAAA,CAAC/D,IAAI;MAACwD,KAAK,EAAE,IAAI,CAACzC,KAAK,CAAC0C;IAAO,GAAE,IAAI,CAAC1C,KAAK,CAACuD,QAAe,CAAC;EACxE;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","View","TouchableOpacity","get","injector","TouchableRipple","TappableContext","createContext","UIPreferencesConsumer","ParentTappableContext","SyntheticEvent","constructor","_defineProperty","stopPropagation","propagationEnabled","Tappable","Component","props","triggerTap","e","_this$parent","target","onTap","invokeEventCallback","parent","onPress","_this$props$target","lastPress","Date","now","onTouchStart","currentTime","tapDelta","lastTap","isLongTap","_injector$FOCUSED_ELE","FOCUSED_ELEMENT","blur","lastDoubleTap","onDoubleTap","setTimeout","_this$parent2","onLongTap","_this$props$target2","_this$parent3","onPressOut","onTouchEnd","_this$props$target3","_this$parent4","setParent","render","commonProps","OS","accessibilityLabel","testID","accessibilityProps","disabled","proxy","style","styles","_e$target","tagName","onLongPress","onLongtap","onDoubletap","createElement","preferences","enableRipple","Consumer","Provider","value","_extends","rippleColor","borderless","Fragment","children"],"sources":["tappable.component.tsx"],"sourcesContent":["import { BaseComponent } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport React from \"react\";\nimport { GestureResponderEvent, Platform, View, TouchableOpacity } from \"react-native\";\nimport { get } from \"lodash\";\nimport injector from \"./injector\";\nimport { TouchableRipple } from \"react-native-paper\";\nimport ThemeVariables from \"../styles/theme.variables\";\nimport { isDefined } from \"./utils\";\n\nexport const TappableContext = React.createContext<Tappable>(null as any);\nimport { UIPreferencesConsumer, UI_PREFERENCES } from \"./ui-preferences.context\";\n\nexport const ParentTappableContext = React.createContext<Tappable>(null as any);\ninterface TappableProps {\n testID?: string;\n children?: any\n styles?: any;\n target?: BaseComponent<any, any, any>;\n onTap?: (e: any) => void;\n onLongTap?: (e: any) => void; \n onDoubleTap?: (e: any) => void;\n onTouchStart? : (e: any) => void;\n onTouchEnd? : (e: any) => void;\n rippleColor?: string;\n accessibilityProps?: any;\n}\n\nexport class SyntheticEvent {\n // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent\n propagationEnabled = true;\n \n constructor() {\n\n }\n\n stopPropagation() {\n this.propagationEnabled = false;\n }\n}\n\nexport class Tappable extends React.Component<TappableProps, any> {\n private lastPress = 0;\n private lastTap = 0;\n private lastDoubleTap = 0;\n private isLongTap = false;\n private parent:Tappable = null as any;\n \n constructor(props: any) {\n super(props);\n }\n\n async triggerTap(e = new SyntheticEvent()) {\n if (!e.propagationEnabled) {\n return;\n }\n const target = this.props.target;\n if (this.props.onTap) {\n await this.props.onTap(e);\n } else {\n await target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.triggerTap(e);\n }\n\n onPress(e: SyntheticEvent): void { \n this.lastPress = Date.now();\n const target = this.props.target;\n this.props.onTouchStart && this.props.onTouchStart(e);\n this.props.target?.invokeEventCallback('onTouchstart', [e, this.props.target]);\n const currentTime = Date.now();\n const tapDelta = currentTime - this.lastTap;\n if (this.isLongTap) {\n this.isLongTap = false;\n return;\n }\n if (e.propagationEnabled) {\n injector.FOCUSED_ELEMENT.get()?.blur();\n if(this.lastDoubleTap !== this.lastTap \n && tapDelta < 500) {\n this.props.onDoubleTap && this.props.onDoubleTap(e);\n setTimeout(() => {\n target?.invokeEventCallback('onDoubletap', [e, target]);\n }, 200);\n this.lastDoubleTap = currentTime;\n }\n setTimeout(() => {\n if (!e.propagationEnabled) {\n return;\n }\n if (this.props.onTap) {\n this.props.onTap(e);\n } else {\n target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.onPress(e);\n }, 200);\n this.lastTap = currentTime;\n }\n }\n\n onLongTap(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n }\n this.props.onLongTap && this.props.onLongTap(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onLongtap', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = true;\n }\n \n onPressOut(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n } \n this.props.onTouchEnd && this.props.onTouchEnd(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onTouchend', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = false;\n }\n private setParent(parent: Tappable) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n }\n }\n\n render() {\n const target = this.props.target;\n const commonProps = {\n ...(Platform.OS === 'android' || Platform.OS === 'web') ? {\n accessibilityLabel: this.props.testID,\n testID: this.props.testID\n }: {\n // accessible: false,\n testID: this.props.testID\n },\n ...this.props.accessibilityProps,\n disabled:get(target?.proxy, 'disabled'),\n style:this.props.styles,\n onPress:(e?: GestureResponderEvent) => {\n if ((e?.target as any)?.tagName === 'INPUT') {\n return;\n }\n this.onPress(new SyntheticEvent())\n },\n onLongPress:(e?: GestureResponderEvent) => this.onLongTap(new SyntheticEvent()),\n onPressOut:(e?: GestureResponderEvent) => this.onPressOut(new SyntheticEvent())\n };\n if (target?.props.onTap \n || target?.props.onLongtap \n || target?.props.onDoubletap \n || this.props.onTap \n || this.props.onLongTap \n || this.props.onDoubleTap) {\n return (\n <UIPreferencesConsumer>\n {(preferences: UI_PREFERENCES) => {\n return preferences.enableRipple != false ? (\n <ParentTappableContext.Consumer>{(parent) => {\n this.setParent(parent);\n return( <ParentTappableContext.Provider value={this}>\n <TouchableRipple rippleColor={this.props.rippleColor} borderless={true} {...commonProps}>\n <>{this.props.children}</>\n </TouchableRipple>\n </ParentTappableContext.Provider>)}}</ParentTappableContext.Consumer>): (\n <TouchableOpacity {...commonProps}>\n <>{this.props.children}</>\n </TouchableOpacity>);\n }}\n </UIPreferencesConsumer>\n );\n }\n return (<View style={this.props.styles}>{this.props.children}</View>);\n }\n}\n"],"mappings":";;;;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAgCC,QAAQ,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,eAAe,QAAQ,oBAAoB;AAIpD,OAAO,MAAMC,eAAe,gBAAGP,KAAK,CAACQ,aAAa,CAAW,IAAW,CAAC;AACzE,SAASC,qBAAqB,QAAwB,0BAA0B;AAEhF,OAAO,MAAMC,qBAAqB,gBAAGV,KAAK,CAACQ,aAAa,CAAW,IAAW,CAAC;AAe/E,OAAO,MAAMG,cAAc,CAAC;EAIxBC,WAAWA,CAAA,EAAG;IAHd;IAAAC,eAAA,6BACqB,IAAI;EAIzB;EAEAC,eAAeA,CAAA,EAAG;IACd,IAAI,CAACC,kBAAkB,GAAG,KAAK;EACnC;AACJ;AAEA,OAAO,MAAMC,QAAQ,SAAShB,KAAK,CAACiB,SAAS,CAAqB;EAO9DL,WAAWA,CAACM,KAAU,EAAE;IACpB,KAAK,CAACA,KAAK,CAAC;IAACL,eAAA,oBAPG,CAAC;IAAAA,eAAA,kBACH,CAAC;IAAAA,eAAA,wBACK,CAAC;IAAAA,eAAA,oBACL,KAAK;IAAAA,eAAA,iBACC,IAAI;EAI9B;EAEA,MAAMM,UAAUA,CAACC,CAAC,GAAG,IAAIT,cAAc,CAAC,CAAC,EAAE;IAAA,IAAAU,YAAA;IACvC,IAAI,CAACD,CAAC,CAACL,kBAAkB,EAAE;MACvB;IACJ;IACA,MAAMO,MAAM,GAAG,IAAI,CAACJ,KAAK,CAACI,MAAM;IAChC,IAAI,IAAI,CAACJ,KAAK,CAACK,KAAK,EAAE;MAClB,MAAM,IAAI,CAACL,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QAAQ,QAAG5C,MAAM,IAAK;UACzC,IAAI,CAACyB,SAAS,CAACzB,MAAM,CAAC;UACtB,oBAAQzB,KAAA,CAAAkE,aAAA,CAACxD,qBAAqB,CAAC4D,QAAQ;YAACC,KAAK,EAAE;UAAK,gBAC5DvE,KAAA,CAAAkE,aAAA,CAAC5D,eAAe,EAAAkE,QAAA;YAACC,WAAW,EAAE,IAAI,CAACvD,KAAK,CAACuD,WAAY;YAACC,UAAU,EAAE;UAAK,GAAKtB,WAAW,gBACnFpD,KAAA,CAAAkE,aAAA,CAAAlE,KAAA,CAAA2E,QAAA,QAAG,IAAI,CAACzD,KAAK,CAAC0D,QAAW,CACZ,CACe,CAAC;QAAC,CAAkC,CAAC,gBACrE5E,KAAA,CAAAkE,aAAA,CAAC/D,gBAAgB,EAAKiD,WAAW,eAC7BpD,KAAA,CAAAkE,aAAA,CAAAlE,KAAA,CAAA2E,QAAA,QAAG,IAAI,CAACzD,KAAK,CAAC0D,QAAW,CACX,CAAE;MACxB,CACmB,CAAC;IAE5B;IACA,oBAAQ5E,KAAA,CAAAkE,aAAA,CAAChE,IAAI;MAACyD,KAAK,EAAE,IAAI,CAACzC,KAAK,CAAC0C;IAAO,GAAE,IAAI,CAAC1C,KAAK,CAAC0D,QAAe,CAAC;EACxE;AACJ","ignoreList":[]}
@@ -521,4 +521,9 @@ export const getMimeType = extensions => {
521
521
  if (hasInvalidExtension) return '*/*';
522
522
  return mimeType;
523
523
  };
524
+ export function getNumberOfEmptyObjects(noOfItems) {
525
+ return Array.from({
526
+ length: noOfItems
527
+ }, () => ({}));
528
+ }
524
529
  //# sourceMappingURL=utils.js.map