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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/actions/notification-action.js.map +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel.component.js +123 -32
  7. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel.styles.js +7 -3
  10. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  11. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  12. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  13. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  14. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  15. app-rn-runtime/components/advanced/webview/webview.component.js +28 -11
  16. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
  18. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  19. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  20. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  21. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  22. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  23. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  24. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  25. app-rn-runtime/components/basic/button/button.component.js +20 -7
  26. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  27. app-rn-runtime/components/basic/button/button.styles.js +15 -5
  28. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  29. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +11 -5
  30. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/icon/icon.component.js +9 -6
  32. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  33. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  34. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  35. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  36. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  37. app-rn-runtime/components/basic/label/label.component.js +79 -11
  38. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  39. app-rn-runtime/components/basic/label/label.props.js +1 -0
  40. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  41. app-rn-runtime/components/basic/label/label.styles.js +5 -0
  42. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/message/message.component.js +6 -3
  44. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  45. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  46. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  47. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -3
  48. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  50. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  51. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  52. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  53. app-rn-runtime/components/basic/search/search.component.js +9 -5
  54. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  55. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  56. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  57. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  58. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  59. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  60. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  61. app-rn-runtime/components/basic/video/video.component.js +2 -1
  62. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  63. app-rn-runtime/components/chart/area-chart/area-chart.component.js +42 -14
  64. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  65. app-rn-runtime/components/chart/area-chart/area-chart.props.js +10 -1
  66. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  67. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +42 -4
  68. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  69. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -2
  70. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  71. app-rn-runtime/components/chart/basechart.component.js +140 -39
  72. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  73. app-rn-runtime/components/chart/basechart.props.js +18 -4
  74. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  75. app-rn-runtime/components/chart/basechart.styles.js +44 -2
  76. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  77. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +25 -3
  78. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  79. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +9 -1
  80. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
  81. app-rn-runtime/components/chart/line-chart/line-chart.component.js +28 -6
  82. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  83. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  84. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  85. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +25 -3
  86. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  87. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -0
  88. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  89. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +81 -19
  90. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  91. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +2 -0
  92. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  93. app-rn-runtime/components/container/accordion/accordion.component.js +16 -13
  94. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  95. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +3 -22
  96. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  97. app-rn-runtime/components/container/container.component.js +14 -4
  98. app-rn-runtime/components/container/container.component.js.map +1 -1
  99. app-rn-runtime/components/container/container.props.js +1 -0
  100. app-rn-runtime/components/container/container.props.js.map +1 -1
  101. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  102. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  103. app-rn-runtime/components/container/panel/panel.component.js +43 -61
  104. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  105. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  106. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  107. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +29 -15
  108. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  109. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +15 -10
  110. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  111. app-rn-runtime/components/container/tabs/tabs.component.js +18 -10
  112. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  113. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -0
  114. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  115. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  116. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  117. app-rn-runtime/components/container/wizard/wizard.component.js +137 -20
  118. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  119. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  120. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  121. app-rn-runtime/components/container/wizard/wizard.styles.js +114 -5
  122. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  123. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
  124. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  125. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +4 -0
  126. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  127. app-rn-runtime/components/data/card/card.component.js +3 -2
  128. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  129. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  130. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  131. app-rn-runtime/components/data/form/form-field/form-field.component.js +9 -7
  132. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  133. app-rn-runtime/components/data/form/form.component.js +12 -6
  134. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  135. app-rn-runtime/components/data/list/list-template/list-template.styles.js +5 -1
  136. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  137. app-rn-runtime/components/data/list/list.component.js +65 -8
  138. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  139. app-rn-runtime/components/data/list/list.props.js +1 -0
  140. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  141. app-rn-runtime/components/data/list/list.styles.js +12 -5
  142. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  143. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  144. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  145. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  146. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  147. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  148. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  149. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  150. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  151. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  152. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  153. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  154. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  155. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  156. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  157. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  158. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  159. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  160. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  161. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +25 -8
  162. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  163. app-rn-runtime/components/input/baseinput/baseinput.component.js +6 -2
  164. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  165. app-rn-runtime/components/input/basenumber/basenumber.component.js +45 -6
  166. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  167. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  168. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  169. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  170. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  171. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  172. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  173. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  174. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  175. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  176. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  177. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +14 -7
  178. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  179. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +2 -1
  180. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  181. app-rn-runtime/components/input/chips/chips.component.js +15 -4
  182. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  183. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  184. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  185. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  186. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  187. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  188. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  189. app-rn-runtime/components/input/currency/currency.component.js +21 -3
  190. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  191. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  192. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  193. app-rn-runtime/components/input/currency/currency.styles.js +31 -5
  194. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  195. app-rn-runtime/components/input/epoch/base-datetime.component.js +32 -9
  196. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  197. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  198. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  199. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  200. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  201. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  202. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  203. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  204. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  205. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  206. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  207. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  208. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  209. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  210. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  211. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  212. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  213. app-rn-runtime/components/input/number/number.component.js +16 -2
  214. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  215. app-rn-runtime/components/input/number/number.props.js +1 -0
  216. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  217. app-rn-runtime/components/input/number/number.styles.js +23 -2
  218. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  219. app-rn-runtime/components/input/radioset/radioset.component.js +7 -4
  220. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  221. app-rn-runtime/components/input/radioset/radioset.styles.js +2 -1
  222. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  223. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  224. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  225. app-rn-runtime/components/input/select/select.component.js +17 -13
  226. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  227. app-rn-runtime/components/input/select/select.styles.js +6 -3
  228. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  229. app-rn-runtime/components/input/slider/slider.component.js +99 -23
  230. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  231. app-rn-runtime/components/input/slider/slider.styles.js +30 -3
  232. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  233. app-rn-runtime/components/input/switch/switch.component.js +11 -5
  234. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  235. app-rn-runtime/components/input/switch/switch.styles.js +13 -8
  236. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  237. app-rn-runtime/components/input/text/text.component.js +12 -1
  238. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  239. app-rn-runtime/components/input/text/text.props.js +1 -0
  240. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  241. app-rn-runtime/components/input/text/text.styles.js +22 -1
  242. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  243. app-rn-runtime/components/input/textarea/textarea.component.js +12 -1
  244. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  245. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  246. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  247. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  248. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  249. app-rn-runtime/components/input/toggle/toggle.component.js +44 -5
  250. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  251. app-rn-runtime/components/input/toggle/toggle.styles.js +16 -11
  252. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  253. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +16 -3
  254. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  255. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  256. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  257. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  258. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  259. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  260. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  261. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  262. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  263. app-rn-runtime/components/navigation/navitem/navitem.component.js +5 -2
  264. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  265. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  266. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  267. app-rn-runtime/components/navigation/popover/popover.component.js +7 -4
  268. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  269. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  270. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  271. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  272. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  273. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  274. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  275. app-rn-runtime/components/page/page-content/page-content.component.js +11 -3
  276. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  277. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  278. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  279. app-rn-runtime/components/page/tabbar/tabbar.component.js +47 -12
  280. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  281. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  282. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  283. app-rn-runtime/components/page/tabbar/tabbar.styles.js +54 -1
  284. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  285. app-rn-runtime/core/base.component.js +84 -37
  286. app-rn-runtime/core/base.component.js.map +1 -1
  287. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  288. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  289. app-rn-runtime/core/components/textinput.component.js +25 -2
  290. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  291. app-rn-runtime/core/constant.service.js +22 -0
  292. app-rn-runtime/core/constant.service.js.map +1 -0
  293. app-rn-runtime/core/formatters.js +9 -2
  294. app-rn-runtime/core/formatters.js.map +1 -1
  295. app-rn-runtime/core/tappable.component.js +49 -12
  296. app-rn-runtime/core/tappable.component.js.map +1 -1
  297. app-rn-runtime/core/testid.provider.js +5 -0
  298. app-rn-runtime/core/testid.provider.js.map +1 -0
  299. app-rn-runtime/core/utils.js +16 -0
  300. app-rn-runtime/core/utils.js.map +1 -1
  301. app-rn-runtime/gestures/swipe.animation.js +56 -5
  302. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  303. app-rn-runtime/package.json +6 -3
  304. app-rn-runtime/runtime/App.js +51 -21
  305. app-rn-runtime/runtime/App.js.map +1 -1
  306. app-rn-runtime/runtime/base-fragment.component.js +27 -6
  307. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  308. app-rn-runtime/runtime/base-page.component.js +8 -2
  309. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  310. app-rn-runtime/runtime/services/app-i18n.service.js +7 -0
  311. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  312. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  313. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  314. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  315. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  316. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  317. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  318. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  319. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  320. app-rn-runtime/styles/theme.js +36 -0
  321. app-rn-runtime/styles/theme.js.map +1 -1
  322. app-rn-runtime/styles/theme.variables.js +24 -3
  323. app-rn-runtime/styles/theme.variables.js.map +1 -1
  324. app-rn-runtime/variables/model-variable.js +2 -1
  325. app-rn-runtime/variables/model-variable.js.map +1 -1
@@ -1,22 +1,42 @@
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
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
5
  import React from 'react';
2
6
  import { Text, View } from 'react-native';
3
7
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
4
8
  import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
9
+ import { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';
5
10
  import WmLabelProps from './label.props';
6
11
  import { DEFAULT_CLASS } from './label.styles';
7
12
  import { isNil, toString } from 'lodash-es';
8
13
  import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
9
14
  import { createSkeleton } from '../skeleton/skeleton.component';
10
- export class WmLabelState extends BaseComponentState {}
15
+ export class WmLabelState extends BaseComponentState {
16
+ constructor() {
17
+ super(...arguments);
18
+ _defineProperty(this, "parts", []);
19
+ }
20
+ }
11
21
  export default class WmLabel extends BaseComponent {
12
22
  constructor(props) {
13
- super(props, DEFAULT_CLASS, new WmLabelProps());
23
+ super(props, DEFAULT_CLASS, new WmLabelProps(), new WmLabelState());
14
24
  }
15
25
  getAsterisk() {
16
26
  return /*#__PURE__*/React.createElement(Text, {
17
27
  style: this.styles.asterisk
18
28
  }, "*");
19
29
  }
30
+ onPropertyChange(name, $new, $old) {
31
+ super.onPropertyChange(name, $new, $old);
32
+ switch (name) {
33
+ case "caption":
34
+ this.updateState({
35
+ parts: this.parseCaption($new)
36
+ });
37
+ break;
38
+ }
39
+ }
20
40
  getMultilineSkeleton(width, height) {
21
41
  const styles = {
22
42
  borderRadius: 4,
@@ -29,6 +49,33 @@ export default class WmLabel extends BaseComponent {
29
49
  height: height
30
50
  });
31
51
  }
52
+ parseCaption(caption) {
53
+ if (!caption) {
54
+ return [];
55
+ }
56
+ caption += '';
57
+ caption = caption.replace(/\(\s*\)/, '(#/__EMPTY__)');
58
+ const pattern = /\[([^\]]+)\]\(([^)]*)\)/g;
59
+ const linkRegex = /^(((http|https):\/\/)|#)[^ "]+$/;
60
+ const captionSplit = caption.split(pattern);
61
+ let parts = [];
62
+ for (let i = 0; i < captionSplit.length; i++) {
63
+ const isLink = linkRegex.test(captionSplit[i]);
64
+ let part = {};
65
+ const isNextTextALink = linkRegex.test(captionSplit[i + 1]);
66
+ if (isLink) {
67
+ part.text = captionSplit[i - 1] ?? '';
68
+ part.link = captionSplit[i] === '#/__EMPTY__' ? '' : captionSplit[i];
69
+ } else {
70
+ part.text = isNextTextALink ? "" : captionSplit[i];
71
+ }
72
+ ;
73
+ if (part.text) {
74
+ parts.push(part);
75
+ }
76
+ }
77
+ return parts;
78
+ }
32
79
  renderSkeleton(props) {
33
80
  var _this$styles$root, _this$styles$root2;
34
81
  const skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
@@ -48,18 +95,39 @@ export default class WmLabel extends BaseComponent {
48
95
  }
49
96
  }
50
97
  renderWidget(props) {
98
+ const linkStyles = this.theme.mergeStyle({
99
+ text: this.styles.text
100
+ }, this.styles.link);
51
101
  return !isNil(props.caption) ? /*#__PURE__*/React.createElement(Animatedview, {
52
102
  entryanimation: props.animation,
53
103
  style: this.styles.root
54
- }, this._background, /*#__PURE__*/React.createElement(Tappable, {
55
- target: this
56
- }, /*#__PURE__*/React.createElement(Text, {
57
- style: [this.styles.text, {
58
- color: props.isValid === false ? 'red' : this.styles.text.color
59
- }],
60
- numberOfLines: props.wrap ? undefined : 1,
61
- selectable: this.styles.text.userSelect === 'text'
62
- }, toString(props.caption), props.required && this.getAsterisk()))) : null;
104
+ }, this._background, /*#__PURE__*/React.createElement(NavigationServiceConsumer, null, navigationService => {
105
+ var _this$state$parts;
106
+ return /*#__PURE__*/React.createElement(Tappable, {
107
+ target: this
108
+ }, /*#__PURE__*/React.createElement(Text, {
109
+ style: {
110
+ flexWrap: "wrap",
111
+ textAlign: this.styles.text.textAlign
112
+ },
113
+ numberOfLines: props.nooflines,
114
+ ellipsizeMode: "tail"
115
+ }, (_this$state$parts = this.state.parts) === null || _this$state$parts === void 0 ? void 0 : _this$state$parts.map((part, index) => {
116
+ const isLink = !isNil(part.link);
117
+ return /*#__PURE__*/React.createElement(Text, _extends({
118
+ key: `part_${index}`,
119
+ style: [this.styles.text, isLink ? this.styles.link.text : null, props.isValid ? null : {
120
+ color: 'red'
121
+ }]
122
+ }, this.getTestPropsForLabel(isLink ? `link_${index}` : `${index}`), {
123
+ selectable: this.styles.text.userSelect === 'text'
124
+ }, part.link ? {
125
+ onPress: () => {
126
+ part.link && navigationService.openUrl(part.link, '_blank');
127
+ }
128
+ } : {}), toString(part.text), props.required && this.getAsterisk());
129
+ })));
130
+ })) : null;
63
131
  }
64
132
  }
65
133
  //# sourceMappingURL=label.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","WmLabel","constructor","props","getAsterisk","createElement","style","styles","asterisk","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","text","fontSize","multilineskeleton","renderWidget","caption","entryanimation","animation","_background","target","color","isValid","numberOfLines","wrap","undefined","selectable","userSelect","required"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\nimport { totalMonths } from 'react-native-paper-dates/lib/typescript/Date/dateUtils';\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps());\n }\n\n private getAsterisk () {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius:4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n public renderSkeleton(props: WmLabelProps){\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n if(this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else{\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n }); \n }\n }\n\n renderWidget(props: WmLabelProps) {\n return !isNil(props.caption)? (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable target={this}>\n <Text\n style={[this.styles.text, \n {color: props.isValid === false ? 'red' : this.styles.text.color}]}\n numberOfLines={props.wrap ? undefined : 1}\n selectable={this.styles.text.userSelect === 'text'}>\n {toString(props.caption)}\n {props.required && this.getAsterisk()}\n </Text>\n </Tappable>\n </Animatedview>\n ): null;\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAE5E,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,WAAW;AAC3C,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAG3E,OAAO,MAAMC,YAAY,SAASR,kBAAkB,CAAe;AAInE,eAAe,MAAMS,OAAO,SAASV,aAAa,CAA4C;EAE5FW,WAAWA,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEQU,WAAWA,CAAA,EAAI;IACrB,oBAAOhB,KAAA,CAAAiB,aAAA,CAAChB,IAAI;MAACiB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAS,GAAC,GAAO,CAAC;EACpD;EAEQC,oBAAoBA,CAACC,KAAU,EAAEC,MAAW,EAAE;IACpD,MAAMJ,MAAM,GAAG;MACbK,YAAY,EAAC,CAAC;MACdC,YAAY,EAAE,EAAE;MAChBF,MAAM,EAAEA;IACV,CAAC;IACD,OAAOZ,cAAc,CAAC,IAAI,CAACe,KAAK,EAAE,IAAI,CAACP,MAAM,CAACQ,QAAQ,EAAE;MACtD,GAAGR,MAAM;MACTG,KAAK,EAAEA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CAACC,MAAM,CAACc;IAAK,GACpE,IAAI,CAACU,WAAW,eACjB3C,KAAA,CAAAiB,aAAA,CAACZ,QAAQ;MAACuC,MAAM,EAAE;IAAK,gBACnB5C,KAAA,CAAAiB,aAAA,CAAChB,IAAI;MACHiB,KAAK,EAAE,CAAC,IAAI,CAACC,MAAM,CAACiB,IAAI,EACtB;QAACS,KAAK,EAAE9B,KAAK,CAAC+B,OAAO,KAAK,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC3B,MAAM,CAACiB,IAAI,CAACS;MAAK,CAAC,CAAE;MACrEE,aAAa,EAAEhC,KAAK,CAACiC,IAAI,GAAGC,SAAS,GAAG,CAAE;MAC1CC,UAAU,EAAE,IAAI,CAAC/B,MAAM,CAACiB,IAAI,CAACe,UAAU,KAAK;IAAO,GAClD1C,QAAQ,CAACM,KAAK,CAACyB,OAAO,CAAC,EACvBzB,KAAK,CAACqC,QAAQ,IAAI,IAAI,CAACpC,WAAW,CAAC,CAChC,CACA,CACE,CAAC,GACd,IAAI;EACT;AACF"}
1
+ {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","constructor","arguments","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","replace","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","text","link","push","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","fontSize","multilineskeleton","renderWidget","linkStyles","mergeStyle","entryanimation","animation","_background","navigationService","_this$state$parts","target","flexWrap","textAlign","numberOfLines","nooflines","ellipsizeMode","state","map","index","_extends","key","isValid","color","getTestPropsForLabel","selectable","userSelect","onPress","openUrl","required"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ntype PartType = {\n text?: string,\n link?: string,\n};\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n parts: PartType[] = []\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps(), new WmLabelState());\n }\n\n private getAsterisk () {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n\n switch(name) {\n case \"caption\":\n this.updateState({\n parts: this.parseCaption($new)\n } as WmLabelState);\n break;\n }\n }\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius:4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n parseCaption(caption: string) {\n if (!caption) {\n return [];\n }\n caption += '';\n caption = caption.replace(/\\(\\s*\\)/, '(#/__EMPTY__)');\n const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|#)[^ \"]+$/;\n const captionSplit = caption.split(pattern);\n\n let parts = [];\n\n for (let i = 0; i < captionSplit.length; i++) {\n const isLink = linkRegex.test(captionSplit[i]);\n let part: PartType = {};\n \n const isNextTextALink = linkRegex.test(captionSplit[i + 1]);\n if (isLink) {\n part.text = captionSplit[i - 1] ?? '';\n part.link = captionSplit[i] === '#/__EMPTY__' ? '' : captionSplit[i];\n } else {\n part.text = isNextTextALink ? \"\" : captionSplit[i];\n };\n\n if (part.text) {\n parts.push(part);\n }\n }\n\n return parts;\n }\n\n public renderSkeleton(props: WmLabelProps){\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n if(this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else{\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n }); \n }\n }\n\n renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({text: this.styles.text}, this.styles.link);\n return !isNil(props.caption) ? (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this}>\n <Text style={{flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}} numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.map((part, index) => {\n const isLink = !isNil(part.link);\n return (\n <Text\n key={`part_${index}`}\n style={[\n this.styles.text,\n isLink ? this.styles.link.text : null,\n props.isValid ? null : { color: 'red'}\n ]}\n {...this.getTestPropsForLabel(isLink ? `link_${index}` : `${index}`)}\n selectable={this.styles.text.userSelect === 'text'}\n {...part.link ? {\n onPress: () => {\n part.link && navigationService.openUrl(part.link, '_blank');\n }\n }: {}}\n >\n {toString(part.text)}\n {props.required && this.getAsterisk()}\n </Text>\n );\n })}\n </Text>\n </Tappable>)}}\n </NavigationServiceConsumer>\n </Animatedview>\n ) : null;\n }\n}\n"],"m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GACE,IAAI,CAACC,oBAAoB,CAACtC,MAAM,GAAI,QAAOiC,KAAM,EAAC,GAAI,GAAEA,KAAM,EAAC,CAAC;UACpEM,UAAU,EAAE,IAAI,CAAC/D,MAAM,CAAC4B,IAAI,CAACoC,UAAU,KAAK;QAAO,GAC/CtC,IAAI,CAACG,IAAI,GAAG;UACdoC,OAAO,EAAEA,CAAA,KAAM;YACbvC,IAAI,CAACG,IAAI,IAAIkB,iBAAiB,CAACmB,OAAO,CAACxC,IAAI,CAACG,IAAI,EAAE,QAAQ,CAAC;UAC7D;QACF,CAAC,GAAE,CAAC,CAAC,GAEJzC,QAAQ,CAACsC,IAAI,CAACE,IAAI,CAAC,EACnBhC,KAAK,CAACuE,QAAQ,IAAI,IAAI,CAACtE,WAAW,CAAC,CAChC,CAAC;MAEX,CAAC,CACG,CACE,CAAC;IAAC,CACa,CACf,CAAC,GACb,IAAI;EACV;AACF"}
@@ -10,6 +10,7 @@ export default class WmLabelProps extends BaseProps {
10
10
  _defineProperty(this, "required", null);
11
11
  _defineProperty(this, "isValid", true);
12
12
  _defineProperty(this, "wrap", true);
13
+ _defineProperty(this, "nooflines", undefined);
13
14
  _defineProperty(this, "skeletonheight", null);
14
15
  _defineProperty(this, "skeletonwidth", null);
15
16
  _defineProperty(this, "multilineskeleton", false);
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmLabelProps","constructor","arguments","_defineProperty"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC3B,IAAI;IAAAA,eAAA,kBACN,OAAO;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,eACP,IAAI;IAAAA,eAAA,yBACK,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,4BACC,KAAK;EAAA;AACvC"}
1
+ {"version":3,"names":["BaseProps","WmLabelProps","constructor","arguments","_defineProperty","undefined"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n nooflines?: any = undefined;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC3B,IAAI;IAAAA,eAAA,kBACN,OAAO;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,eACP,IAAI;IAAAA,eAAA,oBACHC,SAAS;IAAAD,eAAA,yBACD,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,4BACC,KAAK;EAAA;AACvC"}
@@ -19,6 +19,11 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
19
19
  height: 16,
20
20
  borderRadius: 4
21
21
  }
22
+ },
23
+ link: {
24
+ text: {
25
+ textDecorationLine: 'underline'
26
+ }
22
27
  }
23
28
  });
24
29
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","flexDirection","textAlign","getLabelStyles","textColor","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","fontWeight","labelDangerColor","labelDangerContrastColor","labelDefaultContrastColor","labelInfoColor","labelInfoContrastColor","labelPrimaryColor","labelPrimaryContrastColor","labelSuccessColor","labelSuccessContrastColor","labelWarningColor","labelWarningContrastColor","getTextStyles","labelTextDangerColor","labelTextInfoColor","labelTextPrimaryColor","labelTextSuccessColor","labelTextWarningColor","getHeadingStyles","overrides","margin","labelHeaderColor","heading1FontSize","heading2FontSize","heading3FontSize","heading4FontSize","heading5FontSize","heading6FontSize","labelTextMutedColor"],"sources":["label.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmLabelStyles = BaseStyles & {\n asterisk: AllStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-label';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLabelStyles = defineStyles({\n root: {\n },\n text: {\n fontSize: 16,\n color: themeVariables.labelDefaultColor\n },\n asterisk: {\n color: themeVariables.labelAsteriskColor,\n marginLeft: 2\n },\n skeleton: {\n root:{\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n flexDirection: 'row',\n textAlign: 'right'\n }\n });\n const getLabelStyles = (color: string, textColor: string): WmLabelStyles => {\n return {\n root: {\n backgroundColor: color,\n paddingLeft: 32,\n paddingTop: 16,\n paddingRight: 32,\n paddingBottom: 16,\n borderRadius: 6\n },\n text: {\n color: textColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles;\n };\n\n addStyle('label-danger', '', getLabelStyles(themeVariables.labelDangerColor, themeVariables.labelDangerContrastColor));\n addStyle('label-default', '', getLabelStyles(themeVariables.labelDefaultColor, themeVariables.labelDefaultContrastColor));\n addStyle('label-info', '', getLabelStyles(themeVariables.labelInfoColor, themeVariables.labelInfoContrastColor));\n addStyle('label-primary', '', getLabelStyles(themeVariables.labelPrimaryColor, themeVariables.labelPrimaryContrastColor));\n addStyle('label-success', '', getLabelStyles(themeVariables.labelSuccessColor, themeVariables.labelSuccessContrastColor));\n addStyle('label-warning', '', getLabelStyles(themeVariables.labelWarningColor, themeVariables.labelWarningContrastColor));\n addStyle('label-test', '', getLabelStyles('yellow', 'red'));\n addStyle('label-test1', '', getLabelStyles('blue', 'orange'));\n\n const getTextStyles = (color: string) => {\n return {\n text: {\n color: color\n }\n } as WmLabelStyles;\n };\n\n addStyle('text-danger', '', getTextStyles(themeVariables.labelTextDangerColor));\n addStyle('text-info', '', getTextStyles(themeVariables.labelTextInfoColor));\n addStyle('text-primary', '', getTextStyles(themeVariables.labelTextPrimaryColor));\n addStyle('text-success', '', getTextStyles(themeVariables.labelTextSuccessColor));\n addStyle('text-warning', '', getTextStyles(themeVariables.labelTextWarningColor));\n addStyle('text-center', '', {\n root: {\n textAlign: 'center'\n }\n } as WmLabelStyles);\n addStyle('text-left', '', {\n root: {\n textAlign: 'left'\n }\n } as WmLabelStyles);\n addStyle('text-right', '', {\n root: {\n textAlign: 'right'\n }\n } as WmLabelStyles);\n\n\n const getHeadingStyles = (fontSize: number, overrides?: WmLabelStyles) => {\n return deepCopy({\n text: {\n fontWeight: '400',\n fontSize: fontSize,\n margin: 4,\n color: themeVariables.labelHeaderColor\n }\n } as WmLabelStyles, overrides);\n };\n addStyle('h1', '', getHeadingStyles(themeVariables.heading1FontSize, {text: {fontWeight: 'bold'}} as WmLabelStyles));\n addStyle('h2', '', getHeadingStyles(themeVariables.heading2FontSize, {text: {fontWeight: '500'}} as WmLabelStyles));\n addStyle('h3', '', getHeadingStyles(themeVariables.heading3FontSize));\n addStyle('h4', '', getHeadingStyles(themeVariables.heading4FontSize));\n addStyle('h5', '', getHeadingStyles(themeVariables.heading5FontSize));\n addStyle('h6', '', getHeadingStyles(themeVariables.heading6FontSize));\n addStyle('media-heading', '', {\n text : {\n fontSize: 16\n }\n } as WmLabelStyles);\n addStyle('text-muted', '', {\n text : {\n color: themeVariables.labelTextMutedColor\n }\n } as WmLabelStyles);\n addStyle('p', '', {\n text : {\n fontSize: 12\n }\n } as WmLabelStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGL,YAAY,CAAC;IAC9CM,IAAI,EAAE,CACN,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEN,cAAc,CAACO;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRF,KAAK,EAAEN,cAAc,CAACS,kBAAkB;MACxCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRR,IAAI,EAAC;QACHS,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFb,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLY,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EACF,MAAMC,cAAc,GAAGA,CAACX,KAAa,EAAEY,SAAiB,KAAoB;IAC1E,OAAO;MACL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,gBAAgB,EAAE;IAAC1C,IAAI,EAAE;MAACoB,UAAU,EAAE;IAAM;EAAC,CAAkB,CAAC,CAAC;EACpHvB,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAEyC,gBAAgB,CAAC1C,cAAc,CAAC+C,gBAAgB,EAAE;IAAC3C,IAAI,EAAE;MAACoB,UAAU,EAAE;IAAK;EAAC,CAAkB,CAAC,CAAC;EACnHvB,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAEyC,gBAAgB,CAAC1C,cAAc,CAACgD,gBAAgB,CAAC,CAAC;EACrE/C,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAEyC,gBAAgB,CAAC1C,cAAc,CAACiD,gBAAgB,CAAC,CAAC;EACrEhD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAEyC,gBAAgB,CAAC1C,cAAc,CAACkD,gBAAgB,CAAC,CAAC;EACrEjD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAEyC,gBAAgB,CAAC1C,cAAc,CAACmD,gBAAgB,CAAC,CAAC;EACrElD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BG,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;EACnBJ,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACzBG,IAAI,EAAG;MACLE,KAAK,EAAEN,cAAc,CAACoD;IACxB;EACF,CAAkB,CAAC;EACnBnD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE;IAChBG,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;AACrB,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","link","textDecorationLine","flexDirection","textAlign","getLabelStyles","textColor","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","fontWeight","labelDangerColor","labelDangerContrastColor","labelDefaultContrastColor","labelInfoColor","labelInfoContrastColor","labelPrimaryColor","labelPrimaryContrastColor","labelSuccessColor","labelSuccessContrastColor","labelWarningColor","labelWarningContrastColor","getTextStyles","labelTextDangerColor","labelTextInfoColor","labelTextPrimaryColor","labelTextSuccessColor","labelTextWarningColor","getHeadingStyles","overrides","margin","labelHeaderColor","heading1FontSize","heading2FontSize","heading3FontSize","heading4FontSize","heading5FontSize","heading6FontSize","labelTextMutedColor"],"sources":["label.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport { WmAnchorStyles } from '../anchor/anchor.styles';\n\nexport type WmLabelStyles = BaseStyles & {\n asterisk: AllStyle,\n skeleton: WmSkeletonStyles \n link: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-label';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLabelStyles = defineStyles({\n root: {\n },\n text: {\n fontSize: 16,\n color: themeVariables.labelDefaultColor\n },\n asterisk: {\n color: themeVariables.labelAsteriskColor,\n marginLeft: 2\n },\n skeleton: {\n root:{\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n link: {\n text: {\n textDecorationLine: 'underline'\n }\n } as WmAnchorStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n flexDirection: 'row',\n textAlign: 'right'\n }\n });\n const getLabelStyles = (color: string, textColor: string): WmLabelStyles => {\n return {\n root: {\n backgroundColor: color,\n paddingLeft: 32,\n paddingTop: 16,\n paddingRight: 32,\n paddingBottom: 16,\n borderRadius: 6\n },\n text: {\n color: textColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles;\n };\n\n addStyle('label-danger', '', getLabelStyles(themeVariables.labelDangerColor, themeVariables.labelDangerContrastColor));\n addStyle('label-default', '', getLabelStyles(themeVariables.labelDefaultColor, themeVariables.labelDefaultContrastColor));\n addStyle('label-info', '', getLabelStyles(themeVariables.labelInfoColor, themeVariables.labelInfoContrastColor));\n addStyle('label-primary', '', getLabelStyles(themeVariables.labelPrimaryColor, themeVariables.labelPrimaryContrastColor));\n addStyle('label-success', '', getLabelStyles(themeVariables.labelSuccessColor, themeVariables.labelSuccessContrastColor));\n addStyle('label-warning', '', getLabelStyles(themeVariables.labelWarningColor, themeVariables.labelWarningContrastColor));\n addStyle('label-test', '', getLabelStyles('yellow', 'red'));\n addStyle('label-test1', '', getLabelStyles('blue', 'orange'));\n\n const getTextStyles = (color: string) => {\n return {\n text: {\n color: color\n }\n } as WmLabelStyles;\n };\n\n addStyle('text-danger', '', getTextStyles(themeVariables.labelTextDangerColor));\n addStyle('text-info', '', getTextStyles(themeVariables.labelTextInfoColor));\n addStyle('text-primary', '', getTextStyles(themeVariables.labelTextPrimaryColor));\n addStyle('text-success', '', getTextStyles(themeVariables.labelTextSuccessColor));\n addStyle('text-warning', '', getTextStyles(themeVariables.labelTextWarningColor));\n addStyle('text-center', '', {\n root: {\n textAlign: 'center'\n }\n } as WmLabelStyles);\n addStyle('text-left', '', {\n root: {\n textAlign: 'left'\n }\n } as WmLabelStyles);\n addStyle('text-right', '', {\n root: {\n textAlign: 'right'\n }\n } as WmLabelStyles);\n\n\n const getHeadingStyles = (fontSize: number, overrides?: WmLabelStyles) => {\n return deepCopy({\n text: {\n fontWeight: '400',\n fontSize: fontSize,\n margin: 4,\n color: themeVariables.labelHeaderColor\n }\n } as WmLabelStyles, overrides);\n };\n addStyle('h1', '', getHeadingStyles(themeVariables.heading1FontSize, {text: {fontWeight: 'bold'}} as WmLabelStyles));\n addStyle('h2', '', getHeadingStyles(themeVariables.heading2FontSize, {text: {fontWeight: '500'}} as WmLabelStyles));\n addStyle('h3', '', getHeadingStyles(themeVariables.heading3FontSize));\n addStyle('h4', '', getHeadingStyles(themeVariables.heading4FontSize));\n addStyle('h5', '', getHeadingStyles(themeVariables.heading5FontSize));\n addStyle('h6', '', getHeadingStyles(themeVariables.heading6FontSize));\n addStyle('media-heading', '', {\n text : {\n fontSize: 16\n }\n } as WmLabelStyles);\n addStyle('text-muted', '', {\n text : {\n color: themeVariables.labelTextMutedColor\n }\n } as WmLabelStyles);\n addStyle('p', '', {\n text : {\n fontSize: 12\n }\n } as WmLabelStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGL,YAAY,CAAC;IAC9CM,IAAI,EAAE,CACN,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEN,cAAc,CAACO;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRF,KAAK,EAAEN,cAAc,CAACS,kBAAkB;MACxCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRR,IAAI,EAAC;QACHS,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BC,IAAI,EAAE;MACJX,IAAI,EAAE;QACJY,kBAAkB,EAAE;MACtB;IACF;EACJ,CAAC,CAAC;EAEFf,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLc,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE;IACb;EACF,CAAC,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ChC,CAAC;EACD5C,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE2C,gBAAgB,CAAC5C,cAAc,CAACgD,gBAAgB,EAAE;IAAC5C,IAAI,EAAE;MAACsB,UAAU,EAAE;IAAM;EAAC,CAAkB,CAAC,CAAC;EACpHzB,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE2C,gBAAgB,CAAC5C,cAAc,CAACiD,gBAAgB,EAAE;IAAC7C,IAAI,EAAE;MAACsB,UAAU,EAAE;IAAK;EAAC,CAAkB,CAAC,CAAC;EACnHzB,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE2C,gBAAgB,CAAC5C,cAAc,CAACkD,gBAAgB,CAAC,CAAC;EACrEjD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE2C,gBAAgB,CAAC5C,cAAc,CAACmD,gBAAgB,CAAC,CAAC;EACrElD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE2C,gBAAgB,CAAC5C,cAAc,CAACoD,gBAAgB,CAAC,CAAC;EACrEnD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE2C,gBAAgB,CAAC5C,cAAc,CAACqD,gBAAgB,CAAC,CAAC;EACrEpD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BG,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;EACnBJ,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACzBG,IAAI,EAAG;MACLE,KAAK,EAAEN,cAAc,CAACsD;IACxB;EACF,CAAkB,CAAC;EACnBrD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE;IAChBG,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;AACrB,CAAC,CAAC"}
@@ -1,3 +1,4 @@
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); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -55,15 +56,17 @@ export default class WmMessage extends BaseComponent {
55
56
  entryanimation: props.animation,
56
57
  style: styles.root
57
58
  }, this._background, /*#__PURE__*/React.createElement(WmIcon, {
59
+ id: this.getTestId('icon'),
58
60
  iconclass: props.type && MESSAGE_ICONS[props.type],
59
61
  styles: styles.icon
60
62
  }), /*#__PURE__*/React.createElement(View, {
61
63
  style: styles.message
62
- }, /*#__PURE__*/React.createElement(Text, {
64
+ }, /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('title'), {
63
65
  style: styles.title
64
- }, props.title || DEFAULT_TITLE[props.type || '']), /*#__PURE__*/React.createElement(Text, {
66
+ }), props.title || DEFAULT_TITLE[props.type || '']), /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel('caption'), {
65
67
  style: styles.text
66
- }, props.caption)), props.hideclose ? null : /*#__PURE__*/React.createElement(WmButton, {
68
+ }), props.caption)), props.hideclose ? null : /*#__PURE__*/React.createElement(WmButton, {
69
+ id: this.getTestId('close'),
67
70
  iconclass: "wi wi-close",
68
71
  styles: styles.closeBtn,
69
72
  onTap: this.close
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmMessageProps","DEFAULT_CLASS","WmIcon","WmButton","Animatedview","WmMessageState","MESSAGE_ICONS","DEFAULT_TITLE","WmMessage","constructor","props","_defineProperty","updateState","show","invokeEventCallback","showMessage","hideMessage","renderWidget","styles","theme","mergeStyle","getStyle","type","variant","createElement","entryanimation","animation","style","root","_background","iconclass","icon","message","title","text","caption","hideclose","closeBtn","onTap","close"],"sources":["message.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmMessageProps from './message.props';\nimport { DEFAULT_CLASS, WmMessageStyles } from './message.styles';\nimport WmIcon from '../icon/icon.component';\nimport WmButton from '../button/button.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmMessageState extends BaseComponentState<WmMessageProps> {}\n\nconst MESSAGE_ICONS = {\n 'success': 'wm-sl-l sl-check',\n 'warning': 'wm-sl-l sl-alarm-bell',\n 'error': 'fa fa-times-circle',\n 'info': 'wi wi-info',\n 'loading': 'fa fa-spinner fa-spin'\n};\n\nconst DEFAULT_TITLE = {\n 'success': 'Success',\n 'warning': 'Warning',\n 'error': 'Error',\n 'info': 'Info',\n 'loading': 'Processing'\n} as any;\n\nexport default class WmMessage extends BaseComponent<WmMessageProps, WmMessageState, WmMessageStyles> {\n\n constructor(props: WmMessageProps) {\n super(props, DEFAULT_CLASS, new WmMessageProps());\n }\n\n showMessage() {\n this.updateState({\n props: {\n show: true\n }\n } as WmMessageState);\n }\n\n hideMessage() {\n this.updateState({\n props: {\n show: false\n }\n } as WmMessageState);\n }\n\n close = () => {\n this.updateState({props: {\n show : false\n }}, () => this.invokeEventCallback('onClose', [null, this]));\n }\n\n renderWidget(props: WmMessageProps) {\n const styles = this.theme.mergeStyle(this.theme.getStyle(`${props.type}-${props.variant}-message`), this.styles);\n return (<Animatedview entryanimation={props.animation} style={styles.root}>\n {this._background}\n <WmIcon\n iconclass={props.type && MESSAGE_ICONS[props.type]}\n styles={styles.icon}></WmIcon>\n <View style={styles.message}>\n <Text style={styles.title}>{props.title || DEFAULT_TITLE[props.type || '']}</Text>\n <Text style={styles.text}>{props.caption}</Text>\n </View>\n {props.hideclose ? null : (\n <WmButton\n iconclass=\"wi wi-close\"\n styles={styles.closeBtn}\n onTap={this.close}></WmButton>\n )}\n </Animatedview>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAASC,YAAY,QAAQ,mEAAmE;AAEhG,OAAO,MAAMC,cAAc,SAASN,kBAAkB,CAAiB;AAEvE,MAAMO,aAAa,GAAG;EACpB,SAAS,EAAE,kBAAkB;EAC7B,SAAS,EAAE,uBAAuB;EAClC,OAAO,EAAE,oBAAoB;EAC7B,MAAM,EAAE,YAAY;EACpB,SAAS,EAAE;AACb,CAAC;AAED,MAAMC,aAAa,GAAG;EACpB,SAAS,EAAE,SAAS;EACpB,SAAS,EAAE,SAAS;EACpB,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,MAAM;EACd,SAAS,EAAE;AACb,CAAQ;AAER,eAAe,MAAMC,SAAS,SAASV,aAAa,CAAkD;EAEpGW,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;IAACW,eAAA,gBAmB5C,MAAM;MACZ,IAAI,CAACC,WAAW,CAAC;QAACF,KAAK,EAAE;UACvBG,IAAI,EAAG;QACT;MAAC,CAAC,EAAE,MAAM,IAAI,CAACC,mBAAmB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC;EAtBD;EAEAC,WAAWA,C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AA,CAACrB,QAAQ;MACP2B,SAAS,EAAC,aAAa;MACvBZ,MAAM,EAAEA,MAAM,CAACmB,QAAS;MACxBC,KAAK,EAAE,IAAI,CAACC;IAAM,CAAW,CAErB,CAAC;EACjB;AACF"}
1
+ {"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmMessageProps","DEFAULT_CLASS","WmIcon","WmButton","Animatedview","WmMessageState","MESSAGE_ICONS","DEFAULT_TITLE","WmMessage","constructor","props","_defineProperty","updateState","show","invokeEventCallback","showMessage","hideMessage","renderWidget","styles","theme","mergeStyle","getStyle","type","variant","createElement","entryanimation","animation","style","root","_background","id","getTestId","iconclass","icon","message","_extends","getTestPropsForLabel","title","text","caption","hideclose","closeBtn","onTap","close"],"sources":["message.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmMessageProps from './message.props';\nimport { DEFAULT_CLASS, WmMessageStyles } from './message.styles';\nimport WmIcon from '../icon/icon.component';\nimport WmButton from '../button/button.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmMessageState extends BaseComponentState<WmMessageProps> {}\n\nconst MESSAGE_ICONS = {\n 'success': 'wm-sl-l sl-check',\n 'warning': 'wm-sl-l sl-alarm-bell',\n 'error': 'fa fa-times-circle',\n 'info': 'wi wi-info',\n 'loading': 'fa fa-spinner fa-spin'\n};\n\nconst DEFAULT_TITLE = {\n 'success': 'Success',\n 'warning': 'Warning',\n 'error': 'Error',\n 'info': 'Info',\n 'loading': 'Processing'\n} as any;\n\nexport default class WmMessage extends BaseComponent<WmMessageProps, WmMessageState, WmMessageStyles> {\n\n constructor(props: WmMessageProps) {\n super(props, DEFAULT_CLASS, new WmMessageProps());\n }\n\n showMessage() {\n this.updateState({\n props: {\n show: true\n }\n } as WmMessageState);\n }\n\n hideMessage() {\n this.updateState({\n props: {\n show: false\n }\n } as WmMessageState);\n }\n\n close = () => {\n this.updateState({props: {\n show : false\n }}, () => this.invokeEventCallback('onClose', [null, this]));\n }\n\n renderWidget(props: WmMessageProps) {\n const styles = this.theme.mergeStyle(this.theme.getStyle(`${props.type}-${props.variant}-message`), this.styles);\n return (<Animatedview entryanimation={props.animation} style={styles.root}>\n {this._background}\n <WmIcon\n id={this.getTestId('icon')}\n iconclass={props.type && MESSAGE_ICONS[props.type]}\n styles={styles.icon}></WmIcon>\n <View style={styles.message}>\n <Text {...this.getTestPropsForLabel('title')} style={styles.title}>{props.title || DEFAULT_TITLE[props.type || '']}</Text>\n <Text {...this.getTestPropsForLabel('caption')} style={styles.text}>{props.caption}</Text>\n </View>\n {props.hideclose ? null : (\n <WmButton\n id={this.getTestId('close')}\n iconclass=\"wi wi-close\"\n styles={styles.closeBtn}\n onTap={this.close}></WmButton>\n )}\n </Animatedview>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAASC,YAAY,QAAQ,mEAAmE;AAEhG,OAAO,MAAMC,cAAc,SAASN,kBAAkB,CAAiB;AAEvE,MAAMO,aAAa,GAAG;EACpB,SAAS,EAAE,kBAAkB;EAC7B,SAAS,EAAE,uBAAuB;EAClC,OAAO,EAAE,oBAAoB;EAC7B,MAAM,EAAE,YAAY;EACpB,SAAS,EAAE;AACb,CAAC;AAED,MAAMC,aAAa,GAAG;EACpB,SAAS,EAAE,SAAS;EACpB,SAAS,EAAE,SAAS;EACpB,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,MAAM;EACd,SAAS,EAAE;AACb,CAAQ;AAER,eA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,KAAA,CAAA6B,aAAA,CAAC5B,IAAI;MAAC+B,KAAK,EAAET,MAAM,CAACgB;IAAQ,gBAC1BvC,KAAA,CAAA6B,aAAA,CAAC3B,IAAI,EAAAsC,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,OAAO,CAAC;MAAET,KAAK,EAAET,MAAM,CAACmB;IAAM,IAAE3B,KAAK,CAAC2B,KAAK,IAAI9B,aAAa,CAACG,KAAK,CAACY,IAAI,IAAI,EAAE,CAAQ,CAAC,eAC1H3B,KAAA,CAAA6B,aAAA,CAAC3B,IAAI,EAAAsC,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,SAAS,CAAC;MAAET,KAAK,EAAET,MAAM,CAACoB;IAAK,IAAE5B,KAAK,CAAC6B,OAAc,CACrF,CAAC,EACN7B,KAAK,CAAC8B,SAAS,GAAG,IAAI,gBACrB7C,KAAA,CAAA6B,aAAA,CAACrB,QAAQ;MACP2B,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO,CAAE;MAC5BC,SAAS,EAAC,aAAa;MACvBd,MAAM,EAAEA,MAAM,CAACuB,QAAS;MACxBC,KAAK,EAAE,IAAI,CAACC;IAAM,CAAW,CAErB,CAAC;EACjB;AACF"}
@@ -1,3 +1,4 @@
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); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -111,9 +112,9 @@ export default class WmPicture extends BaseComponent {
111
112
  imgStyle['height'] = '100%';
112
113
  }
113
114
  elementToshow = /*#__PURE__*/React.createElement(imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.default, imgStyle);
114
- // } else if (!isWebPreviewMode() && props.isSvg) {
115
- // // svg from uri
116
- // elementToshow = <SvgUri width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;
115
+ //} else if (!isWebPreviewMode() && props.isSvg) {
116
+ // svg from uri
117
+ // elementToshow = <SvgUri testID={this.getTestId('picture')} width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;
117
118
  } else if (isFullPathUrl(imgSrc)) {
118
119
  source = {
119
120
  uri: imgSrc
@@ -123,6 +124,7 @@ export default class WmPicture extends BaseComponent {
123
124
  }
124
125
  if (this.state.naturalImageWidth) {
125
126
  elementToshow = /*#__PURE__*/React.createElement(Image, {
127
+ testID: this.getTestId('picture'),
126
128
  style: [this.styles.picture, shapeStyles.picture],
127
129
  resizeMode: props.resizemode,
128
130
  source: source
@@ -168,13 +170,13 @@ export default class WmPicture extends BaseComponent {
168
170
  height: '100%'
169
171
  }],
170
172
  onLayout: this.onViewLayoutChange
171
- }, /*#__PURE__*/React.createElement(Tappable, {
173
+ }, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
172
174
  target: this,
173
175
  styles: {
174
176
  width: imageWidth ? null : '100%',
175
177
  height: imageHeight ? null : '100%'
176
178
  }
177
- }, /*#__PURE__*/React.createElement(Animatedview, {
179
+ }), /*#__PURE__*/React.createElement(Animatedview, {
178
180
  entryanimation: props.animation,
179
181
  style: [{
180
182
  height: imageHeight,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Image","View","isNumber","Tappable","BaseComponent","BaseComponentState","ImageSizeEstimator","isFullPathUrl","WmPictureProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmPictureState","constructor","arguments","_defineProperty","WmPicture","props","e","imageWidth","nativeEvent","layout","width","imageHeight","height","styles","root","includes","state","naturalImageHeight","naturalImageWidth","updateState","loadImage","image","loadAsset","imageSrc","default","resolveAssetSource","cancel","getSize","cleanup","splice","indexOf","push","onPropertyChange","name","$new","$old","_pictureSource","_picturePlaceHolder","createShape","shape","picture","borderRadius","theme","getStyle","getElementToShow","imgSrc","shapeStyles","elementToshow","source","imgStyle","resizemode","createElement","uri","style","resizeMode","renderSkeleton","_this$styles$root","_shapeStyles$root","_shapeStyles$picture","_this$styles$root2","_shapeStyles$root2","_shapeStyles$picture2","_this$styles$root3","_shapeStyles$picture3","_shapeStyles$root3","_this$styles$root4","skeletonWidth","skeletonwidth","skeletonHeight","skeletonheight","skeleton","renderWidget","_shapeStyles$picture4","picturesource","pictureplaceholder","isSvg","_background","overflow","onLayout","onViewLayoutChange","target","entryanimation","animation"],"sources":["picture.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Image, LayoutChangeEvent, View } from 'react-native';\n// import { NumberProp, SvgUri } from 'react-native-svg';\nimport { isNumber, isString } from 'lodash-es';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { isFullPathUrl, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmPictureProps from './picture.props';\nimport { DEFAULT_CLASS, WmPictureStyles } from './picture.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmPictureState extends BaseComponentState<WmPictureProps> {\n naturalImageWidth: number = 0;\n naturalImageHeight: number = 0;\n imageWidth: number = 0;\n imageHeight: number = 0;\n}\n\nexport default class WmPicture extends BaseComponent<WmPictureProps, WmPictureState, WmPictureStyles> {\n\n private _pictureSource = null as any;\n private _picturePlaceHolder = null as any;\n\n constructor(props: WmPictureProps) {\n super(props, DEFAULT_CLASS, new WmPictureProps());\n }\n\n loadImage(image: string | undefined) {\n if (!image || !this.loadAsset) {\n return null;\n }\n const imageSrc = this.loadAsset(image) as any;\n if (imageSrc && typeof imageSrc === 'object' && typeof imageSrc.default === 'function') {\n return null;\n }\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n } else if (imageSrc !== null) {\n const cancel = ImageSizeEstimator.getSize(imageSrc, (width: number, height: number) => {\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n this.cleanup.splice(this.cleanup.indexOf(cancel), 1);\n });\n this.cleanup.push(cancel);\n }\n return imageSrc;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'picturesource':\n this._pictureSource = null;\n case 'pictureplaceholder':\n this._picturePlaceHolder = null;\n break;\n }\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let imageWidth = e.nativeEvent.layout.width;\n let imageHeight = e.nativeEvent.layout.height;\n if (!imageWidth && !imageHeight) {\n return;\n }\n if (!this.styles.root.height\n || (typeof this.styles.root.height === 'string'\n && !this.styles.root.height.includes('%'))) {\n imageHeight = 0;\n }\n if (imageWidth && !imageHeight) {\n imageHeight = imageWidth * this.state.naturalImageHeight / this.state.naturalImageWidth;\n } else if (imageHeight && !imageWidth) {\n imageWidth = imageHeight * this.state.naturalImageWidth / this.state.naturalImageHeight;\n }\n this.updateState({\n imageWidth: imageWidth,\n imageHeight: imageHeight\n } as WmPictureState);\n };\n\n createShape(shape: string | undefined, imageWidth?: number | string): WmPictureStyles {\n if (shape) {\n switch(shape) {\n case 'circle':\n return {\n picture: {\n borderRadius: isNumber(imageWidth) ? imageWidth / 2 : 4\n }\n } as WmPictureStyles;\n case 'rounded' :\n return (this.theme.getStyle('rounded-image') as WmPictureStyles);\n case 'thumbnail' :\n return (this.theme.getStyle('thumbnail-image') as WmPictureStyles);\n }\n }\n return {} as WmPictureStyles;\n }\n\n getElementToShow(props: WmPictureProps, imgSrc: any, shapeStyles: WmPictureStyles) {\n let elementToshow, source;\n if (imgSrc && typeof imgSrc === 'object' && typeof imgSrc?.default === 'function') {\n let imgStyle : any = {};\n if (props.resizemode === 'contain') {\n imgStyle['width'] = '100%';\n imgStyle['height'] = '100%';\n }\n elementToshow = React.createElement(imgSrc?.default, imgStyle);\n // } else if (!isWebPreviewMode() && props.isSvg) {\n // // svg from uri\n // elementToshow = <SvgUri width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;\n } else if (isFullPathUrl(imgSrc)) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n if (this.state.naturalImageWidth) {\n elementToshow = <Image style={[this.styles.picture, shapeStyles.picture]} resizeMode={props.resizemode} source={source}/>;\n }\n return elementToshow;\n }\n \n public renderSkeleton(props: WmPictureProps){\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(this.props.shape, imageWidth);\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width || shapeStyles.root?.width || shapeStyles.picture?.width || imageWidth; \n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || shapeStyles.root?.height || shapeStyles.picture?.height || imageHeight;\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n borderRadius: this.props.shape == 'circle' && this.styles.root?.width ? 25 : shapeStyles.picture?.borderRadius || shapeStyles.root?.borderRadius || this.styles.root?.borderRadius || 4,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmPictureProps) {\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(props.shape, imageWidth);\n this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);\n this._picturePlaceHolder = this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);\n const imgSrc: any = this._pictureSource || this._picturePlaceHolder;\n let elementToshow;\n if (imgSrc) {\n elementToshow = this.getElementToShow(props, imgSrc, shapeStyles);\n }\n return imgSrc && (this.state.naturalImageWidth || props.isSvg) ? (\n <View style={[{\n width: imageWidth,\n height: imageHeight\n }, this.styles.root, shapeStyles.root, shapeStyles.picture]}>\n {this._background}\n <View style={[{overflow: 'hidden', width: '100%',\n height: '100%'}]} onLayout={this.onViewLayoutChange}>\n <Tappable target={this} styles={{width: imageWidth ? null : '100%', height: imageHeight ? null : '100%'}}>\n <Animatedview entryanimation={props.animation} style={[{\n height: imageHeight,\n width: imageWidth,\n borderRadius: shapeStyles.picture?.borderRadius\n }]}>\n {this.state.imageWidth ? elementToshow : null}\n </Animatedview>\n </Tappable>\n </View>\n </View>\n ): null;\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,KAAK,EAAqBC,IAAI,QAAQ,cAAc;AAC7E;AACA,SAASC,QAAQ,QAAkB,WAAW;AAC9C,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAA0B,sCAAsC;AAEtF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAE3E,OAAO,MAAMC,cAAc,SAASP,kBAAkB,CAAiB;EAAAQ,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,4BACzC,CAAC;IAAAA,eAAA,6BACA,CAAC;IAAAA,eAAA,qBACT,CAAC;IAAAA,eAAA,sBACA,CAAC;EAAA;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N,CACF,CAAC,GACN,IAAI;EACT;AACF"}
1
+ {"version":3,"names":["React","Image","View","isNumber","Tappable","BaseComponent","BaseComponentState","ImageSizeEstimator","isFullPathUrl","WmPictureProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmPictureState","constructor","arguments","_defineProperty","WmPicture","props","e","imageWidth","nativeEvent","layout","width","imageHeight","height","styles","root","includes","state","naturalImageHeight","naturalImageWidth","updateState","loadImage","image","loadAsset","imageSrc","default","resolveAssetSource","cancel","getSize","cleanup","splice","indexOf","push","onPropertyChange","name","$new","$old","_pictureSource","_picturePlaceHolder","createShape","shape","picture","borderRadius","theme","getStyle","getElementToShow","imgSrc","shapeStyles","elementToshow","source","imgStyle","resizemode","createElement","uri","testID","getTestId","style","resizeMode","renderSkeleton","_this$styles$root","_shapeStyles$root","_shapeStyles$picture","_this$styles$root2","_shapeStyles$root2","_shapeStyles$picture2","_this$styles$root3","_shapeStyles$picture3","_shapeStyles$root3","_this$styles$root4","skeletonWidth","skeletonwidth","skeletonHeight","skeletonheight","skeleton","renderWidget","_shapeStyles$picture4","picturesource","pictureplaceholder","isSvg","_background","overflow","onLayout","onViewLayoutChange","_extends","getTestPropsForAction","target","entryanimation","animation"],"sources":["picture.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Image, LayoutChangeEvent, View } from 'react-native';\n// import { NumberProp, SvgUri } from 'react-native-svg';\nimport { isNumber, isString } from 'lodash-es';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { isFullPathUrl, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmPictureProps from './picture.props';\nimport { DEFAULT_CLASS, WmPictureStyles } from './picture.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmPictureState extends BaseComponentState<WmPictureProps> {\n naturalImageWidth: number = 0;\n naturalImageHeight: number = 0;\n imageWidth: number = 0;\n imageHeight: number = 0;\n}\n\nexport default class WmPicture extends BaseComponent<WmPictureProps, WmPictureState, WmPictureStyles> {\n\n private _pictureSource = null as any;\n private _picturePlaceHolder = null as any;\n\n constructor(props: WmPictureProps) {\n super(props, DEFAULT_CLASS, new WmPictureProps());\n }\n\n loadImage(image: string | undefined) {\n if (!image || !this.loadAsset) {\n return null;\n }\n const imageSrc = this.loadAsset(image) as any;\n if (imageSrc && typeof imageSrc === 'object' && typeof imageSrc.default === 'function') {\n return null;\n }\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n } else if (imageSrc !== null) {\n const cancel = ImageSizeEstimator.getSize(imageSrc, (width: number, height: number) => {\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n this.cleanup.splice(this.cleanup.indexOf(cancel), 1);\n });\n this.cleanup.push(cancel);\n }\n return imageSrc;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'picturesource':\n this._pictureSource = null;\n case 'pictureplaceholder':\n this._picturePlaceHolder = null;\n break;\n }\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let imageWidth = e.nativeEvent.layout.width;\n let imageHeight = e.nativeEvent.layout.height;\n if (!imageWidth && !imageHeight) {\n return;\n }\n if (!this.styles.root.height\n || (typeof this.styles.root.height === 'string'\n && !this.styles.root.height.includes('%'))) {\n imageHeight = 0;\n }\n if (imageWidth && !imageHeight) {\n imageHeight = imageWidth * this.state.naturalImageHeight / this.state.naturalImageWidth;\n } else if (imageHeight && !imageWidth) {\n imageWidth = imageHeight * this.state.naturalImageWidth / this.state.naturalImageHeight;\n }\n this.updateState({\n imageWidth: imageWidth,\n imageHeight: imageHeight\n } as WmPictureState);\n };\n\n createShape(shape: string | undefined, imageWidth?: number | string): WmPictureStyles {\n if (shape) {\n switch(shape) {\n case 'circle':\n return {\n picture: {\n borderRadius: isNumber(imageWidth) ? imageWidth / 2 : 4\n }\n } as WmPictureStyles;\n case 'rounded' :\n return (this.theme.getStyle('rounded-image') as WmPictureStyles);\n case 'thumbnail' :\n return (this.theme.getStyle('thumbnail-image') as WmPictureStyles);\n }\n }\n return {} as WmPictureStyles;\n }\n\n getElementToShow(props: WmPictureProps, imgSrc: any, shapeStyles: WmPictureStyles) {\n let elementToshow, source;\n if (imgSrc && typeof imgSrc === 'object' && typeof imgSrc?.default === 'function') {\n let imgStyle : any = {};\n if (props.resizemode === 'contain') {\n imgStyle['width'] = '100%';\n imgStyle['height'] = '100%';\n }\n elementToshow = React.createElement(imgSrc?.default, imgStyle);\n //} else if (!isWebPreviewMode() && props.isSvg) {\n // svg from uri\n // elementToshow = <SvgUri testID={this.getTestId('picture')} width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;\n } else if (isFullPathUrl(imgSrc)) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n if (this.state.naturalImageWidth) {\n elementToshow = <Image testID={this.getTestId('picture')} style={[this.styles.picture, shapeStyles.picture]} resizeMode={props.resizemode} source={source}/>;\n }\n return elementToshow;\n }\n \n public renderSkeleton(props: WmPictureProps){\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(this.props.shape, imageWidth);\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width || shapeStyles.root?.width || shapeStyles.picture?.width || imageWidth; \n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || shapeStyles.root?.height || shapeStyles.picture?.height || imageHeight;\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n borderRadius: this.props.shape == 'circle' && this.styles.root?.width ? 25 : shapeStyles.picture?.borderRadius || shapeStyles.root?.borderRadius || this.styles.root?.borderRadius || 4,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmPictureProps) {\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(props.shape, imageWidth);\n this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);\n this._picturePlaceHolder = this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);\n const imgSrc: any = this._pictureSource || this._picturePlaceHolder;\n let elementToshow;\n if (imgSrc) {\n elementToshow = this.getElementToShow(props, imgSrc, shapeStyles);\n }\n return imgSrc && (this.state.naturalImageWidth || props.isSvg) ? (\n <View style={[{\n width: imageWidth,\n height: imageHeight\n }, this.styles.root, shapeStyles.root, shapeStyles.picture]}>\n {this._background}\n <View style={[{overflow: 'hidden', width: '100%',\n height: '100%'}]} onLayout={this.onViewLayoutChange}>\n <Tappable \n {...this.getTestPropsForAction()}\n target={this} styles={{width: imageWidth ? null : '100%', height: imageHeight ? null : '100%'}}>\n <Animatedview entryanimation={props.animation} style={[{\n height: imageHeight,\n width: imageWidth,\n borderRadius: shapeStyles.picture?.borderRadius\n }]}>\n {this.state.imageWidth ? elementToshow : null}\n </Animatedview>\n </Tappable>\n </View>\n </View>\n ): null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,KAAK,EAAqBC,IAAI,QAAQ,cAAc;AAC7E;AACA,SAASC,QAAQ,QAAkB,WAAW;AAC9C,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAA0B,sCAAsC;AAEtF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AA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AAEhF,KAAK,CAACiF,SAAU;MAAC/B,KAAK,EAAE,CAAC;QACjD3C,MAAM,EAAED,WAAW;QACnBD,KAAK,EAAEH,UAAU;QACjBkC,YAAY,GAAAiC,qBAAA,GAAE5B,WAAW,CAACN,OAAO,cAAAkC,qBAAA,uBAAnBA,qBAAA,CAAqBjC;MACrC,CAAC;IAAE,GACF,IAAI,CAACzB,KAAK,CAACT,UAAU,GAAGwC,aAAa,GAAG,IAC7B,CACN,CACN,CACF,CAAC,GACN,IAAI;EACT;AACF"}
@@ -1,3 +1,4 @@
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); }
1
2
  import React from 'react';
2
3
  import { View } from 'react-native';
3
4
  import { ProgressBar } from 'react-native-paper';
@@ -12,11 +13,10 @@ export default class WmProgressBar extends BaseComponent {
12
13
  }
13
14
  renderWidget(props) {
14
15
  let value = (props.datavalue - props.minvalue) / (props.maxvalue - props.minvalue);
15
- value = Math.round(isNaN(value) ? 0 : value);
16
16
  const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-bar`), this.styles);
17
17
  return /*#__PURE__*/React.createElement(View, {
18
18
  style: styles.root
19
- }, this._background, /*#__PURE__*/React.createElement(Tappable, {
19
+ }, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
20
20
  target: this,
21
21
  styles: {
22
22
  root: {
@@ -24,7 +24,8 @@ export default class WmProgressBar extends BaseComponent {
24
24
  height: '100%'
25
25
  }
26
26
  }
27
- }, /*#__PURE__*/React.createElement(ProgressBar, {
27
+ }), /*#__PURE__*/React.createElement(ProgressBar, {
28
+ testID: this.getTestId('progressbar'),
28
29
  progress: value,
29
30
  color: styles.progressValue.color,
30
31
  style: [styles.progressBar, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","ProgressBar","Tappable","BaseComponent","BaseComponentState","WmProgressBarProps","DEFAULT_CLASS","WmProgressBarState","WmProgressBar","constructor","props","renderWidget","value","datavalue","minvalue","maxvalue","Math","round","isNaN","styles","theme","mergeStyle","getStyle","type","createElement","style","root","_background","target","width","height","progress","color","progressValue","progressBar"],"sources":["progress-bar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ProgressBar } from 'react-native-paper';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmProgressBarProps from './progress-bar.props';\nimport { DEFAULT_CLASS, WmProgressBarStyles } from './progress-bar.styles';\n\nexport class WmProgressBarState extends BaseComponentState<WmProgressBarProps> {}\n\nexport default class WmProgressBar extends BaseComponent<WmProgressBarProps, WmProgressBarState, WmProgressBarStyles> {\n\n constructor(props: WmProgressBarProps) {\n super(props, DEFAULT_CLASS, new WmProgressBarProps());\n }\n\n renderWidget(props: WmProgressBarProps) {\n let value = (props.datavalue - props.minvalue) / (props.maxvalue - props.minvalue);\n value = Math.round(isNaN(value) ? 0 : value);\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-bar`), this.styles);\n return (\n <View style={styles.root}>\n {this._background}\n <Tappable target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <ProgressBar\n progress={value}\n color={styles.progressValue.color}\n style={[styles.progressBar, {height: styles.root.height || styles.progressBar.height}]}></ProgressBar>\n </Tappable>\n </View>); \n }\n\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAA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EACT;AAEF"}
1
+ {"version":3,"names":["React","View","ProgressBar","Tappable","BaseComponent","BaseComponentState","WmProgressBarProps","DEFAULT_CLASS","WmProgressBarState","WmProgressBar","constructor","props","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","createElement","style","root","_background","_extends","getTestPropsForAction","target","width","height","testID","getTestId","progress","color","progressValue","progressBar"],"sources":["progress-bar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ProgressBar } from 'react-native-paper';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmProgressBarProps from './progress-bar.props';\nimport { DEFAULT_CLASS, WmProgressBarStyles } from './progress-bar.styles';\n\nexport class WmProgressBarState extends BaseComponentState<WmProgressBarProps> {}\n\nexport default class WmProgressBar extends BaseComponent<WmProgressBarProps, WmProgressBarState, WmProgressBarStyles> {\n\n constructor(props: WmProgressBarProps) {\n super(props, DEFAULT_CLASS, new WmProgressBarProps());\n }\n\n renderWidget(props: WmProgressBarProps) {\n let value = (props.datavalue - props.minvalue) / (props.maxvalue - props.minvalue);\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-bar`), this.styles);\n return (\n <View style={styles.root}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <ProgressBar\n testID={this.getTestId('progressbar')}\n progress={value}\n color={styles.progressValue.color}\n style={[styles.progressBar, {height: styles.root.height || styles.progressBar.height}]}></ProgressBar>\n </Tappable>\n </View>); \n }\n\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAO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,CAACmB,WAAW,CAACN;MAAM,CAAC;IAAE,CAAc,CAC/F,CACN,CAAC;EACT;AAEF"}
@@ -7,7 +7,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
7
7
  root: {},
8
8
  text: {},
9
9
  progressBar: {
10
- height: 2
10
+ height: 4
11
11
  },
12
12
  progressValue: {}
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","progressBar","height","progressValue","getStyle","color","backgroundColor","alpha","rgb","toString","progressBarDefaultColor","progressBarSuccessColor","progressBarInfoColor","progressBarDangerColor","progressBarWarningColor"],"sources":["progress-bar.styles.ts"],"sourcesContent":["import Color from 'color';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmProgressBarStyles = BaseStyles & {\n progressBar : AllStyle,\n progressValue: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-progress-bar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmProgressBarStyles = defineStyles({\n root: {},\n text: {},\n progressBar: {\n height: 2\n },\n progressValue: {}\n });\n\n const getStyle = (color: string) => ({\n progressBar: {\n backgroundColor: Color(color).alpha(0.2).rgb().toString()\n },\n progressValue: {\n color: color\n }\n } as WmProgressBarStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('app-default-progress-bar', '', getStyle(themeVariables.progressBarDefaultColor));\n addStyle('app-success-progress-bar', '', getStyle(themeVariables.progressBarSuccessColor));\n addStyle('app-info-progress-bar', '', getStyle(themeVariables.progressBarInfoColor));\n addStyle('app-danger-progress-bar', '', getStyle(themeVariables.progressBarDangerColor));\n addStyle('app-warning-progress-bar', '', getStyle(themeVariables.progressBarWarningColor));\n});"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO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Variables","addStyle","defaultStyles","root","text","progressBar","height","progressValue","getStyle","color","backgroundColor","alpha","rgb","toString","progressBarDefaultColor","progressBarSuccessColor","progressBarInfoColor","progressBarDangerColor","progressBarWarningColor"],"sources":["progress-bar.styles.ts"],"sourcesContent":["import Color from 'color';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmProgressBarStyles = BaseStyles & {\n progressBar : AllStyle,\n progressValue: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-progress-bar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmProgressBarStyles = defineStyles({\n root: {},\n text: {},\n progressBar: {\n height: 4\n },\n progressValue: {}\n });\n\n const getStyle = (color: string) => ({\n progressBar: {\n backgroundColor: Color(color).alpha(0.2).rgb().toString()\n },\n progressValue: {\n color: color\n }\n } as WmProgressBarStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('app-default-progress-bar', '', getStyle(themeVariables.progressBarDefaultColor));\n addStyle('app-success-progress-bar', '', getStyle(themeVariables.progressBarSuccessColor));\n addStyle('app-info-progress-bar', '', getStyle(themeVariables.progressBarInfoColor));\n addStyle('app-danger-progress-bar', '', getStyle(themeVariables.progressBarDangerColor));\n addStyle('app-warning-progress-bar', '', getStyle(themeVariables.progressBarWarningColor));\n});"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,kBAAkB;AAC/CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,WAAW,EAAE;MACTC,MAAM,EAAE;IACZ,CAAC;IACDC,aAAa,EAAE,CAAC;EACpB,CAAC,CAAC;EAEF,MAAMC,QAAQ,GAAIC,KAAa,KAAM;IACjCJ,WAAW,EAAE;MACTK,eAAe,EAAEf,KAAK,CAACc,KAAK,CAAC,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;IAC5D,CAAC;IACDN,aAAa,EAAE;MACXE,KAAK,EAAEA;IACX;EACJ,CAAC,CAAwB;EAEzBR,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,0BAA0B,EAAE,EAAE,EAAEO,QAAQ,CAACR,cAAc,CAACc,uBAAuB,CAAC,CAAC;EAC1Fb,QAAQ,CAAC,0BAA0B,EAAE,EAAE,EAAEO,QAAQ,CAACR,cAAc,CAACe,uBAAuB,CAAC,CAAC;EAC1Fd,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAEO,QAAQ,CAACR,cAAc,CAACgB,oBAAoB,CAAC,CAAC;EACpFf,QAAQ,CAAC,yBAAyB,EAAE,EAAE,EAAEO,QAAQ,CAACR,cAAc,CAACiB,sBAAsB,CAAC,CAAC;EACxFhB,QAAQ,CAAC,0BAA0B,EAAE,EAAE,EAAEO,QAAQ,CAACR,cAAc,CAACkB,uBAAuB,CAAC,CAAC;AAC9F,CAAC,CAAC"}
@@ -1,3 +1,4 @@
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); }
1
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -44,7 +45,7 @@ export default class WmProgressCircle extends BaseComponent {
44
45
  return /*#__PURE__*/React.createElement(View, {
45
46
  style: styles.root,
46
47
  onLayout: this.onLayout.bind(this)
47
- }, this._background, /*#__PURE__*/React.createElement(Tappable, {
48
+ }, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
48
49
  target: this,
49
50
  styles: {
50
51
  root: {
@@ -52,7 +53,7 @@ export default class WmProgressCircle extends BaseComponent {
52
53
  height: '100%'
53
54
  }
54
55
  }
55
- }, /*#__PURE__*/React.createElement(AnimatedCircularProgress, {
56
+ }), /*#__PURE__*/React.createElement(AnimatedCircularProgress, {
56
57
  fill: value,
57
58
  width: styles.progressValue.height,
58
59
  backgroundWidth: styles.progressValue.height,
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","arguments","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","style","root","bind","_background","target","fill","progressValue","backgroundWidth","rotation","tintColor","backgroundColor","lineCap","buttStyle","progressCircle","size","alignItems","text","title","subtitle","subTitle"],"sources":["progress-circle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { isNumber } from 'lodash';\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmProgressCircleProps from './progress-circle.props';\nimport { DEFAULT_CLASS, WmProgressCircleStyles } from './progress-circle.styles';\n\n\nexport class WmProgressCircleState extends BaseComponentState<WmProgressCircleProps> {\n radius = 10;\n}\n\nexport default class WmProgressCircle extends BaseComponent<WmProgressCircleProps, WmProgressCircleState, WmProgressCircleStyles> {\n\n constructor(props: WmProgressCircleProps) {\n super(props, DEFAULT_CLASS, new WmProgressCircleProps(), new WmProgressCircleState());\n }\n\n onLayout(e: LayoutChangeEvent) {\n const width = e.nativeEvent.layout.width;\n const height = e.nativeEvent.layout.height;\n let radius = this.state.radius;\n if (!width) {\n radius = height;\n } else if (!height) {\n radius = width;\n } else {\n radius = Math.min(width, height);\n }\n this.updateState({\n radius: radius\n } as WmProgressCircleState);\n }\n\n renderWidget(props: WmProgressCircleProps) {\n let value = 0;\n if (isNumber(props.datavalue) && isNumber(props.minvalue) && isNumber(props.maxvalue)) {\n value = (+props.datavalue - (+props.minvalue)) / (+props.maxvalue - (+props.minvalue)) * 100;\n }\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);\n const showText = props.captionplacement !== 'hidden';\n return (\n <View style={styles.root} onLayout={this.onLayout.bind(this)}>\n {this._background}\n <Tappable target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <AnimatedCircularProgress\n fill={value}\n width={styles.progressValue.height}\n backgroundWidth={styles.progressValue.height}\n rotation={0}\n tintColor={styles.progressValue.backgroundColor}\n lineCap={styles.progressValue.buttStyle || \"butt\"}\n backgroundColor={styles.progressCircle.backgroundColor}\n size={this.state.radius}>\n {(fill) => (<View style={{alignItems: 'center'}}>\n <Text style={styles.text}>{ showText ? props.title || value : '' }</Text>\n {showText && props.subtitle ? (<Text style={styles.subTitle}>{ props.subtitle }</Text>) : null}\n </View>)} \n </AnimatedCircularProgress>\n </Tappable>\n </View>); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,M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ACH,eAAgB;MACvDI,IAAI,EAAE,IAAI,CAAC/B,KAAK,CAACD;IAAO,GACpBuB,IAAI,iBAAM7C,KAAA,CAAAuC,aAAA,CAACtC,IAAI;MAACuC,KAAK,EAAE;QAACe,UAAU,EAAE;MAAQ;IAAE,gBAClCvD,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAER,MAAM,CAACwB;IAAK,GAAGnB,QAAQ,GAAGtB,KAAK,CAAC0C,KAAK,IAAI7B,KAAK,GAAG,EAAU,CAAC,EACxES,QAAQ,IAAItB,KAAK,CAAC2C,QAAQ,gBAAI1D,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAER,MAAM,CAAC2B;IAAS,GAAG5C,KAAK,CAAC2C,QAAgB,CAAC,GAAI,IACtF,CACI,CAClB,CACN,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","arguments","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","style","root","bind","_background","_extends","getTestPropsForAction","target","fill","progressValue","backgroundWidth","rotation","tintColor","backgroundColor","lineCap","buttStyle","progressCircle","size","alignItems","text","title","subtitle","subTitle"],"sources":["progress-circle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { isNumber } from 'lodash';\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmProgressCircleProps from './progress-circle.props';\nimport { DEFAULT_CLASS, WmProgressCircleStyles } from './progress-circle.styles';\n\n\nexport class WmProgressCircleState extends BaseComponentState<WmProgressCircleProps> {\n radius = 10;\n}\n\nexport default class WmProgressCircle extends BaseComponent<WmProgressCircleProps, WmProgressCircleState, WmProgressCircleStyles> {\n\n constructor(props: WmProgressCircleProps) {\n super(props, DEFAULT_CLASS, new WmProgressCircleProps(), new WmProgressCircleState());\n }\n\n onLayout(e: LayoutChangeEvent) {\n const width = e.nativeEvent.layout.width;\n const height = e.nativeEvent.layout.height;\n let radius = this.state.radius;\n if (!width) {\n radius = height;\n } else if (!height) {\n radius = width;\n } else {\n radius = Math.min(width, height);\n }\n this.updateState({\n radius: radius\n } as WmProgressCircleState);\n }\n\n renderWidget(props: WmProgressCircleProps) {\n let value = 0;\n if (isNumber(props.datavalue) && isNumber(props.minvalue) && isNumber(props.maxvalue)) {\n value = (+props.datavalue - (+props.minvalue)) / (+props.maxvalue - (+props.minvalue)) * 100;\n }\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);\n const showText = props.captionplacement !== 'hidden';\n return (\n <View style={styles.root} onLayout={this.onLayout.bind(this)}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <AnimatedCircularProgress\n fill={value}\n width={styles.progressValue.height}\n backgroundWidth={styles.progressValue.height}\n rotation={0}\n tintColor={styles.progressValue.backgroundColor}\n lineCap={styles.progressValue.buttStyle || \"butt\"}\n backgroundColor={styles.progressCircle.backgroundColor}\n size={this.state.radius}>\n {(fill) => (<View style={{alignItems: 'center'}}>\n <Text style={styles.text}>{ showText ? props.title || value : '' }</Text>\n {showText && props.subtitle ? (<Text style={styles.subTitle}>{ props.subtitle }</Text>) : null}\n </View>)} \n </AnimatedCircularProgress>\n </Tappable>\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,QAAQ,QAAQ,QAAQ;AACjC,SAASC,wBA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