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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -2
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  8. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  11. app-rn-runtime/components/basic/audio/audio.component.js +9 -2
  12. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  13. app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
  14. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +15 -2
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  18. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  19. app-rn-runtime/components/basic/icon/icon.component.js +10 -2
  20. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.component.js +13 -3
  22. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  23. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  24. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  25. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  26. app-rn-runtime/components/basic/search/search.component.js +10 -1
  27. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  28. app-rn-runtime/components/basic/search/search.props.js +3 -0
  29. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  30. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  31. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  32. app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
  33. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  34. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  35. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  36. app-rn-runtime/components/basic/video/video.component.js +6 -0
  37. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  38. app-rn-runtime/components/basic/video/video.styles.js +7 -1
  39. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  40. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  41. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  42. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  43. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  44. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  45. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  46. app-rn-runtime/components/chart/basechart.component.js +23 -0
  47. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  48. app-rn-runtime/components/chart/basechart.props.js +2 -2
  49. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  50. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  51. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
  52. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  53. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  54. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  55. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  56. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  57. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  58. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  59. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  60. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  61. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  62. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  63. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
  64. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  65. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  66. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  67. app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
  68. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  69. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  70. app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
  71. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  72. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  73. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  74. app-rn-runtime/components/container/container.component.js +44 -3
  75. app-rn-runtime/components/container/container.component.js.map +1 -1
  76. app-rn-runtime/components/container/container.props.js +1 -0
  77. app-rn-runtime/components/container/container.props.js.map +1 -1
  78. app-rn-runtime/components/container/container.styles.js +7 -0
  79. app-rn-runtime/components/container/container.styles.js.map +1 -1
  80. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  81. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  82. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  83. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  84. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  85. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  86. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  87. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  88. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  89. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  90. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  91. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  92. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  93. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  94. app-rn-runtime/components/container/panel/panel.component.js +43 -4
  95. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  96. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  97. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  98. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  99. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  100. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
  101. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  102. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  103. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  105. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  106. app-rn-runtime/components/container/tabs/tabs.component.js +41 -6
  107. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  108. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  109. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  110. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  111. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  112. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  113. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  114. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  115. app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
  116. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  117. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  118. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  119. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  120. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +8 -1
  121. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  122. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  123. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  124. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  125. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  126. app-rn-runtime/components/data/card/card.component.js +18 -0
  127. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  128. app-rn-runtime/components/data/card/card.styles.js +3 -0
  129. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  130. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
  131. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  132. app-rn-runtime/components/data/form/form.component.js +1 -1
  133. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  134. app-rn-runtime/components/data/form/form.props.js +1 -0
  135. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  136. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  137. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  138. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  139. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  140. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  141. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  142. app-rn-runtime/components/data/list/list.component.js +32 -24
  143. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  144. app-rn-runtime/components/data/list/list.props.js +1 -0
  145. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  146. app-rn-runtime/components/data/list/list.styles.js +9 -0
  147. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  148. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  149. app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
  150. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  151. app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
  152. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  153. app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
  154. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  155. app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
  156. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  157. app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
  158. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  159. app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
  160. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  161. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
  162. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  163. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  164. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  165. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  166. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  167. app-rn-runtime/components/input/chips/chips.component.js +16 -2
  168. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  169. app-rn-runtime/components/input/chips/chips.styles.js +8 -0
  170. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  171. app-rn-runtime/components/input/currency/currency.component.js +14 -4
  172. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  173. app-rn-runtime/components/input/currency/currency.styles.js +43 -1
  174. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  175. app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
  176. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  177. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
  178. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  179. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
  180. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  181. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
  182. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  183. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
  184. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  185. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
  186. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
  187. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
  188. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
  189. app-rn-runtime/components/input/number/number.component.js +17 -3
  190. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  191. app-rn-runtime/components/input/number/number.styles.js +24 -1
  192. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  193. app-rn-runtime/components/input/radioset/radioset.component.js +33 -8
  194. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  195. app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
  196. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  197. app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
  198. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  199. app-rn-runtime/components/input/select/select.component.js +11 -3
  200. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  201. app-rn-runtime/components/input/select/select.styles.js +24 -0
  202. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  203. app-rn-runtime/components/input/switch/switch.component.js +13 -3
  204. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  205. app-rn-runtime/components/input/switch/switch.styles.js +15 -0
  206. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  207. app-rn-runtime/components/input/text/text.component.js +26 -2
  208. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  209. app-rn-runtime/components/input/text/text.props.js +3 -0
  210. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  211. app-rn-runtime/components/input/text/text.styles.js +3 -0
  212. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  213. app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
  214. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  215. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  216. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  217. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  218. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  219. app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
  220. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  221. app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
  222. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  223. app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
  224. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  225. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  226. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  227. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  228. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  229. app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
  230. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  231. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  232. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  233. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  234. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  235. app-rn-runtime/components/page/page.component.js.map +1 -1
  236. app-rn-runtime/components/page/page.props.js.map +1 -1
  237. app-rn-runtime/components/page/page.styles.js +7 -1
  238. app-rn-runtime/components/page/page.styles.js.map +1 -1
  239. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  240. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  241. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  242. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  243. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  244. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  245. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  246. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  247. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  248. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  249. app-rn-runtime/core/AppConfig.js.map +1 -1
  250. app-rn-runtime/core/base.component.js +33 -6
  251. app-rn-runtime/core/base.component.js.map +1 -1
  252. app-rn-runtime/core/components/textinput.component.js +9 -7
  253. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  254. app-rn-runtime/core/props.provider.js +0 -1
  255. app-rn-runtime/core/props.provider.js.map +1 -1
  256. app-rn-runtime/core/storage.service.js +15 -0
  257. app-rn-runtime/core/storage.service.js.map +1 -1
  258. app-rn-runtime/core/tappable.component.js +10 -4
  259. app-rn-runtime/core/tappable.component.js.map +1 -1
  260. app-rn-runtime/core/utils.js +5 -0
  261. app-rn-runtime/core/utils.js.map +1 -1
  262. app-rn-runtime/core/wm-component-tree.js +58 -0
  263. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  264. app-rn-runtime/package.json +13 -6
  265. app-rn-runtime/runtime/App.js +23 -9
  266. app-rn-runtime/runtime/App.js.map +1 -1
  267. app-rn-runtime/runtime/App.navigator.js +1 -0
  268. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  269. app-rn-runtime/runtime/base-fragment.component.js +46 -13
  270. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  271. app-rn-runtime/runtime/base-page.component.js +38 -2
  272. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  273. app-rn-runtime/runtime/base-partial.component.js +3 -0
  274. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  275. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  276. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  277. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  278. app-rn-runtime/runtime/services/app-modal.service.js +4 -4
  279. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  280. app-rn-runtime/runtime/services/app-security.service.js +17 -1
  281. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  282. app-rn-runtime/styles/theme.js +10 -0
  283. app-rn-runtime/styles/theme.js.map +1 -1
  284. app-rn-runtime/styles/theme.variables.js +2 -1
  285. app-rn-runtime/styles/theme.variables.js.map +1 -1
  286. app-rn-runtime/variables/http.service.js +5 -1
  287. app-rn-runtime/variables/http.service.js.map +1 -1
  288. app-rn-runtime/variables/live-variable.js +14 -0
  289. app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -197,6 +197,10 @@ export default class WmCarousel extends BaseComponent {
197
197
  if (maxIndex === data.length) {
198
198
  minIndex = maxIndex - maxNoOfDots;
199
199
  }
200
+ const dotStyle = this._showSkeleton ? {
201
+ ...this.styles.dotStyle,
202
+ ...this.styles.dotSkeleton.root
203
+ } : this.styles.dotStyle;
200
204
  return /*#__PURE__*/React.createElement(View, {
201
205
  style: this.styles.dotsWrapperStyle
202
206
  }, /*#__PURE__*/React.createElement(View, {
@@ -207,9 +211,9 @@ export default class WmCarousel extends BaseComponent {
207
211
  return index >= minIndex && index <= maxIndex ? /*#__PURE__*/React.createElement(View, _extends({
208
212
  key: 'dots_' + this.generateItemKey(item, index, this.state.props)
209
213
  }, this.getTestPropsForAction('indicator' + index), {
210
- style: [this.styles.dotStyle]
214
+ style: [dotStyle]
211
215
  })) : null;
212
- }), /*#__PURE__*/React.createElement(Animated.View, {
216
+ }), this._showSkeleton ? null : /*#__PURE__*/React.createElement(Animated.View, {
213
217
  style: [this.styles.dotStyle, this.styles.activeDotStyle, {
214
218
  width: undefined,
215
219
  height: undefined,
@@ -231,6 +235,13 @@ export default class WmCarousel extends BaseComponent {
231
235
  }]
232
236
  }))));
233
237
  }
238
+ renderSkeleton(props) {
239
+ return /*#__PURE__*/React.createElement(View, {
240
+ style: [this.styles.root, {
241
+ ...this.styles.skeleton.root
242
+ }]
243
+ }, this.renderItem({}, 0), this.renderPagination([{}, {}, {}]));
244
+ }
234
245
  componentDidMount() {
235
246
  super.componentDidMount();
236
247
  this.autoPlay();
@@ -278,6 +289,7 @@ export default class WmCarousel extends BaseComponent {
278
289
  return /*#__PURE__*/React.createElement(Animated.View, {
279
290
  key: this.generateItemKey(item, index, props),
280
291
  onLayout: this.addSlideLayout.bind(this, index),
292
+ testID: `carousel_item_${index}`,
281
293
  style: [{
282
294
  height: props.type === 'dynamic' ? undefined : '100%'
283
295
  }, this.styles.slide, index === 0 ? this.styles.firstSlide : null, index === data.length - 1 ? this.styles.lastSlide : null, isActive ? this.styles.activeSlide : null, translateX && scale ? {
@@ -1 +1 @@
1
- {"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","args","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","noOfSlides","_this$animationView","animationView","setPosition","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView2","_this$animationView3","goToUpper","_this$animationView4","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","initialized","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","stopAnimation","startAnimation","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","componentDidMount","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","root","_background","enableGestures","enablegestures","flex","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView6","_this$animationView7","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","firstSlide","lastSlide","activeSlide","onTap","_this$animationView8","rippleColor","renderItem","btnPanel","id","getTestId","iconclass","prevBtn","prev","accessibilitylabel","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n if(this.noOfSlides < this.state.activeIndex + 1){\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }\n else{\n this.onSlideChange(this.state.activeIndex + 1);\n }\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n if(!this.initialized){\n return;\n }\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n stopAnimation(){ \n this.stopPlay();\n }\n startAnimation() {\n this.autoPlay();\n }\n \n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} {...this.getTestPropsForAction('indicator'+index)}\n style={[this.styles.dotStyle]}>\n </View>) : null;\n })\n }\n <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n </View>\n </View>);\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.autoPlay();\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,WAAW;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAA4C,cAAc;AACzF,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAEnE,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,sBACzD,CAAC;EAAA;AACjB;AAEA,eAAe,MAAMC,UAAU,SAASV,aAAa,CAAqD;EA6CxGO,WAAWA,CAACI,MAAsB,EAAE;IAClC,KAAK,CAACA,MAAK,EAAEN,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIE,eAAe,CAAC,CAAC,CAAC;IAACG,eAAA,qBA5CvD,CAAC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;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbzC,OAAO,IAAI3F,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","isArray","isUndefined","Animated","Easing","View","DefaultKeyExtractor","WmIcon","BaseComponent","BaseComponentState","SwipeAnimation","Tappable","WmCarouselProps","DEFAULT_CLASS","WmCarouselState","constructor","args","_defineProperty","WmCarousel","props","Value","bounds","e","_this$slidesLayout","_this$slidesLayout$ac","activeTabIndex","state","activeIndex","lower","slidesLayout","filter","l","i","reduce","s","width","center","upper","computePhase","value","_this$slidesLayout$ac2","w","Math","abs","onLower","onSlideChange","onUpper","noOfSlides","_this$animationView","animationView","setPosition","index","prevIndex","updateState","invokeEventCallback","animatePagination","item","type","renderSlide","children","data","dataset","length","_this$animationView2","_this$animationView3","goToUpper","_this$animationView4","goToLower","cleanup","push","stopPlay","addSlideLayout","nativeEvent","layout","forceUpdate","generateItemKey","itemkey","_showSkeleton","keyExtractor","getKey","autoPlay","initialized","animation","animationinterval","intervalId","setInterval","next","clearInterval","setTimeout","_this$animationView5","stopAnimation","startAnimation","onPropertyChange","name","$new","$old","_this$keyExtractor","clear","min","_this$styles$dotStyle","_this$styles$dotStyle2","_this$styles$dotStyle3","margin","styles","dotStyle","marginLeft","marginRight","size","position","max","scale","options","useNativeDriver","duration","easing","out","linear","sequence","timing","dotScale","toValue","parallel","dotPosition","isRTL","start","renderPagination","maxNoOfDots","maxnoofdots","minIndex","maxIndex","dotSkeleton","root","createElement","style","dotsWrapperStyle","flexDirection","map","_extends","key","getTestPropsForAction","activeDotStyle","undefined","height","transform","translateX","right","left","renderSkeleton","skeleton","renderItem","componentDidMount","renderWidget","_data","_this$styles$slide","hasNavs","controls","hasDots","slideScale","slideTranslateX","slide","_this$styles$slide2","_this$styles$slide3","find","o","_background","enableGestures","enablegestures","flex","direction","ref","r","handlers","animationHandlers","slideMinWidth","_this$animationView6","_this$animationView7","isActive","animationPhase","interpolate","inputRange","outputRange","onLayout","bind","testID","firstSlide","lastSlide","activeSlide","onTap","_this$animationView8","rippleColor","btnPanel","id","getTestId","iconclass","prevBtn","prev","accessibilitylabel","nextBtn"],"sources":["carousel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isArray, isUndefined } from 'lodash-es';\nimport { Animated, Easing, View, LayoutChangeEvent, LayoutRectangle } from 'react-native';\nimport { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmCarouselProps from './carousel.props';\nimport { DEFAULT_CLASS, WmCarouselStyles } from './carousel.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmCarouselState extends BaseComponentState<WmCarouselProps> {\n activeIndex = 1;\n}\n\nexport default class WmCarousel extends BaseComponent<WmCarouselProps, WmCarouselState, WmCarouselStyles> {\n\n noOfSlides: number = 0;\n private slidesLayout: LayoutRectangle[] = [];\n private keyExtractor = new DefaultKeyExtractor();\n stopPlay: Function = null as any;\n private dotScale = new Animated.Value(0);\n private dotPosition = new Animated.Value(0);\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.activeIndex - 1;\n let lower = 0;\n if (activeTabIndex > 0) {\n lower = this.slidesLayout\n .filter((l , i) => i < activeTabIndex - 1)\n .reduce((s, l) => s + l.width, 0);\n }\n let center = lower + (this.slidesLayout[activeTabIndex - 1]?.width || 0);\n let upper = center + (this.slidesLayout[activeTabIndex]?.width || 0);\n return {\n lower: -1 * lower,\n center: -1 * center,\n upper: -1 * upper\n };\n },\n computePhase: (value) => {\n const activeTabIndex = this.state.activeIndex - 1;\n const w = this.slidesLayout[activeTabIndex]?.width || 0;\n return w && Math.abs(value / w);\n },\n onLower: (e) => {\n this.onSlideChange(this.state.activeIndex - 1);\n },\n onUpper: (e) => {\n if(this.noOfSlides < this.state.activeIndex + 1){\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }\n else{\n this.onSlideChange(this.state.activeIndex + 1);\n }\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmCarouselProps) {\n super(props, DEFAULT_CLASS, new WmCarouselProps(), new WmCarouselState());\n this.cleanup.push(() => {\n this.stopPlay && this.stopPlay();\n })\n }\n\n addSlideLayout(index: number, nativeEvent: LayoutChangeEvent) {\n this.slidesLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.state.activeIndex) {\n this.forceUpdate();\n }\n }\n\n private generateItemKey(item: any, index: number, props: WmCarouselProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + this.keyExtractor.getKey(item, true);\n }\n\n autoPlay() {\n if(!this.initialized){\n return;\n }\n const props = this.state.props;\n this.stopPlay && this.stopPlay();\n if (props.animation === 'auto' && props.animationinterval) {\n const intervalId = setInterval(() => {\n this.next();\n }, props.animationinterval * 1000);\n this.stopPlay = () => clearInterval(intervalId);\n } else {\n setTimeout(() => {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n }, 1000);\n }\n }\n\n stopAnimation(){ \n this.stopPlay();\n }\n startAnimation() {\n this.autoPlay();\n }\n \n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'dataset': {\n this.keyExtractor?.clear();\n this.updateState({\n activeIndex: Math.min(this.state.activeIndex, $new?.length || 1)\n } as WmCarouselState);\n break;\n }\n case 'animation':\n case 'animationinterval' : {\n this.autoPlay();\n }\n }\n }\n\n animatePagination(index: number) {\n const prevIndex = this.state.activeIndex;\n const margin = ((this.styles.dotStyle?.marginLeft as number)|| 0) + \n ((this.styles.dotStyle?.marginRight as number)|| 0)\n const width = (this.styles.dotStyle?.width as number)|| 2;\n const size = margin + width;\n const position = Math.max(index - 1, 0) * size;\n const scale = Math.abs(index - prevIndex) * size;\n const options = {\n useNativeDriver: true,\n duration: 200,\n easing: Easing.out(Easing.linear)\n };\n if (prevIndex < index) {\n Animated.sequence([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ])\n ]).start();\n } else if (prevIndex > index) {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(this.dotScale, {\n toValue: scale,\n ...options\n }),\n Animated.timing(this.dotPosition, {\n toValue: (this.isRTL ? -1: 1) * position,\n ...options\n })\n ]),\n Animated.timing(this.dotScale, {\n toValue: 0,\n ...options\n }),\n ]).start();\n } \n }\n\n onSlideChange = (index: number) => {\n const prevIndex = this.state.activeIndex;\n this.updateState({\n activeIndex: index\n } as WmCarouselState,\n () => this.invokeEventCallback('onChange', [this, index, prevIndex]));\n this.animatePagination(index);\n }\n\n renderItem = (item: any, index: number) => {\n const props = this.state.props;\n if (props.type === 'dynamic') {\n return props.renderSlide ? props.renderSlide(item, index, this) : null;\n }\n return props.children[index];\n }\n\n next = () => {\n const props = this.state.props;\n const data = props.type === 'dynamic' ? props.dataset : props.children;\n if (this.state.activeIndex >= data?.length || 0) {\n this.onSlideChange(1);\n this.animationView?.setPosition(0);\n } else {\n this.animationView?.goToUpper();\n }\n }\n\n prev = () => {\n this.animationView?.goToLower();\n }\n\n renderPagination(data: any) {\n const maxNoOfDots = this.state.props.maxnoofdots;\n let minIndex = Math.max(this.state.activeIndex - maxNoOfDots + 1, 0);\n let maxIndex = Math.min(minIndex + maxNoOfDots - 1, data.length);\n if (maxIndex === data.length) {\n minIndex = maxIndex - maxNoOfDots;\n }\n const dotStyle = this._showSkeleton ? {\n ...this.styles.dotStyle,\n ...this.styles.dotSkeleton.root\n } : this.styles.dotStyle\n return (<View style={this.styles.dotsWrapperStyle}>\n <View style={{flexDirection: this.isRTL ? 'row-reverse' : 'row'}}>\n {\n data.map((item: any, index: number) => {\n return index >= minIndex && index <= maxIndex ? (\n <View key={'dots_' + this.generateItemKey(item, index, this.state.props)} {...this.getTestPropsForAction('indicator'+index)}\n style={[dotStyle]}>\n </View>) : null;\n })\n }\n {\n this._showSkeleton ? null : <Animated.View style={[\n this.styles.dotStyle,\n this.styles.activeDotStyle, {\n width: undefined,\n height: undefined,\n transform: [{\n translateX: this.dotPosition\n }]\n }, this.isRTL ? { right: 0 } : { left: 0}]}>\n <Animated.View style={[{\n width: 1,\n height: 1\n }, {\n // This is failing in Android\n // minWidth: this.dotScale\n }]}>\n </Animated.View>\n </Animated.View>\n }\n </View>\n </View>);\n }\n\n public renderSkeleton(props: WmCarouselProps): React.ReactNode | null {\n return <View style={[this.styles.root, {...this.styles.skeleton.root}]}>\n {this.renderItem({}, 0)}\n {this.renderPagination([{}, {}, {}])}\n </View>\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.autoPlay();\n }\n\n renderWidget(props: WmCarouselProps) {\n const hasNavs = props.controls === 'both' || props.controls ==='navs';\n const hasDots = props.controls === 'both' || props.controls ==='indicators';\n let styles = this.styles;\n let data = props.type === 'dynamic' ? props.dataset : props.children;\n data = isArray(data) ? data : [];\n this.noOfSlides = data?.length || 0;\n let slideScale = undefined as any;\n let slideTranslateX = undefined as any;\n if (isArray(this.styles.slide?.transform)) {\n slideScale = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).scale)) as any)?.scale;\n slideTranslateX = (this.styles.slide?.transform?.find(o => !isUndefined((o as any).translateX)) as any)?.translateX;\n }\n // TODO: loop prop on Carousel is not working Refer: https://github.com/meliorence/react-native-snap-carousel/issues/608\n return (\n <View style={styles.root}>\n {this._background}\n <SwipeAnimation.View \n enableGestures={props.enablegestures && this.noOfSlides > 1}\n style={{\n flex: 1\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n slideMinWidth={this.styles.slide.width}\n >\n {data.map((item: any, index: number) => {\n const isActive = index === this.state.activeIndex - 1;\n let scale = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [slideScale, slideScale, 1, slideScale, slideScale]\n });\n let translateX = this.animationView?.animationPhase.interpolate({\n inputRange: [-2000, index - 1, index, index + 1, 2000],\n outputRange: [-56, -56, 0, 56, 56]\n });\n return (\n <Animated.View key={this.generateItemKey(item, index, props)}\n onLayout={this.addSlideLayout.bind(this, index)}\n testID={`carousel_item_${index}`}\n style={[\n {height: props.type === 'dynamic' ? undefined : '100%'},\n this.styles.slide,\n index === 0 ? this.styles.firstSlide : null,\n index === data.length - 1 ? this.styles.lastSlide: null,\n isActive ? this.styles.activeSlide: null,\n translateX && scale ? {\n transform: [\n {\n translateX: !isUndefined(slideTranslateX) ? slideTranslateX : translateX\n }, {\n scale: scale\n }\n ]\n } : null]}>\n <Tappable onTap={() => {\n this.onSlideChange(index + 1);\n const position = this.slidesLayout\n .filter((l , i) => i < index)\n .reduce((s, l) => s + l.width, 0);\n this.animationView?.setPosition(-1 * position);\n }} rippleColor={this.styles.root.rippleColor} styles={{height: \"100%\"}}>\n {this.renderItem(item, index)}\n </Tappable>\n </Animated.View>\n );\n })}\n </SwipeAnimation.View>\n {hasNavs ? (\n <View style={styles.btnPanel}>\n <WmIcon\n id={this.getTestId('prev_icon')}\n iconclass=\"wi wi-chevron-left fa-2x\"\n styles={styles.prevBtn}\n onTap={this.prev}\n accessibilitylabel='back'/>\n <WmIcon\n id={this.getTestId('next_icon')}\n iconclass=\"wi wi-chevron-right fa-2x\"\n styles={styles.nextBtn}\n onTap={this.next}\n accessibilitylabel='next'/>\n </View>): null}\n {hasDots && data ? this.renderPagination(data) : null}\n </View>);\n }\n}\n"],"mappings":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EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,WAAW,CAAE;MAChCC,SAAS,EAAC,2BAA2B;MACrC1F,MAAM,EAAEA,MAAM,CAAC8F,OAAQ;MACvBV,KAAK,EAAE,IAAI,CAACrG,IAAK;MACjB8G,kBAAkB,EAAC;IAAM,CAAC,CACxB,CAAC,GAAG,IAAI,EACbxC,OAAO,IAAIhG,IAAI,GAAG,IAAI,CAACiE,gBAAgB,CAACjE,IAAI,CAAC,GAAG,IAC/C,CAAC;EACX;AACF","ignoreList":[]}
@@ -15,6 +15,7 @@ export default class WmCarouselProps extends BaseProps {
15
15
  _defineProperty(this, "renderSlide", void 0);
16
16
  _defineProperty(this, "enablegestures", true);
17
17
  _defineProperty(this, "maxnoofdots", 20);
18
+ _defineProperty(this, "showskeletonchildren", false);
18
19
  }
19
20
  }
20
21
  //# sourceMappingURL=carousel.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmCarouselProps","constructor","args","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: 'auto' | 'none' = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n itemkey?: ($item: any, $index: any) => any = null as any;\n renderSlide?: ($item: any, $index: number, carousel: any) => React.ReactNode;\n enablegestures = true;\n maxnoofdots = 20;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACR,MAAM;IAAAA,eAAA,4BACP,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA,kBAC6B,IAAI;IAAAA,eAAA;IAAAA,eAAA,yBAE/B,IAAI;IAAAA,eAAA,sBACR,EAAE;EAAA;AAClB","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmCarouselProps","constructor","args","_defineProperty"],"sources":["carousel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport React from 'react';\n\nexport default class WmCarouselProps extends BaseProps {\n dataset: any = null;\n type?: 'static' | 'dynamic' = 'static';\n animation?: 'auto' | 'none' = 'auto';\n animationinterval?: number = 3;\n controls?: 'both' | 'none' | 'navs' | 'indicators' = 'both';\n children? = null as any;\n itemkey?: ($item: any, $index: any) => any = null as any;\n renderSlide?: ($item: any, $index: number, carousel: any) => React.ReactNode;\n enablegestures = true;\n maxnoofdots = 20;\n showskeletonchildren?: boolean = false;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,eAAe,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACtC,IAAI;IAAAA,eAAA,eACW,QAAQ;IAAAA,eAAA,oBACR,MAAM;IAAAA,eAAA,4BACP,CAAC;IAAAA,eAAA,mBACuB,MAAM;IAAAA,eAAA,mBAC/C,IAAI;IAAAA,eAAA,kBAC6B,IAAI;IAAAA,eAAA;IAAAA,eAAA,yBAE/B,IAAI;IAAAA,eAAA,sBACR,EAAE;IAAAA,eAAA,+BACiB,KAAK;EAAA;AACxC","ignoreList":[]}
@@ -88,6 +88,21 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
88
88
  marginLeft: 2,
89
89
  marginRight: 2,
90
90
  backgroundColor: themeVariables.carouselDotColor
91
+ },
92
+ skeleton: {
93
+ root: {
94
+ width: '100%'
95
+ },
96
+ text: {}
97
+ },
98
+ dotSkeleton: {
99
+ root: {
100
+ width: 10,
101
+ height: 10,
102
+ borderRadius: 5,
103
+ opacity: 1,
104
+ backgroundColor: themeVariables.skeletonAnimatedBgColor
105
+ }
91
106
  }
92
107
  });
93
108
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","rippleColor","text","slide","overflow","paddingHorizontal","transform","scale","firstSlide","lastSlide","activeSlide","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","padding","dotStyle","carouselDotColor","rotateY","defaultColorF","right","alignSelf","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n slide: AllStyle,\n firstSlide: AllStyle,\n lastSlide: AllStyle,\n activeSlide: AllStyle,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative',\n rippleColor: themeVariables.transparent\n },\n text: {},\n slide: {\n width: '100%',\n overflow: 'hidden',\n paddingHorizontal: 16,\n transform: [\n {\n scale: 0.8\n }\n ]\n },\n firstSlide: {},\n lastSlide: {},\n activeSlide: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n position: 'absolute',\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1,\n padding: 4\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginLeft: 2,\n marginRight: 2,\n backgroundColor: themeVariables.carouselDotColor\n }\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,GAAc,GAAG;IACnBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAEN,cAAc,CAACO,WAAW;IACvCC,WAAW,EAAE,CAAC;IACdC,cAAc,EAAE;EACpB,CAAC;EACD,MAAMC,aAA+B,GAAGb,YAAY,CAAC;IACjDc,IAAI,EAAE;MACFC,QAAQ,EAAE,UAAU;MACpBC,WAAW,EAAEb,cAAc,CAACO;IAChC,CAAC;IACDO,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACHX,KAAK,EAAE,MAAM;MACbY,QAAQ,EAAE,QAAQ;MAClBC,iBAAiB,EAAE,EAAE;MACrBC,SAAS,EAAE,CACP;QACIC,KAAK,EAAE;MACX,CAAC;IAET,CAAC;IACDC,UAAU,EAAE,CAAC,CAAC;IACdC,SAAS,EAAE,CAAC,CAA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AQ,EAAE;MACNjB,eAAe,EAAE9B,cAAc,CAACqD;IACpC,CAAC;IACDzB,OAAO,EAAE;MACLjB,IAAI,EAAE;QACFmB,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACqD;MAChC,CAAC;MACDpB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACqD;MAC1B;IACJ,CAAC;IACDjB,OAAO,EAAE;MACLzB,IAAI,EAAE;QACFkB,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACqD;MAChC,CAAC;MACDpB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACqD;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","btn","height","width","borderRadius","borderColor","transparent","borderWidth","justifyContent","defaultStyles","root","position","rippleColor","text","slide","overflow","paddingHorizontal","transform","scale","firstSlide","lastSlide","activeSlide","btnPanel","top","marginTop","flexDirection","alignItems","prevBtn","marginLeft","backgroundColor","carouselPrevBgColor","fontSize","icon","color","carouselPrevBtnColor","nextBtn","marginRight","carouselNextBtnColor","dotsWrapperStyle","opacity","carouselDotWrapperBgColor","paddingTop","paddingBottom","activeDotStyle","carouselActiveDotColor","padding","dotStyle","carouselDotColor","skeleton","dotSkeleton","skeletonAnimatedBgColor","rotateY","defaultColorF","right","alignSelf","primaryColor"],"sources":["carousel.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCarouselStyles = BaseStyles & {\n btnPanel: AllStyle,\n prevBtn: WmIconStyles,\n slide: AllStyle,\n firstSlide: AllStyle,\n lastSlide: AllStyle,\n activeSlide: AllStyle,\n nextBtn: WmIconStyles,\n dotsWrapperStyle: AllStyle,\n dotStyle: AllStyle,\n activeDotStyle: AllStyle,\n skeleton: WmSkeletonStyles\n dotSkeleton: WmSkeletonStyles\n};\nexport const DEFAULT_CLASS = 'app-carousel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const btn: ViewStyle = {\n height: 48,\n width: 48,\n borderRadius: 48,\n borderColor: themeVariables.transparent,\n borderWidth: 1,\n justifyContent: 'center'\n };\n const defaultStyles: WmCarouselStyles = defineStyles({\n root: {\n position: 'relative',\n rippleColor: themeVariables.transparent\n },\n text: {},\n slide: {\n width: '100%',\n overflow: 'hidden',\n paddingHorizontal: 16,\n transform: [\n {\n scale: 0.8\n }\n ]\n },\n firstSlide: {},\n lastSlide: {},\n activeSlide: {},\n btnPanel: {\n position: 'absolute',\n top: '50%',\n marginTop: -64,\n height: 64,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%'\n },\n prevBtn : {\n root: {\n marginLeft: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselPrevBtnColor\n }\n } as WmIconStyles,\n nextBtn : {\n root: {\n marginRight: 12,\n ...btn,\n backgroundColor: themeVariables.carouselPrevBgColor,\n rippleColor: themeVariables.transparent\n },\n text: {\n fontSize: 32\n },\n icon : {\n color: themeVariables.carouselNextBtnColor\n }\n } as WmIconStyles,\n dotsWrapperStyle:{\n opacity: 1,\n backgroundColor: themeVariables.carouselDotWrapperBgColor,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: 4,\n paddingBottom: 4\n },\n activeDotStyle: {\n position: 'absolute',\n backgroundColor: themeVariables.carouselActiveDotColor,\n opacity: 1,\n padding: 4\n },\n dotStyle: {\n width: 8,\n height: 8,\n borderRadius: 10,\n opacity: 0.2,\n marginLeft: 2,\n marginRight: 2,\n backgroundColor: themeVariables.carouselDotColor\n },\n skeleton: {\n root: {\n width: '100%',\n },\n text: {}\n } as any as WmSkeletonStyles,\n dotSkeleton: {\n root: {\n width: 10,\n height: 10,\n borderRadius: 5,\n opacity: 1,\n backgroundColor: themeVariables.skeletonAnimatedBgColor \n }\n } as any as WmSkeletonStyles\n } as WmCarouselStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n },\n nextBtn : {\n root:{\n transform: [{rotateY: '180deg'}]\n }\n }\n });\n\n addStyle('app-carousel-1', '', {\n btnPanel: {\n top: '100%'\n },\n prevBtn: {\n root: {\n borderRadius: 6\n }\n },\n nextBtn: {\n root: {\n borderRadius: 6\n }\n }\n } as any as WmCarouselStyles);\n\n addStyle('app-carousel-2', '', {\n btnPanel: {\n backgroundColor: themeVariables.defaultColorF,\n width: '100%',\n top: '100%',\n right: 0,\n padding: 8,\n justifyContent: 'flex-end'\n },\n dotsWrapperStyle:{\n alignSelf: 'flex-start',\n justifyContent: 'flex-start'\n },\n activeDotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n dotStyle: {\n backgroundColor: themeVariables.primaryColor,\n },\n prevBtn: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n },\n nextBtn: {\n root: {\n marginLeft: 8,\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderColor: themeVariables.primaryColor,\n },\n icon : {\n color: themeVariables.primaryColor\n }\n }\n } as any as WmCarouselStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA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B,IAAI,EAAE;QACFkB,UAAU,EAAE,CAAC;QACbC,eAAe,EAAE,0BAA0B;QAC3CxB,WAAW,EAAEN,cAAc,CAACwD;MAChC,CAAC;MACDvB,IAAI,EAAG;QACHC,KAAK,EAAElC,cAAc,CAACwD;MAC1B;IACJ;EACJ,CAA4B,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
@@ -34,6 +34,20 @@ export default class WmAnchor extends BaseComponent {
34
34
  height: this.props.skeletonheight || this.styles.root.height
35
35
  });
36
36
  }
37
+ renderBadge() {
38
+ const {
39
+ badgevalue
40
+ } = this.props;
41
+ if (this._showSkeleton) {
42
+ return createSkeleton(this.theme, this.styles.badgeSkeleton, {
43
+ ...this.styles.badge
44
+ // marginTop: -50
45
+ });
46
+ }
47
+ return badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, {
48
+ style: this.styles.badge
49
+ }, badgevalue) : null;
50
+ }
37
51
  renderWidget(props) {
38
52
  const {
39
53
  iconclass,
@@ -58,10 +72,6 @@ export default class WmAnchor extends BaseComponent {
58
72
  iconmargin: iconmargin,
59
73
  iconwidth: iconwidth
60
74
  });
61
- //@ts-ignore
62
- const badge = badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, _extends({
63
- style: this.styles.badge
64
- }, this.getTestProps('badge')), badgevalue) : null;
65
75
  return /*#__PURE__*/React.createElement(NavigationServiceConsumer, null, navigationService => /*#__PURE__*/React.createElement(Animatedview, {
66
76
  entryanimation: props.animation,
67
77
  delay: props.animationdelay,
@@ -83,7 +93,7 @@ export default class WmAnchor extends BaseComponent {
83
93
  style: this.styles.text
84
94
  }, this.getTestPropsForLabel('caption'), getAccessibilityProps(AccessibilityWidgetType.ANCHOR, props), {
85
95
  numberOfLines: props.nooflines
86
- }), props.caption) : null, props.iconposition === 'right' && icon, badge)));
96
+ }), props.caption) : null, props.iconposition === 'right' && icon, this.renderBadge())));
87
97
  }
88
98
  }
89
99
  //# sourceMappingURL=anchor.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","Badge","BaseComponent","BaseComponentState","Tappable","WmIcon","encodeUrl","AccessibilityWidgetType","getAccessibilityProps","NavigationServiceConsumer","WmAnchorProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmAnchorState","WmAnchor","constructor","props","onTap","navigationService","e","state","hyperlink","link","encodeurl","openUrl","target","invokeEventCallback","proxy","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","iconclass","iconurl","name","iconheight","iconmargin","iconwidth","badgevalue","icon","text","color","createElement","id","getTestId","hint","badge","undefined","_extends","style","getTestProps","entryanimation","animation","delay","animationdelay","justifyContent","getTestPropsForAction","flexDirection","iconposition","_background","caption","getTestPropsForLabel","ANCHOR","numberOfLines","nooflines"],"sources":["anchor.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SyntheticEvent, Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { encodeUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport WmAnchorProps from './anchor.props';\nimport { DEFAULT_CLASS, WmAnchorStyles } from './anchor.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmAnchorState extends BaseComponentState<WmAnchorProps> {\n\n}\n\nexport default class WmAnchor extends BaseComponent<WmAnchorProps, WmAnchorState, WmAnchorStyles> {\n\n constructor(props: WmAnchorProps) {\n super(props, DEFAULT_CLASS, new WmAnchorProps());\n }\n\n onTap(navigationService: NavigationService, e: SyntheticEvent) {\n const props = this.state.props;\n if (props.hyperlink) {\n const link = props.encodeurl ? encodeUrl(props.hyperlink) : props.hyperlink;\n navigationService.openUrl(link, {\n target: this.state.props.target\n });\n }\n this.invokeEventCallback('onTap', [e, this.proxy]);\n }\n\n public renderSkeleton(props: WmAnchorProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n\n renderWidget(props: WmAnchorProps) {\n const {\n iconclass,\n iconurl,\n name,\n iconheight,\n iconmargin,\n iconwidth,\n badgevalue,\n } = props;\n\n if (this.styles.icon && this.styles.icon.text) {\n this.styles.icon.text.color = this.styles.text.color;\n }\n\n const icon = (iconclass || iconurl) && (\n <WmIcon\n id={this.getTestId('icon')}\n styles={this.styles.icon}\n hint={props?.hint}\n name={name + '_icon'}\n iconclass={iconclass}\n iconurl={iconurl}\n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />\n );\n //@ts-ignore\n const badge = badgevalue != undefined ? (<Badge style={this.styles.badge} {...this.getTestProps('badge')}>{badgevalue}</Badge>): null;\n return (\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) =>\n (<Animatedview entryanimation={props.animation} delay={props.animationdelay} style={{width: this.styles.root.width, height: this.styles.root.height, justifyContent: 'center'}}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={[this.styles.root, this.styles.root.width && this.styles.root.height ? { width: '100%', height: '100%'} : null, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}\n onTap={props.hyperlink || props.onTap ? (e: SyntheticEvent) => this.onTap(navigationService, e) : undefined}>\n {this._background}\n {props.iconposition === 'top' && icon}\n {props.iconposition === 'left' && icon}\n {props.caption ? (<Text style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n {...getAccessibilityProps(AccessibilityWidgetType.ANCHOR, props)}\n numberOfLines={props.nooflines}>{props.caption}</Text>) : null}\n {props.iconposition === 'right' && icon}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KAAK,CAACgD,YAAY,KAAK,KAAK,IAAInB,IAAI,EACpC7B,KAAK,CAACgD,YAAY,KAAK,MAAM,IAAInB,IAAI,EACrC7B,KAAK,CAACkD,OAAO,gBAAIpE,KAAA,CAAAkD,aAAA,CAACjD,IAAI,EAAAuD,QAAA;MAACC,KAAK,EAAE,IAAI,CAACzB,MAAM,CAACgB;IAAK,GAC5C,IAAI,CAACqB,oBAAoB,CAAC,SAAS,CAAC,EACpC5D,qBAAqB,CAACD,uBAAuB,CAAC8D,MAAM,EAAEpD,KAAK,CAAC;MAChEqD,aAAa,EAAErD,KAAK,CAACsD;IAAU,IAAEtD,KAAK,CAACkD,OAAc,CAAC,GAAI,IAAI,EAC7DlD,KAAK,CAACgD,YAAY,KAAK,OAAO,IAAInB,IAAI,EACtCO,KACO,CACE,CAES,CAAC;EAEhC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","Badge","BaseComponent","BaseComponentState","Tappable","WmIcon","encodeUrl","AccessibilityWidgetType","getAccessibilityProps","NavigationServiceConsumer","WmAnchorProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmAnchorState","WmAnchor","constructor","props","onTap","navigationService","e","state","hyperlink","link","encodeurl","openUrl","target","invokeEventCallback","proxy","renderSkeleton","theme","styles","skeleton","root","width","skeletonwidth","height","skeletonheight","renderBadge","badgevalue","_showSkeleton","badgeSkeleton","badge","undefined","createElement","style","renderWidget","iconclass","iconurl","name","iconheight","iconmargin","iconwidth","icon","text","color","id","getTestId","hint","entryanimation","animation","delay","animationdelay","justifyContent","_extends","getTestPropsForAction","flexDirection","iconposition","_background","caption","getTestPropsForLabel","ANCHOR","numberOfLines","nooflines"],"sources":["anchor.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SyntheticEvent, Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { encodeUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport WmAnchorProps from './anchor.props';\nimport { DEFAULT_CLASS, WmAnchorStyles } from './anchor.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmAnchorState extends BaseComponentState<WmAnchorProps> {\n\n}\n\nexport default class WmAnchor extends BaseComponent<WmAnchorProps, WmAnchorState, WmAnchorStyles> {\n\n constructor(props: WmAnchorProps) {\n super(props, DEFAULT_CLASS, new WmAnchorProps());\n }\n\n onTap(navigationService: NavigationService, e: SyntheticEvent) {\n const props = this.state.props;\n if (props.hyperlink) {\n const link = props.encodeurl ? encodeUrl(props.hyperlink) : props.hyperlink;\n navigationService.openUrl(link, {\n target: this.state.props.target\n });\n }\n this.invokeEventCallback('onTap', [e, this.proxy]);\n }\n\n public renderSkeleton(props: WmAnchorProps){\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.props.skeletonwidth || this.styles.root.width,\n height: this.props.skeletonheight || this.styles.root.height\n });\n }\n \n renderBadge() {\n const { badgevalue } = this.props;\n if(this._showSkeleton) {\n return createSkeleton(this.theme, this.styles.badgeSkeleton, {\n ...this.styles.badge,\n // marginTop: -50\n })\n }\n return badgevalue != undefined ? (<Badge style={this.styles.badge}>{badgevalue}</Badge>): null;\n }\n\n renderWidget(props: WmAnchorProps) {\n const {\n iconclass,\n iconurl,\n name,\n iconheight,\n iconmargin,\n iconwidth,\n badgevalue,\n } = props;\n\n if (this.styles.icon && this.styles.icon.text) {\n this.styles.icon.text.color = this.styles.text.color;\n }\n\n const icon = (iconclass || iconurl) && (\n <WmIcon\n id={this.getTestId('icon')}\n styles={this.styles.icon}\n hint={props?.hint}\n name={name + '_icon'}\n iconclass={iconclass}\n iconurl={iconurl}\n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />\n );\n return (\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) =>\n (<Animatedview entryanimation={props.animation} delay={props.animationdelay} style={{width: this.styles.root.width, height: this.styles.root.height, justifyContent: 'center'}}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={[this.styles.root, this.styles.root.width && this.styles.root.height ? { width: '100%', height: '100%'} : null, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}\n onTap={props.hyperlink || props.onTap ? (e: SyntheticEvent) => this.onTap(navigationService, e) : undefined}>\n {this._background}\n {props.iconposition === 'top' && icon}\n {props.iconposition === 'left' && icon}\n {props.caption ? (<Text style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n {...getAccessibilityProps(AccessibilityWidgetType.ANCHOR, props)}\n numberOfLines={props.nooflines}>{props.caption}</Text>) : null}\n {props.iconposition === 'right' && icon}\n {this.renderBadge()}\n </Tappable>\n </Animatedview>)\n }\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAAyBC,QAAQ,QAAQ,mDAAmD;AAC5F,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAM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,KAAK,CAACwD;IAAU,IAAExD,KAAK,CAACoD,OAAc,CAAC,GAAI,IAAI,EAC7DpD,KAAK,CAACkD,YAAY,KAAK,OAAO,IAAId,IAAI,EACtC,IAAI,CAACf,WAAW,CAAC,CACV,CACE,CAES,CAAC;EAEhC;AACF","ignoreList":[]}
@@ -41,6 +41,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
41
41
  height: 20,
42
42
  borderRadius: 4
43
43
  }
44
+ },
45
+ badgeSkeleton: {
46
+ root: {}
44
47
  }
45
48
  });
46
49
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["Color","defineStyles","BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","linkDefaultColor","flexDirection","alignItems","overflow","text","paddingLeft","paddingRight","fontSize","textDecorationLine","badge","backgroundColor","fade","rgb","toString","alignSelf","marginTop","marginLeft","fontWeight","icon","anchorTextPadding","skeleton","width","height","borderRadius","getLinkStyles","linkPrimaryColor","linkSecondaryColor","linkSuccessColor","linkDangerColor","linkWarningColor","linkInfoColor","linkLightColor","linkDarkColor"],"sources":["anchor.styles.ts"],"sourcesContent":["import Color from 'color';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAnchorStyles = BaseStyles & {\n badge: AllStyle,\n icon: WmIconStyles\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-anchor';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAnchorStyles = defineStyles({\n root: {\n color: themeVariables.linkDefaultColor,\n flexDirection: 'row',\n alignItems: 'center',\n overflow: 'visible'\n },\n text: {\n paddingLeft: 8,\n paddingRight: 8,\n color: themeVariables.linkDefaultColor,\n fontSize: 18, \n textDecorationLine: 'underline',\n },\n badge: {\n backgroundColor: Color(themeVariables.linkDefaultColor).fade(0.8).rgb().toString(),\n color: themeVariables.linkDefaultColor,\n alignSelf: 'flex-start',\n marginTop: -12,\n marginLeft: 0,\n fontWeight: 'bold'\n },\n icon: {\n root : {\n alignSelf: 'center'\n },\n text: {\n fontSize: 16,\n paddingRight: themeVariables.anchorTextPadding,\n color: themeVariables.linkDefaultColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: '100%',\n height: 20,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8\n }\n });\n\n const getLinkStyles = (color: string) => {\n return {\n root: {\n color: color\n },\n text: {\n color: color\n },\n icon: {\n text: {\n color: color\n }\n },\n badge: {\n backgroundColor: Color(color).fade(0.8).rgb().toString(),\n color: color,\n }\n } as WmAnchorStyles;\n };\n\n addStyle('link-primary', '', getLinkStyles(themeVariables.linkPrimaryColor));\n addStyle('link-secondary', '', getLinkStyles(themeVariables.linkSecondaryColor));\n addStyle('link-success', '', getLinkStyles(themeVariables.linkSuccessColor));\n addStyle('link-danger', '', getLinkStyles(themeVariables.linkDangerColor));\n addStyle('link-warning', '', getLinkStyles(themeVariables.linkWarningColor));\n addStyle('link-info', '', getLinkStyles(themeVariables.linkInfoColor));\n addStyle('link-light', '', getLinkStyles(themeVariables.linkLightColor));\n addStyle('link-dark', '', getLinkStyles(themeVariables.linkDarkColor));\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,UAAU,MAAoB,wCAAwC;AAS7E,OAAO,MAAMC,aAAa,GAAG,YAAY;AAEzCD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAA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les","root","color","linkDefaultColor","flexDirection","alignItems","overflow","text","paddingLeft","paddingRight","fontSize","textDecorationLine","badge","backgroundColor","fade","rgb","toString","alignSelf","marginTop","marginLeft","fontWeight","icon","anchorTextPadding","skeleton","width","height","borderRadius","badgeSkeleton","getLinkStyles","linkPrimaryColor","linkSecondaryColor","linkSuccessColor","linkDangerColor","linkWarningColor","linkInfoColor","linkLightColor","linkDarkColor"],"sources":["anchor.styles.ts"],"sourcesContent":["import Color from 'color';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAnchorStyles = BaseStyles & {\n badge: AllStyle,\n icon: WmIconStyles\n skeleton: WmSkeletonStyles\n badgeSkeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-anchor';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAnchorStyles = defineStyles({\n root: {\n color: themeVariables.linkDefaultColor,\n flexDirection: 'row',\n alignItems: 'center',\n overflow: 'visible'\n },\n text: {\n paddingLeft: 8,\n paddingRight: 8,\n color: themeVariables.linkDefaultColor,\n fontSize: 18, \n textDecorationLine: 'underline',\n },\n badge: {\n backgroundColor: Color(themeVariables.linkDefaultColor).fade(0.8).rgb().toString(),\n color: themeVariables.linkDefaultColor,\n alignSelf: 'flex-start',\n marginTop: -12,\n marginLeft: 0,\n fontWeight: 'bold'\n },\n icon: {\n root : {\n alignSelf: 'center'\n },\n text: {\n fontSize: 16,\n paddingRight: themeVariables.anchorTextPadding,\n color: themeVariables.linkDefaultColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: '100%',\n height: 20,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n badgeSkeleton: {\n root: {\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8\n }\n });\n\n const getLinkStyles = (color: string) => {\n return {\n root: {\n color: color\n },\n text: {\n color: color\n },\n icon: {\n text: {\n color: color\n }\n },\n badge: {\n backgroundColor: Color(color).fade(0.8).rgb().toString(),\n color: color,\n }\n } as WmAnchorStyles;\n };\n\n addStyle('link-primary', '', getLinkStyles(themeVariables.linkPrimaryColor));\n addStyle('link-secondary', '', getLinkStyles(themeVariables.linkSecondaryColor));\n addStyle('link-success', '', getLinkStyles(themeVariables.linkSuccessColor));\n addStyle('link-danger', '', getLinkStyles(themeVariables.linkDangerColor));\n addStyle('link-warning', '', getLinkStyles(themeVariables.linkWarningColor));\n addStyle('link-info', '', getLinkStyles(themeVariables.linkInfoColor));\n addStyle('link-light', '', getLinkStyles(themeVariables.linkLightColor));\n addStyle('link-dark', '', getLinkStyles(themeVariables.linkDarkColor));\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,UAAU,MAAoB,wCAAwC;AAU7E,OAAO,MAAMC,aAAa,GAAG,YAAY;AAEzCD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA6B,GAAGN,YAAY,CAAC;IAC/CO,IAAI,EAAE;MACFC,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfP,KAAK,EAAEJ,cAAc,CAACK,gBAAgB;MACtCO,QAAQ,EAAE,EAAE;MACZC,kBAAkB,EAAE;IACxB,CAAC;IACDC,KAAK,EAAE;MACHC,eAAe,EAAEpB,KAAK,CAAC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J,CAAC;EACL,CAAC;EAEDH,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAAC+B,gBAAgB,CAAC,CAAC;EAC5E9B,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACgC,kBAAkB,CAAC,CAAC;EAChF/B,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACiC,gBAAgB,CAAC,CAAC;EAC5EhC,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACkC,eAAe,CAAC,CAAC;EAC1EjC,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACmC,gBAAgB,CAAC,CAAC;EAC5ElC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACoC,aAAa,CAAC,CAAC;EACtEnC,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACqC,cAAc,CAAC,CAAC;EACxEpC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE6B,aAAa,CAAC9B,cAAc,CAACsC,aAAa,CAAC,CAAC;AAC1E,CAAC,CAAC","ignoreList":[]}
@@ -11,6 +11,7 @@ import WmAudioProps from './audio.props';
11
11
  import { DEFAULT_CLASS } from './audio.styles';
12
12
  import WmIcon from '../icon/icon.component';
13
13
  import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
14
+ import { createSkeleton } from '../skeleton/skeleton.component';
14
15
  export class WmAudioState extends BaseComponentState {
15
16
  constructor(...args) {
16
17
  super(...args);
@@ -194,6 +195,12 @@ export default class WmAudio extends BaseComponent {
194
195
  super.componentWillUnmount();
195
196
  this.stop();
196
197
  }
198
+ renderTextSkeleton() {
199
+ return createSkeleton(this.theme, {}, {
200
+ ...this.styles.text,
201
+ ...this.styles.textSkeleton.root
202
+ });
203
+ }
197
204
  renderWidget(props) {
198
205
  return props.controls ? /*#__PURE__*/React.createElement(View, {
199
206
  style: this.styles.root
@@ -209,7 +216,7 @@ export default class WmAudio extends BaseComponent {
209
216
  iconclass: "wi wi-pause fa-2x",
210
217
  styles: this.styles.pauseIcon,
211
218
  onTap: () => this.pause()
212
- }), /*#__PURE__*/React.createElement(Text, {
219
+ }), this._showSkeleton ? this.renderTextSkeleton() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
213
220
  style: this.styles.text
214
221
  }, `${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`), /*#__PURE__*/React.createElement(Slider, {
215
222
  testID: this.getTestId('slider'),
@@ -226,7 +233,7 @@ export default class WmAudio extends BaseComponent {
226
233
  thumbTintColor: this.styles.slider.thumb.backgroundColor,
227
234
  minimumTrackTintColor: this.styles.slider.minimumTrack.backgroundColor,
228
235
  maximumTrackTintColor: this.styles.slider.maximumTrack.backgroundColor
229
- }), !props.muted ? /*#__PURE__*/React.createElement(WmIcon, {
236
+ })), !props.muted ? /*#__PURE__*/React.createElement(WmIcon, {
230
237
  name: props.name + "_mute",
231
238
  id: this.getTestId('mute'),
232
239
  iconclass: "wi wi-volume-up fa-2x",
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","Text","View","Slider","isString","Audio","BaseComponent","BaseComponentState","WmAudioProps","DEFAULT_CLASS","WmIcon","isWebPreviewMode","WmAudioState","constructor","args","_defineProperty","WmAudio","props","onPropertyChange","name","$new","$old","initialized","Promise","resolve","then","_this$sound","sound","unloadAsync","onSeekChange","state","playing","autoplay","play","getSource","source","loadAsset","mp3format","uri","addPadding","str","maxLen","pad","length","formatTime","v","t","mins","Math","floor","seconds","round","setTimer","cancelTimer","timer","setInterval","currentTime","totalTime","loop","replay","stop","setState","max","offsetTime","clearInterval","_this$sound2","pause","updateState","replayAsync","loading","playAsync","Sound","createAsync","isMuted","muted","res","getStatusAsync","status","catch","_this$sound3","pauseAsync","mute","setStatusAsync","unmute","time","_this$sound4","setPositionAsync","componentDidMount","setTimeout","componentWillUnmount","renderWidget","controls","createElement","style","styles","root","_background","id","getTestId","playIcon","iconclass","onTap","pauseIcon","text","testID","step","flex","value","disabled","onValueChange","bind","minimumValue","inverted","isRTL","OS","maximumValue","thumbTintColor","slider","thumb","backgroundColor","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack","muteIcon","unmuteIcon"],"sources":["audio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Slider from '@react-native-community/slider';\nimport { isString } from 'lodash-es';\nimport { Audio } from 'expo-av';\nimport { Sound } from 'expo-av/build/Audio';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmAudioProps from './audio.props';\nimport { DEFAULT_CLASS, WmAudioStyles } from './audio.styles';\nimport WmIcon from '../icon/icon.component';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAudioState extends BaseComponentState<WmAudioProps> {\n playing = false;\n currentTime = 0;\n totalTime = 0;\n}\n\nexport default class WmAudio extends BaseComponent<WmAudioProps, WmAudioState, WmAudioStyles> {\n\n private loading = false;\n private sound: Sound = null as any;\n private timer: any;\n private offsetTime = 0;\n\n constructor(props: WmAudioProps) {\n super(props, DEFAULT_CLASS, new WmAudioProps(), new WmAudioState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'mp3format': {\n if (this.initialized) {\n Promise.resolve()\n .then(() => this.sound?.unloadAsync())\n .then(() => {\n this.sound = null as any;\n this.onSeekChange(0);\n if (this.state.playing \n || this.state.props.autoplay) {\n this.play();\n }\n });\n }\n }\n break;\n case 'autoplay':\n if (this.initialized && $new) {\n this.play();\n }\n }\n }\n\n getSource() {\n const source = this.loadAsset \n && this.state.props.mp3format\n && this.loadAsset(this.state.props.mp3format as string);\n if (isString(source)) {\n return {\n uri: source\n };\n }\n return source;\n }\n\n addPadding(str: string, maxLen: number, pad = '0'): string {\n if (str.length < maxLen) {\n return this.addPadding(pad + str, maxLen, pad);\n }\n return str;\n }\n\n formatTime(v: number) {\n const t = v/60;\n const mins = Math.floor(t);\n const seconds = Math.round((t - mins) * 60);\n return this.addPadding(mins+ '', 2) + ':' + this.addPadding(seconds+ '', 2);\n }\n\n setTimer() {\n this.cancelTimer();\n this.timer = setInterval(() => {\n if (this.state.currentTime >= this.state.totalTime) {\n if (this.state.props.loop) {\n this.replay();\n } else {\n this.stop();\n }\n return;\n }\n this.setState({\n currentTime: Math.max(this.offsetTime + this.state.currentTime + 1, 0)\n } as WmAudioState);\n this.offsetTime = 0;\n }, 1000);\n }\n\n cancelTimer() {\n clearInterval(this.timer);\n }\n\n stop() {\n this.pause();\n this.sound?.unloadAsync();\n this.sound = null as any;\n this.cancelTimer();\n this.offsetTime = 0;\n this.updateState({\n currentTime: 0\n } as WmAudioState);\n }\n\n replay() {\n this.updateState({\n currentTime: 0\n } as WmAudioState, () => {\n this.sound.replayAsync();\n });\n }\n\n play() {\n if (isWebPreviewMode() \n || this.loading\n || (this.state.playing && this.sound)) {\n return;\n }\n if (this.sound) {\n this.sound.playAsync();\n this.setTimer();\n this.updateState({\n playing: true\n } as WmAudioState);\n } else {\n this.loading = true;\n const source = this.getSource();\n source && Audio.Sound.createAsync(source, {\n isMuted: this.state.props.muted\n })\n .then((res) => {\n this.sound = res.sound;\n this.sound.playAsync();\n this.sound.getStatusAsync().then((status: any) => {\n this.updateState({\n currentTime: 0,\n totalTime: Math.round(status['durationMillis']/1000)\n } as WmAudioState, () => this.setTimer());\n });\n this.updateState({\n playing: true\n } as WmAudioState);\n }).catch(() => {}).then(() => {\n this.loading = false;\n });\n }\n }\n\n pause() {\n this.cancelTimer();\n this.sound?.pauseAsync().then(() => {\n this.updateState({\n playing: false\n } as WmAudioState);\n })\n }\n\n mute() {\n this.sound.setStatusAsync({\n isMuted: true\n }).then(() => {\n this.updateState({\n props: {\n muted: true\n }\n } as WmAudioState);\n });\n }\n\n unmute() {\n this.sound.setStatusAsync({\n isMuted: false\n }).then(() => {\n this.updateState({\n props: {\n muted: false\n }\n } as WmAudioState);\n });\n }\n\n onSeekChange(time: number) {\n if (time !== this.state.currentTime) {\n this.offsetTime = time - this.state.currentTime;\n this.sound?.setPositionAsync(time * 1000);\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n //without settimeout, app is crashing with errors\n setTimeout(() => {\n if (this.state.props.autoplay) {\n this.play();\n }\n }, 1000);\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stop();\n }\n\n renderWidget(props: WmAudioProps) {\n return props.controls ? (\n <View style={this.styles.root}>\n {this._background}\n {!this.state.playing ? (<WmIcon \n id={this.getTestId('play')}\n name={props.name + \"_play\"}\n styles={this.styles.playIcon}\n iconclass=\"wi wi-play-arrow fa-2x\"\n onTap={() => this.play()}></WmIcon>) : (\n <WmIcon name={props.name + \"_pause\"}\n id={this.getTestId('pause')}\n iconclass=\"wi wi-pause fa-2x\"\n styles={this.styles.pauseIcon}\n onTap={() => this.pause()}></WmIcon>)}\n <Text style={this.styles.text}>\n {`${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`}\n </Text>\n <Slider\n testID={this.getTestId('slider')}\n step={1}\n style={{flex: 1}}\n value={this.state.currentTime}\n disabled={isWebPreviewMode()}\n onValueChange={this.onSeekChange.bind(this)}\n minimumValue={0}\n inverted={this.isRTL && (Platform.OS==\"android\" || Platform.OS==\"web\")}\n maximumValue={this.state.totalTime || 1}\n thumbTintColor={this.styles.slider.thumb.backgroundColor as string}\n minimumTrackTintColor={this.styles.slider.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.slider.maximumTrack.backgroundColor as string}\n />\n {!props.muted ? (<WmIcon name={props.name + \"_mute\"}\n id={this.getTestId('mute')}\n iconclass=\"wi wi-volume-up fa-2x\"\n styles={this.styles.muteIcon}\n onTap={() => this.mute()}></WmIcon>) :\n (<WmIcon name={props.name + \"_unmute\"}\n id={this.getTestId('unmute')}\n iconclass=\"wi wi-volume-off fa-2x\"\n styles={this.styles.unmuteIcon}\n onTap={() => this.unmute()}></WmIcon>)}\n </View>) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACnD,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACvD,KAAK;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,oBACH,CAAC;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASV,aAAa,CAA4C;EAO5FO,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAII,YAAY,CAAC,CAAC,CAAC;IAACG,eAAA,kBANpD,KAAK;IAAAA,eAAA,gBACA,IAAI;IAAAA,eAAA;IAAAA,eAAA,qBAEN,CAAC;EAItB;EAEAG,gBAAgBA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,EAAQ;IACvD,KAAK,CAACH,gBAAgB,CAACC,IAAI,EAAEC,IAAI,EAAEC,IAAI,CAAC;IACxC,QAAOF,IAAI;MACT,KAAK,WAAW;QAAE;UAChB,IAAI,IAAI,CAACG,WAAW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,YAAY,CAACJ;IAA0B,CAClF,CAAC,EACD,CAACtG,KAAK,CAACyD,KAAK,gBAAI3E,KAAA,CAAA6F,aAAA,CAAClF,MAAM;MAACS,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,OAAQ;MAClD8E,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC3BE,SAAS,EAAC,uBAAuB;MACjCN,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC8B,QAAS;MAC7BvB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAACpB,IAAI,CAAC;IAAE,CAAS,CAAC,gBACpClF,KAAA,CAAA6F,aAAA,CAAClF,MAAM;MAACS,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,SAAU;MACpC8E,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,QAAQ,CAAE;MAC7BE,SAAS,EAAC,wBAAwB;MAClCN,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC+B,UAAW;MAC/BxB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAAClB,MAAM,CAAC;IAAE,CAAS,CAClC,CAAC,GAAI,IAAI;EACnB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","Text","View","Slider","isString","Audio","BaseComponent","BaseComponentState","WmAudioProps","DEFAULT_CLASS","WmIcon","isWebPreviewMode","createSkeleton","WmAudioState","constructor","args","_defineProperty","WmAudio","props","onPropertyChange","name","$new","$old","initialized","Promise","resolve","then","_this$sound","sound","unloadAsync","onSeekChange","state","playing","autoplay","play","getSource","source","loadAsset","mp3format","uri","addPadding","str","maxLen","pad","length","formatTime","v","t","mins","Math","floor","seconds","round","setTimer","cancelTimer","timer","setInterval","currentTime","totalTime","loop","replay","stop","setState","max","offsetTime","clearInterval","_this$sound2","pause","updateState","replayAsync","loading","playAsync","Sound","createAsync","isMuted","muted","res","getStatusAsync","status","catch","_this$sound3","pauseAsync","mute","setStatusAsync","unmute","time","_this$sound4","setPositionAsync","componentDidMount","setTimeout","componentWillUnmount","renderTextSkeleton","theme","styles","text","textSkeleton","root","renderWidget","controls","createElement","style","_background","id","getTestId","playIcon","iconclass","onTap","pauseIcon","_showSkeleton","Fragment","testID","step","flex","value","disabled","onValueChange","bind","minimumValue","inverted","isRTL","OS","maximumValue","thumbTintColor","slider","thumb","backgroundColor","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack","muteIcon","unmuteIcon"],"sources":["audio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform, Text, View } from 'react-native';\nimport Slider from '@react-native-community/slider';\nimport { isString } from 'lodash-es';\nimport { Audio } from 'expo-av';\nimport { Sound } from 'expo-av/build/Audio';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAudioProps from './audio.props';\nimport { DEFAULT_CLASS, WmAudioStyles } from './audio.styles';\nimport WmIcon from '../icon/icon.component';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport class WmAudioState extends BaseComponentState<WmAudioProps> {\n playing = false;\n currentTime = 0;\n totalTime = 0;\n}\n\nexport default class WmAudio extends BaseComponent<WmAudioProps, WmAudioState, WmAudioStyles> {\n\n private loading = false;\n private sound: Sound = null as any;\n private timer: any;\n private offsetTime = 0;\n\n constructor(props: WmAudioProps) {\n super(props, DEFAULT_CLASS, new WmAudioProps(), new WmAudioState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'mp3format': {\n if (this.initialized) {\n Promise.resolve()\n .then(() => this.sound?.unloadAsync())\n .then(() => {\n this.sound = null as any;\n this.onSeekChange(0);\n if (this.state.playing \n || this.state.props.autoplay) {\n this.play();\n }\n });\n }\n }\n break;\n case 'autoplay':\n if (this.initialized && $new) {\n this.play();\n }\n }\n }\n\n getSource() {\n const source = this.loadAsset \n && this.state.props.mp3format\n && this.loadAsset(this.state.props.mp3format as string);\n if (isString(source)) {\n return {\n uri: source\n };\n }\n return source;\n }\n\n addPadding(str: string, maxLen: number, pad = '0'): string {\n if (str.length < maxLen) {\n return this.addPadding(pad + str, maxLen, pad);\n }\n return str;\n }\n\n formatTime(v: number) {\n const t = v/60;\n const mins = Math.floor(t);\n const seconds = Math.round((t - mins) * 60);\n return this.addPadding(mins+ '', 2) + ':' + this.addPadding(seconds+ '', 2);\n }\n\n setTimer() {\n this.cancelTimer();\n this.timer = setInterval(() => {\n if (this.state.currentTime >= this.state.totalTime) {\n if (this.state.props.loop) {\n this.replay();\n } else {\n this.stop();\n }\n return;\n }\n this.setState({\n currentTime: Math.max(this.offsetTime + this.state.currentTime + 1, 0)\n } as WmAudioState);\n this.offsetTime = 0;\n }, 1000);\n }\n\n cancelTimer() {\n clearInterval(this.timer);\n }\n\n stop() {\n this.pause();\n this.sound?.unloadAsync();\n this.sound = null as any;\n this.cancelTimer();\n this.offsetTime = 0;\n this.updateState({\n currentTime: 0\n } as WmAudioState);\n }\n\n replay() {\n this.updateState({\n currentTime: 0\n } as WmAudioState, () => {\n this.sound.replayAsync();\n });\n }\n\n play() {\n if (isWebPreviewMode() \n || this.loading\n || (this.state.playing && this.sound)) {\n return;\n }\n if (this.sound) {\n this.sound.playAsync();\n this.setTimer();\n this.updateState({\n playing: true\n } as WmAudioState);\n } else {\n this.loading = true;\n const source = this.getSource();\n source && Audio.Sound.createAsync(source, {\n isMuted: this.state.props.muted\n })\n .then((res) => {\n this.sound = res.sound;\n this.sound.playAsync();\n this.sound.getStatusAsync().then((status: any) => {\n this.updateState({\n currentTime: 0,\n totalTime: Math.round(status['durationMillis']/1000)\n } as WmAudioState, () => this.setTimer());\n });\n this.updateState({\n playing: true\n } as WmAudioState);\n }).catch(() => {}).then(() => {\n this.loading = false;\n });\n }\n }\n\n pause() {\n this.cancelTimer();\n this.sound?.pauseAsync().then(() => {\n this.updateState({\n playing: false\n } as WmAudioState);\n })\n }\n\n mute() {\n this.sound.setStatusAsync({\n isMuted: true\n }).then(() => {\n this.updateState({\n props: {\n muted: true\n }\n } as WmAudioState);\n });\n }\n\n unmute() {\n this.sound.setStatusAsync({\n isMuted: false\n }).then(() => {\n this.updateState({\n props: {\n muted: false\n }\n } as WmAudioState);\n });\n }\n\n onSeekChange(time: number) {\n if (time !== this.state.currentTime) {\n this.offsetTime = time - this.state.currentTime;\n this.sound?.setPositionAsync(time * 1000);\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n //without settimeout, app is crashing with errors\n setTimeout(() => {\n if (this.state.props.autoplay) {\n this.play();\n }\n }, 1000);\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stop();\n }\n\n public renderTextSkeleton(): React.ReactNode {\n return (\n createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.text,\n ...this.styles.textSkeleton.root\n }\n )\n )\n } \n renderWidget(props: WmAudioProps) {\n return props.controls ? (\n <View style={this.styles.root}>\n {this._background}\n {!this.state.playing ? (<WmIcon \n id={this.getTestId('play')}\n name={props.name + \"_play\"}\n styles={this.styles.playIcon}\n iconclass=\"wi wi-play-arrow fa-2x\"\n onTap={() => this.play()}></WmIcon>) : (\n <WmIcon name={props.name + \"_pause\"}\n id={this.getTestId('pause')}\n iconclass=\"wi wi-pause fa-2x\"\n styles={this.styles.pauseIcon}\n onTap={() => this.pause()}></WmIcon>)}\n {\n this._showSkeleton ? this.renderTextSkeleton() : \n <>\n <Text style={this.styles.text}>\n {`${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`}\n </Text>\n <Slider\n testID={this.getTestId('slider')}\n step={1}\n style={{flex: 1}}\n value={this.state.currentTime}\n disabled={isWebPreviewMode()}\n onValueChange={this.onSeekChange.bind(this)}\n minimumValue={0}\n inverted={this.isRTL && (Platform.OS==\"android\" || Platform.OS==\"web\")}\n maximumValue={this.state.totalTime || 1}\n thumbTintColor={this.styles.slider.thumb.backgroundColor as string}\n minimumTrackTintColor={this.styles.slider.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.slider.maximumTrack.backgroundColor as string}\n />\n </>\n }\n {!props.muted ? (<WmIcon name={props.name + \"_mute\"}\n id={this.getTestId('mute')}\n iconclass=\"wi wi-volume-up fa-2x\"\n styles={this.styles.muteIcon}\n onTap={() => this.mute()}></WmIcon>) :\n (<WmIcon name={props.name + \"_unmute\"}\n id={this.getTestId('unmute')}\n iconclass=\"wi wi-volume-off fa-2x\"\n styles={this.styles.unmuteIcon}\n onTap={() => this.unmute()}></WmIcon>)}\n </View>) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACnE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,cAAc,QAAQ,gCAAgC;AAG/D,OAAO,MAAMC,YAAY,SAASN,kBAAkB,CAAe;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACvD,KAAK;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,oBACH,CAAC;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASX,aAAa,CAA4C;EAO5FQ,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIK,YAAY,CAAC,CAAC,CAAC;IAACG,eAAA,kBANpD,KAAK;IAAAA,eAAA,gBACA,IAAI;IAAA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I,CAACtB,MAAM,CAAC;IAAE,CAAS,CAClC,CAAC,GAAI,IAAI;EACnB;AACF","ignoreList":[]}
@@ -54,6 +54,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
54
54
  thumb: {
55
55
  backgroundColor: themeVariables.defaultColor3
56
56
  }
57
+ },
58
+ textSkeleton: {
59
+ root: {
60
+ width: 200,
61
+ height: 16,
62
+ borderRadius: 4
63
+ }
57
64
  }
58
65
  });
59
66
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Color","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","defaultColorF","flexDirection","justifyContent","alignItems","paddingHorizontal","paddingVertical","borderRadius","minWidth","text","color","defaultColor3","playIcon","icon","pauseIcon","muteIcon","unmuteIcon","slider","flex","display","minimumTrack","maximumTrack","lighten","rgb","toString","thumb"],"sources":["audio.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSliderStyles } from '../../input/slider/slider.styles';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport Color from 'color';\n\nexport type WmAudioStyles = BaseStyles & {\n playIcon: WmIconStyles\n pauseIcon: WmIconStyles\n muteIcon: WmIconStyles\n unmuteIcon: WmIconStyles\n slider: WmSliderStyles\n};\n\nexport const DEFAULT_CLASS = 'app-audio';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmAudioStyles>({\n root: {\n backgroundColor: themeVariables.defaultColorF,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderRadius: 64,\n minWidth: 300\n },\n text: {\n color: themeVariables.defaultColor3,\n paddingHorizontal: 8\n },\n playIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n pauseIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n muteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n unmuteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n slider: {\n root: {\n flex: 1\n },\n text: {\n display: 'none'\n },\n minimumTrack: {\n backgroundColor: themeVariables.defaultColor3\n },\n maximumTrack: {\n backgroundColor: Color(themeVariables.defaultColor3).lighten(0.8).rgb().toString()\n },\n thumb: {\n backgroundColor: themeVariables.defaultColor3\n }\n } as WmSliderStyles\n } as WmAudioStyles);\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,OAAOC,KAAK,MAAM,OAAO;AAUzB,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGN,YAAY,CAAgB;IAC9CO,IAAI,EAAE;MACFC,eAAe,EAAEJ,cAAc,CAACK,aAAa;MAC7CC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,eAAe;MAC/BC,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,CAAC;MAClBC,YAAY,EAAE,EAAE;MAChBC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAEd,cAAc,CAACe,aAAa;MACnCN,iBAAiB,EAAE;IACvB,CAAC;IACDO,QAAQ,EAAE;MACNC,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDG,SAAS,EAAE;MACPD,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDI,QAAQ,EAAE;MACNF,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDK,UAAU,EAAE;MACRH,IAAI,EAAE;QACFH,KAAK,EAAEd,cAAc,CAACe;MAC1B;IACJ,CAAC;IACDM,MAAM,EAAE;MACJlB,IAAI,EAAE;QACFmB,IAAI,EAAE;MACV,CAAC;MACDT,IAAI,EAAE;QACFU,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVpB,eAAe,EAAEJ,cAAc,CAACe;MACpC,CAAC;MACDU,YAAY,EAAE;QACVrB,eAAe,EAAEP,KAAK,CAACG,cAAc,CAACe,aAAa,CAAC,CAACW,OAAO,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;MACrF,CAAC;MACDC,KAAK,EAAE;QACHzB,eAAe,EAAEJ,cAAc,CAACe;MACpC;IACJ;EACJ,CAAkB,CAAC;EACnBd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Color","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","defaultColorF","flexDirection","justifyContent","alignItems","paddingHorizontal","paddingVertical","borderRadius","minWidth","text","color","defaultColor3","playIcon","icon","pauseIcon","muteIcon","unmuteIcon","slider","flex","display","minimumTrack","maximumTrack","lighten","rgb","toString","thumb","textSkeleton","width","height"],"sources":["audio.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSliderStyles } from '../../input/slider/slider.styles';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport Color from 'color';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmAudioStyles = BaseStyles & {\n playIcon: WmIconStyles\n pauseIcon: WmIconStyles\n muteIcon: WmIconStyles\n unmuteIcon: WmIconStyles\n slider: WmSliderStyles\n textSkeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-audio';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmAudioStyles>({\n root: {\n backgroundColor: themeVariables.defaultColorF,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderRadius: 64,\n minWidth: 300\n },\n text: {\n color: themeVariables.defaultColor3,\n paddingHorizontal: 8\n },\n playIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n pauseIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n muteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n unmuteIcon: {\n icon: {\n color: themeVariables.defaultColor3\n }\n },\n slider: {\n root: {\n flex: 1\n },\n text: {\n display: 'none'\n },\n minimumTrack: {\n backgroundColor: themeVariables.defaultColor3\n },\n maximumTrack: {\n backgroundColor: Color(themeVariables.defaultColor3).lighten(0.8).rgb().toString()\n },\n thumb: {\n backgroundColor: themeVariables.defaultColor3\n }\n } as WmSliderStyles,\n textSkeleton: {\n root: {\n width: 200,\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n } as WmAudioStyles);\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,OAAOC,KAAK,MAAM,OAAO;AAYzB,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGN,YAAY,CAAgB;IAC9CO,IAAI,EAAE;MACFC,eAAe,EAAEJ,cAAc,CAACK,aAAa;MAC7CC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,eAAe;MAC/BC,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,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