@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-next.NULL

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/actions/notification-action.js.map +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
  7. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
  9. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel.component.js +214 -69
  11. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
  13. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel.styles.js +22 -10
  15. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  16. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  17. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  18. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  19. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  20. app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
  21. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
  23. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  24. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  25. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  26. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  27. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  28. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  29. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  30. app-rn-runtime/components/basic/button/button.component.js +20 -7
  31. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  32. app-rn-runtime/components/basic/button/button.styles.js +15 -5
  33. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  34. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
  35. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  36. app-rn-runtime/components/basic/icon/icon.component.js +11 -5
  37. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  38. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  39. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  40. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  41. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  42. app-rn-runtime/components/basic/label/label.component.js +79 -11
  43. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  44. app-rn-runtime/components/basic/label/label.props.js +1 -0
  45. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  46. app-rn-runtime/components/basic/label/label.styles.js +5 -0
  47. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  48. app-rn-runtime/components/basic/message/message.component.js +6 -3
  49. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  50. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  51. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
  53. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  54. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  55. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  57. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  58. app-rn-runtime/components/basic/search/search.component.js +12 -6
  59. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  60. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  61. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  62. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  63. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  64. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  65. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/video/video.component.js +2 -1
  67. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  68. app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  70. app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
  71. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
  75. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  76. app-rn-runtime/components/chart/basechart.component.js +158 -46
  77. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  78. app-rn-runtime/components/chart/basechart.props.js +18 -4
  79. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  80. app-rn-runtime/components/chart/basechart.styles.js +44 -2
  81. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
  83. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  84. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
  85. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
  87. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  89. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  90. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
  91. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  92. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  93. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  94. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +275 -0
  95. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
  96. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +17 -0
  97. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
  98. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
  99. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
  100. app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
  101. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  102. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
  103. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/container.component.js +14 -4
  105. app-rn-runtime/components/container/container.component.js.map +1 -1
  106. app-rn-runtime/components/container/container.props.js +1 -0
  107. app-rn-runtime/components/container/container.props.js.map +1 -1
  108. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  109. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  110. app-rn-runtime/components/container/panel/panel.component.js +44 -62
  111. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  112. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  113. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  114. app-rn-runtime/components/container/partial-host.component.js +1 -1
  115. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
  117. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  118. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
  119. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  120. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  121. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  122. app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
  123. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  124. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
  125. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  126. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  127. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  128. app-rn-runtime/components/container/wizard/wizard.component.js +139 -22
  129. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  130. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  131. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  132. app-rn-runtime/components/container/wizard/wizard.styles.js +117 -6
  133. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  134. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
  135. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  136. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
  137. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  138. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  139. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  140. app-rn-runtime/components/data/card/card.component.js +3 -2
  141. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  143. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  144. app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
  145. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  146. app-rn-runtime/components/data/form/form.component.js +12 -6
  147. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  150. app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
  151. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.component.js +93 -31
  153. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.props.js +7 -0
  155. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  156. app-rn-runtime/components/data/list/list.styles.js +12 -5
  157. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  158. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  159. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  160. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  161. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  162. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  163. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  164. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  165. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  166. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  167. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  168. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  169. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  170. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  171. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  172. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  173. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  174. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  175. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  176. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
  177. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  178. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
  179. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  180. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
  181. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  182. app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
  183. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  184. app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
  185. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  186. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  187. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  188. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  189. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  190. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  191. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  192. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  193. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  194. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  195. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  196. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
  197. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  198. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
  199. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  200. app-rn-runtime/components/input/chips/chips.component.js +15 -4
  201. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  202. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  203. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  204. app-rn-runtime/components/input/composite/composite.component.js +8 -1
  205. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  206. app-rn-runtime/components/input/composite/composite.props.js +1 -0
  207. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  208. app-rn-runtime/components/input/composite/composite.styles.js +16 -1
  209. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  210. app-rn-runtime/components/input/currency/currency.component.js +21 -3
  211. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  212. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  213. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  214. app-rn-runtime/components/input/currency/currency.styles.js +31 -5
  215. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  216. app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
  217. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  218. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  219. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  220. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  221. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  222. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  223. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  224. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  225. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  226. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  227. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  228. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  229. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  230. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  231. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  232. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  233. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  234. app-rn-runtime/components/input/number/number.component.js +16 -2
  235. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  236. app-rn-runtime/components/input/number/number.props.js +1 -0
  237. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  238. app-rn-runtime/components/input/number/number.styles.js +23 -2
  239. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  240. app-rn-runtime/components/input/radioset/radioset.component.js +13 -6
  241. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  242. app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
  243. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  244. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -9
  245. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  246. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  247. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  248. app-rn-runtime/components/input/select/select.component.js +17 -13
  249. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  250. app-rn-runtime/components/input/select/select.styles.js +8 -4
  251. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  252. app-rn-runtime/components/input/slider/slider.component.js +99 -23
  253. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  254. app-rn-runtime/components/input/slider/slider.styles.js +30 -3
  255. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  256. app-rn-runtime/components/input/switch/switch.component.js +11 -5
  257. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  258. app-rn-runtime/components/input/switch/switch.styles.js +15 -9
  259. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  260. app-rn-runtime/components/input/text/text.component.js +12 -1
  261. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  262. app-rn-runtime/components/input/text/text.props.js +1 -0
  263. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  264. app-rn-runtime/components/input/text/text.styles.js +22 -1
  265. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  266. app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
  267. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  268. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  269. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  270. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  271. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  272. app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
  273. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  274. app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
  275. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  276. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
  277. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  278. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  279. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  280. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
  281. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  282. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  283. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  284. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  285. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  286. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  287. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  288. app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
  289. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  290. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  291. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  292. app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
  293. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  294. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  295. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  296. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  297. app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
  298. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  299. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  300. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  301. app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
  302. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  303. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  304. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  305. app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
  306. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  307. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  308. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  309. app-rn-runtime/components/page/tabbar/tabbar.styles.js +76 -1
  310. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  311. app-rn-runtime/core/base.component.js +84 -37
  312. app-rn-runtime/core/base.component.js.map +1 -1
  313. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  314. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  315. app-rn-runtime/core/components/textinput.component.js +25 -2
  316. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  317. app-rn-runtime/core/constant.service.js +22 -0
  318. app-rn-runtime/core/constant.service.js.map +1 -0
  319. app-rn-runtime/core/formatters.js +9 -2
  320. app-rn-runtime/core/formatters.js.map +1 -1
  321. app-rn-runtime/core/imageSizeEstimator.js +4 -0
  322. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  323. app-rn-runtime/core/key.extractor.js +22 -0
  324. app-rn-runtime/core/key.extractor.js.map +1 -0
  325. app-rn-runtime/core/tappable.component.js +49 -12
  326. app-rn-runtime/core/tappable.component.js.map +1 -1
  327. app-rn-runtime/core/testid.provider.js +5 -0
  328. app-rn-runtime/core/testid.provider.js.map +1 -0
  329. app-rn-runtime/core/utils.js +16 -0
  330. app-rn-runtime/core/utils.js.map +1 -1
  331. app-rn-runtime/gestures/swipe.animation.js +90 -16
  332. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  333. app-rn-runtime/package.json +6 -3
  334. app-rn-runtime/runtime/App.js +55 -22
  335. app-rn-runtime/runtime/App.js.map +1 -1
  336. app-rn-runtime/runtime/base-fragment.component.js +27 -6
  337. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  338. app-rn-runtime/runtime/base-page.component.js +25 -2
  339. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  340. app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
  341. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  342. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  343. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  344. app-rn-runtime/runtime/services/app-security.service.js +14 -3
  345. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  346. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  347. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  348. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  349. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  350. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  351. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  352. app-rn-runtime/styles/theme.js +66 -1
  353. app-rn-runtime/styles/theme.js.map +1 -1
  354. app-rn-runtime/styles/theme.variables.js +24 -3
  355. app-rn-runtime/styles/theme.variables.js.map +1 -1
  356. app-rn-runtime/variables/http.service.js +1 -1
  357. app-rn-runtime/variables/http.service.js.map +1 -1
  358. app-rn-runtime/variables/live-variable.js +1 -0
  359. app-rn-runtime/variables/live-variable.js.map +1 -1
  360. app-rn-runtime/variables/model-variable.js +13 -1
  361. app-rn-runtime/variables/model-variable.js.map +1 -1
  362. app-rn-runtime/variables/service-variable.js +1 -0
  363. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1,4 +1,5 @@
1
1
  import { BaseAction } from "./base-action";
2
+ import { VariableEvents } from '../variables/base-variable';
2
3
  import { get } from 'lodash';
3
4
  export class LoginAction extends BaseAction {
4
5
  constructor(config) {
@@ -9,6 +10,7 @@ export class LoginAction extends BaseAction {
9
10
  if (!get(options, 'formData')) {
10
11
  params = this.config.paramProvider();
11
12
  }
13
+ this.notify(VariableEvents.BEFORE_INVOKE, [this, params]);
12
14
  return this.config.securityService().appLogin({
13
15
  baseURL: this.config.baseURL,
14
16
  formData: get(options, 'formData') || params,
@@ -16,12 +18,14 @@ export class LoginAction extends BaseAction {
16
18
  }).then(data => {
17
19
  this.config.onSuccess && this.config.onSuccess(this, get(data, 'userInfo'));
18
20
  successcb && successcb(data);
21
+ this.notify(VariableEvents.AFTER_INVOKE, [this, data]);
19
22
  if (this.config.useDefaultSuccessHandler) {
20
23
  this.config.securityService().navigateToLandingPage(data);
21
24
  }
22
25
  }).catch(error => {
23
26
  this.config.onError && this.config.onError(this, error);
24
27
  errorcb && errorcb(error);
28
+ this.notify(VariableEvents.AFTER_INVOKE, [this, error]);
25
29
  });
26
30
  }
27
31
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BaseAction","get","LoginAction","constructor","config","invoke","options","successcb","errorcb","params","paramProvider","securityService","appLogin","baseURL","formData","useDefaultSuccessHandler","then","data","onSuccess","navigateToLandingPage","catch","error","onError"],"sources":["login-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { SecurityService } from \"@wavemaker/app-rn-runtime/core/security.service\";\nimport { get } from 'lodash';\nexport interface LoginActionConfig extends ActionConfig {\n securityService: () => SecurityService;\n baseURL: String;\n useDefaultSuccessHandler: boolean;\n}\nexport class LoginAction extends BaseAction<LoginActionConfig> {\n constructor(config: LoginActionConfig) {\n super(config);\n }\n\n invoke(options: any, successcb?: Function, errorcb?: Function) {\n let params;\n if (!get(options, 'formData')) {\n params = this.config.paramProvider();\n }\n return this.config.securityService().appLogin(\n {\n baseURL: this.config.baseURL,\n formData: get(options, 'formData') || params,\n useDefaultSuccessHandler: this.config.useDefaultSuccessHandler\n })\n .then((data: any) => {\n this.config.onSuccess && this.config.onSuccess(this, get(data, 'userInfo'));\n successcb && successcb(data);\n if (this.config.useDefaultSuccessHandler) {\n this.config.securityService().navigateToLandingPage(data);\n }\n })\n .catch((error: any) => {\n this.config.onError && this.config.onError(this, error);\n errorcb && errorcb(error);\n });\n }\n}\n"],"mappings":"AAAA,SAAuBA,UAAU,QAAQ,eAAe;AAExD,SAASC,GAAG,QAAQ,QAAQ;AAM5B,OAAO,MAAMC,WAAW,SAASF,UAAU,CAAoB;EAC3DG,WAAWA,CAACC,MAAyB,EAAE;IACnC,KAAK,CAACA,MAAM,CAAC;EACjB;EAEAC,MAAMA,CAACC,OAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC7D,IAAIC,MAAM;IACV,IAAI,CAACR,GAAG,CAACK,OAAO,EAAE,UAAU,CAAC,EAAE;MAC7BG,MAAM,GAAG,IAAI,CAACL,MAAM,CAACM,aAAa,CAAC,CAAC;IACtC;IACA,OAAO,IAAI,CAACN,MAAM,CAACO,eAAe,CAAC,CAAC,CAACC,QAAQ,CAC3C;MACEC,OAAO,EAAE,IAAI,CAACT,MAAM,CAACS,OAAO;MAC5BC,QAAQ,EAAEb,GAAG,CAACK,OAAO,EAAE,UAAU,CAAC,IAAIG,MAAM;MAC5CM,wBAAwB,EAAE,IAAI,CAACX,MAAM,CAACW;IAC1C,CAAC,CAAC,CACCC,IAAI,CAAEC,IAAS,IAAK;MACjB,IAAI,CAACb,MAAM,CAACc,SAAS,IAAI,IAAI,CAACd,MAAM,CAACc,SAAS,CAAC,IAAI,EAAEjB,GAAG,CAACgB,IAAI,EAAE,UAAU,CAAC,CAAC;MAC3EV,SAAS,IAAIA,SAAS,CAACU,IAAI,CAAC;MAC5B,IAAI,IAAI,CAACb,MAAM,CAACW,wBAAwB,EAAE;QACxC,IAAI,CAACX,MAAM,CAACO,eAAe,CAAC,CAAC,CAACQ,qBAAqB,CAACF,IAAI,CAAC;MAC3D;IACJ,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAU,IAAK;MACnB,IAAI,CAACjB,MAAM,CAACkB,OAAO,IAAI,IAAI,CAAClB,MAAM,CAACkB,OAAO,CAAC,IAAI,EAAED,KAAK,CAAC;MACvDb,OAAO,IAAIA,OAAO,CAACa,KAAK,CAAC;IAC7B,CAAC,CAAC;EACN;AACJ"}
1
+ {"version":3,"names":["BaseAction","VariableEvents","get","LoginAction","constructor","config","invoke","options","successcb","errorcb","params","paramProvider","notify","BEFORE_INVOKE","securityService","appLogin","baseURL","formData","useDefaultSuccessHandler","then","data","onSuccess","AFTER_INVOKE","navigateToLandingPage","catch","error","onError"],"sources":["login-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { VariableEvents } from '../variables/base-variable';\nimport { SecurityService } from \"@wavemaker/app-rn-runtime/core/security.service\";\nimport { get } from 'lodash';\nexport interface LoginActionConfig extends ActionConfig {\n securityService: () => SecurityService;\n baseURL: String;\n useDefaultSuccessHandler: boolean;\n}\nexport class LoginAction extends BaseAction<LoginActionConfig> {\n constructor(config: LoginActionConfig) {\n super(config);\n }\n\n invoke(options: any, successcb?: Function, errorcb?: Function) {\n let params;\n if (!get(options, 'formData')) {\n params = this.config.paramProvider();\n }\n this.notify(VariableEvents.BEFORE_INVOKE, [this, params]);\n return this.config.securityService().appLogin(\n {\n baseURL: this.config.baseURL,\n formData: get(options, 'formData') || params,\n useDefaultSuccessHandler: this.config.useDefaultSuccessHandler\n })\n .then((data: any) => {\n this.config.onSuccess && this.config.onSuccess(this, get(data, 'userInfo'));\n successcb && successcb(data);\n this.notify(VariableEvents.AFTER_INVOKE, [this, data]);\n if (this.config.useDefaultSuccessHandler) {\n this.config.securityService().navigateToLandingPage(data);\n }\n })\n .catch((error: any) => {\n this.config.onError && this.config.onError(this, error);\n errorcb && errorcb(error);\n this.notify(VariableEvents.AFTER_INVOKE, [this, error]);\n });\n }\n}\n"],"mappings":"AAAA,SAAuBA,UAAU,QAAQ,eAAe;AACxD,SAASC,cAAc,QAAQ,4BAA4B;AAE3D,SAASC,GAAG,QAAQ,QAAQ;AAM5B,OAAO,MAAMC,WAAW,SAASH,UAAU,CAAoB;EAC3DI,WAAWA,CAACC,MAAyB,EAAE;IACnC,KAAK,CAACA,MAAM,CAAC;EACjB;EAEAC,MAAMA,CAACC,OAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC7D,IAAIC,MAAM;IACV,IAAI,CAACR,GAAG,CAACK,OAAO,EAAE,UAAU,CAAC,EAAE;MAC7BG,MAAM,GAAG,IAAI,CAACL,MAAM,CAACM,aAAa,CAAC,CAAC;IACtC;IACA,IAAI,CAACC,MAAM,CAACX,cAAc,CAACY,aAAa,EAAE,CAAC,IAAI,EAAEH,MAAM,CAAC,CAAC;IACzD,OAAO,IAAI,CAACL,MAAM,CAACS,eAAe,CAAC,CAAC,CAACC,QAAQ,CAC3C;MACEC,OAAO,EAAE,IAAI,CAACX,MAAM,CAACW,OAAO;MAC5BC,QAAQ,EAAEf,GAAG,CAACK,OAAO,EAAE,UAAU,CAAC,IAAIG,MAAM;MAC5CQ,wBAAwB,EAAE,IAAI,CAACb,MAAM,CAACa;IAC1C,CAAC,CAAC,CACCC,IAAI,CAAEC,IAAS,IAAK;MACjB,IAAI,CAACf,MAAM,CAACgB,SAAS,IAAI,IAAI,CAAChB,MAAM,CAACgB,SAAS,CAAC,IAAI,EAAEnB,GAAG,CAACkB,IAAI,EAAE,UAAU,CAAC,CAAC;MAC3EZ,SAAS,IAAIA,SAAS,CAACY,IAAI,CAAC;MAC5B,IAAI,CAACR,MAAM,CAACX,cAAc,CAACqB,YAAY,EAAE,CAAC,IAAI,EAAEF,IAAI,CAAC,CAAC;MACtD,IAAI,IAAI,CAACf,MAAM,CAACa,wBAAwB,EAAE;QACxC,IAAI,CAACb,MAAM,CAACS,eAAe,CAAC,CAAC,CAACS,qBAAqB,CAACH,IAAI,CAAC;MAC3D;IACJ,CAAC,CAAC,CACDI,KAAK,CAAEC,KAAU,IAAK;MACnB,IAAI,CAACpB,MAAM,CAACqB,OAAO,IAAI,IAAI,CAACrB,MAAM,CAACqB,OAAO,CAAC,IAAI,EAAED,KAAK,CAAC;MACvDhB,OAAO,IAAIA,OAAO,CAACgB,KAAK,CAAC;MACzB,IAAI,CAACb,MAAM,CAACX,cAAc,CAACqB,YAAY,EAAE,CAAC,IAAI,EAAEG,KAAK,CAAC,CAAC;IAC3D,CAAC,CAAC;EACN;AACJ"}
@@ -1,17 +1,21 @@
1
1
  import { BaseAction } from "./base-action";
2
+ import { VariableEvents } from '../variables/base-variable';
2
3
  export class LogoutAction extends BaseAction {
3
4
  constructor(config) {
4
5
  super(config);
5
6
  }
6
7
  invoke(options, successcb, errorcb) {
8
+ this.notify(VariableEvents.BEFORE_INVOKE, [this]);
7
9
  return this.config.securityService().appLogout({
8
10
  baseURL: this.config.baseURL
9
11
  }).then(data => {
12
+ this.notify(VariableEvents.AFTER_INVOKE, [this, data]);
10
13
  this.config.onSuccess && this.config.onSuccess(this, data);
11
14
  successcb && successcb(data);
12
15
  }).catch(error => {
13
16
  this.config.onError && this.config.onError(this, error);
14
17
  errorcb && errorcb(error);
18
+ this.notify(VariableEvents.AFTER_INVOKE, [this, error]);
15
19
  });
16
20
  }
17
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BaseAction","LogoutAction","constructor","config","invoke","options","successcb","errorcb","securityService","appLogout","baseURL","then","data","onSuccess","catch","error","onError"],"sources":["logout-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { SecurityService } from \"@wavemaker/app-rn-runtime/core/security.service\";\nexport interface LogoutActionConfig extends ActionConfig {\n securityService: () => SecurityService;\n baseURL: String;\n}\nexport class LogoutAction extends BaseAction<LogoutActionConfig> {\n constructor(config: LogoutActionConfig) {\n super(config);\n }\n\n invoke(options: any, successcb?: Function, errorcb?: Function) {\n return this.config.securityService().appLogout({baseURL: this.config.baseURL})\n .then((data: any) => {\n this.config.onSuccess && this.config.onSuccess(this, data);\n successcb && successcb(data);\n })\n .catch((error: any) => {\n this.config.onError && this.config.onError(this, error);\n errorcb && errorcb(error);\n });\n }\n}"],"mappings":"AAAA,SAAuBA,UAAU,QAAQ,eAAe;AAMxD,OAAO,MAAMC,YAAY,SAASD,UAAU,CAAqB;EAC7DE,WAAWA,CAACC,MAA0B,EAAE;IACpC,KAAK,CAACA,MAAM,CAAC;EACjB;EAEAC,MAAMA,CAACC,OAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC3D,OAAO,IAAI,CAACJ,MAAM,CAACK,eAAe,CAAC,CAAC,CAACC,SAAS,CAAC;MAACC,OAAO,EAAE,IAAI,CAACP,MAAM,CAACO;IAAO,CAAC,CAAC,CAC7EC,IAAI,CAAEC,IAAS,IAAK;MACjB,IAAI,CAACT,MAAM,CAACU,SAAS,IAAI,IAAI,CAACV,MAAM,CAACU,SAAS,CAAC,IAAI,EAAED,IAAI,CAAC;MAC1DN,SAAS,IAAIA,SAAS,CAACM,IAAI,CAAC;IAChC,CAAC,CAAC,CACDE,KAAK,CAAEC,KAAU,IAAK;MACnB,IAAI,CAACZ,MAAM,CAACa,OAAO,IAAI,IAAI,CAACb,MAAM,CAACa,OAAO,CAAC,IAAI,EAAED,KAAK,CAAC;MACvDR,OAAO,IAAIA,OAAO,CAACQ,KAAK,CAAC;IAC7B,CAAC,CAAC;EACN;AACJ"}
1
+ {"version":3,"names":["BaseAction","VariableEvents","LogoutAction","constructor","config","invoke","options","successcb","errorcb","notify","BEFORE_INVOKE","securityService","appLogout","baseURL","then","data","AFTER_INVOKE","onSuccess","catch","error","onError"],"sources":["logout-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { SecurityService } from \"@wavemaker/app-rn-runtime/core/security.service\";\nimport { VariableEvents } from '../variables/base-variable';\nexport interface LogoutActionConfig extends ActionConfig {\n securityService: () => SecurityService;\n baseURL: String;\n}\nexport class LogoutAction extends BaseAction<LogoutActionConfig> {\n constructor(config: LogoutActionConfig) {\n super(config);\n }\n\n invoke(options: any, successcb?: Function, errorcb?: Function) {\n this.notify(VariableEvents.BEFORE_INVOKE, [this]);\n return this.config.securityService().appLogout({baseURL: this.config.baseURL})\n .then((data: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [this, data]);\n this.config.onSuccess && this.config.onSuccess(this, data);\n successcb && successcb(data); \n })\n .catch((error: any) => {\n this.config.onError && this.config.onError(this, error);\n errorcb && errorcb(error);\n this.notify(VariableEvents.AFTER_INVOKE, [this, error]);\n });\n }\n}"],"mappings":"AAAA,SAAuBA,UAAU,QAAQ,eAAe;AAExD,SAASC,cAAc,QAAQ,4BAA4B;AAK3D,OAAO,MAAMC,YAAY,SAASF,UAAU,CAAqB;EAC7DG,WAAWA,CAACC,MAA0B,EAAE;IACpC,KAAK,CAACA,MAAM,CAAC;EACjB;EAEAC,MAAMA,CAACC,OAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC3D,IAAI,CAACC,MAAM,CAACR,cAAc,CAACS,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,IAAI,CAACN,MAAM,CAACO,eAAe,CAAC,CAAC,CAACC,SAAS,CAAC;MAACC,OAAO,EAAE,IAAI,CAACT,MAAM,CAACS;IAAO,CAAC,CAAC,CAC7EC,IAAI,CAAEC,IAAS,IAAK;MACjB,IAAI,CAACN,MAAM,CAACR,cAAc,CAACe,YAAY,EAAE,CAAC,IAAI,EAAED,IAAI,CAAC,CAAC;MACtD,IAAI,CAACX,MAAM,CAACa,SAAS,IAAI,IAAI,CAACb,MAAM,CAACa,SAAS,CAAC,IAAI,EAAEF,IAAI,CAAC;MAC1DR,SAAS,IAAIA,SAAS,CAACQ,IAAI,CAAC;IAChC,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAU,IAAK;MACnB,IAAI,CAACf,MAAM,CAACgB,OAAO,IAAI,IAAI,CAAChB,MAAM,CAACgB,OAAO,CAAC,IAAI,EAAED,KAAK,CAAC;MACvDX,OAAO,IAAIA,OAAO,CAACW,KAAK,CAAC;MACzB,IAAI,CAACV,MAAM,CAACR,cAAc,CAACe,YAAY,EAAE,CAAC,IAAI,EAAEG,KAAK,CAAC,CAAC;IAC3D,CAAC,CAAC;EACN;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseAction","DEFAULT_DURATION","NotificationAction","constructor","config","_defineProperty","showDialog","prepareToastOptions","_options$class","_params$class","options","arguments","length","undefined","params","paramProvider","o","text","message","type","class","toLowerCase","onClose","onClick","onOk","content","partialContent","hideOnClick","toasterPosition","position","placement","split","styles","top","bottom","duration","parseInt","name","getMessage","invoke","success","error","operation","toasterService","showToast","onCancel"],"sources":["notification-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport React from 'react';\nexport interface NotificationActionConfig extends ActionConfig {\n showDialog: Function;\n onOk: any;\n onCancel: any;\n onClose: any;\n operation: string;\n partialContent: React.ReactNode;\n toasterService: () => ToastService;\n}\nconst DEFAULT_DURATION = 3000;\nexport class NotificationAction extends BaseAction<NotificationActionConfig> {\n showDialog: Function;\n constructor(config: NotificationActionConfig) {\n super(config);\n this.showDialog = config.showDialog;\n }\n\n prepareToastOptions(options: any = {}) {\n const params = this.config.paramProvider();\n const o = {} as ToastOptions;\n o.text = options.message || params.text;\n o.type = options.class?.toLowerCase() || params.class?.toLowerCase();\n o.onClose = () => {\n this.config.onClose && this.config.onClose(this);\n },\n o.onClick = () => {\n this.config.onOk && this.config.onOk(this);\n },\n o.content = this.config.partialContent;\n o.hideOnClick = options.hideOnClick || true;\n const toasterPosition = options.position || params.toasterPosition || 'bottom right';\n const placement = toasterPosition.split(' ')[0];\n switch(placement) {\n case 'top':\n o.styles = {top: 0};\n break;\n case 'bottom':\n o.styles = {bottom: 0};\n break;\n case 'center':\n o.styles = {top: '50%'};\n break;\n }\n if (this.config.partialContent) {\n if (!o.styles) {\n o.styles = {};\n }\n }\n if (!params.duration) {\n params.duration = (params.duration !== 0 && o.type === 'success') ? DEFAULT_DURATION : 0;\n }\n o.duration = parseInt(options.duration || params.duration);\n o.name = this.name;\n return o;\n }\n\n getMessage() {\n return this.config.paramProvider().text;\n }\n\n invoke(options: any, success: any, error: any) {\n super.invoke(options, success, error);\n if (this.config.operation === 'toast') {\n const toasterService = this.config.toasterService();\n return toasterService.showToast(this.prepareToastOptions(options));\n } else {\n return this.showDialog && this.showDialog({...this.params, onOk: this.config.onOk, onCancel: this.config.onCancel, onClose: this.config.onClose});\n }\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"names":["BaseAction","DEFAULT_DURATION","NotificationAction","constructor","config","_defineProperty","showDialog","prepareToastOptions","_options$class","_params$class","options","arguments","length","undefined","params","paramProvider","o","text","message","type","class","toLowerCase","onClose","onClick","onOk","content","partialContent","hideOnClick","toasterPosition","position","placement","split","styles","top","bottom","duration","parseInt","name","getMessage","invoke","success","error","operation","toasterService","showToast","onCancel"],"sources":["notification-action.ts"],"sourcesContent":["import { ActionConfig, BaseAction } from \"./base-action\";\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport React from 'react';\nexport interface NotificationActionConfig extends ActionConfig {\n showDialog: Function;\n onOk: any;\n onCancel: any;\n onClose: any;\n operation: string;\n partialContent: React.ReactNode;\n toasterService: () => ToastService;\n}\nconst DEFAULT_DURATION = 3000;\nexport class NotificationAction extends BaseAction<NotificationActionConfig> {\n showDialog: Function;\n constructor(config: NotificationActionConfig) {\n super(config);\n this.showDialog = config.showDialog;\n }\n\n prepareToastOptions(options: any = {}) {\n const params = this.config.paramProvider();\n const o = {} as ToastOptions;\n o.text = options.message || params.text;\n o.type = options.class?.toLowerCase() || params.class?.toLowerCase();\n o.onClose = () => {\n this.config.onClose && this.config.onClose(this);\n },\n o.onClick = () => {\n this.config.onOk && this.config.onOk(this);\n },\n o.content = this.config.partialContent;\n o.hideOnClick = options.hideOnClick || true;\n const toasterPosition = options.position || params.toasterPosition || 'bottom right';\n const placement = toasterPosition.split(' ')[0];\n switch(placement) {\n case 'top':\n o.styles = {top: 0};\n break;\n case 'bottom':\n o.styles = {bottom: 0};\n break;\n case 'center':\n o.styles = {top: '50%'};\n break;\n }\n if (this.config.partialContent) {\n if (!o.styles) {\n o.styles = {};\n }\n }\n if (!params.duration) {\n params.duration = (params.duration !== 0 && o.type === 'success') ? DEFAULT_DURATION : 0;\n }\n o.duration = parseInt(options.duration || params.duration);\n o.name = this.name;\n return o;\n }\n\n getMessage() {\n return this.config.paramProvider().text;\n }\n\n invoke(options: any, success: any, error: any) {\n super.invoke(options, success, error);\n if (this.config.operation === 'toast') {\n const toasterService = this.config.toasterService();\n return toasterService.showToast(this.prepareToastOptions(options));\n } else {\n return this.showDialog && this.showDialog({...this.params, onOk: this.config.onOk, onCancel: this.config.onCancel, onClose: this.config.onClose});\n }\n }\n}\n"],"mappings":"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"}
@@ -9,8 +9,11 @@ export default class WmCarouselTemplate extends BaseComponent {
9
9
  super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());
10
10
  }
11
11
  renderWidget(props) {
12
+ var _this$parent;
12
13
  return /*#__PURE__*/React.createElement(View, {
13
- style: this.styles.root
14
+ style: [this.styles.root, {
15
+ height: this.styles.root.height || ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.styles.root.height) && '100%'
16
+ }]
14
17
  }, this._background, props.children);
15
18
  }
16
19
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselTemplateProps","DEFAULT_CLASS","WmCarouselTemplateState","WmCarouselTemplate","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["carousel-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselTemplateProps from './carousel-template.props';\nimport { DEFAULT_CLASS, WmCarouselTemplateStyles } from './carousel-template.styles';\n\nexport class WmCarouselTemplateState extends BaseComponentState<WmCarouselTemplateProps> {}\n\nexport default class WmCarouselTemplate extends BaseComponent<WmCarouselTemplateProps, WmCarouselTemplateState, WmCarouselTemplateStyles> {\n\n constructor(props: WmCarouselTemplateProps) {\n super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());\n }\n\n renderWidget(props: WmCarouselTemplateProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AAEpF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,CAAC,CAAC,CAAC;EAC5D;EAEAM,YAAYA,CAACD,KAA8B,EAAE;IAC3C,oBAAQT,KAAA,CAAAW,aAAA,CAACV,IAAI;MAACW,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEN,KAAK,CAACO,QAAe,CAAC;EAClF;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCarouselTemplateProps","DEFAULT_CLASS","WmCarouselTemplateState","WmCarouselTemplate","constructor","props","renderWidget","_this$parent","createElement","style","styles","root","height","parent","_background","children"],"sources":["carousel-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCarouselTemplateProps from './carousel-template.props';\nimport { DEFAULT_CLASS, WmCarouselTemplateStyles } from './carousel-template.styles';\n\nexport class WmCarouselTemplateState extends BaseComponentState<WmCarouselTemplateProps> {}\n\nexport default class WmCarouselTemplate extends BaseComponent<WmCarouselTemplateProps, WmCarouselTemplateState, WmCarouselTemplateStyles> {\n\n constructor(props: WmCarouselTemplateProps) {\n super(props, DEFAULT_CLASS, new WmCarouselTemplateProps());\n }\n\n renderWidget(props: WmCarouselTemplateProps) {\n return (<View style={[this.styles.root, {\n height: this.styles.root.height || (this.parent?.styles.root.height && '100%')\n }]}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AAEpF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,CAAC,CAAC,CAAC;EAC5D;EAEAM,YAAYA,CAACD,KAA8B,EAAE;IAAA,IAAAE,YAAA;IAC3C,oBAAQX,KAAA,CAAAY,aAAA,CAACX,IAAI;MAACY,KAAK,EAAE,CAAC,IAAI,CAACC,MAAM,CAACC,IAAI,EAAE;QACtCC,MAAM,EAAE,IAAI,CAACF,MAAM,CAACC,IAAI,CAACC,MAAM,IAAK,EAAAL,YAAA,OAAI,CAACM,MAAM,cAAAN,YAAA,uBAAXA,YAAA,CAAaG,MAAM,CAACC,IAAI,CAACC,MAAM,KAAI;MACzE,CAAC;IAAE,GAAE,IAAI,CAACE,WAAW,EAAET,KAAK,CAACU,QAAe,CAAC;EAC/C;AACF"}
@@ -7,8 +7,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
7
7
  flexDirection: 'column',
8
8
  justifyContent: 'center',
9
9
  alignItems: 'center',
10
- width: '100%',
11
- height: '100%'
10
+ width: '100%'
12
11
  },
13
12
  text: {}
14
13
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","width","height","text"],"sources":["carousel-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmCarouselTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-carousel-template';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCarouselTemplateStyles = defineStyles({\n root: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '100%'\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,uBAAuB;AAEpDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IACzDM,IAAI,EAAE;MACFC,aAAa,EAAE,QAAQ;MACvBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","justifyContent","alignItems","width","text"],"sources":["carousel-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmCarouselTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-carousel-template';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCarouselTemplateStyles = defineStyles({\n root: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%'\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,uBAAuB;AAEpDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IACzDM,IAAI,EAAE;MACFC,aAAa,EAAE,QAAQ;MACvBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,KAAK,EAAE;IACX,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFP,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -2,87 +2,134 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
2
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
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); }
4
4
  import React from 'react';
5
- import { View, Text } from 'react-native';
6
- import Carousel, { Pagination } from 'react-native-snap-carousel';
5
+ import { isArray, isUndefined } from 'lodash-es';
6
+ import { Animated, Easing, View } from 'react-native';
7
+ import { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';
7
8
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
8
9
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
10
+ import * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';
11
+ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
9
12
  import WmCarouselProps from './carousel.props';
10
13
  import { DEFAULT_CLASS } from './carousel.styles';
11
14
  export class WmCarouselState extends BaseComponentState {
12
15
  constructor() {
13
16
  super(...arguments);
14
- _defineProperty(this, "activeIndex", 0);
15
- _defineProperty(this, "sliderWidth", 0);
17
+ _defineProperty(this, "activeIndex", 1);
16
18
  }
17
19
  }
18
20
  export default class WmCarousel extends BaseComponent {
19
21
  constructor(_props) {
20
22
  super(_props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());
21
- _defineProperty(this, "carouselRef", null);
22
23
  _defineProperty(this, "noOfSlides", 0);
24
+ _defineProperty(this, "slidesLayout", []);
25
+ _defineProperty(this, "keyExtractor", new DefaultKeyExtractor());
23
26
  _defineProperty(this, "stopPlay", null);
27
+ _defineProperty(this, "dotScale", new Animated.Value(0));
28
+ _defineProperty(this, "dotPosition", new Animated.Value(0));
29
+ _defineProperty(this, "animationView", null);
30
+ _defineProperty(this, "animationHandlers", {
31
+ bounds: e => {
32
+ var _this$slidesLayout, _this$slidesLayout$ac;
33
+ const activeTabIndex = this.state.activeIndex - 1;
34
+ let lower = 0;
35
+ if (activeTabIndex > 0) {
36
+ lower = this.slidesLayout.filter((l, i) => i < activeTabIndex - 1).reduce((s, l) => s + l.width, 0);
37
+ }
38
+ let center = lower + (((_this$slidesLayout = this.slidesLayout[activeTabIndex - 1]) === null || _this$slidesLayout === void 0 ? void 0 : _this$slidesLayout.width) || 0);
39
+ let upper = center + (((_this$slidesLayout$ac = this.slidesLayout[activeTabIndex]) === null || _this$slidesLayout$ac === void 0 ? void 0 : _this$slidesLayout$ac.width) || 0);
40
+ return {
41
+ lower: -1 * lower,
42
+ center: -1 * center,
43
+ upper: -1 * upper
44
+ };
45
+ },
46
+ computePhase: value => {
47
+ var _this$slidesLayout$ac2;
48
+ const activeTabIndex = this.state.activeIndex - 1;
49
+ const w = ((_this$slidesLayout$ac2 = this.slidesLayout[activeTabIndex]) === null || _this$slidesLayout$ac2 === void 0 ? void 0 : _this$slidesLayout$ac2.width) || 0;
50
+ return w && Math.abs(value / w);
51
+ },
52
+ onLower: e => {
53
+ this.onSlideChange(this.state.activeIndex - 1);
54
+ },
55
+ onUpper: e => {
56
+ this.onSlideChange(this.state.activeIndex + 1);
57
+ }
58
+ });
24
59
  _defineProperty(this, "onSlideChange", index => {
25
60
  const prevIndex = this.state.activeIndex;
26
61
  this.updateState({
27
62
  activeIndex: index
28
63
  }, () => this.invokeEventCallback('onChange', [this, index, prevIndex]));
64
+ this.animatePagination(index);
29
65
  });
30
- _defineProperty(this, "renderItem", data => {
66
+ _defineProperty(this, "renderItem", (item, index) => {
31
67
  const props = this.state.props;
32
68
  if (props.type === 'dynamic') {
33
- return props.renderSlide ? props.renderSlide(data.item, data.index) : null;
69
+ return props.renderSlide ? props.renderSlide(item, index, this) : null;
34
70
  }
35
- return props.children[data.index];
36
- });
37
- _defineProperty(this, "onLayoutChange", e => {
38
- this.updateState({
39
- sliderWidth: e.nativeEvent.layout.width
40
- });
41
- });
42
- _defineProperty(this, "getDotElement", _ref => {
43
- let {
44
- active,
45
- index
46
- } = _ref;
47
- return /*#__PURE__*/React.createElement(Text, {
48
- style: active ? this.styles.activeDotStyle : this.styles.dotStyle
49
- }, index);
71
+ return props.children[index];
50
72
  });
51
73
  _defineProperty(this, "next", () => {
52
- if (this.carouselRef && this.carouselRef.currentIndex < this.noOfSlides - 1) {
53
- var _this$carouselRef;
54
- (_this$carouselRef = this.carouselRef) === null || _this$carouselRef === void 0 ? void 0 : _this$carouselRef.snapToNext();
74
+ const props = this.state.props;
75
+ const data = props.type === 'dynamic' ? props.dataset : props.children;
76
+ if (this.state.activeIndex >= (data === null || data === void 0 ? void 0 : data.length) || 0) {
77
+ var _this$animationView;
78
+ this.onSlideChange(1);
79
+ (_this$animationView = this.animationView) === null || _this$animationView === void 0 ? void 0 : _this$animationView.setPosition(0);
55
80
  } else {
56
- var _this$carouselRef2;
57
- (_this$carouselRef2 = this.carouselRef) === null || _this$carouselRef2 === void 0 ? void 0 : _this$carouselRef2.snapToItem(0);
81
+ var _this$animationView2;
82
+ (_this$animationView2 = this.animationView) === null || _this$animationView2 === void 0 ? void 0 : _this$animationView2.goToUpper();
58
83
  }
59
84
  });
60
85
  _defineProperty(this, "prev", () => {
61
- if (this.carouselRef && this.carouselRef.currentIndex > 0) {
62
- var _this$carouselRef3;
63
- (_this$carouselRef3 = this.carouselRef) === null || _this$carouselRef3 === void 0 ? void 0 : _this$carouselRef3.snapToPrev();
64
- } else {
65
- var _this$carouselRef4;
66
- (_this$carouselRef4 = this.carouselRef) === null || _this$carouselRef4 === void 0 ? void 0 : _this$carouselRef4.snapToItem(this.noOfSlides - 1);
67
- }
86
+ var _this$animationView3;
87
+ (_this$animationView3 = this.animationView) === null || _this$animationView3 === void 0 ? void 0 : _this$animationView3.goToLower();
68
88
  });
69
89
  this.cleanup.push(() => {
70
90
  this.stopPlay && this.stopPlay();
71
91
  });
72
92
  }
93
+ addSlideLayout(index, nativeEvent) {
94
+ this.slidesLayout[index] = nativeEvent.nativeEvent.layout;
95
+ if (index === this.state.activeIndex) {
96
+ this.forceUpdate();
97
+ }
98
+ }
99
+ generateItemKey(item, index, props) {
100
+ if (props.itemkey && item && !this._showSkeleton) {
101
+ return props.itemkey(item, index);
102
+ }
103
+ return 'list_item_' + this.keyExtractor.getKey(item, true);
104
+ }
73
105
  autoPlay() {
74
106
  const props = this.state.props;
75
107
  this.stopPlay && this.stopPlay();
76
- if (props.animation && props.animationinterval) {
108
+ if (props.animation === 'auto' && props.animationinterval) {
77
109
  const intervalId = setInterval(() => {
78
110
  this.next();
79
111
  }, props.animationinterval * 1000);
80
112
  this.stopPlay = () => clearInterval(intervalId);
113
+ } else {
114
+ setTimeout(() => {
115
+ var _this$animationView4;
116
+ this.onSlideChange(1);
117
+ (_this$animationView4 = this.animationView) === null || _this$animationView4 === void 0 ? void 0 : _this$animationView4.setPosition(0);
118
+ }, 1000);
81
119
  }
82
120
  }
83
121
  onPropertyChange(name, $new, $old) {
84
122
  super.onPropertyChange(name, $new, $old);
85
123
  switch (name) {
124
+ case 'dataset':
125
+ {
126
+ var _this$keyExtractor;
127
+ (_this$keyExtractor = this.keyExtractor) === null || _this$keyExtractor === void 0 ? void 0 : _this$keyExtractor.clear();
128
+ this.updateState({
129
+ activeIndex: Math.min(this.state.activeIndex, ($new === null || $new === void 0 ? void 0 : $new.length) || 1)
130
+ });
131
+ break;
132
+ }
86
133
  case 'animation':
87
134
  case 'animationinterval':
88
135
  {
@@ -90,58 +137,156 @@ export default class WmCarousel extends BaseComponent {
90
137
  }
91
138
  }
92
139
  }
93
- renderPagination(props, styles) {
94
- return /*#__PURE__*/React.createElement(Pagination, {
95
- carouselRef: this.carouselRef,
96
- dotsLength: this.noOfSlides,
97
- activeDotIndex: this.state.activeIndex,
98
- containerStyle: styles.dotsWrapperStyle,
99
- dotStyle: styles.activeDotStyle,
100
- inactiveDotStyle: styles.dotStyle,
101
- inactiveDotScale: 0.8,
102
- tappableDots: true
103
- });
140
+ animatePagination(index) {
141
+ var _this$styles$dotStyle, _this$styles$dotStyle2, _this$styles$dotStyle3;
142
+ const prevIndex = this.state.activeIndex;
143
+ const margin = (((_this$styles$dotStyle = this.styles.dotStyle) === null || _this$styles$dotStyle === void 0 ? void 0 : _this$styles$dotStyle.marginLeft) || 0) + (((_this$styles$dotStyle2 = this.styles.dotStyle) === null || _this$styles$dotStyle2 === void 0 ? void 0 : _this$styles$dotStyle2.marginRight) || 0);
144
+ const width = ((_this$styles$dotStyle3 = this.styles.dotStyle) === null || _this$styles$dotStyle3 === void 0 ? void 0 : _this$styles$dotStyle3.width) || 2;
145
+ const size = margin + width;
146
+ const position = Math.max(index - 1, 0) * size;
147
+ const scale = Math.abs(index - prevIndex) * size;
148
+ const options = {
149
+ useNativeDriver: true,
150
+ duration: 200,
151
+ easing: Easing.out(Easing.linear)
152
+ };
153
+ if (prevIndex < index) {
154
+ Animated.sequence([Animated.timing(this.dotScale, {
155
+ toValue: scale,
156
+ ...options
157
+ }), Animated.parallel([Animated.timing(this.dotScale, {
158
+ toValue: 0,
159
+ ...options
160
+ }), Animated.timing(this.dotPosition, {
161
+ toValue: (this.isRTL ? -1 : 1) * position,
162
+ ...options
163
+ })])]).start();
164
+ } else if (prevIndex > index) {
165
+ Animated.sequence([Animated.parallel([Animated.timing(this.dotScale, {
166
+ toValue: scale,
167
+ ...options
168
+ }), Animated.timing(this.dotPosition, {
169
+ toValue: (this.isRTL ? -1 : 1) * position,
170
+ ...options
171
+ })]), Animated.timing(this.dotScale, {
172
+ toValue: 0,
173
+ ...options
174
+ })]).start();
175
+ }
176
+ }
177
+ renderPagination(data) {
178
+ const maxNoOfDots = this.state.props.maxnoofdots;
179
+ let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);
180
+ let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);
181
+ if (maxIndex === data.length) {
182
+ minIndex = maxIndex - maxNoOfDots;
183
+ }
184
+ return /*#__PURE__*/React.createElement(View, {
185
+ style: this.styles.dotsWrapperStyle
186
+ }, /*#__PURE__*/React.createElement(View, {
187
+ style: {
188
+ flexDirection: this.isRTL ? 'row-reverse' : 'row'
189
+ }
190
+ }, data.map((item, index) => {
191
+ return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, {
192
+ key: 'dots_' + this.generateItemKey(item, index, this.state.props),
193
+ style: [this.styles.dotStyle]
194
+ }) : null;
195
+ }), /*#__PURE__*/React.createElement(Animated.View, {
196
+ style: [this.styles.dotStyle, this.styles.activeDotStyle, {
197
+ width: undefined,
198
+ height: undefined,
199
+ transform: [{
200
+ translateX: this.dotPosition
201
+ }]
202
+ }, this.isRTL ? {
203
+ right: 0
204
+ } : {
205
+ left: 0
206
+ }]
207
+ }, /*#__PURE__*/React.createElement(Animated.View, {
208
+ style: [{
209
+ width: 1,
210
+ height: 1
211
+ }, {
212
+ // This is failing in Android
213
+ // minWidth: this.dotScale
214
+ }]
215
+ }))));
104
216
  }
105
217
  renderWidget(props) {
218
+ var _data, _this$styles$slide;
106
219
  const hasNavs = props.controls === 'both' || props.controls === 'navs';
107
220
  const hasDots = props.controls === 'both' || props.controls === 'indicators';
108
221
  let styles = this.styles;
109
- const data = props.type === 'dynamic' ? props.dataset : props.children;
110
- this.noOfSlides = (data === null || data === void 0 ? void 0 : data.length) || 0;
111
- const autoPlay = props.animation === 'auto';
222
+ let data = props.type === 'dynamic' ? props.dataset : props.children;
223
+ data = isArray(data) ? data : [];
224
+ this.noOfSlides = ((_data = data) === null || _data === void 0 ? void 0 : _data.length) || 0;
225
+ let slideScale = undefined;
226
+ let slideTranslateX = undefined;
227
+ if (isArray((_this$styles$slide = this.styles.slide) === null || _this$styles$slide === void 0 ? void 0 : _this$styles$slide.transform)) {
228
+ var _this$styles$slide2, _this$styles$slide3;
229
+ slideScale = (_this$styles$slide2 = this.styles.slide) === null || _this$styles$slide2 === void 0 || (_this$styles$slide2 = _this$styles$slide2.transform) === null || _this$styles$slide2 === void 0 || (_this$styles$slide2 = _this$styles$slide2.find(o => !isUndefined(o.scale))) === null || _this$styles$slide2 === void 0 ? void 0 : _this$styles$slide2.scale;
230
+ slideTranslateX = (_this$styles$slide3 = this.styles.slide) === null || _this$styles$slide3 === void 0 || (_this$styles$slide3 = _this$styles$slide3.transform) === null || _this$styles$slide3 === void 0 || (_this$styles$slide3 = _this$styles$slide3.find(o => !isUndefined(o.translateX))) === null || _this$styles$slide3 === void 0 ? void 0 : _this$styles$slide3.translateX;
231
+ }
112
232
  // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608
113
233
  return /*#__PURE__*/React.createElement(View, {
114
- style: styles.root,
115
- onLayout: this.onLayoutChange
116
- }, this._background, this.state.sliderWidth > 0 ? /*#__PURE__*/React.createElement(Carousel, {
117
- ref: ref => this.carouselRef = ref,
118
- data: data || [],
119
- firstItem: 0,
234
+ style: styles.root
235
+ }, this._background, /*#__PURE__*/React.createElement(SwipeAnimation.View, {
236
+ enableGestures: props.enablegestures,
120
237
  style: {
121
- width: '100%',
122
- height: '100%'
238
+ height: props.type === 'dynamic' ? undefined : '100%'
239
+ },
240
+ direction: "horizontal",
241
+ ref: r => {
242
+ this.animationView = r;
123
243
  },
124
- enableSnap: true,
125
- loopClonesPerSide: 1,
126
- autoplay: false,
127
- activeSlideAlignment: "start",
128
- renderItem: this.renderItem,
129
- sliderWidth: this.state.sliderWidth,
130
- itemWidth: this.state.sliderWidth,
131
- lockScrollWhileSnapping: false,
132
- scrollEnabled: false,
133
- onSnapToItem: this.onSlideChange
134
- }) : null, hasNavs ? /*#__PURE__*/React.createElement(View, {
244
+ handlers: this.animationHandlers,
245
+ slideMinWidth: this.styles.slide.width
246
+ }, data.map((item, index) => {
247
+ var _this$animationView5, _this$animationView6;
248
+ const isActive = index === this.state.activeIndex - 1;
249
+ let scale = (_this$animationView5 = this.animationView) === null || _this$animationView5 === void 0 ? void 0 : _this$animationView5.animationPhase.interpolate({
250
+ inputRange: [-2000, index - 1, index, index + 1, 2000],
251
+ outputRange: [slideScale, slideScale, 1, slideScale, slideScale]
252
+ });
253
+ let translateX = (_this$animationView6 = this.animationView) === null || _this$animationView6 === void 0 ? void 0 : _this$animationView6.animationPhase.interpolate({
254
+ inputRange: [-2000, index - 1, index, index + 1, 2000],
255
+ outputRange: [-56, -56, 0, 56, 56]
256
+ });
257
+ return /*#__PURE__*/React.createElement(Animated.View, {
258
+ key: this.generateItemKey(item, index, props),
259
+ onLayout: this.addSlideLayout.bind(this, index),
260
+ style: [{
261
+ height: props.type === 'dynamic' ? undefined : '100%'
262
+ }, this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
263
+ transform: [{
264
+ translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX
265
+ }, {
266
+ scale: scale
267
+ }]
268
+ } : null]
269
+ }, /*#__PURE__*/React.createElement(Tappable, {
270
+ onTap: () => {
271
+ var _this$animationView7;
272
+ this.onSlideChange(index + 1);
273
+ const position = this.slidesLayout.filter((l, i) => i < index).reduce((s, l) => s + l.width, 0);
274
+ (_this$animationView7 = this.animationView) === null || _this$animationView7 === void 0 ? void 0 : _this$animationView7.setPosition(-1 * position);
275
+ }
276
+ }, this.renderItem(item, index)));
277
+ })), hasNavs ? /*#__PURE__*/React.createElement(View, {
135
278
  style: styles.btnPanel
136
279
  }, /*#__PURE__*/React.createElement(WmIcon, {
280
+ id: this.getTestId('prev_icon'),
137
281
  iconclass: "wi wi-chevron-left fa-2x",
138
282
  styles: styles.prevBtn,
139
283
  onTap: this.prev
140
284
  }), /*#__PURE__*/React.createElement(WmIcon, {
285
+ id: this.getTestId('next_icon'),
141
286
  iconclass: "wi wi-chevron-right fa-2x",
142
287
  styles: styles.nextBtn,
143
288
  onTap: this.next
144
- })) : null, this.state.sliderWidth > 0 && hasDots && data ? this.renderPagination(props, styles) : null);
289
+ })) : null, hasDots && data ? this.renderPagination(data) : null);
145
290
  }
146
291
  }
147
292
  //# sourceMappingURL=carousel.component.js.map