@wavemaker/app-rn-runtime 12.0.0-next.45002 → 12.0.0-next.45005

Sign up to get free protection for your applications and to get access to all the features.
Files changed (704) hide show
  1. app-rn-runtime/actions/base-action.js.map +1 -1
  2. app-rn-runtime/actions/index.js.map +1 -1
  3. app-rn-runtime/actions/login-action.js.map +1 -1
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/actions/navigation-action.js +4 -4
  6. app-rn-runtime/actions/navigation-action.js.map +1 -1
  7. app-rn-runtime/actions/notification-action.js +3 -4
  8. app-rn-runtime/actions/notification-action.js.map +1 -1
  9. app-rn-runtime/actions/timer-action.js +2 -2
  10. app-rn-runtime/actions/timer-action.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js +4 -4
  13. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.styles.js.map +1 -1
  15. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  16. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js +4 -4
  17. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
  18. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  19. app-rn-runtime/components/advanced/carousel/carousel.component.js +31 -22
  20. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  21. app-rn-runtime/components/advanced/carousel/carousel.props.js +4 -4
  22. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  23. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  24. app-rn-runtime/components/advanced/login/login.component.js +4 -4
  25. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  26. app-rn-runtime/components/advanced/login/login.props.js +4 -4
  27. app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
  28. app-rn-runtime/components/advanced/login/login.styles.js.map +1 -1
  29. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +4 -4
  30. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  31. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js +4 -4
  32. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
  33. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.styles.js.map +1 -1
  34. app-rn-runtime/components/advanced/webview/webview.component.js +12 -8
  35. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  36. app-rn-runtime/components/advanced/webview/webview.props.js +4 -4
  37. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  38. app-rn-runtime/components/advanced/webview/webview.styles.js.map +1 -1
  39. app-rn-runtime/components/basic/anchor/anchor.component.js +1 -0
  40. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  41. app-rn-runtime/components/basic/anchor/anchor.props.js +5 -4
  42. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  43. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  44. app-rn-runtime/components/basic/animatedview.component.js +4 -2
  45. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  46. app-rn-runtime/components/basic/audio/audio.component.js +8 -9
  47. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  48. app-rn-runtime/components/basic/audio/audio.props.js +4 -4
  49. app-rn-runtime/components/basic/audio/audio.props.js.map +1 -1
  50. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
  51. app-rn-runtime/components/basic/button/button.component.js +18 -14
  52. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  53. app-rn-runtime/components/basic/button/button.props.js +5 -4
  54. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  55. app-rn-runtime/components/basic/button/button.styles.js +2 -4
  56. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  57. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
  58. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js +4 -4
  59. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
  60. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  61. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  62. app-rn-runtime/components/basic/custom/custom.props.js +4 -4
  63. app-rn-runtime/components/basic/custom/custom.props.js.map +1 -1
  64. app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -1
  65. app-rn-runtime/components/basic/icon/icon.component.js +6 -5
  66. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  67. app-rn-runtime/components/basic/icon/icon.props.js +5 -4
  68. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  69. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  70. app-rn-runtime/components/basic/icon/streamline-light-icon/streamline-light-icon.component.js.map +1 -1
  71. app-rn-runtime/components/basic/icon/streamline-regular-icon/streamline-regular-icon.component.js.map +1 -1
  72. app-rn-runtime/components/basic/icon/wavicon/wavicon.component.js.map +1 -1
  73. app-rn-runtime/components/basic/label/label.component.js +11 -9
  74. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  75. app-rn-runtime/components/basic/label/label.props.js +5 -4
  76. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  77. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  78. app-rn-runtime/components/basic/lottie/lottie.component.js +9 -10
  79. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  80. app-rn-runtime/components/basic/lottie/lottie.props.js +4 -4
  81. app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -1
  82. app-rn-runtime/components/basic/lottie/lottie.styles.js +5 -1
  83. app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -1
  84. app-rn-runtime/components/basic/message/message.component.js +3 -2
  85. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  86. app-rn-runtime/components/basic/message/message.props.js +5 -4
  87. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  88. app-rn-runtime/components/basic/message/message.styles.js +1 -2
  89. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  90. app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
  91. app-rn-runtime/components/basic/modal/modal.props.js +4 -4
  92. app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
  93. app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
  94. app-rn-runtime/components/basic/picture/picture.component.js +5 -4
  95. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  96. app-rn-runtime/components/basic/picture/picture.props.js +5 -4
  97. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  98. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  99. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +23 -1
  100. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  101. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +4 -4
  102. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  103. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  104. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +4 -4
  105. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  106. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +4 -4
  107. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  108. app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
  109. app-rn-runtime/components/basic/search/local-data-provider.js +2 -2
  110. app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
  111. app-rn-runtime/components/basic/search/search.component.js +16 -22
  112. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  113. app-rn-runtime/components/basic/search/search.props.js +4 -4
  114. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  115. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  116. app-rn-runtime/components/basic/skeleton/skeleton.component.js +5 -5
  117. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  118. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  119. app-rn-runtime/components/basic/skeleton/skeleton.styles.js.map +1 -1
  120. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -2
  121. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  122. app-rn-runtime/components/basic/spinner/spinner.props.js +4 -4
  123. app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
  124. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  125. app-rn-runtime/components/basic/tooltip/tooltip.component.js +79 -0
  126. app-rn-runtime/components/basic/tooltip/tooltip.component.js.map +1 -0
  127. app-rn-runtime/components/basic/tooltip/tooltip.props.js +18 -0
  128. app-rn-runtime/components/basic/tooltip/tooltip.props.js.map +1 -0
  129. app-rn-runtime/components/basic/tooltip/tooltip.styles.js +49 -0
  130. app-rn-runtime/components/basic/tooltip/tooltip.styles.js.map +1 -0
  131. app-rn-runtime/components/basic/video/video.component.js +11 -8
  132. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  133. app-rn-runtime/components/basic/video/video.props.js +4 -4
  134. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  135. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  136. app-rn-runtime/components/chart/area-chart/area-chart.component.js +19 -9
  137. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  138. app-rn-runtime/components/chart/area-chart/area-chart.props.js +4 -4
  139. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  140. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  141. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +21 -10
  142. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  143. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +4 -4
  144. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  145. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  146. app-rn-runtime/components/chart/basechart.component.js +90 -55
  147. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  148. app-rn-runtime/components/chart/basechart.props.js +4 -11
  149. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  150. app-rn-runtime/components/chart/basechart.styles.js +27 -10
  151. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  152. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +19 -11
  153. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  154. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +4 -4
  155. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  156. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  157. app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
  158. app-rn-runtime/components/chart/column-chart/column-chart.props.js.map +1 -1
  159. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  160. app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
  161. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +4 -4
  162. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
  163. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  164. app-rn-runtime/components/chart/legend/legend.component.js.map +1 -1
  165. app-rn-runtime/components/chart/line-chart/line-chart.component.js +16 -4
  166. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  167. app-rn-runtime/components/chart/line-chart/line-chart.props.js +4 -4
  168. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  169. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  170. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +19 -11
  171. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  172. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +4 -4
  173. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  174. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  175. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +79 -41
  176. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  177. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +5 -5
  178. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  179. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -1
  180. app-rn-runtime/components/chart/staticdata.js.map +1 -1
  181. app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
  182. app-rn-runtime/components/container/accordion/accordion.component.js +11 -17
  183. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  184. app-rn-runtime/components/container/accordion/accordion.props.js +4 -4
  185. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  186. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  187. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +4 -4
  188. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  189. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js +4 -4
  190. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
  191. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.styles.js.map +1 -1
  192. app-rn-runtime/components/container/container.component.js +5 -4
  193. app-rn-runtime/components/container/container.component.js.map +1 -1
  194. app-rn-runtime/components/container/container.props.js +5 -4
  195. app-rn-runtime/components/container/container.props.js.map +1 -1
  196. app-rn-runtime/components/container/container.styles.js.map +1 -1
  197. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  198. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js +4 -4
  199. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
  200. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.styles.js.map +1 -1
  201. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  202. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js +4 -4
  203. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
  204. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  205. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  206. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js +4 -4
  207. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  208. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  209. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  210. app-rn-runtime/components/container/linearlayout/linearlayout.props.js +4 -4
  211. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  212. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  213. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  214. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +4 -4
  215. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  216. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.styles.js.map +1 -1
  217. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -1
  218. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  219. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js +4 -4
  220. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
  221. app-rn-runtime/components/container/panel/panel-content/panel-content.styles.js.map +1 -1
  222. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  223. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js +4 -4
  224. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
  225. app-rn-runtime/components/container/panel/panel-footer/panel-footer.styles.js.map +1 -1
  226. app-rn-runtime/components/container/panel/panel.component.js +5 -5
  227. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  228. app-rn-runtime/components/container/panel/panel.props.js +4 -4
  229. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  230. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  231. app-rn-runtime/components/container/partial-host.component.js +6 -6
  232. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  233. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +10 -9
  234. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  235. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js +4 -4
  236. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  237. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
  238. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  239. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +10 -7
  240. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  241. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +4 -4
  242. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  243. app-rn-runtime/components/container/tabs/tabpane/tabpane.styles.js.map +1 -1
  244. app-rn-runtime/components/container/tabs/tabs.component.js +20 -17
  245. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  246. app-rn-runtime/components/container/tabs/tabs.props.js +4 -4
  247. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  248. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  249. app-rn-runtime/components/container/tile/tile.component.js +1 -0
  250. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  251. app-rn-runtime/components/container/tile/tile.props.js +5 -4
  252. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  253. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  254. app-rn-runtime/components/container/wizard/wizard.component.js +12 -12
  255. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  256. app-rn-runtime/components/container/wizard/wizard.props.js +5 -4
  257. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  258. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -1
  259. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  260. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +5 -5
  261. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  262. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -4
  263. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  264. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.styles.js +1 -1
  265. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.styles.js.map +1 -1
  266. app-rn-runtime/components/data/card/card-content/card-content.component.js +4 -4
  267. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  268. app-rn-runtime/components/data/card/card-content/card-content.props.js +4 -4
  269. app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
  270. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  271. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  272. app-rn-runtime/components/data/card/card-footer/card-footer.props.js +4 -4
  273. app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
  274. app-rn-runtime/components/data/card/card-footer/card-footer.styles.js.map +1 -1
  275. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  276. app-rn-runtime/components/data/card/card.props.js +4 -4
  277. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  278. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  279. app-rn-runtime/components/data/form/form-action/form-action.component.js +2 -2
  280. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  281. app-rn-runtime/components/data/form/form-action/form-action.props.js +4 -4
  282. app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
  283. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  284. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  285. app-rn-runtime/components/data/form/form-body/form-body.props.js +4 -4
  286. app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
  287. app-rn-runtime/components/data/form/form-body/form-body.styles.js.map +1 -1
  288. app-rn-runtime/components/data/form/form-field/form-field.component.js +12 -9
  289. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  290. app-rn-runtime/components/data/form/form-field/form-field.props.js +5 -4
  291. app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
  292. app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
  293. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  294. app-rn-runtime/components/data/form/form-footer/form-footer.props.js +4 -4
  295. app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
  296. app-rn-runtime/components/data/form/form-footer/form-footer.styles.js.map +1 -1
  297. app-rn-runtime/components/data/form/form.component.js +11 -11
  298. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  299. app-rn-runtime/components/data/form/form.props.js +4 -4
  300. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  301. app-rn-runtime/components/data/form/form.styles.js.map +1 -1
  302. app-rn-runtime/components/data/list/list-action-template/list-action-template.component.js +28 -0
  303. app-rn-runtime/components/data/list/list-action-template/list-action-template.component.js.map +1 -0
  304. app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js +12 -0
  305. app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js.map +1 -0
  306. app-rn-runtime/components/data/list/list-action-template/list-action-template.styles.js +36 -0
  307. app-rn-runtime/components/data/list/list-action-template/list-action-template.styles.js.map +1 -0
  308. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  309. app-rn-runtime/components/data/list/list-template/list-template.props.js +4 -4
  310. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  311. app-rn-runtime/components/data/list/list-template/list-template.styles.js +0 -1
  312. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  313. app-rn-runtime/components/data/list/list.component.js +63 -38
  314. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  315. app-rn-runtime/components/data/list/list.props.js +5 -4
  316. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  317. app-rn-runtime/components/data/list/list.styles.js +2 -2
  318. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  319. app-rn-runtime/components/data/liveform/liveform.component.js +5 -5
  320. app-rn-runtime/components/data/liveform/liveform.component.js.map +1 -1
  321. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +2 -2
  322. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  323. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +4 -4
  324. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  325. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  326. app-rn-runtime/components/device/camera/camera.component.js +2 -2
  327. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  328. app-rn-runtime/components/device/camera/camera.props.js +4 -4
  329. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  330. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  331. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +3 -2
  332. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  333. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +5 -4
  334. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  335. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  336. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +3 -2
  337. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  338. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +5 -4
  339. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  340. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  341. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -4
  342. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  343. app-rn-runtime/components/dialogs/dialog/dialog.props.js +5 -4
  344. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  345. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  346. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +2 -2
  347. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  348. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js +4 -4
  349. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
  350. app-rn-runtime/components/dialogs/dialogactions/dialogactions.styles.js.map +1 -1
  351. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
  352. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  353. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js +4 -4
  354. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
  355. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  356. app-rn-runtime/components/input/basedataset/basedataset.component.js +9 -14
  357. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  358. app-rn-runtime/components/input/basedataset/basedataset.props.js +4 -4
  359. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  360. app-rn-runtime/components/input/basedataset/basedataset.styles.js.map +1 -1
  361. app-rn-runtime/components/input/baseinput/baseinput.component.js +8 -9
  362. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  363. app-rn-runtime/components/input/baseinput/baseinput.props.js +4 -4
  364. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  365. app-rn-runtime/components/input/baseinput/baseinput.styles.js.map +1 -1
  366. app-rn-runtime/components/input/basenumber/basenumber.component.js +6 -9
  367. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  368. app-rn-runtime/components/input/basenumber/basenumber.props.js +4 -4
  369. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  370. app-rn-runtime/components/input/basenumber/basenumber.styles.js.map +1 -1
  371. app-rn-runtime/components/input/calendar/calendar.component.js +5 -5
  372. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  373. app-rn-runtime/components/input/calendar/calendar.props.js +4 -4
  374. app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
  375. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  376. app-rn-runtime/components/input/calendar/views/month-view.js +6 -10
  377. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  378. app-rn-runtime/components/input/calendar/views/month-view.styles.js.map +1 -1
  379. app-rn-runtime/components/input/checkbox/checkbox.component.js +4 -4
  380. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  381. app-rn-runtime/components/input/checkbox/checkbox.props.js +4 -4
  382. app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
  383. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  384. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +17 -8
  385. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  386. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +10 -4
  387. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  388. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -0
  389. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  390. app-rn-runtime/components/input/chips/chips.component.js +5 -5
  391. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  392. app-rn-runtime/components/input/chips/chips.props.js +4 -4
  393. app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
  394. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  395. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  396. app-rn-runtime/components/input/composite/composite.props.js +4 -4
  397. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  398. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  399. app-rn-runtime/components/input/currency/currency.component.js +4 -4
  400. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  401. app-rn-runtime/components/input/currency/currency.props.js +4 -4
  402. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  403. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  404. app-rn-runtime/components/input/epoch/base-datetime.component.js +90 -16
  405. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  406. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  407. app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
  408. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  409. app-rn-runtime/components/input/epoch/date-picker.component.js +2 -2
  410. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  411. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  412. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -4
  413. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  414. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  415. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  416. app-rn-runtime/components/input/epoch/time/time.props.js +2 -2
  417. app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
  418. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  419. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +87 -0
  420. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -0
  421. app-rn-runtime/components/input/epoch/wheel-time-picker.component.js +107 -0
  422. app-rn-runtime/components/input/epoch/wheel-time-picker.component.js.map +1 -0
  423. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js +91 -0
  424. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -0
  425. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js +17 -0
  426. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js.map +1 -0
  427. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.styles.js +55 -0
  428. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.styles.js.map +1 -0
  429. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +72 -0
  430. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -0
  431. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +15 -0
  432. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -0
  433. app-rn-runtime/components/input/epoch/wheelpickermodal/styles/datetime-picker-modal.styles.js +66 -0
  434. app-rn-runtime/components/input/epoch/wheelpickermodal/styles/datetime-picker-modal.styles.js.map +1 -0
  435. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +74 -0
  436. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -0
  437. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +16 -0
  438. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -0
  439. app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -4
  440. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  441. app-rn-runtime/components/input/fileupload/fileupload.props.js +4 -4
  442. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  443. app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
  444. app-rn-runtime/components/input/number/number.component.js +4 -4
  445. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  446. app-rn-runtime/components/input/number/number.props.js +4 -4
  447. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  448. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  449. app-rn-runtime/components/input/radioset/radioset.component.js +10 -7
  450. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  451. app-rn-runtime/components/input/radioset/radioset.props.js +4 -4
  452. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  453. app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
  454. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  455. app-rn-runtime/components/input/rating/rating.component.js +4 -4
  456. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  457. app-rn-runtime/components/input/rating/rating.props.js +4 -4
  458. app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
  459. app-rn-runtime/components/input/rating/rating.styles.js.map +1 -1
  460. app-rn-runtime/components/input/select/select.component.js +10 -7
  461. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  462. app-rn-runtime/components/input/select/select.props.js +4 -4
  463. app-rn-runtime/components/input/select/select.props.js.map +1 -1
  464. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  465. app-rn-runtime/components/input/slider/slider.component.js +357 -70
  466. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  467. app-rn-runtime/components/input/slider/slider.props.js +13 -9
  468. app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
  469. app-rn-runtime/components/input/slider/slider.styles.js +25 -2
  470. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  471. app-rn-runtime/components/input/switch/switch.component.js +1 -1
  472. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  473. app-rn-runtime/components/input/switch/switch.props.js +4 -4
  474. app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
  475. app-rn-runtime/components/input/switch/switch.styles.js +6 -1
  476. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  477. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  478. app-rn-runtime/components/input/text/text.props.js +4 -4
  479. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  480. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  481. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  482. app-rn-runtime/components/input/textarea/textarea.props.js +4 -4
  483. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  484. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  485. app-rn-runtime/components/input/toggle/toggle.component.js +13 -6
  486. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  487. app-rn-runtime/components/input/toggle/toggle.props.js +4 -4
  488. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  489. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  490. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +4 -4
  491. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  492. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +4 -4
  493. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  494. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  495. app-rn-runtime/components/navigation/basenav/basenav.component.js +6 -10
  496. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  497. app-rn-runtime/components/navigation/basenav/basenav.props.js +4 -4
  498. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  499. app-rn-runtime/components/navigation/basenav/basenav.styles.js.map +1 -1
  500. app-rn-runtime/components/navigation/menu/menu.component.js +2 -2
  501. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  502. app-rn-runtime/components/navigation/menu/menu.props.js +4 -4
  503. app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
  504. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  505. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  506. app-rn-runtime/components/navigation/navbar/navbar.props.js +4 -4
  507. app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
  508. app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
  509. app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -4
  510. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  511. app-rn-runtime/components/navigation/navitem/navitem.props.js +4 -4
  512. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  513. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  514. app-rn-runtime/components/navigation/popover/popover.component.js +84 -31
  515. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  516. app-rn-runtime/components/navigation/popover/popover.props.js +5 -4
  517. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  518. app-rn-runtime/components/navigation/popover/popover.styles.js +6 -1
  519. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  520. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  521. app-rn-runtime/components/page/content/content.props.js.map +1 -1
  522. app-rn-runtime/components/page/content/content.styles.js.map +1 -1
  523. app-rn-runtime/components/page/left-panel/left-panel.component.js +5 -5
  524. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  525. app-rn-runtime/components/page/left-panel/left-panel.props.js +4 -4
  526. app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
  527. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  528. app-rn-runtime/components/page/page-content/page-content.component.js +2 -1
  529. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  530. app-rn-runtime/components/page/page-content/page-content.props.js +4 -4
  531. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  532. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  533. app-rn-runtime/components/page/page.component.js +13 -3
  534. app-rn-runtime/components/page/page.component.js.map +1 -1
  535. app-rn-runtime/components/page/page.props.js.map +1 -1
  536. app-rn-runtime/components/page/page.styles.js.map +1 -1
  537. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  538. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  539. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  540. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  541. app-rn-runtime/components/page/partial-container/partial-container.props.js +4 -4
  542. app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
  543. app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
  544. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  545. app-rn-runtime/components/page/tabbar/tabbar.component.js +26 -14
  546. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  547. app-rn-runtime/components/page/tabbar/tabbar.props.js +4 -4
  548. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  549. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  550. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  551. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  552. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  553. app-rn-runtime/core/AppConfig.js.map +1 -1
  554. app-rn-runtime/core/accessibility.js +1 -1
  555. app-rn-runtime/core/accessibility.js.map +1 -1
  556. app-rn-runtime/core/asset.provider.js.map +1 -1
  557. app-rn-runtime/core/base.component.js +27 -22
  558. app-rn-runtime/core/base.component.js.map +1 -1
  559. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -1
  560. app-rn-runtime/core/components/textinput.component.js +6 -5
  561. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  562. app-rn-runtime/core/constant.service.js +2 -2
  563. app-rn-runtime/core/constant.service.js.map +1 -1
  564. app-rn-runtime/core/constants/currency-constants.js.map +1 -1
  565. app-rn-runtime/core/currency-constants.js.map +1 -1
  566. app-rn-runtime/core/device/calendar-service.js.map +1 -1
  567. app-rn-runtime/core/device/camera-service.js.map +1 -1
  568. app-rn-runtime/core/device/contacts-service.js.map +1 -1
  569. app-rn-runtime/core/device/location-service.js.map +1 -1
  570. app-rn-runtime/core/device/scan-service.js.map +1 -1
  571. app-rn-runtime/core/display.manager.js.map +1 -1
  572. app-rn-runtime/core/event-notifier.js +15 -7
  573. app-rn-runtime/core/event-notifier.js.map +1 -1
  574. app-rn-runtime/core/file-extension-types.js.map +1 -1
  575. app-rn-runtime/core/fixed-view.component.js +4 -4
  576. app-rn-runtime/core/fixed-view.component.js.map +1 -1
  577. app-rn-runtime/core/formatters.js +6 -12
  578. app-rn-runtime/core/formatters.js.map +1 -1
  579. app-rn-runtime/core/i18n.service.js.map +1 -1
  580. app-rn-runtime/core/if.component.js +6 -7
  581. app-rn-runtime/core/if.component.js.map +1 -1
  582. app-rn-runtime/core/imageSizeEstimator.js +3 -3
  583. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  584. app-rn-runtime/core/injector.js.map +1 -1
  585. app-rn-runtime/core/key.extractor.js +3 -4
  586. app-rn-runtime/core/key.extractor.js.map +1 -1
  587. app-rn-runtime/core/logger.js +3 -3
  588. app-rn-runtime/core/logger.js.map +1 -1
  589. app-rn-runtime/core/modal.service.js.map +1 -1
  590. app-rn-runtime/core/navigation.service.js.map +1 -1
  591. app-rn-runtime/core/network.service.js +7 -11
  592. app-rn-runtime/core/network.service.js.map +1 -1
  593. app-rn-runtime/core/partial.service.js.map +1 -1
  594. app-rn-runtime/core/props.provider.js +4 -5
  595. app-rn-runtime/core/props.provider.js.map +1 -1
  596. app-rn-runtime/core/scroll-view.component.js +2 -2
  597. app-rn-runtime/core/scroll-view.component.js.map +1 -1
  598. app-rn-runtime/core/security.service.js.map +1 -1
  599. app-rn-runtime/core/spinner.service.js.map +1 -1
  600. app-rn-runtime/core/storage.service.js +2 -2
  601. app-rn-runtime/core/storage.service.js.map +1 -1
  602. app-rn-runtime/core/tappable.component.js +77 -42
  603. app-rn-runtime/core/tappable.component.js.map +1 -1
  604. app-rn-runtime/core/testid.provider.js.map +1 -1
  605. app-rn-runtime/core/toast.service.js.map +1 -1
  606. app-rn-runtime/core/utils.js +123 -20
  607. app-rn-runtime/core/utils.js.map +1 -1
  608. app-rn-runtime/core/viewport.js +2 -2
  609. app-rn-runtime/core/viewport.js.map +1 -1
  610. app-rn-runtime/gestures/swipe.animation.js +2 -2
  611. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  612. app-rn-runtime/index.js.map +1 -1
  613. app-rn-runtime/package.json +85 -85
  614. app-rn-runtime/runtime/App.js +55 -47
  615. app-rn-runtime/runtime/App.js.map +1 -1
  616. app-rn-runtime/runtime/App.navigator.js +1 -1
  617. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  618. app-rn-runtime/runtime/base-fragment.component.js +6 -8
  619. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  620. app-rn-runtime/runtime/base-page.component.js +29 -22
  621. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  622. app-rn-runtime/runtime/base-partial.component.js +12 -7
  623. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  624. app-rn-runtime/runtime/base-prefab.component.js +6 -6
  625. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  626. app-rn-runtime/runtime/lib-patch.js +1 -1
  627. app-rn-runtime/runtime/lib-patch.js.map +1 -1
  628. app-rn-runtime/runtime/memo.component.js +2 -2
  629. app-rn-runtime/runtime/memo.component.js.map +1 -1
  630. app-rn-runtime/runtime/navigator/drawer.navigator.js +1 -0
  631. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  632. app-rn-runtime/runtime/navigator/stack.navigator.js +5 -8
  633. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  634. app-rn-runtime/runtime/platform.api.js.map +1 -1
  635. app-rn-runtime/runtime/services/app-display-manager.service.js +7 -4
  636. app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
  637. app-rn-runtime/runtime/services/app-i18n.service.js +3 -4
  638. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  639. app-rn-runtime/runtime/services/app-modal.service.js +7 -4
  640. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  641. app-rn-runtime/runtime/services/app-security.service.js +26 -11
  642. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  643. app-rn-runtime/runtime/services/app-spinner.service.js +3 -4
  644. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  645. app-rn-runtime/runtime/services/app-toast.service.js +2 -2
  646. app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
  647. app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
  648. app-rn-runtime/runtime/services/device/camera-service.js +2 -2
  649. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  650. app-rn-runtime/runtime/services/device/contacts-service.js +1 -1
  651. app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
  652. app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
  653. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  654. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  655. app-rn-runtime/runtime/services/partial.service.js +1 -2
  656. app-rn-runtime/runtime/services/partial.service.js.map +1 -1
  657. app-rn-runtime/runtime/services/webprocess.service.js +3 -5
  658. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  659. app-rn-runtime/runtime/watcher.js +5 -5
  660. app-rn-runtime/runtime/watcher.js.map +1 -1
  661. app-rn-runtime/styles/MediaQueryList.js.map +1 -1
  662. app-rn-runtime/styles/background.component.js +7 -6
  663. app-rn-runtime/styles/background.component.js.map +1 -1
  664. app-rn-runtime/styles/style-prop.validator.js +1 -4
  665. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  666. app-rn-runtime/styles/style-props.js +2 -2
  667. app-rn-runtime/styles/style-props.js.map +1 -1
  668. app-rn-runtime/styles/theme.js +25 -17
  669. app-rn-runtime/styles/theme.js.map +1 -1
  670. app-rn-runtime/styles/theme.variables.js +13 -7
  671. app-rn-runtime/styles/theme.variables.js.map +1 -1
  672. app-rn-runtime/variables/base-variable.js +2 -2
  673. app-rn-runtime/variables/base-variable.js.map +1 -1
  674. app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
  675. app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
  676. app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
  677. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  678. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  679. app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
  680. app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
  681. app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
  682. app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
  683. app-rn-runtime/variables/device/device/network-info.operation.js +23 -3
  684. app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
  685. app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
  686. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  687. app-rn-runtime/variables/device/operation.provider.js.map +1 -1
  688. app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
  689. app-rn-runtime/variables/device-variable.js +1 -1
  690. app-rn-runtime/variables/device-variable.js.map +1 -1
  691. app-rn-runtime/variables/http.service.js +4 -0
  692. app-rn-runtime/variables/http.service.js.map +1 -1
  693. app-rn-runtime/variables/live-variable.js +3 -3
  694. app-rn-runtime/variables/live-variable.js.map +1 -1
  695. app-rn-runtime/variables/model-variable.js +2 -2
  696. app-rn-runtime/variables/model-variable.js.map +1 -1
  697. app-rn-runtime/variables/service-variable.js +2 -2
  698. app-rn-runtime/variables/service-variable.js.map +1 -1
  699. app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
  700. app-rn-runtime/variables/utils/inflight-queue.js +2 -2
  701. app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
  702. app-rn-runtime/variables/utils/variable.constants.js.map +1 -1
  703. app-rn-runtime/variables/utils/variable.utils.js +0 -1
  704. app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["axios","clone","isEqual","noop","Network","NetInfo","StorageService","EventNotifier","getAbortableDefer","isWebPreviewMode","retryIfFails","NetworkState","constructor","_defineProperty","AUTO_CONNECT_KEY","IS_CONNECTED_KEY","excludedList","RegExp","networkState","blockUrl","url","isConnected","startsWith","findIndex","regExp","test","interceptors","request","use","noServiceRequired","urlSplits","split","pathIndex","indexOf","substr","join","NetworkService","setAutoConnect","checkForNetworkStateChange","isConnecting","connect","silent","arguments","length","undefined","tryToConnect","disconnect","p","tryToDisconnect","disableAutoConnect","isAvailable","pingServer","isServiceAvailable","then","onConnect","defer","cancelSubscription","Promise","resolve","notifier","subscribe","promise","catch","retryIfNetworkFails","fn","onConnectPromise","abort","reject","start","appConfig","getItem","_autoConnect","state","getNetworkStateAsync","isNetworkAvailable","addEventListener","data","_isCheckingServer","checkForServiceAvailiblity","getServiceName","SERVICE_NAME","unblock","urlRegex","push","getState","_lastKnownNetworkState","notify","maxTimeout","intervalId","setInterval","available","clearInterval","response","baseURL","endsWith","get","Date","now","responseType","timeout","res","status","flag","setItem","silentMode","setTimeout"],"sources":["network.service.ts"],"sourcesContent":["import axios from 'axios';\nimport { clone, isEqual, noop } from 'lodash-es';\nimport * as Network from 'expo-network';\nimport NetInfo from '@react-native-community/netinfo';\n\nimport AppConfig from './AppConfig';\nimport StorageService from './storage.service';\nimport EventNotifier from './event-notifier';\nimport { getAbortableDefer, isWebPreviewMode, retryIfFails } from './utils';\n\nexport class NetworkState {\n isConnecting = false;\n isConnected = true;\n isNetworkAvailable = true;\n isServiceAvailable = true;\n noServiceRequired = false;\n}\n\nconst AUTO_CONNECT_KEY = 'WM.NetworkService._autoConnect',\n IS_CONNECTED_KEY = 'WM.NetworkService.isConnected',\n excludedList = [new RegExp('/wmProperties.js')],\n networkState = new NetworkState();\n\n/**\n * If server is not connected and url does not match the unblock list of regular expressions,\n * then this function return true. Otherwise, return false.\n * @param url\n * @returns {boolean}\n */\nconst blockUrl = (url: string) => {\n return !networkState.isConnected\n && url.startsWith('http')\n && excludedList.findIndex(regExp => regExp.test(url)) < 0;\n};\n\naxios.interceptors.request.use((request) => {\n if (!networkState.noServiceRequired && request.url && blockUrl(request.url)) {\n const url = request.url;\n const urlSplits = url.split('://');\n const pathIndex = urlSplits[1].indexOf('/');\n urlSplits[1] = 'localhost' + (pathIndex > 0 ? urlSplits[1].substr(pathIndex) : '/');\n request.url = urlSplits.join('://');\n }\n return request;\n});\n\nclass NetworkService {\n static readonly SERVICE_NAME = 'NetworkService';\n\n private _autoConnect = true;\n private _lastKnownNetworkState: any;\n private _isCheckingServer = false;\n private appConfig: AppConfig = null as any;\n public readonly notifier: EventNotifier = new EventNotifier();\n\n constructor() {}\n\n /**\n * This method attempts to connect app to the server and returns a promise that will be resolved with\n * a boolean value based on the operation result.\n *\n * @returns {object} promise\n */\n public connect(silent = false): Promise<boolean> {\n this.setAutoConnect(true);\n return this.tryToConnect(silent);\n }\n\n /**\n * When the auto connect is enabled, then app is automatically connected whenever server is available.\n * Every time when app goes offline, auto connect is enabled. Before app coming to online, one can disable\n * the auto connection flow using this method.\n */\n public disableAutoConnect = () => this.setAutoConnect(false);\n\n /**\n * This method disconnects the app from the server and returns a promise that will be resolved with\n * a boolean value based on the operation result. Use connect method to reconnect.\n *\n * @returns {object} promise\n */\n public disconnect(): Promise<boolean> {\n const p = this.tryToDisconnect();\n this.disableAutoConnect();\n return p;\n }\n\n /**\n * If pingServer is true, then it returns a promise that will be resolved with boolean based on service availability\n * check.If pingServer is false, returns a boolean value based on the last known service availability.\n *\n * @returns {boolean} if pingServer is true, then a promise is returned. Otherwise, a boolean value.\n */\n public isAvailable(pingServer = false): boolean | Promise<boolean> {\n if (pingServer) {\n return this.isServiceAvailable().then(() => {\n this.checkForNetworkStateChange();\n return networkState.isServiceAvailable;\n });\n }\n return networkState.isServiceAvailable;\n }\n\n /**\n * Returns true, if app is connected to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true, if app is connected to server. Otherwise, returns false.\n */\n public isConnected = () => {\n this.checkForNetworkStateChange();\n return networkState.isConnected;\n }\n\n /**\n * Returns true if app is trying to connect to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true if app is trying to connect to server. Otherwise, returns false.\n */\n public isConnecting = () => networkState.isConnecting;\n\n /**\n * This method returns a promise that is resolved when connection is established with server.\n *\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public onConnect() {\n let defer = getAbortableDefer(),\n cancelSubscription: Function;\n if (this.isConnected()) {\n return Promise.resolve();\n }\n cancelSubscription = this.notifier.subscribe('onNetworkStateChange', () => {\n if (this.isConnected()) {\n defer.resolve(true);\n cancelSubscription();\n }\n });\n defer.promise.catch(function () {\n cancelSubscription();\n });\n return defer.promise;\n }\n\n /**\n * This is a util method. If fn cannot execute successfully and network lost connection, then the fn will\n * be invoked when network is back. The returned can also be aborted.\n *\n * @param {function()} fn method to invoke.\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public retryIfNetworkFails(fn: Function) {\n const defer = getAbortableDefer();\n retryIfFails(fn, 0, 0, () => {\n let onConnectPromise: any;\n if (!this.isConnected()) {\n onConnectPromise = this.onConnect();\n defer.promise.catch(function () {\n onConnectPromise.abort();\n });\n return onConnectPromise;\n }\n return false;\n }).then(defer.resolve, defer.reject);\n return defer.promise;\n }\n\n public async start(appConfig: AppConfig): Promise<any> {\n this.appConfig = appConfig;\n networkState.noServiceRequired = !appConfig.url;\n networkState.isConnected = (await StorageService.getItem(IS_CONNECTED_KEY)) === 'true';\n this._autoConnect = (await StorageService.getItem(AUTO_CONNECT_KEY)) !== 'false';\n const state = await Network.getNetworkStateAsync();\n networkState.isNetworkAvailable = !!state.isConnected;\n networkState.isConnected = networkState.isNetworkAvailable && networkState.isConnected;\n !isWebPreviewMode() && NetInfo.addEventListener(state => {\n if (state.isConnected !== networkState.isConnected) {\n if (state.isConnected) {\n networkState.isNetworkAvailable = !!state.isConnected;\n this.tryToConnect().catch(noop);\n } else {\n networkState.isNetworkAvailable = false;\n networkState.isServiceAvailable = false;\n networkState.isConnected = false;\n this.tryToDisconnect();\n }\n }\n });\n this.notifier.subscribe('onNetworkStateChange', (data: NetworkState) => {\n /**\n * If network is available and server is not available,then\n * try to connect when server is available.\n */\n if (data.isNetworkAvailable && !data.isServiceAvailable && !this._isCheckingServer && !data.noServiceRequired) {\n this._isCheckingServer = true;\n this.checkForServiceAvailiblity().then(() => {\n this._isCheckingServer = false;\n this.connect();\n }, () => {\n this._isCheckingServer = false;\n });\n }\n });\n // to set the default n/w connection values.\n return this.tryToConnect(true).catch(noop);\n }\n\n public getServiceName() {\n return NetworkService.SERVICE_NAME;\n }\n\n /**\n * This function adds the given regular expression to the unblockList. Even app is in offline mode,\n * the urls matching with the given regular expression are not blocked by NetworkService.\n *\n * @param {string} urlRegex regular expression\n */\n public unblock(urlRegex: string) {\n excludedList.push(new RegExp(urlRegex));\n }\n\n public getState() {\n return clone(networkState);\n }\n\n private checkForNetworkStateChange() {\n if (!isEqual(this._lastKnownNetworkState, networkState)) {\n this._lastKnownNetworkState = clone(networkState);\n this.notifier.notify('onNetworkStateChange', [this._lastKnownNetworkState]);\n }\n }\n\n /**\n * Returns a promise that is resolved when server is available.\n * @returns {*}\n */\n private checkForServiceAvailiblity(): Promise<void> {\n const maxTimeout = 4500;\n return new Promise<void>(resolve => {\n const intervalId = setInterval(() => {\n if (networkState.isNetworkAvailable) {\n this.isServiceAvailable(maxTimeout).then(available => {\n if (available) {\n clearInterval(intervalId);\n resolve();\n }\n });\n }\n }, 5000);\n });\n }\n\n /**\n * Pings server to check whether server is available. Based on ping response network state is modified.\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n */\n private isServiceAvailable(maxTimeout?: number): Promise<boolean> {\n if (networkState.noServiceRequired) {\n networkState.isServiceAvailable = false;\n networkState.noServiceRequired = true;\n return Promise.resolve(false);\n }\n return this.pingServer(maxTimeout).then(response => {\n networkState.isServiceAvailable = response;\n if (!networkState.isServiceAvailable) {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n }\n return response;\n });\n }\n\n /**\n * Pings server\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n * default timeout value is 1min.\n */\n private pingServer(maxTimeout = 60000): Promise<boolean> {\n let baseURL = this.appConfig.url;\n if (baseURL && !baseURL.endsWith('/')) {\n baseURL += '/';\n } else {\n baseURL = baseURL || '';\n }\n return axios.get(baseURL + 'services/application/wmProperties.js?t=' + Date.now(), {\n responseType: 'text',\n timeout: maxTimeout\n }).then((res) => res.status === 200, () => false);\n }\n\n private setAutoConnect(flag: boolean): void {\n this._autoConnect = flag;\n StorageService.setItem(AUTO_CONNECT_KEY, '' + flag);\n }\n\n /**\n * Tries to connect to remote server. Network State will be changed based on the success of connection\n * operation and emits an event notifying the network state change.\n *\n * @param silentMode {boolean} if true and connection is successful, then no event is emitted. Otherwise,\n * events are emitted for network status change.\n * @returns {*} a promise\n */\n private tryToConnect(silentMode = false): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n this.isServiceAvailable(5000).then(() => {\n if (networkState.isServiceAvailable && this._autoConnect) {\n networkState.isConnecting = true;\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n setTimeout(() => {\n networkState.isConnecting = false;\n networkState.isConnected = true;\n StorageService.setItem(IS_CONNECTED_KEY, '' + true);\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n resolve(true);\n }, silentMode ? 0 : 5000);\n } else {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n StorageService.setItem(IS_CONNECTED_KEY, '' + false);\n reject();\n this.checkForNetworkStateChange();\n }\n });\n });\n }\n\n private tryToDisconnect(): Promise<boolean> {\n networkState.isConnected = false;\n networkState.isConnecting = false;\n this.checkForNetworkStateChange();\n StorageService.setItem(IS_CONNECTED_KEY, '' + networkState.isConnected);\n return Promise.resolve(networkState.isConnected);\n }\n}\n\nexport default new NetworkService();"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,OAAO,EAAEC,IAAI,QAAQ,WAAW;AAChD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAOC,OAAO,MAAM,iCAAiC;AAGrD,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,iBAAiB,EAAEC,gBAAgB,EAAEC,YAAY,QAAQ,SAAS;AAE3E,OAAO,MAAMC,YAAY,CAAC;EAAAC,YAAA;IAAAC,eAAA,uBACP,KAAK;IAAAA,eAAA,sBACN,IAAI;IAAAA,eAAA,6BACG,IAAI;IAAAA,eAAA,6BACJ,IAAI;IAAAA,eAAA,4BACL,KAAK;EAAA;AAC7B;AAEA,MAAMC,gBAAgB,GAAG,gCAAgC;EACrDC,gBAAgB,GAAG,+BAA+B;EAClDC,YAAY,GAAG,CAAC,IAAIC,MAAM,CAAC,kBAAkB,CAAC,CAAC;EAC/CC,YAAY,GAAG,IAAIP,YAAY,CAAC,CAAC;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,MAAMQ,QAAQ,GAAIC,GAAW,IAAK;EAC9B,OAAO,CAACF,YAAY,CAACG,WAAW,IACzBD,GAAG,CAACE,UAAU,CAAC,MAAM,CAAC,IACtBN,YAAY,CAACO,SAAS,CAACC,MAAM,IAAIA,MAAM,CAACC,IAAI,CAACL,GAAG,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC;AAEDpB,KAAK,CAAC0B,YAAY,CAACC,OAAO,C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eAAe,IAAIA,cAAc,CAAC,CAAC"}
1
+ {"version":3,"names":["axios","clone","isEqual","noop","Network","NetInfo","StorageService","EventNotifier","getAbortableDefer","isWebPreviewMode","retryIfFails","NetworkState","constructor","_defineProperty","AUTO_CONNECT_KEY","IS_CONNECTED_KEY","excludedList","RegExp","networkState","blockUrl","url","isConnected","startsWith","findIndex","regExp","test","interceptors","request","use","noServiceRequired","urlSplits","split","pathIndex","indexOf","substr","join","NetworkService","setAutoConnect","checkForNetworkStateChange","isConnecting","connect","silent","tryToConnect","disconnect","p","tryToDisconnect","disableAutoConnect","isAvailable","pingServer","isServiceAvailable","then","onConnect","defer","cancelSubscription","Promise","resolve","notifier","subscribe","promise","catch","retryIfNetworkFails","fn","onConnectPromise","abort","reject","start","appConfig","getItem","_autoConnect","state","getNetworkStateAsync","isNetworkAvailable","addEventListener","data","_isCheckingServer","checkForServiceAvailiblity","getServiceName","SERVICE_NAME","unblock","urlRegex","push","getState","_lastKnownNetworkState","notify","maxTimeout","intervalId","setInterval","available","clearInterval","response","baseURL","endsWith","get","Date","now","responseType","timeout","res","status","flag","setItem","silentMode","setTimeout"],"sources":["network.service.ts"],"sourcesContent":["import axios from 'axios';\nimport { clone, isEqual, noop } from 'lodash-es';\nimport * as Network from 'expo-network';\nimport NetInfo from '@react-native-community/netinfo';\n\nimport AppConfig from './AppConfig';\nimport StorageService from './storage.service';\nimport EventNotifier from './event-notifier';\nimport { getAbortableDefer, isWebPreviewMode, retryIfFails } from './utils';\n\nexport class NetworkState {\n isConnecting = false;\n isConnected = true;\n isNetworkAvailable = true;\n isServiceAvailable = true;\n noServiceRequired = false;\n}\n\nconst AUTO_CONNECT_KEY = 'WM.NetworkService._autoConnect',\n IS_CONNECTED_KEY = 'WM.NetworkService.isConnected',\n excludedList = [new RegExp('/wmProperties.js')],\n networkState = new NetworkState();\n\n/**\n * If server is not connected and url does not match the unblock list of regular expressions,\n * then this function return true. Otherwise, return false.\n * @param url\n * @returns {boolean}\n */\nconst blockUrl = (url: string) => {\n return !networkState.isConnected\n && url.startsWith('http')\n && excludedList.findIndex(regExp => regExp.test(url)) < 0;\n};\n\naxios.interceptors.request.use((request) => {\n if (!networkState.noServiceRequired && request.url && blockUrl(request.url)) {\n const url = request.url;\n const urlSplits = url.split('://');\n const pathIndex = urlSplits[1].indexOf('/');\n urlSplits[1] = 'localhost' + (pathIndex > 0 ? urlSplits[1].substr(pathIndex) : '/');\n request.url = urlSplits.join('://');\n }\n return request;\n});\n\nclass NetworkService {\n static readonly SERVICE_NAME = 'NetworkService';\n\n private _autoConnect = true;\n private _lastKnownNetworkState: any;\n private _isCheckingServer = false;\n private appConfig: AppConfig = null as any;\n public readonly notifier: EventNotifier = new EventNotifier();\n\n constructor() {}\n\n /**\n * This method attempts to connect app to the server and returns a promise that will be resolved with\n * a boolean value based on the operation result.\n *\n * @returns {object} promise\n */\n public connect(silent = false): Promise<boolean> {\n this.setAutoConnect(true);\n return this.tryToConnect(silent);\n }\n\n /**\n * When the auto connect is enabled, then app is automatically connected whenever server is available.\n * Every time when app goes offline, auto connect is enabled. Before app coming to online, one can disable\n * the auto connection flow using this method.\n */\n public disableAutoConnect = () => this.setAutoConnect(false);\n\n /**\n * This method disconnects the app from the server and returns a promise that will be resolved with\n * a boolean value based on the operation result. Use connect method to reconnect.\n *\n * @returns {object} promise\n */\n public disconnect(): Promise<boolean> {\n const p = this.tryToDisconnect();\n this.disableAutoConnect();\n return p;\n }\n\n /**\n * If pingServer is true, then it returns a promise that will be resolved with boolean based on service availability\n * check.If pingServer is false, returns a boolean value based on the last known service availability.\n *\n * @returns {boolean} if pingServer is true, then a promise is returned. Otherwise, a boolean value.\n */\n public isAvailable(pingServer = false): boolean | Promise<boolean> {\n if (pingServer) {\n return this.isServiceAvailable().then(() => {\n this.checkForNetworkStateChange();\n return networkState.isServiceAvailable;\n });\n }\n return networkState.isServiceAvailable;\n }\n\n /**\n * Returns true, if app is connected to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true, if app is connected to server. Otherwise, returns false.\n */\n public isConnected = () => {\n this.checkForNetworkStateChange();\n return networkState.isConnected;\n }\n\n /**\n * Returns true if app is trying to connect to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true if app is trying to connect to server. Otherwise, returns false.\n */\n public isConnecting = () => networkState.isConnecting;\n\n /**\n * This method returns a promise that is resolved when connection is established with server.\n *\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public onConnect() {\n let defer = getAbortableDefer(),\n cancelSubscription: Function;\n if (this.isConnected()) {\n return Promise.resolve();\n }\n cancelSubscription = this.notifier.subscribe('onNetworkStateChange', () => {\n if (this.isConnected()) {\n defer.resolve(true);\n cancelSubscription();\n }\n });\n defer.promise.catch(function () {\n cancelSubscription();\n });\n return defer.promise;\n }\n\n /**\n * This is a util method. If fn cannot execute successfully and network lost connection, then the fn will\n * be invoked when network is back. The returned can also be aborted.\n *\n * @param {function()} fn method to invoke.\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public retryIfNetworkFails(fn: Function) {\n const defer = getAbortableDefer();\n retryIfFails(fn, 0, 0, () => {\n let onConnectPromise: any;\n if (!this.isConnected()) {\n onConnectPromise = this.onConnect();\n defer.promise.catch(function () {\n onConnectPromise.abort();\n });\n return onConnectPromise;\n }\n return false;\n }).then(defer.resolve, defer.reject);\n return defer.promise;\n }\n\n public async start(appConfig: AppConfig): Promise<any> {\n this.appConfig = appConfig;\n networkState.noServiceRequired = !appConfig.url;\n networkState.isConnected = (await StorageService.getItem(IS_CONNECTED_KEY)) !== 'false';\n this._autoConnect = (await StorageService.getItem(AUTO_CONNECT_KEY)) !== 'false';\n const state = await Network.getNetworkStateAsync();\n networkState.isNetworkAvailable = !!state.isConnected;\n networkState.isConnected = networkState.isNetworkAvailable && networkState.isConnected;\n !isWebPreviewMode() && NetInfo.addEventListener(state => {\n if (state.isConnected !== networkState.isConnected) {\n if (state.isConnected) {\n networkState.isNetworkAvailable = !!state.isConnected;\n this.tryToConnect().catch(noop);\n } else {\n networkState.isNetworkAvailable = false;\n networkState.isServiceAvailable = false;\n networkState.isConnected = false;\n this.tryToDisconnect();\n }\n }\n });\n this.notifier.subscribe('onNetworkStateChange', (data: NetworkState) => {\n /**\n * If network is available and server is not available,then\n * try to connect when server is available.\n */\n if (data.isNetworkAvailable && !data.isServiceAvailable && !this._isCheckingServer && !data.noServiceRequired) {\n this._isCheckingServer = true;\n this.checkForServiceAvailiblity().then(() => {\n this._isCheckingServer = false;\n this.connect();\n }, () => {\n this._isCheckingServer = false;\n });\n }\n });\n // to set the default n/w connection values.\n return this.tryToConnect(true).catch(noop);\n }\n\n public getServiceName() {\n return NetworkService.SERVICE_NAME;\n }\n\n /**\n * This function adds the given regular expression to the unblockList. Even app is in offline mode,\n * the urls matching with the given regular expression are not blocked by NetworkService.\n *\n * @param {string} urlRegex regular expression\n */\n public unblock(urlRegex: string) {\n excludedList.push(new RegExp(urlRegex));\n }\n\n public getState() {\n return clone(networkState);\n }\n\n private checkForNetworkStateChange() {\n if (!isEqual(this._lastKnownNetworkState, networkState)) {\n this._lastKnownNetworkState = clone(networkState);\n this.notifier.notify('onNetworkStateChange', [this._lastKnownNetworkState]);\n }\n }\n\n /**\n * Returns a promise that is resolved when server is available.\n * @returns {*}\n */\n private checkForServiceAvailiblity(): Promise<void> {\n const maxTimeout = 4500;\n return new Promise<void>(resolve => {\n const intervalId = setInterval(() => {\n if (networkState.isNetworkAvailable) {\n this.isServiceAvailable(maxTimeout).then(available => {\n if (available) {\n clearInterval(intervalId);\n resolve();\n }\n });\n }\n }, 5000);\n });\n }\n\n /**\n * Pings server to check whether server is available. Based on ping response network state is modified.\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n */\n private isServiceAvailable(maxTimeout?: number): Promise<boolean> {\n if (networkState.noServiceRequired) {\n networkState.isServiceAvailable = false;\n networkState.noServiceRequired = true;\n return Promise.resolve(false);\n }\n return this.pingServer(maxTimeout).then(response => {\n networkState.isServiceAvailable = response;\n if (!networkState.isServiceAvailable) {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n }\n return response;\n });\n }\n\n /**\n * Pings server\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n * default timeout value is 1min.\n */\n private pingServer(maxTimeout = 60000): Promise<boolean> {\n let baseURL = this.appConfig.url;\n if (baseURL && !baseURL.endsWith('/')) {\n baseURL += '/';\n } else {\n baseURL = baseURL || '';\n }\n return axios.get(baseURL + 'services/application/wmProperties.js?t=' + Date.now(), {\n responseType: 'text',\n timeout: maxTimeout\n }).then((res) => res.status === 200, () => false);\n }\n\n private setAutoConnect(flag: boolean): void {\n this._autoConnect = flag;\n StorageService.setItem(AUTO_CONNECT_KEY, '' + flag);\n }\n\n /**\n * Tries to connect to remote server. Network State will be changed based on the success of connection\n * operation and emits an event notifying the network state change.\n *\n * @param silentMode {boolean} if true and connection is successful, then no event is emitted. Otherwise,\n * events are emitted for network status change.\n * @returns {*} a promise\n */\n private tryToConnect(silentMode = false): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n this.isServiceAvailable(5000).then(() => {\n if (networkState.isServiceAvailable && this._autoConnect) {\n networkState.isConnecting = true;\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n setTimeout(() => {\n networkState.isConnecting = false;\n networkState.isConnected = true;\n StorageService.setItem(IS_CONNECTED_KEY, '' + true);\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n resolve(true);\n }, silentMode ? 0 : 5000);\n } else {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n StorageService.setItem(IS_CONNECTED_KEY, '' + false);\n reject();\n this.checkForNetworkStateChange();\n }\n });\n });\n }\n\n private tryToDisconnect(): Promise<boolean> {\n networkState.isConnected = false;\n networkState.isConnecting = false;\n this.checkForNetworkStateChange();\n StorageService.setItem(IS_CONNECTED_KEY, '' + networkState.isConnected);\n return Promise.resolve(networkState.isConnected);\n }\n}\n\nexport default new NetworkService();\n"],"mappings":";;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GAAG,CAAC,GAAG,IAAI,CAAC;QAC7B,CAAC,MAAM;UACHnF,YAAY,CAACqB,YAAY,GAAG,KAAK;UACjCrB,YAAY,CAACG,WAAW,GAAG,KAAK;UAChCf,cAAc,CAAC8F,OAAO,CAACrF,gBAAgB,EAAE,EAAE,GAAG,KAAK,CAAC;UACpDiD,MAAM,CAAC,CAAC;UACR,IAAI,CAAC1B,0BAA0B,CAAC,CAAC;QACrC;MACJ,CAAC,CAAC;IACN,CAAC,CAAC;EACN;EAEQO,eAAeA,CAAA,EAAqB;IACxC3B,YAAY,CAACG,WAAW,GAAG,KAAK;IAChCH,YAAY,CAACqB,YAAY,GAAG,KAAK;IACjC,IAAI,CAACD,0BAA0B,CAAC,CAAC;IACjChC,cAAc,CAAC8F,OAAO,CAACrF,gBAAgB,EAAE,EAAE,GAAGG,YAAY,CAACG,WAAW,CAAC;IACvE,OAAOiC,OAAO,CAACC,OAAO,CAACrC,YAAY,CAACG,WAAW,CAAC;EACpD;AACJ;AAACR,eAAA,CArSKuB,cAAc,kBACe,gBAAgB;AAsSnD,eAAe,IAAIA,cAAc,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","PartialContext","createContext","PartialProvider","Provider","PartialConsumer","Consumer"],"sources":["partial.service.ts"],"sourcesContent":["import React from 'react';\n\nexport default interface PartialService {\n get: (partialName: string) => any;\n}\n\nconst PartialContext = React.createContext<PartialService>(null as any);\n\nexport const PartialProvider = PartialContext.Provider;\nexport const PartialConsumer = PartialContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAMzB,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAiB,IAAW,CAAC;AAEvE,OAAO,MAAMC,eAAe,GAAGF,cAAc,CAACG,QAAQ;AACtD,OAAO,MAAMC,eAAe,GAAGJ,cAAc,CAACK,QAAQ"}
1
+ {"version":3,"names":["React","PartialContext","createContext","PartialProvider","Provider","PartialConsumer","Consumer"],"sources":["partial.service.ts"],"sourcesContent":["import React from 'react';\n\nexport default interface PartialService {\n get: (partialName: string) => any;\n}\n\nconst PartialContext = React.createContext<PartialService>(null as any);\n\nexport const PartialProvider = PartialContext.Provider;\nexport const PartialConsumer = PartialContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAMzB,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAiB,IAAW,CAAC;AAEvE,OAAO,MAAMC,eAAe,GAAGF,cAAc,CAACG,QAAQ;AACtD,OAAO,MAAMC,eAAe,GAAGJ,cAAc,CAACK,QAAQ","ignoreList":[]}
@@ -1,10 +1,9 @@
1
1
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { assign, isNil } from "lodash-es";
5
5
  export class PropsProvider {
6
- constructor(defaultProps, initprops) {
7
- let onChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (name, $new, $old) => {};
6
+ constructor(defaultProps, initprops, onChange = (name, $new, $old) => {}) {
8
7
  this.defaultProps = defaultProps;
9
8
  this.initprops = initprops;
10
9
  this.onChange = onChange;
@@ -31,7 +30,7 @@ export class PropsProvider {
31
30
  set: (target, prop, value) => {
32
31
  const propName = prop.toString();
33
32
  if (!this.has(propName)) {
34
- return false;
33
+ return true;
35
34
  }
36
35
  this.isDirty = this.isDirty || this.overriddenProps[propName] !== value;
37
36
  this.overriddenProps[propName] = value;
@@ -1 +1 @@
1
- {"version":3,"names":["assign","isNil","PropsProvider","constructor","defaultProps","initprops","onChange","arguments","length","undefined","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","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 false;\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\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,EAAiE;IAAA,IAAvDC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAACG,IAAY,EAAEC,IAAS,EAAEC,IAAS,KAAK,CAAC,CAAC;IAAA,KAApGR,YAAe,GAAfA,YAAe;IAAA,KAAUC,SAAY,GAAZA,SAAY;IAAA,KAAUC,QAAQ,GAARA,QAAQ;IAAAO,eAAA,mBANnD,CAAC,CAAC;IAAAA,eAAA,0BACK,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA,kBAEf,KAAK;IAAAA,eAAA,wBACC,CAAC,CAAC;IAGtB,IAAI,CAACR,SAAS,GAAG,IAAI,CAACA,SAAS,IAAI,CAAC,CAAC;IACrCS,MAAM,CAACC,IAAI,CAACX,YAAY,CAAC,CAACY,OAAO,CAACC,CAAC,IAAI,IAAI,CAACC,aAAa,CAACD,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OK,MAAM;EACf;;EAEA;EACAP,GAAGA,CAACrB,IAAY,EAAEiB,KAAU,EAAE;IAC1B,IAAI,CAACG,QAAQ,CAACpB,IAAI,CAAC,GAAGiB,KAAK;IAC3B,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,CAACrB,QAAQ,CAACI,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"}
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","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\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,CAA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,CAACb,CAAC,CAAC,GAAGU,KAAK;QACxB,IAAI,CAAClB,QAAQ,CAACQ,CAAC,EAAEU,KAAK,EAAEO,QAAQ,CAAC;QACjCO,IAAI,GAAG,IAAI;MACf;MACA,OAAOD,CAAC,IAAIC,IAAI;IACpB,CAAC,EAAE,KAAK,CAAC,IAAI,IAAI,CAACR,OAAO;IAE3B,IAAI,CAACA,OAAO,GAAG,KAAK;IACpB,OAAOK,MAAM;EACf;;EAEA;EACAP,GAAGA,CAACrB,IAAY,EAAEiB,KAAU,EAAE;IAC1B,IAAI,CAACG,QAAQ,CAACpB,IAAI,CAAC,GAAGiB,KAAK;IAC3B,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":[]}
@@ -1,7 +1,7 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
6
6
  import { ScrollView as RNScrollView, View } from 'react-native';
7
7
  const ScrollViewContext = /*#__PURE__*/React.createContext(null);
@@ -1 +1 @@
1
- {"version":3,"names":["React","ScrollView","RNScrollView","View","ScrollViewContext","createContext","ScrollViewProvider","Provider","ScrollViewConsumer","Consumer","Component","constructor","props","_defineProperty","state","scrollEnabled","enableScroll","setState","disableScroll","isScrollEnabled","contentOffset","instance","render","createElement","value","onStartShouldSetResponderCapture","_extends","ref","scrollRef","children"],"sources":["scroll-view.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView as RNScrollView, ScrollViewProps as RNScrollViewProps, View } from 'react-native';\n\nexport interface ScrollViewProps extends RNScrollViewProps {\n\n}\n\nexport interface ScrollViewState {\n scrollEnabled: boolean;\n}\n\nconst ScrollViewContext = React.createContext<ScrollView>(null as any);\n\nexport const ScrollViewProvider = ScrollViewContext.Provider;\nexport const ScrollViewConsumer = ScrollViewContext.Consumer;\n// TODO: implement scroll view that handles FlatList.\nexport class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {\n\n public instance: ScrollView = null as any;\n\n constructor(props: ScrollViewProps) {\n super(props);\n this.state = {\n scrollEnabled: true\n } as ScrollViewState;\n }\n\n enableScroll() {\n this.setState({\n scrollEnabled: true\n });\n }\n\n disableScroll() {\n this.setState({\n scrollEnabled: false\n });\n }\n\n isScrollEnabled() {\n return this.state.scrollEnabled;\n }\n\n get contentOffset(): number {\n return this.instance.contentOffset;\n }\n\n render() {\n return (\n <ScrollViewProvider value={this}>\n <View onStartShouldSetResponderCapture={() => {\n this.setState({\n scrollEnabled: true\n });\n return true;\n }}>\n <RNScrollView\n ref={scrollRef => (this.instance = scrollRef as any)}\n {...this.props} scrollEnabled={this.state.scrollEnabled}>\n {this.props.children}\n </RNScrollView>\n </View>\n </ScrollViewProvider>\n ); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,YAAY,EAAwCC,IAAI,QAAQ,cAAc;AAUrG,MAAMC,iBAAiB,gBAAGJ,KAAK,CAACK,aAAa,CAAa,IAAW,CAAC;AAEtE,OAAO,MAAMC,kBAAkB,GAAGF,iBAAiB,CAACG,QAAQ;AAC5D,OAAO,MAAMC,kBAAkB,GAAGJ,iBAAiB,CAACK,QAAQ;AAC5D;AACA,OAAO,MAAMR,UAAU,SAASD,KAAK,CAACU,SAAS,CAAmC;EAI9EC,WAAWA,CAACC,KAAsB,EAAE;IAChC,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,mBAHa,IAAI;IAI9B,IAAI,CAACC,KAAK,GAAG;MACTC,aAAa,EAAE;IACnB,CAAoB;EACxB;EAEAC,YAAYA,CAAA,EAAG;IACX,IAAI,CAACC,QAAQ,CAAC;MACVF,aAAa,EAAE;IACnB,CAAC,CAAC;EACN;EAEAG,aAAaA,CAAA,EAAG;IACZ,IAAI,CAACD,QAAQ,CAAC;MACVF,aAAa,EAAE;IACnB,CAAC,CAAC;EACN;EAEAI,eAAeA,CAAA,EAAG;IACd,OAAO,IAAI,CAACL,KAAK,CAACC,aAAa;EACnC;EAEA,IAAIK,aAAaA,CAAA,EAAW;IACxB,OAAO,IAAI,CAACC,QAAQ,CAACD,aAAa;EACtC;EAEAE,MAAMA,CAAA,EAAG;IACL,oBACItB,KAAA,CAAAuB,aAAA,CAACjB,kBAAkB;MAACkB,KAAK,EAAE;IAAK,gBAC5BxB,KAAA,CAAAuB,aAAA,CAACpB,IAAI;MAACsB,gCAAgC,EAAEA,CAAA,KAAM;QAC1C,IAAI,CAACR,QAAQ,CAAC;UACVF,aAAa,EAAE;QACnB,CAAC,CAAC;QACF,OAAO,IAAI;MACf;IAAE,gBACEf,KAAA,CAAAuB,aAAA,CAACrB,YAAY,EAAAwB,QAAA;MACTC,GAAG,EAAEC,SAAS,IAAK,IAAI,CAACP,QAAQ,GAAGO;IAAkB,GACjD,IAAI,CAAChB,KAAK;MAAEG,aAAa,EAAE,IAAI,CAACD,KAAK,CAACC;IAAc,IACvD,IAAI,CAACH,KAAK,CAACiB,QACF,CACZ,CACU,CAAC;EAE7B;AACJ"}
1
+ {"version":3,"names":["React","ScrollView","RNScrollView","View","ScrollViewContext","createContext","ScrollViewProvider","Provider","ScrollViewConsumer","Consumer","Component","constructor","props","_defineProperty","state","scrollEnabled","enableScroll","setState","disableScroll","isScrollEnabled","contentOffset","instance","render","createElement","value","onStartShouldSetResponderCapture","_extends","ref","scrollRef","children"],"sources":["scroll-view.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView as RNScrollView, ScrollViewProps as RNScrollViewProps, View } from 'react-native';\n\nexport interface ScrollViewProps extends RNScrollViewProps {\n\n}\n\nexport interface ScrollViewState {\n scrollEnabled: boolean;\n}\n\nconst ScrollViewContext = React.createContext<ScrollView>(null as any);\n\nexport const ScrollViewProvider = ScrollViewContext.Provider;\nexport const ScrollViewConsumer = ScrollViewContext.Consumer;\n// TODO: implement scroll view that handles FlatList.\nexport class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {\n\n public instance: ScrollView = null as any;\n\n constructor(props: ScrollViewProps) {\n super(props);\n this.state = {\n scrollEnabled: true\n } as ScrollViewState;\n }\n\n enableScroll() {\n this.setState({\n scrollEnabled: true\n });\n }\n\n disableScroll() {\n this.setState({\n scrollEnabled: false\n });\n }\n\n isScrollEnabled() {\n return this.state.scrollEnabled;\n }\n\n get contentOffset(): number {\n return this.instance.contentOffset;\n }\n\n render() {\n return (\n <ScrollViewProvider value={this}>\n <View onStartShouldSetResponderCapture={() => {\n this.setState({\n scrollEnabled: true\n });\n return true;\n }}>\n <RNScrollView\n ref={scrollRef => (this.instance = scrollRef as any)}\n {...this.props} scrollEnabled={this.state.scrollEnabled}>\n {this.props.children}\n </RNScrollView>\n </View>\n </ScrollViewProvider>\n ); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,YAAY,EAAwCC,IAAI,QAAQ,cAAc;AAUrG,MAAMC,iBAAiB,gBAAGJ,KAAK,CAACK,aAAa,CAAa,IAAW,CAAC;AAEtE,OAAO,MAAMC,kBAAkB,GAAGF,iBAAiB,CAACG,QAAQ;AAC5D,OAAO,MAAMC,kBAAkB,GAAGJ,iBAAiB,CAACK,QAAQ;AAC5D;AACA,OAAO,MAAMR,UAAU,SAASD,KAAK,CAACU,SAAS,CAAmC;EAI9EC,WAAWA,CAACC,KAAsB,EAAE;IAChC,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,mBAHa,IAAI;IAI9B,IAAI,CAACC,KAAK,GAAG;MACTC,aAAa,EAAE;IACnB,CAAoB;EACxB;EAEAC,YAAYA,CAAA,EAAG;IACX,IAAI,CAACC,QAAQ,CAAC;MACVF,aAAa,EAAE;IACnB,CAAC,CAAC;EACN;EAEAG,aAAaA,CAAA,EAAG;IACZ,IAAI,CAACD,QAAQ,CAAC;MACVF,aAAa,EAAE;IACnB,CAAC,CAAC;EACN;EAEAI,eAAeA,CAAA,EAAG;IACd,OAAO,IAAI,CAACL,KAAK,CAACC,aAAa;EACnC;EAEA,IAAIK,aAAaA,CAAA,EAAW;IACxB,OAAO,IAAI,CAACC,QAAQ,CAACD,aAAa;EACtC;EAEAE,MAAMA,CAAA,EAAG;IACL,oBACItB,KAAA,CAAAuB,aAAA,CAACjB,kBAAkB;MAACkB,KAAK,EAAE;IAAK,gBAC5BxB,KAAA,CAAAuB,aAAA,CAACpB,IAAI;MAACsB,gCAAgC,EAAEA,CAAA,KAAM;QAC1C,IAAI,CAACR,QAAQ,CAAC;UACVF,aAAa,EAAE;QACnB,CAAC,CAAC;QACF,OAAO,IAAI;MACf;IAAE,gBACEf,KAAA,CAAAuB,aAAA,CAACrB,YAAY,EAAAwB,QAAA;MACTC,GAAG,EAAEC,SAAS,IAAK,IAAI,CAACP,QAAQ,GAAGO;IAAkB,GACjD,IAAI,CAAChB,KAAK;MAAEG,aAAa,EAAE,IAAI,CAACD,KAAK,CAACC;IAAc,IACvD,IAAI,CAACH,KAAK,CAACiB,QACF,CACZ,CACU,CAAC;EAE7B;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","SecurityContext","createContext","SecurityProvider","Provider","SecurityConsumer","Consumer"],"sources":["security.service.ts"],"sourcesContent":["import React from 'react';\n\nexport interface SecurityOptions {}\n\nexport interface SecurityService {\n isLoggedIn: Boolean;\n loggedInUser: any;\n appLogin: (options: SecurityOptions, success?: any, failure?: any) => any;\n appLogout: (options: any, success?: any, failure?: any) => any;\n navigateToLandingPage: (data: any) => any;\n}\n\nconst SecurityContext = React.createContext<SecurityService>(null as any);\n\nexport const SecurityProvider = SecurityContext.Provider;\nexport const SecurityConsumer = SecurityContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAYzB,MAAMC,eAAe,gBAAGD,KAAK,CAACE,aAAa,CAAkB,IAAW,CAAC;AAEzE,OAAO,MAAMC,gBAAgB,GAAGF,eAAe,CAACG,QAAQ;AACxD,OAAO,MAAMC,gBAAgB,GAAGJ,eAAe,CAACK,QAAQ"}
1
+ {"version":3,"names":["React","SecurityContext","createContext","SecurityProvider","Provider","SecurityConsumer","Consumer"],"sources":["security.service.ts"],"sourcesContent":["import React from 'react';\n\nexport interface SecurityOptions {}\n\nexport interface SecurityService {\n isLoggedIn: Boolean;\n loggedInUser: any;\n appLogin: (options: SecurityOptions, success?: any, failure?: any) => any;\n appLogout: (options: any, success?: any, failure?: any) => any;\n navigateToLandingPage: (data: any) => any;\n}\n\nconst SecurityContext = React.createContext<SecurityService>(null as any);\n\nexport const SecurityProvider = SecurityContext.Provider;\nexport const SecurityConsumer = SecurityContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAYzB,MAAMC,eAAe,gBAAGD,KAAK,CAACE,aAAa,CAAkB,IAAW,CAAC;AAEzE,OAAO,MAAMC,gBAAgB,GAAGF,eAAe,CAACG,QAAQ;AACxD,OAAO,MAAMC,gBAAgB,GAAGJ,eAAe,CAACK,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","SpinnerContext","createContext","SpinnerProvider","Provider","SpinnerConsumer","Consumer"],"sources":["spinner.service.ts"],"sourcesContent":["import React from 'react';\n\nexport interface DisplayOptions {\n content?: React.ReactNode;\n message?: string;\n spinner?: any;\n}\n\nexport interface SpinnerService {\n show: (options: DisplayOptions) => any;\n hide: (options: DisplayOptions) => any;\n}\n\nconst SpinnerContext = React.createContext<SpinnerService>(null as any);\n\nexport const SpinnerProvider = SpinnerContext.Provider;\nexport const SpinnerConsumer = SpinnerContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAazB,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAiB,IAAW,CAAC;AAEvE,OAAO,MAAMC,eAAe,GAAGF,cAAc,CAACG,QAAQ;AACtD,OAAO,MAAMC,eAAe,GAAGJ,cAAc,CAACK,QAAQ"}
1
+ {"version":3,"names":["React","SpinnerContext","createContext","SpinnerProvider","Provider","SpinnerConsumer","Consumer"],"sources":["spinner.service.ts"],"sourcesContent":["import React from 'react';\n\nexport interface DisplayOptions {\n content?: React.ReactNode;\n message?: string;\n spinner?: any;\n}\n\nexport interface SpinnerService {\n show: (options: DisplayOptions) => any;\n hide: (options: DisplayOptions) => any;\n}\n\nconst SpinnerContext = React.createContext<SpinnerService>(null as any);\n\nexport const SpinnerProvider = SpinnerContext.Provider;\nexport const SpinnerConsumer = SpinnerContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAazB,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAiB,IAAW,CAAC;AAEvE,OAAO,MAAMC,eAAe,GAAGF,cAAc,CAACG,QAAQ;AACtD,OAAO,MAAMC,eAAe,GAAGJ,cAAc,CAACK,QAAQ","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import AsyncStorage from '@react-native-async-storage/async-storage';
5
5
  export class StorageService {
6
6
  constructor() {
@@ -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,OAAQ,GAAE,IAAI,CAACC,MAAO,IAAGD,GAAI,EAAC;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"}
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,OAAQ,GAAE,IAAI,CAACC,MAAO,IAAGD,GAAI,EAAC;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,14 +1,16 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from "react";
6
6
  import { Platform, View } from "react-native";
7
7
  import { get } from "lodash";
8
8
  import injector from "./injector";
9
9
  import { TouchableRipple } from "react-native-paper";
10
- export class TapEvent {
10
+ export const TappableContext = /*#__PURE__*/React.createContext(null);
11
+ export class SyntheticEvent {
11
12
  constructor() {
13
+ // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent
12
14
  _defineProperty(this, "propagationEnabled", true);
13
15
  }
14
16
  stopPropagation() {
@@ -22,88 +24,121 @@ export class Tappable extends React.Component {
22
24
  _defineProperty(this, "lastTap", 0);
23
25
  _defineProperty(this, "lastDoubleTap", 0);
24
26
  _defineProperty(this, "isLongTap", false);
27
+ _defineProperty(this, "parent", null);
28
+ }
29
+ async triggerTap(e = new SyntheticEvent()) {
30
+ var _this$parent;
31
+ if (!e.propagationEnabled) {
32
+ return;
33
+ }
34
+ const target = this.props.target;
35
+ if (this.props.onTap) {
36
+ await this.props.onTap(e);
37
+ } else {
38
+ await (target === null || target === void 0 ? void 0 : target.invokeEventCallback('onTap', [e, target]));
39
+ }
40
+ (_this$parent = this.parent) === null || _this$parent === void 0 || _this$parent.triggerTap(e);
25
41
  }
26
42
  onPress(e) {
27
43
  var _this$props$target;
28
44
  this.lastPress = Date.now();
29
45
  const target = this.props.target;
30
- if (!Tappable.CURRENT_EVENT) {
31
- Tappable.CURRENT_EVENT = new TapEvent();
32
- setTimeout(() => {
33
- Tappable.CURRENT_EVENT = null;
34
- }, 10);
35
- }
36
- const syntheticEvent = Tappable.CURRENT_EVENT;
37
- this.props.onTouchStart && this.props.onTouchStart(e || syntheticEvent);
38
- (_this$props$target = this.props.target) === null || _this$props$target === void 0 ? void 0 : _this$props$target.invokeEventCallback('onTouchstart', [syntheticEvent, this.props.target]);
46
+ this.props.onTouchStart && this.props.onTouchStart(e);
47
+ (_this$props$target = this.props.target) === null || _this$props$target === void 0 || _this$props$target.invokeEventCallback('onTouchstart', [e, this.props.target]);
39
48
  const currentTime = Date.now();
40
49
  const tapDelta = currentTime - this.lastTap;
41
50
  if (this.isLongTap) {
42
51
  this.isLongTap = false;
43
52
  return;
44
53
  }
45
- if (syntheticEvent.propagationEnabled) {
54
+ if (e.propagationEnabled) {
46
55
  var _injector$FOCUSED_ELE;
47
- (_injector$FOCUSED_ELE = injector.FOCUSED_ELEMENT.get()) === null || _injector$FOCUSED_ELE === void 0 ? void 0 : _injector$FOCUSED_ELE.blur();
56
+ (_injector$FOCUSED_ELE = injector.FOCUSED_ELEMENT.get()) === null || _injector$FOCUSED_ELE === void 0 || _injector$FOCUSED_ELE.blur();
48
57
  if (this.lastDoubleTap !== this.lastTap && tapDelta < 500) {
49
58
  this.props.onDoubleTap && this.props.onDoubleTap(e);
50
59
  setTimeout(() => {
51
- target === null || target === void 0 ? void 0 : target.invokeEventCallback('onDoubletap', [syntheticEvent, target]);
60
+ target === null || target === void 0 || target.invokeEventCallback('onDoubletap', [e, target]);
52
61
  }, 200);
53
62
  this.lastDoubleTap = currentTime;
54
63
  }
55
64
  setTimeout(() => {
65
+ var _this$parent2;
66
+ if (!e.propagationEnabled) {
67
+ return;
68
+ }
56
69
  if (this.props.onTap) {
57
- this.props.onTap(e || syntheticEvent);
70
+ this.props.onTap(e);
58
71
  } else {
59
- target === null || target === void 0 ? void 0 : target.invokeEventCallback('onTap', [syntheticEvent, target]);
72
+ target === null || target === void 0 || target.invokeEventCallback('onTap', [e, target]);
60
73
  }
74
+ (_this$parent2 = this.parent) === null || _this$parent2 === void 0 || _this$parent2.onPress(e);
61
75
  }, 200);
62
76
  this.lastTap = currentTime;
63
77
  }
64
78
  }
65
79
  onLongTap(e) {
66
- const syntheticEvent = Tappable.CURRENT_EVENT;
67
- this.props.onLongTap && this.props.onLongTap(e || syntheticEvent);
80
+ if (!e.propagationEnabled) {
81
+ return;
82
+ }
83
+ this.props.onLongTap && this.props.onLongTap(e);
68
84
  setTimeout(() => {
69
- var _this$props$target2;
70
- (_this$props$target2 = this.props.target) === null || _this$props$target2 === void 0 ? void 0 : _this$props$target2.invokeEventCallback('onLongtap', [syntheticEvent, this.props.target]);
85
+ var _this$props$target2, _this$parent3;
86
+ (_this$props$target2 = this.props.target) === null || _this$props$target2 === void 0 || _this$props$target2.invokeEventCallback('onLongtap', [e, this.props.target]);
87
+ (_this$parent3 = this.parent) === null || _this$parent3 === void 0 || _this$parent3.onPressOut(e);
71
88
  }, 200);
72
89
  this.isLongTap = true;
73
90
  }
74
91
  onPressOut(e) {
75
- const syntheticEvent = Tappable.CURRENT_EVENT;
76
- this.props.onTouchEnd && this.props.onTouchEnd(e || syntheticEvent);
92
+ if (!e.propagationEnabled) {
93
+ return;
94
+ }
95
+ this.props.onTouchEnd && this.props.onTouchEnd(e);
77
96
  setTimeout(() => {
78
- var _this$props$target3;
79
- (_this$props$target3 = this.props.target) === null || _this$props$target3 === void 0 ? void 0 : _this$props$target3.invokeEventCallback('onTouchend', [syntheticEvent, this.props.target]);
97
+ var _this$props$target3, _this$parent4;
98
+ (_this$props$target3 = this.props.target) === null || _this$props$target3 === void 0 || _this$props$target3.invokeEventCallback('onTouchend', [e, this.props.target]);
99
+ (_this$parent4 = this.parent) === null || _this$parent4 === void 0 || _this$parent4.onPressOut(e);
80
100
  }, 200);
81
101
  this.isLongTap = false;
82
102
  }
103
+ setParent(parent) {
104
+ if (parent && this.parent !== parent) {
105
+ this.parent = parent;
106
+ }
107
+ }
83
108
  render() {
84
109
  const target = this.props.target;
85
110
  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) {
86
- return /*#__PURE__*/React.createElement(TouchableRipple, _extends({
87
- rippleColor: this.props.rippleColor,
88
- borderless: true
89
- }, Platform.OS === 'android' || Platform.OS === 'web' ? {
90
- accessibilityLabel: this.props.testID,
91
- testID: this.props.testID
92
- } : {
93
- // accessible: false,
94
- testID: this.props.testID
95
- }, this.props.accessibilityProps, {
96
- disabled: get(target === null || target === void 0 ? void 0 : target.proxy, 'disabled'),
97
- style: this.props.styles,
98
- onPress: () => this.onPress(),
99
- onLongPress: () => this.onLongTap(),
100
- onPressOut: () => this.onPressOut()
101
- }), /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children));
111
+ return /*#__PURE__*/React.createElement(TappableContext.Consumer, null, parent => {
112
+ this.setParent(parent);
113
+ return /*#__PURE__*/React.createElement(TappableContext.Provider, {
114
+ value: this
115
+ }, /*#__PURE__*/React.createElement(TouchableRipple, _extends({
116
+ rippleColor: this.props.rippleColor,
117
+ borderless: true
118
+ }, Platform.OS === 'android' || Platform.OS === 'web' ? {
119
+ accessibilityLabel: this.props.testID,
120
+ testID: this.props.testID
121
+ } : {
122
+ // accessible: false,
123
+ testID: this.props.testID
124
+ }, this.props.accessibilityProps, {
125
+ disabled: get(target === null || target === void 0 ? void 0 : target.proxy, 'disabled'),
126
+ style: this.props.styles,
127
+ onPress: e => {
128
+ var _e$target;
129
+ if ((e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.tagName) === 'INPUT') {
130
+ return;
131
+ }
132
+ this.onPress(new SyntheticEvent());
133
+ },
134
+ onLongPress: e => this.onLongTap(new SyntheticEvent()),
135
+ onPressOut: e => this.onPressOut(new SyntheticEvent())
136
+ }), /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children)));
137
+ });
102
138
  }
103
139
  return /*#__PURE__*/React.createElement(View, {
104
140
  style: this.props.styles
105
141
  }, this.props.children);
106
142
  }
107
143
  }
108
- _defineProperty(Tappable, "CURRENT_EVENT", null);
109
144
  //# sourceMappingURL=tappable.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","View","get","injector","TouchableRipple","TapEvent","constructor","_defineProperty","stopPropagation","propagationEnabled","Tappable","Component","props","onPress","e","_this$props$target","lastPress","Date","now","target","CURRENT_EVENT","setTimeout","syntheticEvent","onTouchStart","invokeEventCallback","currentTime","tapDelta","lastTap","isLongTap","_injector$FOCUSED_ELE","FOCUSED_ELEMENT","blur","lastDoubleTap","onDoubleTap","onTap","onLongTap","_this$props$target2","onPressOut","onTouchEnd","_this$props$target3","render","onLongtap","onDoubletap","createElement","_extends","rippleColor","borderless","OS","accessibilityLabel","testID","accessibilityProps","disabled","proxy","style","styles","onLongPress","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 } from \"react-native\";\nimport { get } from \"lodash\";\nimport injector from \"./injector\";\nimport { TouchableRipple } from \"react-native-paper\";\nimport ThemeVariables from \"../styles/theme.variables\";\n\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 TapEvent {\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\n static CURRENT_EVENT: TapEvent = null as any;\n \n constructor(props: any) {\n super(props);\n }\n\n onPress(e?: GestureResponderEvent): void { \n this.lastPress = Date.now();\n const target = this.props.target;\n if (!Tappable.CURRENT_EVENT) {\n Tappable.CURRENT_EVENT = new TapEvent();\n setTimeout(() => {\n Tappable.CURRENT_EVENT = null as any;\n }, 10);\n }\n const syntheticEvent = Tappable.CURRENT_EVENT;\n this.props.onTouchStart && this.props.onTouchStart(e || syntheticEvent);\n this.props.target?.invokeEventCallback('onTouchstart', [syntheticEvent, 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 (syntheticEvent.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', [syntheticEvent, target]);\n }, 200);\n this.lastDoubleTap = currentTime;\n }\n setTimeout(() => {\n if (this.props.onTap) {\n this.props.onTap(e || syntheticEvent);\n } else {\n target?.invokeEventCallback('onTap', [syntheticEvent, target]);\n }\n }, 200);\n this.lastTap = currentTime;\n }\n }\n\n onLongTap(e?: GestureResponderEvent): void {\n const syntheticEvent = Tappable.CURRENT_EVENT;\n this.props.onLongTap && this.props.onLongTap(e || syntheticEvent);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onLongtap', [syntheticEvent, this.props.target]);\n }, 200);\n this.isLongTap = true;\n }\n \n onPressOut(e?: GestureResponderEvent): void {\n const syntheticEvent = Tappable.CURRENT_EVENT;\n this.props.onTouchEnd && this.props.onTouchEnd(e || syntheticEvent);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onTouchend', [syntheticEvent, this.props.target]);\n }, 200);\n this.isLongTap = false;\n }\n\n render() {\n const target = this.props.target;\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 <TouchableRipple\n rippleColor={this.props.rippleColor}\n borderless = {true}\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={() => this.onPress()}\n onLongPress={() => this.onLongTap()}\n onPressOut={() => this.onPressOut()}>\n <>{this.props.children}</>\n </TouchableRipple>\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,QAAQ,cAAc;AACpE,SAASC,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,eAAe,QAAQ,oBAAoB;AAkBpD,OAAO,MAAMC,QAAQ,CAAC;EAGlBC,WAAWA,CAAA,EAAG;IAAAC,eAAA,6BAFO,IAAI;EAIzB;EAEAC,eAAeA,CAAA,EAAG;IACd,IAAI,CAACC,kBAAkB,GAAG,KAAK;EACnC;AACJ;AAEA,OAAO,MAAMC,QAAQ,SAASX,KAAK,CAACY,SAAS,CAAqB;EAQ9DL,WAAWA,CAACM,KAAU,EAAE;IACpB,KAAK,CAACA,KAAK,CAAC;IAACL,eAAA,oBARG,CAAC;IAAAA,eAAA,kBACH,CAAC;IAAAA,eAAA,wBACK,CAAC;IAAAA,eAAA,oBACL,KAAK;EAMzB;EAEAM,OAAOA,CAACC,CAAyB,EAAQ;IAAA,IAAAC,kBAAA;IACrC,IAAI,CAACC,SAAS,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;IAC3B,MAAMC,MAAM,GAA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AAO;QACzBzC,OAAO,EAAEA,CAAA,KAAM,IAAI,CAACA,OAAO,CAAC,CAAE;QAC9B0C,WAAW,EAAEA,CAAA,KAAM,IAAI,CAACpB,SAAS,CAAC,CAAE;QACpCE,UAAU,EAAEA,CAAA,KAAM,IAAI,CAACA,UAAU,CAAC;MAAE,iBAChCtC,KAAA,CAAA4C,aAAA,CAAA5C,KAAA,CAAAyD,QAAA,QAAG,IAAI,CAAC5C,KAAK,CAAC6C,QAAW,CACZ,CAAC;IAE1B;IACA,oBAAQ1D,KAAA,CAAA4C,aAAA,CAAC1C,IAAI;MAACoD,KAAK,EAAE,IAAI,CAACzC,KAAK,CAAC0C;IAAO,GAAE,IAAI,CAAC1C,KAAK,CAAC6C,QAAe,CAAC;EACxE;AACJ;AAAClD,eAAA,CApGYG,QAAQ,mBAMgB,IAAI"}
1
+ {"version":3,"names":["React","Platform","View","get","injector","TouchableRipple","TappableContext","createContext","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","onLongtap","onDoubletap","createElement","Consumer","Provider","value","_extends","rippleColor","borderless","OS","accessibilityLabel","testID","accessibilityProps","disabled","proxy","style","styles","_e$target","tagName","onLongPress","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 } 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);\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 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 <TappableContext.Consumer>{(parent) => {\n this.setParent(parent);\n return( <TappableContext.Provider value={this}>\n <TouchableRipple\n rippleColor={this.props.rippleColor}\n borderless = {true}\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 <>{this.props.children}</>\n </TouchableRipple>\n </TappableContext.Provider>)}}</TappableContext.Consumer>\n \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,QAAQ,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KAAK,EAAE,IAAI,CAACjD,KAAK,CAACkD;IAAO,GAAE,IAAI,CAAClD,KAAK,CAACuD,QAAe,CAAC;EACxE;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","TextIdPrefixContext","createContext","TestIdPrefixProvider","Provider","TextIdPrefixConsumer","Consumer"],"sources":["testid.provider.ts"],"sourcesContent":["import React from 'react';\n\nconst TextIdPrefixContext = React.createContext<string | undefined>(null as any);\n\nexport const TestIdPrefixProvider = TextIdPrefixContext.Provider;\nexport const TextIdPrefixConsumer = TextIdPrefixContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,mBAAmB,gBAAGD,KAAK,CAACE,aAAa,CAAqB,IAAW,CAAC;AAEhF,OAAO,MAAMC,oBAAoB,GAAGF,mBAAmB,CAACG,QAAQ;AAChE,OAAO,MAAMC,oBAAoB,GAAGJ,mBAAmB,CAACK,QAAQ"}
1
+ {"version":3,"names":["React","TextIdPrefixContext","createContext","TestIdPrefixProvider","Provider","TextIdPrefixConsumer","Consumer"],"sources":["testid.provider.ts"],"sourcesContent":["import React from 'react';\n\nconst TextIdPrefixContext = React.createContext<string | undefined>(null as any);\n\nexport const TestIdPrefixProvider = TextIdPrefixContext.Provider;\nexport const TextIdPrefixConsumer = TextIdPrefixContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,mBAAmB,gBAAGD,KAAK,CAACE,aAAa,CAAqB,IAAW,CAAC;AAEhF,OAAO,MAAMC,oBAAoB,GAAGF,mBAAmB,CAACG,QAAQ;AAChE,OAAO,MAAMC,oBAAoB,GAAGJ,mBAAmB,CAACK,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","ToastContext","createContext","ToastProvider","Provider","ToastConsumer","Consumer"],"sources":["toast.service.ts"],"sourcesContent":["import React from 'react';\n\nexport interface ToastOptions {\n elevationIndex: number;\n content?: React.ReactNode;\n onClick?: () => void;\n onClose?: () => void;\n text: string;\n type: 'success' | 'warning' | 'error' | 'info' | 'loading';\n placement: string;\n duration?: number;\n name: string;\n styles: any;\n hideOnClick?: boolean;\n}\n\nexport interface ToastService {\n showToast: (options: ToastOptions) => void;\n hideToast: (options: ToastOptions) => void;\n}\n\nconst ToastContext = React.createContext<ToastService>(null as any);\n\nexport const ToastProvider = ToastContext.Provider;\nexport const ToastConsumer = ToastContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAqBzB,MAAMC,YAAY,gBAAGD,KAAK,CAACE,aAAa,CAAe,IAAW,CAAC;AAEnE,OAAO,MAAMC,aAAa,GAAGF,YAAY,CAACG,QAAQ;AAClD,OAAO,MAAMC,aAAa,GAAGJ,YAAY,CAACK,QAAQ"}
1
+ {"version":3,"names":["React","ToastContext","createContext","ToastProvider","Provider","ToastConsumer","Consumer"],"sources":["toast.service.ts"],"sourcesContent":["import React from 'react';\n\nexport interface ToastOptions {\n elevationIndex: number;\n content?: React.ReactNode;\n onClick?: () => void;\n onClose?: () => void;\n text: string;\n type: 'success' | 'warning' | 'error' | 'info' | 'loading';\n placement: string;\n duration?: number;\n name: string;\n styles: any;\n hideOnClick?: boolean;\n}\n\nexport interface ToastService {\n showToast: (options: ToastOptions) => void;\n hideToast: (options: ToastOptions) => void;\n}\n\nconst ToastContext = React.createContext<ToastService>(null as any);\n\nexport const ToastProvider = ToastContext.Provider;\nexport const ToastConsumer = ToastContext.Consumer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAqBzB,MAAMC,YAAY,gBAAGD,KAAK,CAACE,aAAa,CAAe,IAAW,CAAC;AAEnE,OAAO,MAAMC,aAAa,GAAGF,YAAY,CAACG,QAAQ;AAClD,OAAO,MAAMC,aAAa,GAAGJ,YAAY,CAACK,QAAQ","ignoreList":[]}