@wavemaker/app-rn-runtime 11.6.0-next.26304 → 11.6.0-next.26306

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +9 -14
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.styles.js +3 -6
  4. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  5. app-rn-runtime/components/advanced/webview/webview.component.js +14 -33
  6. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.props.js +1 -3
  8. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.component.js +8 -22
  10. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  11. app-rn-runtime/components/basic/anchor/anchor.props.js +0 -7
  12. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  13. app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -1
  14. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/animatedview.component.js +3 -5
  16. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  17. app-rn-runtime/components/basic/button/button.component.js +7 -40
  18. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  19. app-rn-runtime/components/basic/button/button.props.js +0 -7
  20. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  21. app-rn-runtime/components/basic/button/button.styles.js +6 -6
  22. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  23. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +5 -13
  24. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  25. app-rn-runtime/components/basic/icon/icon.component.js +12 -64
  26. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  27. app-rn-runtime/components/basic/icon/icon.props.js +0 -7
  28. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  29. app-rn-runtime/components/basic/icon/icon.styles.js +1 -2
  30. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/label/label.component.js +25 -34
  32. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  33. app-rn-runtime/components/basic/label/label.props.js +0 -3
  34. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  35. app-rn-runtime/components/basic/label/label.styles.js +5 -4
  36. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  37. app-rn-runtime/components/basic/message/message.component.js +2 -3
  38. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  39. app-rn-runtime/components/basic/message/message.props.js +0 -3
  40. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  41. app-rn-runtime/components/basic/message/message.styles.js +1 -3
  42. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/picture/picture.component.js +2 -4
  44. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  45. app-rn-runtime/components/basic/picture/picture.props.js +0 -3
  46. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  47. app-rn-runtime/components/basic/picture/picture.styles.js +1 -2
  48. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -3
  50. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  51. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +0 -2
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  53. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +2 -3
  54. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  55. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +0 -2
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  57. app-rn-runtime/components/basic/search/search.component.js +1 -2
  58. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  59. app-rn-runtime/components/basic/search/search.props.js +0 -3
  60. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  61. app-rn-runtime/components/basic/search/search.styles.js +5 -6
  62. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  63. app-rn-runtime/components/basic/skeleton/skeleton.component.js +1 -0
  64. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  65. app-rn-runtime/components/basic/video/video.component.js +2 -4
  66. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  67. app-rn-runtime/components/basic/video/video.props.js +0 -3
  68. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js +16 -23
  70. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  71. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +16 -29
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +2 -0
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  75. app-rn-runtime/components/chart/basechart.component.js +7 -33
  76. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  77. app-rn-runtime/components/chart/basechart.props.js +2 -7
  78. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  79. app-rn-runtime/components/chart/basechart.styles.js +2 -9
  80. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  81. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +2 -4
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  83. app-rn-runtime/components/chart/line-chart/line-chart.component.js +18 -23
  84. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  85. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +4 -7
  87. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +10 -33
  89. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  90. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -1
  91. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  92. app-rn-runtime/components/container/container.component.js +2 -11
  93. app-rn-runtime/components/container/container.component.js.map +1 -1
  94. app-rn-runtime/components/container/container.props.js +0 -1
  95. app-rn-runtime/components/container/container.props.js.map +1 -1
  96. app-rn-runtime/components/container/panel/panel.component.js +2 -6
  97. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  98. app-rn-runtime/components/container/panel/panel.props.js +0 -4
  99. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  100. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
  101. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  102. app-rn-runtime/components/container/wizard/wizard.component.js +14 -17
  103. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -19
  105. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  106. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +2 -27
  107. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  108. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -6
  109. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  110. app-rn-runtime/components/data/card/card.component.js +3 -7
  111. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  112. app-rn-runtime/components/data/card/card.props.js +0 -4
  113. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  114. app-rn-runtime/components/data/form/form-action/form-action.styles.js +1 -2
  115. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  116. app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -5
  117. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  118. app-rn-runtime/components/data/list/list.component.js +6 -58
  119. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  120. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -4
  121. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  122. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +0 -3
  123. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  124. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +6 -13
  125. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  126. app-rn-runtime/components/device/camera/camera.component.js +1 -4
  127. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  128. app-rn-runtime/components/device/camera/camera.props.js +0 -3
  129. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  130. app-rn-runtime/components/device/camera/camera.styles.js +4 -12
  131. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  132. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +0 -4
  133. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  134. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +0 -4
  135. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  136. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +1 -2
  137. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  138. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +0 -4
  139. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  140. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +0 -4
  141. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  142. app-rn-runtime/components/dialogs/dialog/dialog.component.js +3 -7
  143. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  144. app-rn-runtime/components/dialogs/dialog/dialog.props.js +0 -4
  145. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  146. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +2 -11
  147. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  148. app-rn-runtime/components/input/basedataset/basedataset.props.js +0 -4
  149. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  150. app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
  151. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  152. app-rn-runtime/components/input/baseinput/baseinput.props.js +0 -4
  153. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  154. app-rn-runtime/components/input/basenumber/basenumber.component.js +10 -16
  155. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  156. app-rn-runtime/components/input/basenumber/basenumber.props.js +0 -4
  157. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  158. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -12
  159. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  160. app-rn-runtime/components/input/checkbox/checkbox.styles.js +5 -35
  161. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  162. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -13
  163. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  164. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +10 -39
  165. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  166. app-rn-runtime/components/input/chips/chips.component.js +1 -5
  167. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  168. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  169. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  170. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  171. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  172. app-rn-runtime/components/input/currency/currency.component.js +2 -18
  173. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  174. app-rn-runtime/components/input/currency/currency.props.js +0 -1
  175. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  176. app-rn-runtime/components/input/currency/currency.styles.js +1 -19
  177. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  178. app-rn-runtime/components/input/epoch/base-datetime.component.js +10 -76
  179. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  180. app-rn-runtime/components/input/epoch/date/date.component.js +0 -8
  181. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  182. app-rn-runtime/components/input/epoch/date/date.styles.js +0 -16
  183. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  184. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +0 -8
  185. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +0 -5
  187. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +1 -49
  189. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  190. app-rn-runtime/components/input/epoch/time/time.component.js +0 -8
  191. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  192. app-rn-runtime/components/input/epoch/time/time.styles.js +0 -16
  193. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  194. app-rn-runtime/components/input/fileupload/fileupload.component.js +0 -2
  195. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  196. app-rn-runtime/components/input/fileupload/fileupload.props.js +0 -2
  197. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  198. app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
  199. app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
  200. app-rn-runtime/components/input/number/number.component.js +1 -13
  201. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  202. app-rn-runtime/components/input/number/number.props.js +0 -1
  203. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  204. app-rn-runtime/components/input/number/number.styles.js +0 -17
  205. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  206. app-rn-runtime/components/input/radioset/radioset.component.js +2 -7
  207. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  208. app-rn-runtime/components/input/select/select.component.js +3 -7
  209. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  210. app-rn-runtime/components/input/select/select.styles.js +1 -5
  211. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  212. app-rn-runtime/components/input/slider/slider.styles.js +3 -3
  213. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  214. app-rn-runtime/components/input/switch/switch.component.js +1 -8
  215. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  216. app-rn-runtime/components/input/switch/switch.styles.js +5 -10
  217. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  218. app-rn-runtime/components/input/text/text.component.js +1 -13
  219. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  220. app-rn-runtime/components/input/text/text.props.js +0 -1
  221. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  222. app-rn-runtime/components/input/text/text.styles.js +0 -17
  223. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  224. app-rn-runtime/components/input/textarea/textarea.component.js +1 -13
  225. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  226. app-rn-runtime/components/input/textarea/textarea.props.js +0 -1
  227. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  228. app-rn-runtime/components/input/textarea/textarea.styles.js +0 -17
  229. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  230. app-rn-runtime/components/input/toggle/toggle.component.js +5 -48
  231. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  232. app-rn-runtime/components/input/toggle/toggle.props.js +0 -4
  233. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  234. app-rn-runtime/components/input/toggle/toggle.styles.js +12 -5
  235. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  236. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -6
  237. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  238. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +0 -1
  239. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  240. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -9
  241. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  242. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -1
  243. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  244. app-rn-runtime/components/navigation/menu/menu.styles.js +5 -8
  245. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  246. app-rn-runtime/components/navigation/navitem/navitem.component.js +5 -8
  247. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  248. app-rn-runtime/components/navigation/navitem/navitem.props.js +0 -3
  249. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  250. app-rn-runtime/components/navigation/popover/popover.component.js +3 -10
  251. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  252. app-rn-runtime/components/navigation/popover/popover.props.js +0 -7
  253. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  254. app-rn-runtime/components/navigation/popover/popover.styles.js +2 -8
  255. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  256. app-rn-runtime/components/page/page-content/page-content.component.js +1 -3
  257. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  258. app-rn-runtime/components/page/tabbar/tabbar.component.js +8 -42
  259. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  260. app-rn-runtime/components/page/tabbar/tabbar.styles.js +16 -82
  261. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  262. app-rn-runtime/core/base.component.js +3 -16
  263. app-rn-runtime/core/base.component.js.map +1 -1
  264. app-rn-runtime/core/components/textinput.component.js +2 -25
  265. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  266. app-rn-runtime/core/tappable.component.js +10 -37
  267. app-rn-runtime/core/tappable.component.js.map +1 -1
  268. app-rn-runtime/core/utils.js +0 -11
  269. app-rn-runtime/core/utils.js.map +1 -1
  270. app-rn-runtime/gestures/swipe.animation.js +1 -34
  271. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  272. app-rn-runtime/package.json +3 -5
  273. app-rn-runtime/runtime/App.js +0 -4
  274. app-rn-runtime/runtime/App.js.map +1 -1
  275. app-rn-runtime/runtime/base-page.component.js +1 -1
  276. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  277. app-rn-runtime/runtime/services/app-security.service.js +1 -2
  278. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  279. app-rn-runtime/runtime/services/webprocess.service.js +1 -0
  280. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  281. app-rn-runtime/styles/theme.js +0 -36
  282. app-rn-runtime/styles/theme.js.map +1 -1
  283. app-rn-runtime/styles/theme.variables.js +3 -26
  284. app-rn-runtime/styles/theme.variables.js.map +1 -1
  285. app-rn-runtime/variables/model-variable.js +1 -2
  286. app-rn-runtime/variables/model-variable.js.map +1 -1
  287. app-rn-runtime/variables/service-variable.js +0 -1
  288. app-rn-runtime/variables/service-variable.js.map +1 -1
  289. app-rn-runtime/components/chart/staticdata.js +0 -215
  290. app-rn-runtime/components/chart/staticdata.js.map +0 -1
  291. app-rn-runtime/components/page/tabbar/curve.js +0 -84
  292. app-rn-runtime/components/page/tabbar/curve.js.map +0 -1
  293. app-rn-runtime/core/accessibility.js +0 -149
  294. app-rn-runtime/core/accessibility.js.map +0 -1
  295. app-rn-runtime/core/components/floatinglabel.component.js +0 -45
  296. app-rn-runtime/core/components/floatinglabel.component.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","Svg","AccessibilityWidgetType","getAccessibilityProps","VictoryLabel","VictoryPie","WmPieChartProps","DEFAULT_CLASS","formatCompactNumber","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","Legend","WmPieChartState","constructor","arguments","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","_e$nativeEvent3","_e$nativeEvent4","legendWidth","legendHeight","componentDidMount","getLabel","d","labeltype","Math","round","y","state","total","xaxisDatakeyArr","x","onSelect","event","data","value","slice","label","datum","selectedItem","dataset","index","selectedChartItem","color","style","fill","_dataObj","invokeEventCallback","proxy","renderWidget","length","pieData","showlegend","chartHeight","styles","root","radius","min","innerRadius","donutratio","styleProp","labelRadius","showlabels","labels","display","origin","orientation","legendData","map","name","colors","createElement","_extends","LINECHART","onLayout","onViewLayoutChange","onInfoViewLayoutChange","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","onLegendViewLayoutChange","testStyle","legendText","dotStyle","legenedDot","justifyContent","flex","standalone","colorScale","_ref","endAngle","theme","key","isRTL","toReversed","labelPlacement","labelplacement","events","target","eventHandlers","OS","onClick","bind","onPress","textAnchor","text","centerlabel","maxWidth"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport { VictoryLabel, VictoryLegend, VictoryPie } from 'victory-native';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport { formatCompactNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { Legend } from '../legend/legend.component';\n\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\n legendWidth = 0;\n legendHeight = 0;\n opacity = 0;\n}\n\nexport default class WmPieChart extends BaseChartComponent<WmPieChartProps, WmPieChartState, WmPieChartStyles> {\n\n constructor(props: WmPieChartProps) {\n super(props, DEFAULT_CLASS, props.type === 'Donut' ? new WmDonutChartProps() : new WmPieChartProps(), new WmPieChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth,\n totalHeight: e.nativeEvent?.layout.height\n } as WmPieChartState)\n }\n\n onInfoViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n infoHeight: e.nativeEvent?.layout.height,\n opacity: 1\n } as WmPieChartState);\n }\n\n onLegendViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n legendWidth: e.nativeEvent?.layout.width,\n legendHeight: e.nativeEvent?.layout.height\n } as WmPieChartState);\n }\n\n getLabel(d: {x: any, y: any}, props: WmPieChartProps): string {\n switch(props.labeltype) {\n case 'percent': {\n return Math.round(d.y * 100 /this.state.total) + '%';\n }\n case 'key': {\n return this.state.xaxisDatakeyArr[d.x];\n }\n case 'value': {\n return formatCompactNumber(d.y);\n }\n case 'key-value': {\n return this.state.xaxisDatakeyArr[d.x] + ' ' + d.y;\n }\n }\n }\n\n onSelect(event: any, data: any){\n let value = data.slice.value;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = data.slice;\n selectedChartItem[\"data\"] = {x: label, y: value, color: data.style.fill, _dataObj: selectedItem}\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmPieChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n } \n const pieData = this.state.data[0];\n const chartWidth = this.state.chartWidth \n - (props.showlegend === 'right' ? this.state.legendWidth : 0);\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth) \n - this.state.infoHeight \n - (props.showlegend === 'right' ? 0 : this.state.legendHeight);\n let radius = (Math.min(chartWidth, chartHeight) - 40)/ 2;\n let innerRadius = props.donutratio * radius;\n let styleProp = {};\n let labelRadius;\n if (props.showlabels === 'hide') {\n styleProp={labels: { display: \"none\" }};\n } else if (props.showlabels === 'inside') {\n labelRadius = radius/2;\n } else {\n labelRadius = radius + 8;\n }\n const origin = {x: (chartWidth/2), y: (chartHeight/2)};\n const orientation = props.showlegend === 'right' ? 'vertical' : 'horizontal';\n let legendData = pieData.map((d: {x: any, y: any}, index: number) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x],\n color: this.state.colors[index % (this.state.colors.length)]\n };\n });\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n onLayout={this.onViewLayoutChange}>\n <View onLayout={this.onInfoViewLayoutChange}>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {props.showlegend === 'top' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>\n <View style={{flex: 1}}>\n {chartWidth ? (\n <Svg\n width={chartWidth}\n height={chartHeight}\n >\n <VictoryPie\n style={styleProp}\n standalone={false}\n colorScale={this.state.colors}\n labels={({datum}) => this.getLabel(datum, props)}\n endAngle={this.state.endAngle || 0}\n radius={radius}\n innerRadius={innerRadius}\n theme={this.state.theme}\n key={props.name}\n name={props.name}\n data={this.isRTL?pieData.toReversed():pieData}\n origin={origin}\n labelPlacement={props.labelplacement}\n labelRadius={labelRadius}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n />\n <VictoryLabel\n textAnchor=\"middle\"\n style={this.styles.title as any}\n x={origin.x} y={origin.y}\n text={props.centerlabel}\n />\n </Svg>) : null}\n </View>\n {props.showlegend === 'right' ? \n (<View style={{maxWidth: '50%'}} onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}\n orientation='vertical'></Legend>\n </View>) : null }\n </View>\n {props.showlegend === 'bottom' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SAASC,YAAY,EAAiBC,UAAU,QAAQ,gBAAgB;AAExE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,SAASC,mBAAmB,QAAQ,sCAAsC;AAC1E,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,iBAAiB,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AAEsC,MAAM,CAACtC,CAAE;MACzBkF,IAAI,EAAE3G,KAAK,CAAC4G;IAAY,CACzB,CACE,CAAC,GAAI,IACN,CAAC,EACN5G,KAAK,CAACkD,UAAU,KAAK,OAAO,gBAC1BxE,KAAA,CAAA2F,aAAA,CAAC1F,IAAI;MAAC+D,KAAK,EAAE;QAACmE,QAAQ,EAAE;MAAK,CAAE;MAACrC,QAAQ,EAAE,IAAI,CAACU;IAAyB,gBACvExG,KAAA,CAAA2F,aAAA,CAAC3E,MAAM;MAACsC,IAAI,EAAEiC,UAAW;MACvBkB,SAAS,EAAE,IAAI,CAAC/B,MAAM,CAACgC,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAACjC,MAAM,CAACkC,UAAW;MACjCtB,WAAW,EAAC;IAAU,CAAS,CAC7B,CAAC,GAAI,IACT,CAAC,EACNhE,KAAK,CAACkD,UAAU,KAAK,QAAQ,gBAC3BxE,KAAA,CAAA2F,aAAA,CAAC1F,IAAI;MAAC6F,QAAQ,EAAE,IAAI,CAACU;IAAyB,gBAC7CxG,KAAA,CAAA2F,aAAA,CAAC3E,MAAM;MAACsC,IAAI,EAAEiC,UAAW;MACvBkB,SAAS,EAAE,IAAI,CAAC/B,MAAM,CAACgC,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAACjC,MAAM,CAACkC;IAAW,CAAS,CACxC,CAAC,GAAI,IACT,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","Text","Platform","Svg","VictoryLabel","VictoryPie","WmPieChartProps","DEFAULT_CLASS","formatCompactNumber","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","Legend","WmPieChartState","constructor","arguments","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","_e$nativeEvent3","_e$nativeEvent4","legendWidth","legendHeight","componentDidMount","getLabel","d","labeltype","Math","round","y","state","total","xaxisDatakeyArr","x","onSelect","event","data","value","slice","label","datum","selectedItem","dataset","index","selectedChartItem","color","style","fill","_dataObj","invokeEventCallback","proxy","renderWidget","length","pieData","showlegend","chartHeight","styles","root","radius","min","innerRadius","donutratio","styleProp","labelRadius","showlabels","labels","display","origin","orientation","legendData","map","name","colors","createElement","onLayout","onViewLayoutChange","onInfoViewLayoutChange","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","onLegendViewLayoutChange","testStyle","legendText","dotStyle","legenedDot","justifyContent","flex","standalone","colorScale","_ref","endAngle","theme","key","labelPlacement","labelplacement","events","target","eventHandlers","OS","onClick","bind","onPress","textAnchor","text","centerlabel","maxWidth"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\n\nimport { VictoryLabel, VictoryLegend, VictoryPie } from 'victory-native';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport { formatCompactNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { Legend } from '../legend/legend.component';\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\n legendWidth = 0;\n legendHeight = 0;\n opacity = 0;\n}\n\nexport default class WmPieChart extends BaseChartComponent<WmPieChartProps, WmPieChartState, WmPieChartStyles> {\n\n constructor(props: WmPieChartProps) {\n super(props, DEFAULT_CLASS, props.type === 'Donut' ? new WmDonutChartProps() : new WmPieChartProps(), new WmPieChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth,\n totalHeight: e.nativeEvent?.layout.height\n } as WmPieChartState)\n }\n\n onInfoViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n infoHeight: e.nativeEvent?.layout.height,\n opacity: 1\n } as WmPieChartState);\n }\n\n onLegendViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n legendWidth: e.nativeEvent?.layout.width,\n legendHeight: e.nativeEvent?.layout.height\n } as WmPieChartState);\n }\n\n getLabel(d: {x: any, y: any}, props: WmPieChartProps): string {\n switch(props.labeltype) {\n case 'percent': {\n return Math.round(d.y * 100 /this.state.total) + '%';\n }\n case 'key': {\n return this.state.xaxisDatakeyArr[d.x];\n }\n case 'value': {\n return formatCompactNumber(d.y);\n }\n case 'key-value': {\n return this.state.xaxisDatakeyArr[d.x] + ' ' + d.y;\n }\n }\n }\n\n onSelect(event: any, data: any){\n let value = data.slice.value;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = data.slice;\n selectedChartItem[\"data\"] = {x: label, y: value, color: data.style.fill, _dataObj: selectedItem}\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmPieChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n const pieData = this.state.data[0];\n const chartWidth = this.state.chartWidth \n - (props.showlegend === 'right' ? this.state.legendWidth : 0);\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth) \n - this.state.infoHeight \n - (props.showlegend === 'right' ? 0 : this.state.legendHeight);\n let radius = (Math.min(chartWidth, chartHeight) - 40)/ 2;\n let innerRadius = props.donutratio * radius;\n let styleProp = {};\n let labelRadius;\n if (props.showlabels === 'hide') {\n styleProp={labels: { display: \"none\" }};\n } else if (props.showlabels === 'inside') {\n labelRadius = radius/2;\n } else {\n labelRadius = radius + 8;\n }\n const origin = {x: (chartWidth/2), y: (chartHeight/2)};\n const orientation = props.showlegend === 'right' ? 'vertical' : 'horizontal';\n let legendData = pieData.map((d: {x: any, y: any}, index: number) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x],\n color: this.state.colors[index % (this.state.colors.length)]\n };\n });\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n onLayout={this.onViewLayoutChange}>\n <View onLayout={this.onInfoViewLayoutChange}>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {props.showlegend === 'top' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>\n <View style={{flex: 1}}>\n {chartWidth ? (\n <Svg\n width={chartWidth}\n height={chartHeight}\n >\n <VictoryPie\n style={styleProp}\n standalone={false}\n colorScale={this.state.colors}\n labels={({datum}) => this.getLabel(datum, props)}\n endAngle={this.state.endAngle || 0}\n radius={radius}\n innerRadius={innerRadius}\n theme={this.state.theme}\n key={props.name}\n name={props.name}\n data={pieData}\n origin={origin}\n labelPlacement={props.labelplacement}\n labelRadius={labelRadius}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n />\n <VictoryLabel\n textAnchor=\"middle\"\n style={this.styles.title as any}\n x={origin.x} y={origin.y}\n text={props.centerlabel}\n />\n </Svg>) : null}\n </View>\n {props.showlegend === 'right' ? \n (<View style={{maxWidth: '50%'}} onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}\n orientation='vertical'></Legend>\n </View>) : null }\n </View>\n {props.showlegend === 'bottom' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,SAASC,YAAY,EAAiBC,UAAU,QAAQ,gBAAgB;AAExE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,SAASC,mBAAmB,QAAQ,sCAAsC;AAC1E,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,iBAAiB,MAAM,0EAA0E;AACxG,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,OAAO,MAAMC,eAAe,SAASH,uBAAuB,CAAkB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBAC/D,CAAC;IAAAA,eAAA,sBACA,CAAC;IAAAA,eAAA,qBACF,EAAE;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,uBACA,CAAC;IAAAA,eAAA,kBACN,CAAC;EAAA;AACb;AAEA,eAAe,MAAMC,UAAU,SAASR,kBAAkB,CAAqD;EAE7GK,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEZ,aAAa,EAAEY,KAAK,CAACC,IAAI,KAAK,OAAO,GAAG,IAAIR,iBAAiB,CAAC,CAAC,GAAG,IAAIN,eAAe,CAAC,CAAC,EAAE,IAAIQ,eAAe,CAAC,CAAC,CAAC;IAACG,eAAA,6BAOzGI,CAAoB,IAAK;MAAA,IAAAC,cAAA;MAC7C,IAAIC,SA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,QAAQ,EAAE,IAAI,CAAC/B,MAAM,CAACgC;IAAW,CAAS,CACxC,CAAC,GAAI,IACT,CAAC;EAEX;AACF"}
@@ -1,4 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -7,8 +6,7 @@ import { View, Platform } from 'react-native';
7
6
  import { Svg } from 'react-native-svg';
8
7
  import { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';
9
8
  import { Axis, Scale } from 'victory-core';
10
- import { orderBy, cloneDeep, findIndex, isString } from 'lodash';
11
- import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
9
+ import { orderBy, cloneDeep } from 'lodash';
12
10
  import WmStackChartProps from './stack-chart.props';
13
11
  import { DEFAULT_CLASS } from './stack-chart.styles';
14
12
  import { BaseChartComponent, BaseChartComponentState } from '@wavemaker/app-rn-runtime/components/chart/basechart.component';
@@ -42,30 +40,10 @@ export default class WmStackChart extends BaseChartComponent {
42
40
  positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');
43
41
  return positiveValuesArray;
44
42
  }
45
- getData() {
46
- const negativeValues = cloneDeep(this.getNegativeValuesArray());
47
- return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));
48
- }
49
- updateColors() {
50
- if (this.state.colors.length === 1) {
51
- return this.state.colors[0];
52
- } else {
53
- let colorCodes = cloneDeep(this.state.colors);
54
- ;
55
- if (this.state.data.length > 0) {
56
- const orderedData = this.getData();
57
- this.state.data[0].map((d, i) => {
58
- let index = findIndex(orderedData, d);
59
- colorCodes[index] = this.state.colors[i];
60
- });
61
- return colorCodes;
62
- }
63
- }
64
- }
65
43
  getBarChart(props) {
66
44
  if (this.state.data.length > 0) {
67
45
  const negativeValues = cloneDeep(this.getNegativeValuesArray());
68
- const data = this.getData();
46
+ const data = negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));
69
47
  let currentValue = 0;
70
48
  return data.map((d, i) => {
71
49
  let d1 = [];
@@ -87,8 +65,8 @@ export default class WmStackChart extends BaseChartComponent {
87
65
  }
88
66
  }
89
67
  getColorCodes() {
90
- const colors = cloneDeep(this.updateColors());
91
- return isString(colors) ? [colors] : colors.reverse();
68
+ const colors = cloneDeep(this.state.colors);
69
+ return colors.reverse();
92
70
  }
93
71
  getArcChart(props) {
94
72
  if (this.state.data.length > 0) {
@@ -169,8 +147,6 @@ export default class WmStackChart extends BaseChartComponent {
169
147
  } else {
170
148
  ticks[0] = minValue;
171
149
  }
172
- } else {
173
- ticks[0] = this.state.props.minvalue;
174
150
  }
175
151
  }
176
152
  return ticks;
@@ -196,14 +172,15 @@ export default class WmStackChart extends BaseChartComponent {
196
172
  x: this.props.xdomain === 'Min' ? this.state.chartMinX : undefined,
197
173
  y: this.props.ydomain === 'Min' ? this.state.chartMinY : undefined
198
174
  };
199
- return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
175
+ const colorScale = this.state.colors.length === 1 ? this.state.colors[0] : this.state.colors;
176
+ return /*#__PURE__*/React.createElement(View, {
200
177
  style: this.styles.root,
201
178
  onLayout: this.onViewLayoutChange
202
- }), props.viewtype === 'Bar' ? /*#__PURE__*/React.createElement(VictoryChart, {
179
+ }, props.viewtype === 'Bar' ? /*#__PURE__*/React.createElement(VictoryChart, {
203
180
  theme: this.state.theme,
204
181
  minDomain: mindomain,
205
182
  height: this.styles.root.height,
206
- width: this.styles.root.width || this.state.chartWidth,
183
+ width: this.styles.root.width || this.screenWidth,
207
184
  padding: {
208
185
  top: props.offsettop,
209
186
  bottom: props.offsetbottom,
@@ -225,7 +202,7 @@ export default class WmStackChart extends BaseChartComponent {
225
202
  gutter: 20,
226
203
  data: [],
227
204
  theme: this.state.theme
228
- }), this.getLegendView(this.updateColors()), /*#__PURE__*/React.createElement(VictoryAxis, {
205
+ }), this.getLegendView(colorScale), /*#__PURE__*/React.createElement(VictoryAxis, {
229
206
  crossAxis: true,
230
207
  style: {
231
208
  tickLabels: {
@@ -245,7 +222,7 @@ export default class WmStackChart extends BaseChartComponent {
245
222
  tickFormat: t => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`,
246
223
  dependentAxis: true
247
224
  }), /*#__PURE__*/React.createElement(VictoryStack, {
248
- colorScale: this.updateColors(),
225
+ colorScale: colorScale,
249
226
  horizontal: true,
250
227
  style: {
251
228
  data: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","findIndex","isString","AccessibilityWidgetType","getAccessibilityProps","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","arguments","_defineProperty","WmStackChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","componentDidMount","setHeightWidthOnChart","getNegativeValuesArray","negativeValuesArray","state","data","filter","d","y","getPositiveValuesArray","positiveValuesArray","getData","negativeValues","concat","updateColors","colors","length","colorCodes","orderedData","map","i","index","getBarChart","currentValue","d1","x","push","createElement","key","name","cornerRadius","bottomLeft","bottomRight","topLeft","topRight","getColorCodes","reverse","getArcChart","colorScaleArray","maxValue","Math","max","o","radius","min","chartHeight","colorScale","startAngle","endAngle","standalone","origin","innerRadius","thickness","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","minValue","scale","getBaseScale","domain","getTicks","unshift","minvalue","onSelect","event","value","label","xaxisDatakeyArr","datum","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","_extends","LINECHART","styles","root","onLayout","onViewLayoutChange","viewtype","theme","minDomain","height","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal","strokeWidth","events","target","eventHandlers","OS","onClick","bind","onPress"],"sources":["stack-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';\nimport { Axis, Scale } from 'victory-core';\nimport { orderBy, cloneDeep, findIndex, isString} from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport WmStackChartProps from './stack-chart.props';\nimport { DEFAULT_CLASS, WmStackChartStyles } from './stack-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\n\nexport class WmStackChartState extends BaseChartComponentState<WmStackChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmStackChart extends BaseChartComponent<WmStackChartProps, WmStackChartState, WmStackChartStyles> {\n constructor(props: WmStackChartProps) {\n super(props, DEFAULT_CLASS, new WmStackChartProps(), new WmStackChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.setHeightWidthOnChart();\n }\n\n getNegativeValuesArray() {\n let negativeValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y < 0);\n negativeValuesArray = orderBy(negativeValuesArray, 'y', 'desc');\n return negativeValuesArray;\n }\n\n getPositiveValuesArray() {\n let positiveValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y > 0);\n positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');\n return positiveValuesArray;\n }\n\n getData() {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));\n }\n\n updateColors() {\n if (this.state.colors.length === 1 ) {\n return this.state.colors[0];\n } else {\n let colorCodes = cloneDeep(this.state.colors);;\n if ( this.state.data.length > 0 ) {\n const orderedData = this.getData();\n this.state.data[0].map((d: any, i: number) => {\n let index = findIndex(orderedData, d);\n colorCodes[index] = this.state.colors[i];\n })\n return colorCodes;\n }\n }\n }\n\n getBarChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n const data = this.getData();\n let currentValue = 0;\n\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d.x = 0;\n d.y = d.y - currentValue;\n d1.push(d);\n currentValue = d.y < 0 && i === negativeValues.length -1 ? 0 : d.y + currentValue;\n return <VictoryBar key={props.name + '_' + i}\n cornerRadius={{bottomLeft:(1), bottomRight:(1), topLeft:(1), topRight:(1)}}\n data={d1}/>\n });\n }\n }\n\n private getColorCodes() {\n const colors = cloneDeep(this.updateColors());\n return isString(colors) ? [colors] : colors.reverse();\n }\n\n getArcChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n let data = cloneDeep(this.state.data[0]);\n const colorScaleArray = this.getColorCodes();\n const maxValue = Math.max(...data.map((o: any) => o.y));\n data = orderBy(data, 'y', 'desc');\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight - 50);\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d1.push(d);\n d1.push({x: d.x, y: maxValue - d.y})\n return <VictoryPie key={props.name + '_' + i}\n radius={radius}\n colorScale={[colorScaleArray[i], '#fff0']}\n startAngle={-80}\n endAngle={80}\n cornerRadius={100}\n standalone={false}\n origin={{x: (this.state.chartWidth/2), y: (this.state.chartHeight - 50)}}\n innerRadius={radius - this.state.props.thickness}\n labels={[]}\n data={d1}/>\n });\n }\n }\n\n getArcAxis() {\n const ticks = this.getTickValues();\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight-50);\n const axisData: any = [];\n ticks.forEach((d: any, i: any) => {\n axisData.push({x: `${this.state.props.yunits}${d}`, y: 1})\n });\n return <VictoryPie\n style={{\n labels: {\n fontSize: 12, paddingLeft: 50, paddingRight: 80\n }}\n }\n startAngle={-90}\n endAngle={90}\n standalone={false}\n colorScale={['#fff0']}\n origin={{x: (this.state.chartWidth/2 - 5), y: (this.state.chartHeight - 50)}}\n labelRadius={radius - this.state.props.thickness - 20}\n data={axisData}\n />\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmStackChartState);\n }\n\n getTickValues() {\n let ticks: any = [];\n if (this.state.data[0].length) {\n let data = cloneDeep(this.state.data[0]);\n const maxValue = Math.max(...data.map((o: any) => o.y));\n const minValue = Math.min(...data.map((o: any) => o.y));\n const scale = Scale.getBaseScale({}, 'x');\n scale.domain([minValue > 0 ? 0 : minValue, maxValue]);\n ticks = Axis.getTicks({}, scale);\n ticks[ticks.length -1] = maxValue;\n if ( minValue < 0 ) {\n if (ticks[0] === 0) {\n ticks.unshift(minValue);\n } else {\n ticks[0] = minValue;\n }\n } else {\n ticks[0] = this.state.props.minvalue;\n }\n }\n return ticks;\n }\n\n onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmStackChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root} onLayout={this.onViewLayoutChange}\n >{\n props.viewtype === 'Bar' ?\n <VictoryChart\n theme={this.state.theme}\n minDomain={mindomain}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.state.chartWidth}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n containerComponent={\n this.getTooltip(props)\n }\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n style={{title: {\n fontFamily: \"'Helvetica Neue', 'Helvetica', sans-serif\",\n fontSize: 18\n }\n }}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView(this.updateColors())}\n <VictoryAxis crossAxis\n style={{\n tickLabels: { fill: this.state.props.showyaxis === false ? 'transparent' : '#000000', fontSize: 12, padding: this.state.props.thickness/2 + 5},\n axisLabel: { padding: (15 + this.state.props.thickness/2) },\n grid: {stroke: 'none'}\n }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t) => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`} dependentAxis />\n <VictoryStack\n colorScale={this.updateColors()}\n horizontal={true}\n style={{\n data: { strokeWidth: this.state.props.thickness }\n }}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n >\n {\n this.getBarChart(props)\n }\n </VictoryStack>\n </VictoryChart> :\n <Svg width={this.state.chartWidth} height={this.state.chartHeight}>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getArcChart(props)}\n {this.getArcAxis()}\n </Svg>\n }\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,YAAY,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,aAAa,EAAEC,WAAW,QAAQ,gBAAgB;AAC/G,SAASC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAC1C,SAASC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AACxE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AAEvE,OAAO,MAAMC,iBAAiB,SAASD,uBAAuB,CAAoB;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBACnE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,YAAY,SAASN,kBAAkB,CAA2D;EACrHG,WAAWA,CAACI,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,EAAE,IAAII,iBAAiB,CAAC,CAAC,CAAC;IAACG,eAAA,6BAkH1DG,CAAoB,IAAK;MAC7C,IAAIC,SAAS,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACC,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UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACXhH,IAAI,EAAE,EAAG;MACT8F,KAAK,EAAE,IAAI,CAAC/F,KAAK,CAAC+F;IAAM,CACzB,CAAC,EACD,IAAI,CAAC9D,WAAW,CAAC7C,KAAK,CAAC,EACvB,IAAI,CAAC8D,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","arguments","_defineProperty","WmStackChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","componentDidMount","setHeightWidthOnChart","getNegativeValuesArray","negativeValuesArray","state","data","filter","d","y","getPositiveValuesArray","positiveValuesArray","getBarChart","length","negativeValues","concat","currentValue","map","i","d1","x","push","createElement","key","name","cornerRadius","bottomLeft","bottomRight","topLeft","topRight","getColorCodes","colors","reverse","getArcChart","colorScaleArray","maxValue","Math","max","o","radius","min","chartHeight","colorScale","startAngle","endAngle","standalone","origin","innerRadius","thickness","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","minValue","scale","getBaseScale","domain","getTicks","unshift","onSelect","event","value","index","label","xaxisDatakeyArr","datum","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","styles","root","onLayout","onViewLayoutChange","viewtype","theme","minDomain","height","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal","strokeWidth","events","target","eventHandlers","OS","onClick","bind","onPress"],"sources":["stack-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';\nimport { Axis, Scale } from 'victory-core';\nimport { orderBy, cloneDeep } from 'lodash';\n\nimport WmStackChartProps from './stack-chart.props';\nimport { DEFAULT_CLASS, WmStackChartStyles } from './stack-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\n\nexport class WmStackChartState extends BaseChartComponentState<WmStackChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmStackChart extends BaseChartComponent<WmStackChartProps, WmStackChartState, WmStackChartStyles> {\n constructor(props: WmStackChartProps) {\n super(props, DEFAULT_CLASS, new WmStackChartProps(), new WmStackChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.setHeightWidthOnChart();\n }\n\n getNegativeValuesArray() {\n let negativeValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y < 0);\n negativeValuesArray = orderBy(negativeValuesArray, 'y', 'desc');\n return negativeValuesArray;\n }\n\n getPositiveValuesArray() {\n let positiveValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y > 0);\n positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');\n return positiveValuesArray;\n }\n\n getBarChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n const data = negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));\n let currentValue = 0;\n\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d.x = 0;\n d.y = d.y - currentValue;\n d1.push(d);\n currentValue = d.y < 0 && i === negativeValues.length -1 ? 0 : d.y + currentValue;\n return <VictoryBar key={props.name + '_' + i}\n cornerRadius={{bottomLeft:(1), bottomRight:(1), topLeft:(1), topRight:(1)}}\n data={d1}/>\n });\n }\n }\n\n private getColorCodes() {\n const colors = cloneDeep(this.state.colors);\n return colors.reverse();\n }\n\n getArcChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n let data = cloneDeep(this.state.data[0]);\n const colorScaleArray = this.getColorCodes();\n const maxValue = Math.max(...data.map((o: any) => o.y));\n data = orderBy(data, 'y', 'desc');\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight - 50);\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d1.push(d);\n d1.push({x: d.x, y: maxValue - d.y})\n return <VictoryPie key={props.name + '_' + i}\n radius={radius}\n colorScale={[colorScaleArray[i], '#fff0']}\n startAngle={-80}\n endAngle={80}\n cornerRadius={100}\n standalone={false}\n origin={{x: (this.state.chartWidth/2), y: (this.state.chartHeight - 50)}}\n innerRadius={radius - this.state.props.thickness}\n labels={[]}\n data={d1}/>\n });\n }\n }\n\n getArcAxis() {\n const ticks = this.getTickValues();\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight-50);\n const axisData: any = [];\n ticks.forEach((d: any, i: any) => {\n axisData.push({x: `${this.state.props.yunits}${d}`, y: 1})\n });\n return <VictoryPie\n style={{\n labels: {\n fontSize: 12, paddingLeft: 50, paddingRight: 80\n }}\n }\n startAngle={-90}\n endAngle={90}\n standalone={false}\n colorScale={['#fff0']}\n origin={{x: (this.state.chartWidth/2 - 5), y: (this.state.chartHeight - 50)}}\n labelRadius={radius - this.state.props.thickness - 20}\n data={axisData}\n />\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmStackChartState);\n }\n\n getTickValues() {\n let ticks: any = [];\n if (this.state.data[0].length) {\n let data = cloneDeep(this.state.data[0]);\n const maxValue = Math.max(...data.map((o: any) => o.y));\n const minValue = Math.min(...data.map((o: any) => o.y));\n const scale = Scale.getBaseScale({}, 'x');\n scale.domain([minValue > 0 ? 0 : minValue, maxValue]);\n ticks = Axis.getTicks({}, scale);\n ticks[ticks.length -1] = maxValue;\n if ( minValue < 0 ) {\n if (ticks[0] === 0) {\n ticks.unshift(minValue);\n } else {\n ticks[0] = minValue;\n }\n }\n }\n return ticks;\n }\n\n onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmStackChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n const colorScale = this.state.colors.length === 1 ? this.state.colors[0] : this.state.colors;\n return (\n <View\n style={this.styles.root} onLayout={this.onViewLayoutChange}\n >{\n props.viewtype === 'Bar' ?\n <VictoryChart\n theme={this.state.theme}\n minDomain={mindomain}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n containerComponent={\n this.getTooltip(props)\n }\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n style={{title: {\n fontFamily: \"'Helvetica Neue', 'Helvetica', sans-serif\",\n fontSize: 18\n }\n }}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView(colorScale)}\n <VictoryAxis crossAxis\n style={{\n tickLabels: { fill: this.state.props.showyaxis === false ? 'transparent' : '#000000', fontSize: 12, padding: this.state.props.thickness/2 + 5},\n axisLabel: { padding: (15 + this.state.props.thickness/2) },\n grid: {stroke: 'none'}\n }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t) => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`} dependentAxis />\n <VictoryStack\n colorScale={colorScale}\n horizontal={true}\n style={{\n data: { strokeWidth: this.state.props.thickness }\n }}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n >\n {\n this.getBarChart(props)\n }\n </VictoryStack>\n </VictoryChart> :\n <Svg width={this.state.chartWidth} height={this.state.chartHeight}>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getArcChart(props)}\n {this.getArcAxis()}\n </Svg>\n }\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,YAAY,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,aAAa,EAAEC,WAAW,QAAQ,gBAAgB;AAC/G,SAASC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAC1C,SAASC,OAAO,EAAEC,SAAS,QAAQ,QAAQ;AAE3C,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AACxE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AAEvE,OAAO,MAAMC,iBAAiB,SAASD,uBAAuB,CAAoB;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBACnE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,YAAY,SAASN,kBAAkB,CAA2D;EACrHG,WAAWA,CAACI,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAA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IAAE,GAGD,IAAI,CAACzH,WAAW,CAACnB,KAAK,CAEZ,CACF,CAAC,gBACfvB,KAAA,CAAAoD,aAAA,CAACjD,GAAG;MAACyB,KAAK,EAAE,IAAI,CAACO,KAAK,CAACL,UAAW;MAAC+F,MAAM,EAAE,IAAI,CAAC1F,KAAK,CAACoC;IAAY,gBAChEvE,KAAA,CAAAoD,aAAA,CAAC5C,aAAa;MACZ8C,IAAI,EAAE,QAAS;MACfkF,kBAAkB,eAAExI,KAAA,CAAAoD,aAAA,CAACjD,GAAG,MAAE,CAAE;MAC5BuI,KAAK,EAAE,CAACnH,KAAK,CAACmH,KAAK,EAAEnH,KAAK,CAACqH,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACX1G,IAAI,EAAE,EAAG;MACTuF,KAAK,EAAE,IAAI,CAACxF,KAAK,CAACwF;IAAM,CACzB,CAAC,EACD,IAAI,CAAC5D,WAAW,CAACxC,KAAK,CAAC,EACvB,IAAI,CAACyD,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF"}
@@ -11,7 +11,6 @@ export default class WmStackChartProps extends BaseChartComponentProps {
11
11
  _defineProperty(this, "offsetleft", 25);
12
12
  _defineProperty(this, "offsetright", 35);
13
13
  _defineProperty(this, "onSelect", void 0);
14
- _defineProperty(this, "minvalue", 0);
15
14
  }
16
15
  }
17
16
  //# sourceMappingURL=stack-chart.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseChartComponentProps","WmStackChartProps","constructor","arguments","_defineProperty"],"sources":["stack-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmStackChartProps extends BaseChartComponentProps {\n viewtype: string = 'Bar';\n showlegend: string = 'left';\n thickness: number = 20;\n offsetleft: number = 25;\n offsetright: number = 35;\n onSelect?: any;\n minvalue: number = 0;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,iBAAiB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBAClD,KAAK;IAAAA,eAAA,qBACH,MAAM;IAAAA,eAAA,oBACP,EAAE;IAAAA,eAAA,qBACD,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA;IAAAA,eAAA,mBAEL,CAAC;EAAA;AACtB"}
1
+ {"version":3,"names":["BaseChartComponentProps","WmStackChartProps","constructor","arguments","_defineProperty"],"sources":["stack-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmStackChartProps extends BaseChartComponentProps {\n viewtype: string = 'Bar';\n showlegend: string = 'left';\n thickness: number = 20;\n offsetleft: number = 25;\n offsetright: number = 35;\n onSelect?: any;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,iBAAiB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBAClD,KAAK;IAAAA,eAAA,qBACH,MAAM;IAAAA,eAAA,oBACP,EAAE;IAAAA,eAAA,qBACD,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA;EAAA;AAE1B"}
@@ -13,27 +13,18 @@ export class WmContainerState extends PartialHostState {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  _defineProperty(this, "isPartialLoaded", false);
16
- _defineProperty(this, "showContent", false);
17
16
  }
18
17
  }
19
18
  export default class WmContainer extends PartialHost {
20
19
  constructor(props) {
21
- super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());
22
- this.updateState({
23
- showContent: !this.state.props.deferload
24
- });
20
+ super(props, DEFAULT_CLASS, new WmContainerProps());
25
21
  }
26
22
  renderWidget(props) {
27
- if (!this.state.showContent && this.isVisible()) {
28
- this.updateState({
29
- showContent: true
30
- });
31
- }
32
23
  const dimensions = {
33
24
  width: this.styles.root.width ? '100%' : undefined,
34
25
  height: this.styles.root.height ? '100%' : undefined
35
26
  };
36
- return this.state.showContent && /*#__PURE__*/React.createElement(Animatedview, {
27
+ return /*#__PURE__*/React.createElement(Animatedview, {
37
28
  entryanimation: props.animation,
38
29
  style: this.styles.root
39
30
  }, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","WmContainerState","constructor","arguments","_defineProperty","WmContainer","props","updateState","showContent","state","deferload","renderWidget","isVisible","dimensions","width","styles","root","undefined","height","createElement","entryanimation","animation","style","_background","_extends","getTestPropsForAction","target","content","renderContent"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n showContent: boolean = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n this.updateState({showContent: !this.state.props.deferload} as WmContainerState);\n }\n\n renderWidget(props: WmContainerProps) {\n if(!this.state.showContent && this.isVisible()){\n this.updateState({showContent: true} as WmContainerState);\n }\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n return this.state.showContent && (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle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Bf,KAAA,CAAA0B,aAAA,CAACrB,YAAY;MAACsB,cAAc,EAAEd,KAAK,CAACe,SAAU;MAACC,KAAK,EAAE,IAAI,CAACP,MAAM,CAACC;IAAK,GACpE,IAAI,CAACO,WAAW,eACjB9B,KAAA,CAAA0B,aAAA,CAACtB,QAAQ,EAAA2B,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE,IAAK;MAACX,MAAM,EAAEF;IAAW,iBACzEpB,KAAA,CAAA0B,aAAA,CAACzB,IAAI;MAAC4B,KAAK,EAAE,CAACT,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACY,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACtB,KAAK,CAAQ,CACzF,CACE,CACf;EACH;AACF"}
1
+ {"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","WmContainerState","constructor","arguments","_defineProperty","WmContainer","props","renderWidget","dimensions","width","styles","root","undefined","height","createElement","entryanimation","animation","style","_background","_extends","getTestPropsForAction","target","content","renderContent"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps());\n }\n\n renderWidget(props: WmContainerProps) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n return (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAE9C,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AAExE,OAAO,MAAMC,gBAAgB,SAASD,gBAAgB,CAAmB;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACrD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAASN,WAAW,CAAwD;EAC1GG,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,CAAC;EACrD;EAEAY,YAAYA,CAACD,KAAuB,EAAE;IACpC,MAAME,UAAU,GAAG;MACjBC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,KAAK,GAAG,MAAM,GAAGG,SAAS;MAClDC,MAAM,EAAE,IAAI,CAACH,MAAM,CAACC,IAAI,CAACE,MAAM,GAAG,MAAM,GAAGD;IAC7C,CAAC;IACD,oBACEnB,KAAA,CAAAqB,aAAA,CAAChB,YAAY;MAACiB,cAAc,EAAET,KAAK,CAACU,SAAU;MAACC,KAAK,EAAE,IAAI,CAACP,MAAM,CAACC;IAAK,GACpE,IAAI,CAACO,WAAW,eACjBzB,KAAA,CAAAqB,aAAA,CAACjB,QAAQ,EAAAsB,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE,IAAK;MAACX,MAAM,EAAEF;IAAW,iBACzEf,KAAA,CAAAqB,aAAA,CAACpB,IAAI;MAACuB,KAAK,EAAE,CAACT,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACY,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACjB,KAAK,CAAQ,CACzF,CACE,CAAC;EAEnB;AACF"}
@@ -7,7 +7,6 @@ export default class WmContainerProps extends PartialHostProps {
7
7
  super(...arguments);
8
8
  _defineProperty(this, "animation", null);
9
9
  _defineProperty(this, "onLoad", void 0);
10
- _defineProperty(this, "deferload", false);
11
10
  }
12
11
  }
13
12
  //# sourceMappingURL=container.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PartialHostProps","WmContainerProps","constructor","arguments","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n onLoad?: Function;\n deferload?: boolean = false;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEH,KAAK;EAAA;AAC7B"}
1
+ {"version":3,"names":["PartialHostProps","WmContainerProps","constructor","arguments","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n onLoad?: Function;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA;EAAA;AAE3B"}
@@ -73,14 +73,10 @@ export default class WmPanel extends BaseComponent {
73
73
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction(`header`), {
74
74
  style: [this.styles.header],
75
75
  onPress: this.onPanelPress.bind(this)
76
- }), props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
76
+ }), props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
77
77
  styles: this.styles.icon,
78
78
  name: props.name + '_icon',
79
- iconclass: props.iconclass,
80
- iconheight: props.iconheight,
81
- iconwidth: props.iconwidth,
82
- iconmargin: props.iconmargin,
83
- iconurl: props.iconurl
79
+ iconclass: props.iconclass
84
80
  }) : null, /*#__PURE__*/React.createElement(View, {
85
81
  style: {
86
82
  flexDirection: 'column',
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","arguments","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","alignItems","renderHeader","_extends","getTestPropsForAction","header","onPress","iconurl","icon","iconheight","iconwidth","iconmargin","flex","justifyContent","text","heading","title","subheading","renderPane","content","maxHeight","overflow","close","renderWidget","root","_background","Fragment","children"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}>\n {props.iconclass || props.iconurl ? \n <WmIcon styles={this.styles.icon} \n name={props.name + '_icon'}\n iconclass={props.iconclass}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n /> : null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text>\n {props.subheading ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>{props.subheading}</Text>) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,OAAO,MAAMC,YAAY,SAASN,kBAAkB,CAAe;EAAAO,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BAC/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,OAAO,SAASX,aAAa,CAA4C;EAC5FQ,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEAU,aAAaA,CAAA,E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AK,EAAE,IAAI,CAACC,MAAM,CAAC6B;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACvB,YAAY,CAAC,CAAC,EACnB,IAAI,CAACgB,UAAU,eACdhE,KAAA,CAAAuC,aAAA,CAAAvC,KAAA,CAAAwE,QAAA,QACC,IAAI,CAACnD,aAAa,CAACH,KAAK,CAAC,eAC1BlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI,QAAEgB,KAAK,CAACuD,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","arguments","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","alignItems","renderHeader","_extends","getTestPropsForAction","header","onPress","icon","flex","justifyContent","text","heading","title","subheading","renderPane","content","maxHeight","overflow","close","renderWidget","root","_background","Fragment","children"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}>\n {props.iconclass ? <WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text>\n {props.subheading ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>{props.subheading}</Text>) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,OAAO,MAAMC,YAAY,SAASN,kBAAkB,CAAe;EAAAO,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BAC/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,OAAO,SAASX,aAAa,CAA4C;EAC5FQ,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEAU,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC5C;EAEAC,aAAaA,CAACH,KAAmB,EAAE;IACjC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAA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Props {
15
15
  _defineProperty(this, "badgevalue", null);
16
16
  _defineProperty(this, "badgetype", 'default');
17
17
  _defineProperty(this, "expanded", true);
18
- _defineProperty(this, "iconurl", null);
19
- _defineProperty(this, "iconheight", null);
20
- _defineProperty(this, "iconwidth", null);
21
- _defineProperty(this, "iconmargin", null);
22
18
  }
23
19
  }
24
20
  //# sourceMappingURL=panel.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmPanelProps","constructor","arguments","_defineProperty"],"sources":["panel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPanelProps extends BaseProps {\n animation: string = null as any;\n children: any;\n collapsible: boolean = null as any;\n iconclass: string = null as any;\n title: string = 'Title';\n renderPartial?: Function;\n subheading: string = null as any;\n badgevalue: string = null as any;\n badgetype: string = 'default';\n expanded: boolean = true;\n iconurl?: string = null as any;\n iconheight?: number = null as any;\n iconwidth?: number = null as any;\n iconmargin?: number = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC9B,IAAI;IAAAA,eAAA;IAAAA,eAAA,sBAED,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,gBACR,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEF,IAAI;IAAAA,eAAA,qBACJ,IAAI;IAAAA,eAAA,oBACL,SAAS;IAAAA,eAAA,mBACT,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,qBACH,IAAI;EAAA;AAC5B"}
1
+ {"version":3,"names":["BaseProps","WmPanelProps","constructor","arguments","_defineProperty"],"sources":["panel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPanelProps extends BaseProps {\n animation: string = null as any;\n children: any;\n collapsible: boolean = null as any;\n iconclass: string = null as any;\n title: string = 'Title';\n renderPartial?: Function;\n subheading: string = null as any;\n badgevalue: string = null as any;\n badgetype: string = 'default';\n expanded: boolean = true;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC9B,IAAI;IAAAA,eAAA;IAAAA,eAAA,sBAED,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,gBACR,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEF,IAAI;IAAAA,eAAA,qBACJ,IAAI;IAAAA,eAAA,oBACL,SAAS;IAAAA,eAAA,mBACT,IAAI;EAAA;AAC1B"}
@@ -42,7 +42,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
42
42
  backgroundColor: themeVariables.tabActiveIndicatorBgColor,
43
43
  width: 100,
44
44
  height: 2,
45
- marginTop: -2
45
+ marginTop: -4
46
46
  },
47
47
  activeHeaderIcon: {
48
48
  text: {
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingTop","paddingBottom","paddingVertical","minHeight","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","icon","fontSize","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","arrowIndicator","display","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","arrowIndicatorDot","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\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 WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n arrowIndicator: ViewStyle,\n arrowIndicatorDot: ViewStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingTop: 16,\n paddingBottom: 16,\n paddingVertical: 12,\n minWidth: 80,\n minHeight:48,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n },\n icon: {\n fontSize : 24\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n fontSize: 14,\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 2,\n marginTop: -2\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n arrowIndicator: {\n display: 'none',\n backgroundImage: '',\n backgroundSize: '100% 100%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat'\n },\n arrowIndicatorDot: {\n display: 'none'\n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAmB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAG;IAClBC,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,SAAS;MACnBC,eAAe,EAAEP,cAAc,CAACQ;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJH,eAAe,EAAEP,cAAc,CAACQ,gBAAgB;MAChDG,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,EAAE;MACjBC,eAAe,EAAE,EAAE;MACnBR,QAAQ,EAAE,EAAE;MACZS,SAAS,EAAC,EAAE;MACZV,aAAa,EAAE,KAAK;MACpBW,cAAc,EAAE,QAAQ;MACxBC,QAAQ,EAAE;IACd,CAAC;IACDC,UAAU,EAAE;MACRR,IAAI,EAAE;QACFS,KAAK,EAAElB,cAAc,CAACmB;MAC1B,CAAC;MACDC,IAAI,EAAE;QACFC,QAAQ,EAAG;MACd;IACL,CAAiB;IACjBC,UAAU,EAAE;MACRJ,KAAK,EAAElB,cAAc,CAACuB,kBAAkB;MACxCjB,QAAQ,EAAE,SAAS;MACnBkB,UAAU,EAAExB,cAAc,CAACyB,QAAQ;MACnCC,UAAU,EAAE,KAAK;MACjBL,QAAQ,EAAE;IACd,CAAC;IACDM,YAAY,EAAE;MACVpB,eAAe,EAAEP,cAAc,CAAC4B;IACpC,CAAC;IACDC,eAAe,EAAE;MACbtB,eAAe,EAAEP,cAAc,CAAC8B,yBAAyB;MACzDC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,CAAC;MACTC,SAAS,EAAE,CAAC;IAChB,CAAC;IACDC,gBAAgB,EAAE;MACdzB,IAAI,EAAE;QACFS,KAAK,EAAElB,cAAc,CAACmC;MAC1B;IACJ,CAAiB;IACjBC,gBAAgB,EAAE;MACdlB,KAAK,EAAElB,cAAc,CAACqC;IAC1B,CAAC;IACDC,cAAc,EAAE;MACZC,OAAO,EAAE,MAAM;MACfC,eAAe,EAAE,EAAE;MACnBC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE,QAAQ;MAC5BC,gBAAgB,EAAE;IACtB,CAAC;IACDC,iBAAiB,EAAE;MACfL,OAAO,EAAE;IACb,CAAC;IACDM,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtB5C,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingTop","paddingBottom","paddingVertical","minHeight","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","icon","fontSize","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","arrowIndicator","display","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","arrowIndicatorDot","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\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 WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n arrowIndicator: ViewStyle,\n arrowIndicatorDot: ViewStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingTop: 16,\n paddingBottom: 16,\n paddingVertical: 12,\n minWidth: 80,\n minHeight:48,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n },\n icon: {\n fontSize : 24\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n fontSize: 14,\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 2,\n marginTop: -4\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n arrowIndicator: {\n display: 'none',\n backgroundImage: '',\n backgroundSize: '100% 100%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat'\n },\n arrowIndicatorDot: {\n display: 'none'\n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAmB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,C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,OAAO,EAAE,MAAM;MACfC,eAAe,EAAE,EAAE;MACnBC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE,QAAQ;MAC5BC,gBAAgB,EAAE;IACtB,CAAC;IACDC,iBAAiB,EAAE;MACfL,OAAO,EAAE;IACb,CAAC;IACDM,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtB5C,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -164,7 +164,7 @@ export default class WmWizard extends BaseComponent {
164
164
  const isFirstStep = index === 0;
165
165
  const isActiveStep = index === this.state.currentStep;
166
166
  const isNumberTextLayout = this.state.props.classname === 'number-text-inline';
167
- return item.state.props.show != false ? /*#__PURE__*/React.createElement(View, {
167
+ return item.props.show != false ? /*#__PURE__*/React.createElement(View, {
168
168
  style: [this.styles.headerWrapper, isNumberTextLayout ? {
169
169
  paddingRight: isActiveStep ? 0 : 5,
170
170
  paddingLeft: index === this.state.currentStep + 1 ? 0 : 5
@@ -184,10 +184,10 @@ export default class WmWizard extends BaseComponent {
184
184
  color: this.styles.activeStep.color
185
185
  }
186
186
  }),
187
- iconclass: item.state.props.iconclass || 'wm-sl-l sl-check'
187
+ iconclass: item.props.iconclass || 'wm-sl-l sl-check'
188
188
  })), (isNumberTextLayout && isActiveStep || !isNumberTextLayout) && /*#__PURE__*/React.createElement(Text, {
189
189
  style: this.styles.stepTitle
190
- }, item.state.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
190
+ }, item.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
191
191
  style: [this.styles.numberTextStepConnector, {
192
192
  width: isLastStep ? 0 : 50
193
193
  }]
@@ -204,9 +204,7 @@ export default class WmWizard extends BaseComponent {
204
204
  return;
205
205
  }
206
206
  const currentStep = this.steps[index];
207
- if (currentStep.invokePrevCB(index) == false) {
208
- return;
209
- }
207
+ currentStep.invokePrevCB(index);
210
208
  this.updateCurrentStep(index - 1);
211
209
  }
212
210
  next(eventName) {
@@ -235,13 +233,15 @@ export default class WmWizard extends BaseComponent {
235
233
  this.invokeEventCallback('onCancel', [null, this.proxy]);
236
234
  }
237
235
  skip() {
238
- this.next('skip');
236
+ if (this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip) {
237
+ this.next('skip');
238
+ }
239
239
  }
240
240
  renderWidget(props) {
241
241
  var _this$state$props$cla;
242
242
  this.numberOfSteps = this.steps.length;
243
243
  const activeStep = this.steps[this.state.currentStep];
244
- const isSkippable = activeStep && activeStep.state.props.enableskip;
244
+ const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;
245
245
  const isProgressCircleHeader = (_this$state$props$cla = this.state.props.classname) === null || _this$state$props$cla === void 0 ? void 0 : _this$state$props$cla.includes('progress-circle-header');
246
246
  return /*#__PURE__*/React.createElement(View, {
247
247
  style: this.styles.root
@@ -253,28 +253,25 @@ export default class WmWizard extends BaseComponent {
253
253
  style: [this.styles.wizardFooter, {
254
254
  flexDirection: props.actionsalignment === 'right' ? 'row-reverse' : 'row'
255
255
  }]
256
- }, this.state.currentStep + 1 === this.numberOfSteps && activeStep.state.props.showdone && /*#__PURE__*/React.createElement(WmButton, {
256
+ }, this.state.currentStep + 1 === this.numberOfSteps && /*#__PURE__*/React.createElement(WmButton, {
257
257
  iconclass: 'wm-sl-l sl-check',
258
258
  styles: merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.doneButton),
259
259
  id: this.getTestId('donebtn'),
260
260
  caption: props.donebtnlabel,
261
- onTap: this.done.bind(this),
262
- disabled: activeStep.state.props.disabledone
263
- }), this.state.currentStep + 1 < this.numberOfSteps && activeStep.state.props.shownext && /*#__PURE__*/React.createElement(WmButton, {
261
+ onTap: this.done.bind(this)
262
+ }), this.state.currentStep + 1 < this.numberOfSteps && /*#__PURE__*/React.createElement(WmButton, {
264
263
  iconclass: 'wi wi-chevron-right',
265
264
  styles: merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton),
266
265
  id: this.getTestId('nextbtn'),
267
266
  iconposition: 'right',
268
267
  caption: props.nextbtnlabel,
269
- onTap: this.next.bind(this),
270
- disabled: activeStep.state.props.disablenext
271
- }), this.state.currentStep > 0 && activeStep.state.props.showprev && /*#__PURE__*/React.createElement(WmButton, {
268
+ onTap: this.next.bind(this)
269
+ }), this.state.currentStep > 0 && /*#__PURE__*/React.createElement(WmButton, {
272
270
  iconclass: 'wi wi-chevron-left',
273
271
  styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton),
274
272
  caption: props.previousbtnlabel,
275
273
  id: this.getTestId('prevbtn'),
276
- onTap: this.prev.bind(this),
277
- disabled: activeStep.state.props.disableprev
274
+ onTap: this.prev.bind(this)
278
275
  }), props.cancelable ? /*#__PURE__*/React.createElement(WmButton, {
279
276
  id: this.getTestId('cancelbtn'),
280
277
  caption: props.cancelbtnlabel,