@wavemaker/app-rn-runtime 12.0.0-next.45102 → 12.0.0-next.45128

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +31 -5
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  9. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  11. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  12. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  13. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  14. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +20 -6
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/icon/icon.component.js +14 -6
  18. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  19. app-rn-runtime/components/basic/label/label.component.js +13 -3
  20. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  22. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  23. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  24. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  25. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  26. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  27. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  28. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  29. app-rn-runtime/components/basic/search/search.component.js +9 -0
  30. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  31. app-rn-runtime/components/basic/search/search.props.js +2 -0
  32. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  33. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  34. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  35. app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
  36. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  37. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  38. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  39. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  40. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  41. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  42. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  44. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  45. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  46. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  47. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  48. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  49. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  50. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  51. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  52. app-rn-runtime/components/chart/basechart.component.js +54 -2
  53. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  54. app-rn-runtime/components/chart/basechart.props.js +3 -2
  55. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  56. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  57. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  58. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  59. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  60. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  61. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  62. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  63. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  64. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  65. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  66. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  67. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  68. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  69. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  70. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +6 -2
  71. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  72. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  73. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  74. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  75. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  76. app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
  77. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  78. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  79. app-rn-runtime/components/container/accordion/accordion.styles.js +5 -0
  80. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  81. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  82. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  83. app-rn-runtime/components/container/container.component.js +36 -2
  84. app-rn-runtime/components/container/container.component.js.map +1 -1
  85. app-rn-runtime/components/container/container.styles.js +7 -0
  86. app-rn-runtime/components/container/container.styles.js.map +1 -1
  87. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  88. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  89. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  90. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  91. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  92. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  93. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  94. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  95. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  96. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  97. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  98. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  99. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  100. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  101. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  102. app-rn-runtime/components/container/panel/panel.component.js +47 -6
  103. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  104. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  105. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  106. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  107. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  108. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +3 -4
  109. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  110. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  111. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  112. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  113. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  114. app-rn-runtime/components/container/tabs/tabs.component.js +41 -5
  115. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  117. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  118. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  119. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  120. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  121. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  122. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  123. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  124. app-rn-runtime/components/container/wizard/wizard.component.js +62 -13
  125. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  126. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  127. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  128. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  129. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
  130. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  131. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  132. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  133. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  134. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  135. app-rn-runtime/components/data/card/card.component.js +18 -0
  136. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  137. app-rn-runtime/components/data/card/card.styles.js +3 -0
  138. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  139. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  140. app-rn-runtime/components/data/form/form.component.js +1 -1
  141. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form.props.js +1 -0
  143. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  144. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  145. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  146. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  147. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  150. app-rn-runtime/components/data/list/list.component.js +54 -33
  151. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.props.js +1 -0
  153. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.styles.js +9 -0
  155. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  156. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  157. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  158. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  159. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  160. app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
  161. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  162. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  163. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  164. app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
  165. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  166. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  167. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  168. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
  169. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  170. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  171. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
  172. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  173. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  174. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  175. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  176. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  177. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  178. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  179. app-rn-runtime/components/input/currency/currency.component.js +16 -1
  180. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  181. app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
  182. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  183. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  184. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  185. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  187. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  189. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  190. app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
  191. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  192. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
  193. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  194. app-rn-runtime/components/input/number/number.component.js +6 -3
  195. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  196. app-rn-runtime/components/input/radioset/radioset.component.js +27 -7
  197. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  198. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  199. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  200. app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
  201. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  202. app-rn-runtime/components/input/select/select.component.js +23 -9
  203. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  204. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  205. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  206. app-rn-runtime/components/input/text/text.component.js +21 -0
  207. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  208. app-rn-runtime/components/input/text/text.props.js +2 -0
  209. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  210. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  211. app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
  212. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  213. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  214. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  215. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  216. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  217. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  218. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  219. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  220. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  221. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  222. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  223. app-rn-runtime/components/page/content/content.component.js +19 -4
  224. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  225. app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
  226. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  227. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  228. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  229. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  230. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  231. app-rn-runtime/components/page/page.component.js.map +1 -1
  232. app-rn-runtime/components/page/page.props.js.map +1 -1
  233. app-rn-runtime/components/page/page.styles.js +7 -1
  234. app-rn-runtime/components/page/page.styles.js.map +1 -1
  235. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  236. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  237. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  238. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  239. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  240. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  241. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  242. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  243. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  244. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  245. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  246. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  247. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  248. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  249. app-rn-runtime/core/base.component.js +5 -3
  250. app-rn-runtime/core/base.component.js.map +1 -1
  251. app-rn-runtime/core/components/textinput.component.js +4 -3
  252. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  253. app-rn-runtime/core/formatters.js.map +1 -1
  254. app-rn-runtime/core/key.extractor.js.map +1 -1
  255. app-rn-runtime/core/props.provider.js +4 -1
  256. app-rn-runtime/core/props.provider.js.map +1 -1
  257. app-rn-runtime/core/storage.service.js.map +1 -1
  258. app-rn-runtime/core/tappable.component.js +34 -27
  259. app-rn-runtime/core/tappable.component.js.map +1 -1
  260. app-rn-runtime/core/ui-preferences.context.js +7 -0
  261. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  262. app-rn-runtime/core/utils.js +87 -4
  263. app-rn-runtime/core/utils.js.map +1 -1
  264. app-rn-runtime/package.json +30 -7
  265. app-rn-runtime/runtime/App.js +4 -8
  266. app-rn-runtime/runtime/App.js.map +1 -1
  267. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  268. app-rn-runtime/runtime/base-fragment.component.js +43 -13
  269. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  270. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  271. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  272. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  273. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  274. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  275. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  276. app-rn-runtime/runtime/services/app-security.service.js +42 -2
  277. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  278. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  279. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  280. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  281. app-rn-runtime/runtime/watcher.js.map +1 -1
  282. app-rn-runtime/styles/background.component.js +1 -0
  283. app-rn-runtime/styles/background.component.js.map +1 -1
  284. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  285. app-rn-runtime/styles/theme.js +5 -0
  286. app-rn-runtime/styles/theme.js.map +1 -1
  287. app-rn-runtime/styles/theme.variables.js +1 -0
  288. app-rn-runtime/styles/theme.variables.js.map +1 -1
  289. app-rn-runtime/variables/base-variable.js.map +1 -1
  290. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  291. app-rn-runtime/variables/device-variable.js.map +1 -1
  292. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","Text","View","Slider","isString","Audio","BaseComponent","BaseComponentState","WmAudioProps","DEFAULT_CLASS","WmIcon","isWebPreviewMode","WmAudioState","constructor","args","_defineProperty","WmAudio","props","onPropertyChange","name","$new","$old","initialized","Promise","resolve","then","_this$sound","sound","unloadAsync","onSeekChange","state","playing","autoplay","play","getSource","source","loadAsset","mp3format","uri","addPadding","str","maxLen","pad","length","formatTime","v","t","mins","Math","floor","seconds","round","setTimer","cancelTimer","timer","setInterval","currentTime","totalTime","loop","replay","stop","setState","max","offsetTime","clearInterval","_this$sound2","pause","updateState","replayAsync","loading","playAsync","Sound","createAsync","isMuted","muted","res","getStatusAsync","status","catch","_this$sound3","pauseAsync","mute","setStatusAsync","unmute","time","_this$sound4","setPositionAsync","componentDidMount","setTimeout","componentWillUnmount","renderWidget","controls","createElement","style","styles","root","_background","id","getTestId","playIcon","iconclass","onTap","pauseIcon","text","testID","step","flex","value","disabled","onValueChange","bind","minimumValue","inverted","isRTL","OS","maximumValue","thumbTintColor","slider","thumb","backgroundColor","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack","muteIcon","unmuteIcon"],"sources":["audio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Slider from '@react-native-community/slider';\nimport { isString } from 'lodash-es';\nimport { Audio } from 'expo-av';\nimport { Sound } from 'expo-av/build/Audio';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmAudioProps from './audio.props';\nimport { DEFAULT_CLASS, WmAudioStyles } from './audio.styles';\nimport WmIcon from '../icon/icon.component';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAudioState extends BaseComponentState<WmAudioProps> {\n playing = false;\n currentTime = 0;\n totalTime = 0;\n}\n\nexport default class WmAudio extends BaseComponent<WmAudioProps, WmAudioState, WmAudioStyles> {\n\n private loading = false;\n private sound: Sound = null as any;\n private timer: any;\n private offsetTime = 0;\n\n constructor(props: WmAudioProps) {\n super(props, DEFAULT_CLASS, new WmAudioProps(), new WmAudioState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'mp3format': {\n if (this.initialized) {\n Promise.resolve()\n .then(() => this.sound?.unloadAsync())\n .then(() => {\n this.sound = null as any;\n this.onSeekChange(0);\n if (this.state.playing \n || this.state.props.autoplay) {\n this.play();\n }\n });\n }\n }\n break;\n case 'autoplay':\n if (this.initialized && $new) {\n this.play();\n }\n }\n }\n\n getSource() {\n const source = this.loadAsset \n && this.state.props.mp3format\n && this.loadAsset(this.state.props.mp3format as string);\n if (isString(source)) {\n return {\n uri: source\n };\n }\n return source;\n }\n\n addPadding(str: string, maxLen: number, pad = '0'): string {\n if (str.length < maxLen) {\n return this.addPadding(pad + str, maxLen, pad);\n }\n return str;\n }\n\n formatTime(v: number) {\n const t = v/60;\n const mins = Math.floor(t);\n const seconds = Math.round((t - mins) * 60);\n return this.addPadding(mins+ '', 2) + ':' + this.addPadding(seconds+ '', 2);\n }\n\n setTimer() {\n this.cancelTimer();\n this.timer = setInterval(() => {\n if (this.state.currentTime >= this.state.totalTime) {\n if (this.state.props.loop) {\n this.replay();\n } else {\n this.stop();\n }\n return;\n }\n this.setState({\n currentTime: Math.max(this.offsetTime + this.state.currentTime + 1, 0)\n } as WmAudioState);\n this.offsetTime = 0;\n }, 1000);\n }\n\n cancelTimer() {\n clearInterval(this.timer);\n }\n\n stop() {\n this.pause();\n this.sound?.unloadAsync();\n this.sound = null as any;\n this.cancelTimer();\n this.offsetTime = 0;\n this.updateState({\n currentTime: 0\n } as WmAudioState);\n }\n\n replay() {\n this.updateState({\n currentTime: 0\n } as WmAudioState, () => {\n this.sound.replayAsync();\n });\n }\n\n play() {\n if (isWebPreviewMode() \n || this.loading\n || (this.state.playing && this.sound)) {\n return;\n }\n if (this.sound) {\n this.sound.playAsync();\n this.setTimer();\n this.updateState({\n playing: true\n } as WmAudioState);\n } else {\n this.loading = true;\n const source = this.getSource();\n source && Audio.Sound.createAsync(source, {\n isMuted: this.state.props.muted\n })\n .then((res) => {\n this.sound = res.sound;\n this.sound.playAsync();\n this.sound.getStatusAsync().then((status: any) => {\n this.updateState({\n currentTime: 0,\n totalTime: Math.round(status['durationMillis']/1000)\n } as WmAudioState, () => this.setTimer());\n });\n this.updateState({\n playing: true\n } as WmAudioState);\n }).catch(() => {}).then(() => {\n this.loading = false;\n });\n }\n }\n\n pause() {\n this.cancelTimer();\n this.sound?.pauseAsync().then(() => {\n this.updateState({\n playing: false\n } as WmAudioState);\n })\n }\n\n mute() {\n this.sound.setStatusAsync({\n isMuted: true\n }).then(() => {\n this.updateState({\n props: {\n muted: true\n }\n } as WmAudioState);\n });\n }\n\n unmute() {\n this.sound.setStatusAsync({\n isMuted: false\n }).then(() => {\n this.updateState({\n props: {\n muted: false\n }\n } as WmAudioState);\n });\n }\n\n onSeekChange(time: number) {\n if (time !== this.state.currentTime) {\n this.offsetTime = time - this.state.currentTime;\n this.sound?.setPositionAsync(time * 1000);\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n //without settimeout, app is crashing with errors\n setTimeout(() => {\n if (this.state.props.autoplay) {\n this.play();\n }\n }, 1000);\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stop();\n }\n\n renderWidget(props: WmAudioProps) {\n return props.controls ? (\n <View style={this.styles.root}>\n {this._background}\n {!this.state.playing ? (<WmIcon \n id={this.getTestId('play')}\n name={props.name + \"_play\"}\n styles={this.styles.playIcon}\n iconclass=\"wi wi-play-arrow fa-2x\"\n onTap={() => this.play()}></WmIcon>) : (\n <WmIcon name={props.name + \"_pause\"}\n id={this.getTestId('pause')}\n iconclass=\"wi wi-pause fa-2x\"\n styles={this.styles.pauseIcon}\n onTap={() => this.pause()}></WmIcon>)}\n <Text style={this.styles.text}>\n {`${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`}\n </Text>\n <Slider\n testID={this.getTestId('slider')}\n step={1}\n style={{flex: 1}}\n value={this.state.currentTime}\n disabled={isWebPreviewMode()}\n onValueChange={this.onSeekChange.bind(this)}\n minimumValue={0}\n inverted={this.isRTL && (Platform.OS==\"android\" || Platform.OS==\"web\")}\n maximumValue={this.state.totalTime || 1}\n thumbTintColor={this.styles.slider.thumb.backgroundColor as string}\n minimumTrackTintColor={this.styles.slider.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.slider.maximumTrack.backgroundColor as string}\n />\n {!props.muted ? (<WmIcon name={props.name + \"_mute\"}\n id={this.getTestId('mute')}\n iconclass=\"wi wi-volume-up fa-2x\"\n styles={this.styles.muteIcon}\n onTap={() => this.mute()}></WmIcon>) :\n (<WmIcon name={props.name + \"_unmute\"}\n id={this.getTestId('unmute')}\n iconclass=\"wi wi-volume-off fa-2x\"\n styles={this.styles.unmuteIcon}\n onTap={() => this.unmute()}></WmIcon>)}\n </View>) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACnD,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACvD,KAAK;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,oBACH,CAAC;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASV,aAAa,CAA4C;EAO5FO,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CA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AE,IAAE,SAAS,IAAIlH,QAAQ,CAACkH,EAAE,IAAE,KAAK,CAAE;MACvEC,YAAY,EAAE,IAAI,CAACrF,KAAK,CAAC2B,SAAS,IAAI,CAAE;MACxC2D,cAAc,EAAE,IAAI,CAACtB,MAAM,CAACuB,MAAM,CAACC,KAAK,CAACC,eAA0B;MACnEC,qBAAqB,EAAE,IAAI,CAAC1B,MAAM,CAACuB,MAAM,CAACI,YAAY,CAACF,eAA0B;MACjFG,qBAAqB,EAAE,IAAI,CAAC5B,MAAM,CAACuB,MAAM,CAACM,YAAY,CAACJ;IAA0B,CAClF,CAAC,EACD,CAACtG,KAAK,CAACyD,KAAK,gBAAI3E,KAAA,CAAA6F,aAAA,CAAClF,MAAM;MAACS,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,OAAQ;MAClD8E,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC3BE,SAAS,EAAC,uBAAuB;MACjCN,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC8B,QAAS;MAC7BvB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAACpB,IAAI,CAAC;IAAE,CAAS,CAAC,gBACpClF,KAAA,CAAA6F,aAAA,CAAClF,MAAM;MAACS,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,SAAU;MACpC8E,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,QAAQ,CAAE;MAC7BE,SAAS,EAAC,wBAAwB;MAClCN,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC+B,UAAW;MAC/BxB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAAClB,MAAM,CAAC;IAAE,CAAS,CAClC,CAAC,GAAI,IAAI;EACnB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","Text","View","Slider","isString","Audio","BaseComponent","BaseComponentState","WmAudioProps","DEFAULT_CLASS","WmIcon","isWebPreviewMode","WmAudioState","constructor","args","_defineProperty","WmAudio","props","onPropertyChange","name","$new","$old","initialized","Promise","resolve","then","_this$sound","sound","unloadAsync","onSeekChange","state","playing","autoplay","play","getSource","source","loadAsset","mp3format","uri","addPadding","str","maxLen","pad","length","formatTime","v","t","mins","Math","floor","seconds","round","setTimer","cancelTimer","timer","setInterval","currentTime","totalTime","loop","replay","stop","setState","max","offsetTime","clearInterval","_this$sound2","pause","updateState","replayAsync","loading","playAsync","Sound","createAsync","isMuted","muted","res","getStatusAsync","status","catch","_this$sound3","pauseAsync","mute","setStatusAsync","unmute","time","_this$sound4","setPositionAsync","componentDidMount","setTimeout","componentWillUnmount","renderWidget","controls","createElement","style","styles","root","_background","id","getTestId","playIcon","iconclass","onTap","pauseIcon","text","testID","step","flex","value","disabled","onValueChange","bind","minimumValue","inverted","isRTL","OS","maximumValue","thumbTintColor","slider","thumb","backgroundColor","minimumTrackTintColor","minimumTrack","maximumTrackTintColor","maximumTrack","muteIcon","unmuteIcon"],"sources":["audio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Slider from '@react-native-community/slider';\nimport { isString } from 'lodash-es';\nimport { Audio } from 'expo-av';\nimport { Sound } from 'expo-av/build/Audio';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmAudioProps from './audio.props';\nimport { DEFAULT_CLASS, WmAudioStyles } from './audio.styles';\nimport WmIcon from '../icon/icon.component';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAudioState extends BaseComponentState<WmAudioProps> {\n playing = false;\n currentTime = 0;\n totalTime = 0;\n}\n\nexport default class WmAudio extends BaseComponent<WmAudioProps, WmAudioState, WmAudioStyles> {\n\n private loading = false;\n private sound: Sound = null as any;\n private timer: any;\n private offsetTime = 0;\n\n constructor(props: WmAudioProps) {\n super(props, DEFAULT_CLASS, new WmAudioProps(), new WmAudioState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'mp3format': {\n if (this.initialized) {\n Promise.resolve()\n .then(() => this.sound?.unloadAsync())\n .then(() => {\n this.sound = null as any;\n this.onSeekChange(0);\n if (this.state.playing \n || this.state.props.autoplay) {\n this.play();\n }\n });\n }\n }\n break;\n case 'autoplay':\n if (this.initialized && $new) {\n this.play();\n }\n }\n }\n\n getSource() {\n const source = this.loadAsset \n && this.state.props.mp3format\n && this.loadAsset(this.state.props.mp3format as string);\n if (isString(source)) {\n return {\n uri: source\n };\n }\n return source;\n }\n\n addPadding(str: string, maxLen: number, pad = '0'): string {\n if (str.length < maxLen) {\n return this.addPadding(pad + str, maxLen, pad);\n }\n return str;\n }\n\n formatTime(v: number) {\n const t = v/60;\n const mins = Math.floor(t);\n const seconds = Math.round((t - mins) * 60);\n return this.addPadding(mins+ '', 2) + ':' + this.addPadding(seconds+ '', 2);\n }\n\n setTimer() {\n this.cancelTimer();\n this.timer = setInterval(() => {\n if (this.state.currentTime >= this.state.totalTime) {\n if (this.state.props.loop) {\n this.replay();\n } else {\n this.stop();\n }\n return;\n }\n this.setState({\n currentTime: Math.max(this.offsetTime + this.state.currentTime + 1, 0)\n } as WmAudioState);\n this.offsetTime = 0;\n }, 1000);\n }\n\n cancelTimer() {\n clearInterval(this.timer);\n }\n\n stop() {\n this.pause();\n this.sound?.unloadAsync();\n this.sound = null as any;\n this.cancelTimer();\n this.offsetTime = 0;\n this.updateState({\n currentTime: 0\n } as WmAudioState);\n }\n\n replay() {\n this.updateState({\n currentTime: 0\n } as WmAudioState, () => {\n this.sound.replayAsync();\n });\n }\n\n play() {\n if (isWebPreviewMode() \n || this.loading\n || (this.state.playing && this.sound)) {\n return;\n }\n if (this.sound) {\n this.sound.playAsync();\n this.setTimer();\n this.updateState({\n playing: true\n } as WmAudioState);\n } else {\n this.loading = true;\n const source = this.getSource();\n source && Audio.Sound.createAsync(source, {\n isMuted: this.state.props.muted\n })\n .then((res) => {\n this.sound = res.sound;\n this.sound.playAsync();\n this.sound.getStatusAsync().then((status: any) => {\n this.updateState({\n currentTime: 0,\n totalTime: Math.round(status['durationMillis']/1000)\n } as WmAudioState, () => this.setTimer());\n });\n this.updateState({\n playing: true\n } as WmAudioState);\n }).catch(() => {}).then(() => {\n this.loading = false;\n });\n }\n }\n\n pause() {\n this.cancelTimer();\n this.sound?.pauseAsync().then(() => {\n this.updateState({\n playing: false\n } as WmAudioState);\n })\n }\n\n mute() {\n this.sound.setStatusAsync({\n isMuted: true\n }).then(() => {\n this.updateState({\n props: {\n muted: true\n }\n } as WmAudioState);\n });\n }\n\n unmute() {\n this.sound.setStatusAsync({\n isMuted: false\n }).then(() => {\n this.updateState({\n props: {\n muted: false\n }\n } as WmAudioState);\n });\n }\n\n onSeekChange(time: number) {\n if (time !== this.state.currentTime) {\n this.offsetTime = time - this.state.currentTime;\n this.sound?.setPositionAsync(time * 1000);\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n //without settimeout, app is crashing with errors\n setTimeout(() => {\n if (this.state.props.autoplay) {\n this.play();\n }\n }, 1000);\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stop();\n }\n\n renderWidget(props: WmAudioProps) {\n return props.controls ? (\n <View style={this.styles.root}>\n {this._background}\n {!this.state.playing ? (<WmIcon \n id={this.getTestId('play')}\n name={props.name + \"_play\"}\n styles={this.styles.playIcon}\n iconclass=\"wi wi-play-arrow fa-2x\"\n onTap={() => this.play()}></WmIcon>) : (\n <WmIcon name={props.name + \"_pause\"}\n id={this.getTestId('pause')}\n iconclass=\"wi wi-pause fa-2x\"\n styles={this.styles.pauseIcon}\n onTap={() => this.pause()}></WmIcon>)}\n <Text style={this.styles.text}>\n {`${this.formatTime(this.state.currentTime)} / ${this.formatTime(this.state.totalTime)}`}\n </Text>\n <Slider\n testID={this.getTestId('slider')}\n step={1}\n style={{flex: 1}}\n value={this.state.currentTime}\n disabled={isWebPreviewMode()}\n onValueChange={this.onSeekChange.bind(this)}\n minimumValue={0}\n inverted={this.isRTL && (Platform.OS==\"android\" || Platform.OS==\"web\")}\n maximumValue={this.state.totalTime || 1}\n thumbTintColor={this.styles.slider.thumb.backgroundColor as string}\n minimumTrackTintColor={this.styles.slider.minimumTrack.backgroundColor as string}\n maximumTrackTintColor={this.styles.slider.maximumTrack.backgroundColor as string}\n />\n {!props.muted ? (<WmIcon name={props.name + \"_mute\"}\n id={this.getTestId('mute')}\n iconclass=\"wi wi-volume-up fa-2x\"\n styles={this.styles.muteIcon}\n onTap={() => this.mute()}></WmIcon>) :\n (<WmIcon name={props.name + \"_unmute\"}\n id={this.getTestId('unmute')}\n iconclass=\"wi wi-volume-off fa-2x\"\n styles={this.styles.unmuteIcon}\n onTap={() => this.unmute()}></WmIcon>)}\n </View>) : null; \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACnD,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACvD,KAAK;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,oBACH,CAAC;EAAA;AACf;AAEA,eAAe,MAAMC,OAAO,SAASV,aAAa,CAA4C;EAO5FO,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAII,YAAY,CAAC,CAAC,CAAC;IAACG,eAAA,kBANpD,KAAK;IAAAA,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AE,IAAI,CAACrF,KAAK,CAAC2B,SAAS,IAAI,CAAE;MACxC2D,cAAc,EAAE,IAAI,CAACtB,MAAM,CAACuB,MAAM,CAACC,KAAK,CAACC,eAA0B;MACnEC,qBAAqB,EAAE,IAAI,CAAC1B,MAAM,CAACuB,MAAM,CAACI,YAAY,CAACF,eAA0B;MACjFG,qBAAqB,EAAE,IAAI,CAAC5B,MAAM,CAACuB,MAAM,CAACM,YAAY,CAACJ;IAA0B,CAClF,CAAC,EACD,CAACtG,KAAK,CAACyD,KAAK,gBAAI3E,KAAA,CAAA6F,aAAA,CAAClF,MAAM;MAACS,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,OAAQ;MAClD8E,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC3BE,SAAS,EAAC,uBAAuB;MACjCN,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC8B,QAAS;MAC7BvB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAACpB,IAAI,CAAC;IAAE,CAAS,CAAC,gBACpClF,KAAA,CAAA6F,aAAA,CAAClF,MAAM;MAACS,IAAI,EAAEF,KAAK,CAACE,IAAI,GAAG,SAAU;MACpC8E,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,QAAQ,CAAE;MAC7BE,SAAS,EAAC,wBAAwB;MAClCN,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC+B,UAAW;MAC/BxB,KAAK,EAAEA,CAAA,KAAM,IAAI,CAAClB,MAAM,CAAC;IAAE,CAAS,CAClC,CAAC,GAAI,IAAI;EACnB;AACF","ignoreList":[]}
@@ -25,7 +25,8 @@ export default class WmButton extends BaseComponent {
25
25
  iconmargin,
26
26
  iconwidth
27
27
  }) {
28
- return iconclass || iconurl ? /*#__PURE__*/React.createElement(WmIcon, _extends({}, this.getTestPropsForLabel('icon'), {
28
+ return iconclass || iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
29
+ id: this.getTestId('icon'),
29
30
  hint: hint,
30
31
  styles: this.styles.icon,
31
32
  name: `${name}_icon`,
@@ -35,19 +36,32 @@ export default class WmButton extends BaseComponent {
35
36
  iconheight: iconheight,
36
37
  iconmargin: iconmargin,
37
38
  iconwidth: iconwidth
38
- })) : null;
39
+ }) : null;
39
40
  }
40
41
  prepareBadge(props) {
41
42
  //@ts-ignore
42
- return /*#__PURE__*/React.createElement(Badge, {
43
+ return /*#__PURE__*/React.createElement(Badge, _extends({
43
44
  style: this.styles.badge
44
- }, props.badgevalue);
45
+ }, this.getTestProps('badge')), props.badgevalue);
45
46
  }
46
47
  renderSkeleton(prop) {
48
+ let skeletonWidth, skeletonHeight;
49
+ if (this.props.skeletonwidth == "0") {
50
+ skeletonWidth = 0;
51
+ } else {
52
+ var _this$styles$root;
53
+ skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
54
+ }
55
+ if (this.props.skeletonheight == "0") {
56
+ skeletonHeight = 0;
57
+ } else {
58
+ var _this$styles$root2;
59
+ skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height);
60
+ }
47
61
  return createSkeleton(this.theme, this.styles.skeleton, {
48
62
  ...this.styles.root,
49
- width: this.props.skeletonwidth || this.styles.root.width,
50
- height: this.props.skeletonheight || this.styles.root.height
63
+ width: skeletonWidth,
64
+ height: skeletonHeight
51
65
  });
52
66
  }
53
67
  renderWidget(props) {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","iconurl","hint","name","iconsize","iconheight","iconmargin","iconwidth","createElement","_extends","getTestPropsForLabel","styles","icon","prepareBadge","style","badge","badgevalue","renderSkeleton","prop","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","Fragment","entryanimation","animation","delay","animationdelay","paddingTop","paddingBottom","paddingLeft","paddingRight","overflow","flexDirection","flex","_background","justifyContent","rippleColor","target","getTestPropsForAction","accessibilityProps","BUTTON","content","iconposition","caption","text","importantForAccessibility"],"sources":["button.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 { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon({\n iconclass,\n iconurl,\n hint,\n name,\n iconsize,\n iconheight,\n iconmargin,\n iconwidth,\n }: any) {\n return iconclass || iconurl\n ? (<WmIcon\n {...this.getTestPropsForLabel('icon')}\n hint={hint}\n styles={this.styles.icon}\n name={`${name}_icon`}\n iconclass={iconclass}\n iconsize={iconsize}\n iconurl={iconurl}\n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />): null;\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.styles.root.width)as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay}\n style={[\n this.styles.root,\n {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n overflow: 'hidden',\n flexDirection: 'column'\n },\n this.styles.root.height == \"100%\" ? {flex: 1}:{}\n ]}\n // accessibilityProps={{...getAccessibilityProps(\n // AccessibilityWidgetType.BUTTON,\n // props\n // )}}\n >\n {this._background}\n <Tappable\n styles={{\n paddingTop: this.styles.root.paddingTop,\n paddingBottom: this.styles.root.paddingBottom,\n paddingLeft: this.styles.root.paddingLeft,\n paddingRight: this.styles.root.paddingRight,\n width: '100%',\n height: this.styles.root.height ? '100%' : null,\n justifyContent: 'center',\n }}\n rippleColor = {this.styles.root.rippleColor}\n target={this}\n {...this.getTestPropsForAction()}\n accessibilityProps={{...getAccessibilityProps(\n AccessibilityWidgetType.BUTTON,\n props\n )}}>\n <View\n style={[\n this.styles.content,\n { flexDirection: props.iconposition === 'top' ? 'column' : 'row' }\n ]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n {props.caption ? (\n <Text\n style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n importantForAccessibility={'no'}\n // accessibilityLabel={`${props.caption}`}\n >\n {props.caption}\n </Text>\n ) : null}\n {props.iconposition === 'right' && this.prepareIcon(props)}\n </View>\n </Tappable>\n </Animatedview>\n {props.badgevalue && this.prepareBadge(props)}\n </>\n );\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;AAC5E,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,a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aseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","iconurl","hint","name","iconsize","iconheight","iconmargin","iconwidth","createElement","id","getTestId","styles","icon","prepareBadge","_extends","style","badge","getTestProps","badgevalue","renderSkeleton","prop","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","Fragment","entryanimation","animation","delay","animationdelay","paddingTop","paddingBottom","paddingLeft","paddingRight","overflow","flexDirection","flex","_background","justifyContent","rippleColor","target","getTestPropsForAction","accessibilityProps","BUTTON","content","iconposition","caption","text","getTestPropsForLabel","importantForAccessibility"],"sources":["button.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 { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon({\n iconclass,\n iconurl,\n hint,\n name,\n iconsize,\n iconheight,\n iconmargin,\n iconwidth,\n }: any) {\n return iconclass || iconurl\n ? (<WmIcon\n id={this.getTestId('icon')}\n hint={hint}\n styles={this.styles.icon}\n name={`${name}_icon`}\n iconclass={iconclass}\n iconsize={iconsize}\n iconurl={iconurl}\n iconheight={iconheight}\n iconmargin={iconmargin}\n iconwidth={iconwidth}\n />): null;\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge} {...this.getTestProps('badge')}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n let skeletonWidth, skeletonHeight;\n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n \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 renderWidget(props: WmButtonProps) {\n return (\n <>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay}\n style={[\n this.styles.root,\n {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n overflow: 'hidden',\n flexDirection: 'column'\n },\n this.styles.root.height == \"100%\" ? {flex: 1}:{}\n ]}\n // accessibilityProps={{...getAccessibilityProps(\n // AccessibilityWidgetType.BUTTON,\n // props\n // )}}\n >\n {this._background}\n <Tappable\n styles={{\n paddingTop: this.styles.root.paddingTop,\n paddingBottom: this.styles.root.paddingBottom,\n paddingLeft: this.styles.root.paddingLeft,\n paddingRight: this.styles.root.paddingRight,\n width: '100%',\n height: this.styles.root.height ? '100%' : null,\n justifyContent: 'center',\n }}\n rippleColor = {this.styles.root.rippleColor}\n target={this}\n {...this.getTestPropsForAction()}\n accessibilityProps={{...getAccessibilityProps(\n AccessibilityWidgetType.BUTTON,\n props\n )}}>\n <View\n style={[\n this.styles.content,\n { flexDirection: props.iconposition === 'top' ? 'column' : 'row' }\n ]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n {props.caption ? (\n <Text\n style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}\n importantForAccessibility={'no'}\n // accessibilityLabel={`${props.caption}`}\n >\n {props.caption}\n </Text>\n ) : null}\n {props.iconposition === 'right' && this.prepareIcon(props)}\n </View>\n </Tappable>\n </Animatedview>\n {props.badgevalue && this.prepareBadge(props)}\n </>\n );\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;AAC5E,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,aAAa,SAASV,kBAAkB,CAAgB;AAIrE,eAAe,MAAMW,QAAQ,SAASZ,aAAa,CAA+C;EAEhGa,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;EAClD;EAEQW,WAAWA,CAAC;IAClBC,SAAS;IACTC,OAAO;IACPC,IAAI;IACJC,IAAI;IACJC,QAAQ;IACRC,UAAU;IACVC,UAAU;IACVC;EACG,CAAC,EAAE;IACN,OAAOP,SAAS,IAAIC,OAAO,gBACtBpB,KAAA,CAAA2B,aAAA,CAAClB,MAAM;MACNmB,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC3BR,IAAI,EAAEA,IAAK;MACXS,MAAM,EAAE,IAAI,CAACA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Y;MAC5CC,MAAM,EAAE;IAAK,GACT,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAChCC,kBAAkB,EAAE;QAAC,GAAGxD,qBAAqB,CAC3CD,uBAAuB,CAAC0D,MAAM,EAC9BrD,KACF;MAAC;IAAE,iBACHjB,KAAA,CAAA2B,aAAA,CAACzB,IAAI;MACHgC,KAAK,EAAE,CACL,IAAI,CAACJ,MAAM,CAACyC,OAAO,EACnB;QAAET,aAAa,EAAE7C,KAAK,CAACuD,YAAY,KAAK,KAAK,GAAG,QAAQ,GAAG;MAAM,CAAC;IAClE,GACDvD,KAAK,CAACuD,YAAY,KAAK,KAAK,IAAI,IAAI,CAACtD,WAAW,CAACD,KAAK,CAAC,EACvDA,KAAK,CAACuD,YAAY,KAAK,MAAM,IAAI,IAAI,CAACtD,WAAW,CAACD,KAAK,CAAC,EACxDA,KAAK,CAACwD,OAAO,gBACZzE,KAAA,CAAA2B,aAAA,CAAC1B,IAAI,EAAAgC,QAAA;MACHC,KAAK,EAAE,IAAI,CAACJ,MAAM,CAAC4C;IAAK,GACpB,IAAI,CAACC,oBAAoB,CAAC,SAAS,CAAC;MACxCC,yBAAyB,EAAE;MAC3B;IAAA,IAEC3D,KAAK,CAACwD,OACH,CAAC,GACL,IAAI,EACPxD,KAAK,CAACuD,YAAY,KAAK,OAAO,IAAI,IAAI,CAACtD,WAAW,CAACD,KAAK,CACrD,CACE,CACE,CAAC,EACdA,KAAK,CAACoB,UAAU,IAAI,IAAI,CAACL,YAAY,CAACf,KAAK,CAC1C,CAAC;EAEP;AACF","ignoreList":[]}
@@ -108,10 +108,18 @@ export default class WmIcon extends BaseComponent {
108
108
  return null;
109
109
  }
110
110
  renderSkeleton(props) {
111
+ let skeletonWidth = this.props.skeletonwidth || this.props.iconsize || this.styles.root.width;
112
+ let skeletonHeight = this.props.skeletonheight || this.props.iconsize || this.styles.root.height;
113
+ if (this.props.skeletonheight == "0") {
114
+ skeletonWidth = 0;
115
+ }
116
+ if (this.props.skeletonheight == "0") {
117
+ skeletonHeight = 0;
118
+ }
111
119
  return createSkeleton(this.theme, this.styles.skeleton, {
112
120
  ...this.styles.root,
113
- width: this.props.skeletonwidth || this.props.iconsize || this.styles.root.width,
114
- height: this.props.skeletonheight || this.props.iconsize || this.styles.root.height
121
+ width: skeletonWidth,
122
+ height: skeletonHeight
115
123
  });
116
124
  }
117
125
  getElementToShow(props, iconSrc) {
@@ -179,11 +187,11 @@ export default class WmIcon extends BaseComponent {
179
187
  const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;
180
188
  if (props.show && iconDef && iconDef.isFontAwesome) {
181
189
  //@ts-ignore type information is not matching
182
- iconJsx = /*#__PURE__*/React.createElement(FontAwesome, {
190
+ iconJsx = /*#__PURE__*/React.createElement(FontAwesome, _extends({
183
191
  name: customIcon ? '' : iconDef.type,
184
192
  style: style,
185
193
  size: iconSize
186
- }, customIcon);
194
+ }, this.getTestProps('icon')), customIcon);
187
195
  } else if (props.show && iconDef) {
188
196
  var _this$styles$icon;
189
197
  let WMCustomIcon = WavIcon;
@@ -195,11 +203,11 @@ export default class WmIcon extends BaseComponent {
195
203
  return null;
196
204
  }
197
205
  //@ts-ignore type information is not matching
198
- iconJsx = WMCustomIcon ? /*#__PURE__*/React.createElement(WMCustomIcon, {
206
+ iconJsx = WMCustomIcon ? /*#__PURE__*/React.createElement(WMCustomIcon, _extends({
199
207
  name: customIcon ? '' : iconDef.type,
200
208
  style: style,
201
209
  size: iconSize
202
- }, customIcon) : null;
210
+ }, this.getTestProps('icon')), customIcon) : null;
203
211
  }
204
212
  if (iconJsx && iconDef.animation === 'spin') {
205
213
  const rotate = this.spinValue.interpolate({
@@ -1 +1 @@
1
- {"version":3,"names":["React","Animated","Easing","Text","Image","View","FontAwesome","BaseComponent","BaseComponentState","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmIconProps","DEFAULT_CLASS","WavIcon","StreamlineLightIcon","StreamlineRegularIcon","Tappable","Animatedview","createSkeleton","ICON_SIZES","Map","ICON_ROTATTION","WmIconState","constructor","args","_defineProperty","WmIcon","props","Value","getIconDef","iconClass","iconDef","rotate","splits","split","isFontAwesome","find","v","isStreamlineLightIcon","isStreamlineRegularIcon","_splits$find","type","startsWith","substring","_splits$find2","_splits$find3","_splits$find4","isWavIcon","indexOf","animation","size","map","get","spin","stopAnimation","spinValue","setValue","timing","toValue","duration","easing","linear","useNativeDriver","start","componentDidMount","componentWillUnmount","onPropertyChange","name","$new","$old","updateState","getCustomIcon","style","_this$theme$getStyle","customIcon","theme","mergeStyle","getStyle","iconclass","icon","styles","customIconContent","content","createElement","fontFamily","decodeURIComponent","renderSkeleton","skeleton","root","width","skeletonwidth","iconsize","height","skeletonheight","getElementToShow","iconSrc","iconmargin","iconheight","iconwidth","elementToshow","source","uri","testID","getTestId","margin","loadIcon","iconImage","loadAsset","iconImageSrc","renderIcon","iconJsx","_iconSource","iconurl","state","text","color","transform","iconSize","fontSize","show","_this$styles$icon","WMCustomIcon","interpolate","inputRange","outputRange","opacity","renderWidget","iterationCount","iterationcount","parseInt","undefined","_extends","target","rippleColor","getTestPropsForAction","accessibilityProps","ICON","entryanimation","delay","animationdelay","_background","iconposition","caption","getTestPropsForLabel","accessibilityRole","accessibilityrole"],"sources":["icon.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, DimensionValue, Easing, Text, Image, View } from 'react-native';\nimport { FontAwesome } from '@expo/vector-icons';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmIconProps from './icon.props';\nimport { DEFAULT_CLASS, WmIconStyles } from './icon.styles';\nimport WavIcon from './wavicon/wavicon.component';\nimport StreamlineLightIcon from './streamline-light-icon/streamline-light-icon.component';\nimport StreamlineRegularIcon from './streamline-regular-icon/streamline-regular-icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ninterface IconDef {\n isFontAwesome: boolean;\n isWavIcon: boolean;\n isStreamlineLightIcon: boolean;\n isStreamlineRegularIcon: boolean;\n type: string;\n rotate: string;\n size: number;\n animation: string;\n}\n\nconst ICON_SIZES = new Map([\n ['fa-lg', 24],\n ['fa-2x', 36],\n ['fa-3x', 48],\n ['fa-4x', 60],\n ['fa-5x', 72]\n]);\n\nconst ICON_ROTATTION = new Map([\n ['fa-rotate-90', '90deg'],\n ['fa-rotate-180', '180deg'],\n ['fa-rotate-270', '270deg']\n]);\n\nexport class WmIconState extends BaseComponentState<WmIconProps> {\n public iconDef = {} as IconDef;\n}\n\nexport default class WmIcon extends BaseComponent<WmIconProps, WmIconState, WmIconStyles> {\n spinValue = new Animated.Value(0);\n pulseValue = new Animated.Value(0);\n public stopAnimation = true;\n private _iconSource = null as any;\n\n constructor(props: WmIconProps) {\n super(props, DEFAULT_CLASS, new WmIconProps());\n }\n\n getIconDef(iconClass: string): IconDef {\n const iconDef = {\n rotate: '0'\n } as IconDef;\n const splits = iconClass.split(' ');\n iconDef.isFontAwesome = !!splits.find(v => v === 'fa');\n iconDef.isStreamlineLightIcon = !!splits.find(v => v === 'wm-sl-l');\n iconDef.isStreamlineRegularIcon = !!splits.find(v => v === 'wm-sl-r');\n if (iconDef.isFontAwesome) {\n iconDef.type = splits.find(v => v.startsWith('fa-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineLightIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineRegularIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else {\n iconDef.isWavIcon = !iconDef.isFontAwesome && !!splits.find(v => v === 'wi');\n iconDef.type = (iconDef.isWavIcon && splits.find(v => v.startsWith('wi-'))?.substring(3)) || '';\n }\n if (iconClass.indexOf('fa-spin') >= 0) {\n iconDef.animation = 'spin';\n } else if (iconClass.indexOf('fa-pulse') >= 0) {\n iconDef.animation = 'pulse';\n }\n iconDef.size = splits.map(v => ICON_SIZES.get(v)).find(v => !!v) || 12;\n iconDef.rotate = splits.map(v => ICON_ROTATTION.get(v)).find(v => !!v) || '0deg';\n return iconDef;\n }\n\n private spin () {\n if (this.stopAnimation) {\n return;\n }\n this.spinValue.setValue(0);\n Animated.timing(\n this.spinValue,\n {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true\n }\n ).start(() => this.spin());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.spin();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stopAnimation = true;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'iconclass':\n $new && this.updateState({iconDef: this.getIconDef($new)} as WmIconState);\n break;\n }\n }\n\n private getCustomIcon(props: WmIconProps, style: any) {\n const customIcon = this.theme.mergeStyle({}, this.theme.getStyle(props?.iconclass || '')?.icon || this.styles.icon);\n const customIconContent = customIcon?.content;\n if (customIconContent) {\n delete customIcon.content;\n return (<Text\n style={[style, customIcon.fontFamily ? {fontFamily: customIcon.fontFamily}: null]}>\n {decodeURIComponent(customIconContent)}\n </Text>);\n }\n return null;\n }\n\n public renderSkeleton(props: WmIconProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.props.iconsize || this.styles.root.width) as DimensionValue,\n height: (this.props.skeletonheight || this.props.iconsize || this.styles.root.height) as DimensionValue\n });\n }\n\n getElementToShow(props: WmIconProps, iconSrc: any) {\n\n const { iconmargin, iconheight, iconwidth } = props;\n let width, height;\n let elementToshow, source;\n\n if (iconwidth) width = iconwidth;\n else if (iconheight) width = iconheight;\n else width = 12;\n if (iconheight) height = iconheight;\n else if (iconwidth) height = iconwidth;\n else height = 12;\n\n if (isFullPathUrl(iconSrc)) {\n source = {\n uri: iconSrc\n };\n } else {\n source = iconSrc;\n }\n elementToshow = <Image testID={this.getTestId('icon')}\n style={{\n margin: iconmargin ?? 0,\n height: height,\n width: width\n }}\n source={source}/>;\n return elementToshow;\n }\n\n loadIcon(iconImage: string | undefined) {\n if (!iconImage || !this.loadAsset) {\n return null;\n }\n const iconImageSrc = this.loadAsset(iconImage);\n if (iconImageSrc && typeof iconImageSrc !== 'function') {\n return iconImageSrc;\n }\n return null;\n }\n\n renderIcon(props: WmIconProps) {\n let iconJsx = null;\n this._iconSource = this._iconSource || this.loadIcon(props.iconurl);\n const iconSrc: any = this._iconSource\n if (iconSrc) {\n return this.getElementToShow(props, iconSrc);\n }\n const iconDef = this.state.iconDef;\n if (!iconDef) {\n return null;\n }\n const { root, text, icon } = this.styles;\n const style = [{ color: root.color || text.color },\n icon,\n { transform: [{ rotate: iconDef.rotate }] }];\n\n const customIcon = this.getCustomIcon(props, style);\n const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;\n if (props.show && iconDef && iconDef.isFontAwesome) {\n //@ts-ignore type information is not matching\n iconJsx = (<FontAwesome name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}>\n {customIcon}\n </FontAwesome>);\n } else if (props.show && iconDef) {\n let WMCustomIcon = WavIcon as unknown;\n if (iconDef.isStreamlineLightIcon) {\n WMCustomIcon = StreamlineLightIcon;\n } else if (iconDef.isStreamlineRegularIcon) {\n WMCustomIcon = StreamlineRegularIcon;\n } else if (!iconDef.isWavIcon && !customIcon && !this.styles.icon?.fontFamily) {\n return null;\n }\n //@ts-ignore type information is not matching\n iconJsx = WMCustomIcon ? (<WMCustomIcon name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}>\n {customIcon}\n </WMCustomIcon>) : null;\n }\n if (iconJsx && iconDef.animation === 'spin') {\n const rotate = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg']});\n const animation = { transform: [{ rotate }] };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else if (iconJsx && iconDef.animation === 'pulse') {\n const opacity = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: [0, 1]});\n const animation = { opacity: opacity };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else {\n this.stopAnimation = true;\n }\n return (\n <View\n // {...getAccessibilityProps(AccessibilityWidgetType.ICON, this.props)}\n >\n {iconJsx}\n </View>\n );\n }\n\n renderWidget(props: WmIconProps) {\n let icon = this.renderIcon(props);\n let iterationCount: any = props.iterationcount ? (props.iterationcount != 'infinite' ? parseInt(props.iterationcount): 'infinite') : undefined;\n return (\n <Tappable target={this} rippleColor = {this.styles.root.rippleColor} {...this.getTestPropsForAction()} accessibilityProps={{...getAccessibilityProps(AccessibilityWidgetType.ICON, props)}}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={this.styles.root} iterationCount={iterationCount}>\n {this._background}\n {(props.iconposition === 'left' && icon) || null}\n {(props.caption && (<Text {...this.getTestPropsForLabel('caption')}style={this.styles.text} accessibilityRole={props?.accessibilityrole ? props?.accessibilityrole : 'text'}>{props.caption}</Text>)) || null}\n {(props.iconposition === 'right' && icon) || null}\n </Animatedview>\n </Tappable>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAkBC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;AAClF,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,OAAOC,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AAC;EAEf;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Animated","Easing","Text","Image","View","FontAwesome","BaseComponent","BaseComponentState","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmIconProps","DEFAULT_CLASS","WavIcon","StreamlineLightIcon","StreamlineRegularIcon","Tappable","Animatedview","createSkeleton","ICON_SIZES","Map","ICON_ROTATTION","WmIconState","constructor","args","_defineProperty","WmIcon","props","Value","getIconDef","iconClass","iconDef","rotate","splits","split","isFontAwesome","find","v","isStreamlineLightIcon","isStreamlineRegularIcon","_splits$find","type","startsWith","substring","_splits$find2","_splits$find3","_splits$find4","isWavIcon","indexOf","animation","size","map","get","spin","stopAnimation","spinValue","setValue","timing","toValue","duration","easing","linear","useNativeDriver","start","componentDidMount","componentWillUnmount","onPropertyChange","name","$new","$old","updateState","getCustomIcon","style","_this$theme$getStyle","customIcon","theme","mergeStyle","getStyle","iconclass","icon","styles","customIconContent","content","createElement","fontFamily","decodeURIComponent","renderSkeleton","skeletonWidth","skeletonwidth","iconsize","root","width","skeletonHeight","skeletonheight","height","skeleton","getElementToShow","iconSrc","iconmargin","iconheight","iconwidth","elementToshow","source","uri","testID","getTestId","margin","loadIcon","iconImage","loadAsset","iconImageSrc","renderIcon","iconJsx","_iconSource","iconurl","state","text","color","transform","iconSize","fontSize","show","_extends","getTestProps","_this$styles$icon","WMCustomIcon","interpolate","inputRange","outputRange","opacity","renderWidget","iterationCount","iterationcount","parseInt","undefined","target","rippleColor","getTestPropsForAction","accessibilityProps","ICON","entryanimation","delay","animationdelay","_background","iconposition","caption","getTestPropsForLabel","accessibilityRole","accessibilityrole"],"sources":["icon.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, DimensionValue, Easing, Text, Image, View } from 'react-native';\nimport { FontAwesome } from '@expo/vector-icons';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmIconProps from './icon.props';\nimport { DEFAULT_CLASS, WmIconStyles } from './icon.styles';\nimport WavIcon from './wavicon/wavicon.component';\nimport StreamlineLightIcon from './streamline-light-icon/streamline-light-icon.component';\nimport StreamlineRegularIcon from './streamline-regular-icon/streamline-regular-icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ninterface IconDef {\n isFontAwesome: boolean;\n isWavIcon: boolean;\n isStreamlineLightIcon: boolean;\n isStreamlineRegularIcon: boolean;\n type: string;\n rotate: string;\n size: number;\n animation: string;\n}\n\nconst ICON_SIZES = new Map([\n ['fa-lg', 24],\n ['fa-2x', 36],\n ['fa-3x', 48],\n ['fa-4x', 60],\n ['fa-5x', 72]\n]);\n\nconst ICON_ROTATTION = new Map([\n ['fa-rotate-90', '90deg'],\n ['fa-rotate-180', '180deg'],\n ['fa-rotate-270', '270deg']\n]);\n\nexport class WmIconState extends BaseComponentState<WmIconProps> {\n public iconDef = {} as IconDef;\n}\n\nexport default class WmIcon extends BaseComponent<WmIconProps, WmIconState, WmIconStyles> {\n spinValue = new Animated.Value(0);\n pulseValue = new Animated.Value(0);\n public stopAnimation = true;\n private _iconSource = null as any;\n\n constructor(props: WmIconProps) {\n super(props, DEFAULT_CLASS, new WmIconProps());\n }\n\n getIconDef(iconClass: string): IconDef {\n const iconDef = {\n rotate: '0'\n } as IconDef;\n const splits = iconClass.split(' ');\n iconDef.isFontAwesome = !!splits.find(v => v === 'fa');\n iconDef.isStreamlineLightIcon = !!splits.find(v => v === 'wm-sl-l');\n iconDef.isStreamlineRegularIcon = !!splits.find(v => v === 'wm-sl-r');\n if (iconDef.isFontAwesome) {\n iconDef.type = splits.find(v => v.startsWith('fa-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineLightIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineRegularIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else {\n iconDef.isWavIcon = !iconDef.isFontAwesome && !!splits.find(v => v === 'wi');\n iconDef.type = (iconDef.isWavIcon && splits.find(v => v.startsWith('wi-'))?.substring(3)) || '';\n }\n if (iconClass.indexOf('fa-spin') >= 0) {\n iconDef.animation = 'spin';\n } else if (iconClass.indexOf('fa-pulse') >= 0) {\n iconDef.animation = 'pulse';\n }\n iconDef.size = splits.map(v => ICON_SIZES.get(v)).find(v => !!v) || 12;\n iconDef.rotate = splits.map(v => ICON_ROTATTION.get(v)).find(v => !!v) || '0deg';\n return iconDef;\n }\n\n private spin () {\n if (this.stopAnimation) {\n return;\n }\n this.spinValue.setValue(0);\n Animated.timing(\n this.spinValue,\n {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true\n }\n ).start(() => this.spin());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.spin();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stopAnimation = true;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'iconclass':\n $new && this.updateState({iconDef: this.getIconDef($new)} as WmIconState);\n break;\n }\n }\n\n private getCustomIcon(props: WmIconProps, style: any) {\n const customIcon = this.theme.mergeStyle({}, this.theme.getStyle(props?.iconclass || '')?.icon || this.styles.icon);\n const customIconContent = customIcon?.content;\n if (customIconContent) {\n delete customIcon.content;\n return (<Text\n style={[style, customIcon.fontFamily ? {fontFamily: customIcon.fontFamily}: null]}>\n {decodeURIComponent(customIconContent)}\n </Text>);\n }\n return null;\n }\n\n public renderSkeleton(props: WmIconProps) {\n let skeletonWidth = (this.props.skeletonwidth || this.props.iconsize || this.styles.root.width) as DimensionValue;\n let skeletonHeight = (this.props.skeletonheight || this.props.iconsize || this.styles.root.height) as DimensionValue\n\n if(this.props.skeletonheight == \"0\") {\n skeletonWidth = 0\n }\n \n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n }\n \n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth,\n height: skeletonHeight\n });\n }\n\n getElementToShow(props: WmIconProps, iconSrc: any) {\n\n const { iconmargin, iconheight, iconwidth } = props;\n let width, height;\n let elementToshow, source;\n\n if (iconwidth) width = iconwidth;\n else if (iconheight) width = iconheight;\n else width = 12;\n if (iconheight) height = iconheight;\n else if (iconwidth) height = iconwidth;\n else height = 12;\n\n if (isFullPathUrl(iconSrc)) {\n source = {\n uri: iconSrc\n };\n } else {\n source = iconSrc;\n }\n elementToshow = <Image testID={this.getTestId('icon')}\n style={{\n margin: iconmargin ?? 0,\n height: height,\n width: width\n }}\n source={source}/>;\n return elementToshow;\n }\n\n loadIcon(iconImage: string | undefined) {\n if (!iconImage || !this.loadAsset) {\n return null;\n }\n const iconImageSrc = this.loadAsset(iconImage);\n if (iconImageSrc && typeof iconImageSrc !== 'function') {\n return iconImageSrc;\n }\n return null;\n }\n\n renderIcon(props: WmIconProps) {\n let iconJsx = null;\n this._iconSource = this._iconSource || this.loadIcon(props.iconurl);\n const iconSrc: any = this._iconSource\n if (iconSrc) {\n return this.getElementToShow(props, iconSrc);\n }\n const iconDef = this.state.iconDef;\n if (!iconDef) {\n return null;\n }\n const { root, text, icon } = this.styles;\n const style = [{ color: root.color || text.color },\n icon,\n { transform: [{ rotate: iconDef.rotate }] }];\n\n const customIcon = this.getCustomIcon(props, style);\n const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;\n if (props.show && iconDef && iconDef.isFontAwesome) {\n //@ts-ignore type information is not matching\n iconJsx = (<FontAwesome name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}\n {...this.getTestProps('icon')}>\n {customIcon}\n </FontAwesome>);\n } else if (props.show && iconDef) {\n let WMCustomIcon = WavIcon as unknown;\n if (iconDef.isStreamlineLightIcon) {\n WMCustomIcon = StreamlineLightIcon;\n } else if (iconDef.isStreamlineRegularIcon) {\n WMCustomIcon = StreamlineRegularIcon;\n } else if (!iconDef.isWavIcon && !customIcon && !this.styles.icon?.fontFamily) {\n return null;\n }\n //@ts-ignore type information is not matching\n iconJsx = WMCustomIcon ? (<WMCustomIcon name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}\n {...this.getTestProps('icon')}>\n {customIcon}\n </WMCustomIcon>) : null;\n }\n if (iconJsx && iconDef.animation === 'spin') {\n const rotate = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg']});\n const animation = { transform: [{ rotate }] };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else if (iconJsx && iconDef.animation === 'pulse') {\n const opacity = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: [0, 1]});\n const animation = { opacity: opacity };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else {\n this.stopAnimation = true;\n }\n return (\n <View\n // {...getAccessibilityProps(AccessibilityWidgetType.ICON, this.props)}\n >\n {iconJsx}\n </View>\n );\n }\n\n renderWidget(props: WmIconProps) {\n let icon = this.renderIcon(props);\n let iterationCount: any = props.iterationcount ? (props.iterationcount != 'infinite' ? parseInt(props.iterationcount): 'infinite') : undefined;\n return (\n <Tappable target={this} rippleColor = {this.styles.root.rippleColor} {...this.getTestPropsForAction()} accessibilityProps={{...getAccessibilityProps(AccessibilityWidgetType.ICON, props)}}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={this.styles.root} iterationCount={iterationCount}>\n {this._background}\n {(props.iconposition === 'left' && icon) || null}\n {(props.caption && (<Text {...this.getTestPropsForLabel('caption')}style={this.styles.text} accessibilityRole={props?.accessibilityrole ? props?.accessibilityrole : 'text'}>{props.caption}</Text>)) || null}\n {(props.iconposition === 'right' && icon) || null}\n </Animat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CAACkI,IAAI,EAAEhH,KAAK;MAAC;IAAE,iBACzL5B,KAAA,CAAAoF,aAAA,CAAClE,YAAY;MAAC2H,cAAc,EAAEjH,KAAK,CAACsB,SAAU;MAAC4F,KAAK,EAAElH,KAAK,CAACmH,cAAe;MAACtE,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACU,IAAK;MAACyC,cAAc,EAAEA;IAAe,GACjI,IAAI,CAACY,WAAW,EACfpH,KAAK,CAACqH,YAAY,KAAK,MAAM,IAAIjE,IAAI,IAAK,IAAI,EAC9CpD,KAAK,CAACsH,OAAO,iBAAKlJ,KAAA,CAAAoF,aAAA,CAACjF,IAAI,EAAAwH,QAAA,KAAK,IAAI,CAACwB,oBAAoB,CAAC,SAAS,CAAC;MAAC1E,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACoC,IAAK;MAAC+B,iBAAiB,EAAExH,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEyH,iBAAiB,GAAGzH,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEyH,iBAAiB,GAAG;IAAO,IAAEzH,KAAK,CAACsH,OAAc,CAAE,IAAK,IAAI,EAC3MtH,KAAK,CAACqH,YAAY,KAAK,OAAO,IAAIjE,IAAI,IAAK,IACjC,CACN,CAAC;EAEf;AACF","ignoreList":[]}
@@ -80,9 +80,19 @@ export default class WmLabel extends BaseComponent {
80
80
  return parts;
81
81
  }
82
82
  renderSkeleton(props) {
83
- var _this$styles$root, _this$styles$root2;
84
- const skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
85
- const skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height) || this.styles.text.fontSize;
83
+ let skeletonWidth, skeletonHeight;
84
+ if (this.props.skeletonwidth == "0") {
85
+ skeletonWidth = 0;
86
+ } else {
87
+ var _this$styles$root;
88
+ skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
89
+ }
90
+ if (this.props.skeletonheight == "0") {
91
+ skeletonHeight = 0;
92
+ } else {
93
+ var _this$styles$root2;
94
+ skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height) || this.styles.text.fontSize;
95
+ }
86
96
  if (this.props.multilineskeleton) {
87
97
  return /*#__PURE__*/React.createElement(View, {
88
98
  style: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","constructor","args","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","String","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","replace","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","_captionSplit","text","link","push","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","fontSize","multilineskeleton","renderWidget","linkStyles","mergeStyle","entryanimation","animation","delay","animationdelay","_background","navigationService","_this$state$parts","_this$state$parts2","target","_extends","state","flexWrap","textAlign","getTestPropsForLabel","LABEL","numberOfLines","nooflines","ellipsizeMode","map","index","key","isValid","color","selectable","userSelect","onPress","startsWith","openUrl","eventName","substring","invokeEventCallback","proxy","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';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\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(String($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*\\(\\s*\\$event,\\s*\\$widget\\s*\\)\\s*/, '');\n caption = caption.replace(/\\(\\s*\\)/, '(#/__EMPTY__)');\n const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|javascript:|#).+$/;\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} delay={props.animationdelay} style={this.styles.root}>\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this}>\n <Text style={ this.state.parts.length <= 1 ? this.styles.text : {flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.length === 1 ? toString(this.state.props.caption) : 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}` : `caption_${index}`)}\n selectable={this.styles.text.userSelect === 'text'}\n onPress={() => {\n if (part.link) {\n if (part.link.startsWith('http:')\n || part.link.startsWith('https:')\n || part.link.startsWith('#')) {\n navigationService.openUrl(part.link, '_blank');\n } else if (part.link.startsWith('javascript:')) {\n const eventName = part.link.substring(11);\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n }}\n // {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n >\n {toString(part.text)}\n </Text>\n );\n })}\n {props.required && this.getAsterisk()}\n </Text>\n </Tappable>)}}\n </NavigationServiceConsumer>\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;AAC5E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAChH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,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;AAO3E,OAAO,MAAMC,YAAY,SAASX,kBAAkB,CAAe;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,gBAC7C,EAAE;EAAA;AACxB;AAEA,eAAe,MAAMC,OAAO,SAAShB,aAAa,CAA4C;EAE5Fa,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIM,YAAY,CAAC,CAAC,CAAC;EACrE;EAEQM,WAAWA,CAAA,EAAI;IACrB,oBAAOrB,KAAA,CAAAsB,aAAA,CAACrB,IAAI;MAACsB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAS,GAAC,GAAO,CAAC;EACpD;EAEOC,gBAAgBA,CAACC,I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AAK,MAAO;UACnDC,OAAO,EAAEA,CAAA,KAAM;YACb,IAAI5C,IAAI,CAACI,IAAI,EAAE;cACb,IAAIJ,IAAI,CAACI,IAAI,CAACyC,UAAU,CAAC,OAAO,CAAC,IAC5B7C,IAAI,CAACI,IAAI,CAACyC,UAAU,CAAC,QAAQ,CAAC,IAC9B7C,IAAI,CAACI,IAAI,CAACyC,UAAU,CAAC,GAAG,CAAC,EAAE;gBAC9BrB,iBAAiB,CAACsB,OAAO,CAAC9C,IAAI,CAACI,IAAI,EAAE,QAAQ,CAAC;cAChD,CAAC,MAAM,IAAIJ,IAAI,CAACI,IAAI,CAACyC,UAAU,CAAC,aAAa,CAAC,EAAE;gBAC9C,MAAME,SAAS,GAAG/C,IAAI,CAACI,IAAI,CAAC4C,SAAS,CAAC,EAAE,CAAC;gBACzC,IAAI,CAACC,mBAAmB,CAACF,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAACG,KAAK,CAAC,CAAC;cACzD;YACF;YACA,IAAI,CAACD,mBAAmB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;UACvD;UACA;QAAA,IAECzF,QAAQ,CAACuC,IAAI,CAACG,IAAI,CACf,CAAC;MAEX,CAAC,CAAC,EACAlC,KAAK,CAACkF,QAAQ,IAAI,IAAI,CAACjF,WAAW,CAAC,CACjC,CACE,CAAC;IAAC,CACa,CACf,CAAC,GACb,IAAI;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","constructor","args","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","String","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","replace","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","_captionSplit","text","link","push","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","root","skeletonheight","_this$styles$root2","fontSize","multilineskeleton","renderWidget","linkStyles","mergeStyle","entryanimation","animation","delay","animationdelay","_background","navigationService","_this$state$parts","_this$state$parts2","target","_extends","state","flexWrap","textAlign","getTestPropsForLabel","LABEL","numberOfLines","nooflines","ellipsizeMode","map","index","key","isValid","color","selectable","userSelect","onPress","startsWith","openUrl","eventName","substring","invokeEventCallback","proxy","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';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\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(String($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*\\(\\s*\\$event,\\s*\\$widget\\s*\\)\\s*/, '');\n caption = caption.replace(/\\(\\s*\\)/, '(#/__EMPTY__)');\n const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|javascript:|#).+$/;\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\n let skeletonWidth, skeletonHeight;\n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n }\n \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} delay={props.animationdelay} style={this.styles.root}>\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this}>\n <Text style={ this.state.parts.length <= 1 ? this.styles.text : {flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.length === 1 ? toString(this.state.props.caption) : 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}` : `caption_${index}`)}\n selectable={this.styles.text.userSelect === 'text'}\n onPress={() => {\n if (part.link) {\n if (part.link.startsWith('http:')\n || part.link.startsWith('https:')\n || part.link.startsWith('#')) {\n navigationService.openUrl(part.link, '_blank');\n } else if (part.link.startsWith('javascript:')) {\n const eventName = part.link.substring(11);\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n }}\n // {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n >\n {toString(part.text)}\n </Text>\n );\n })}\n {props.required && this.getAsterisk()}\n </Text>\n </Tappable>)}}\n </NavigationServiceConsumer>\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;AAC5E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAChH,SAASC,uBAAuB,EAAEC,qBAAqB,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ACsB,OAAO,CAAC9C,IAAI,CAACI,IAAI,EAAE,QAAQ,CAAC;cAChD,CAAC,MAAM,IAAIJ,IAAI,CAACI,IAAI,CAACyC,UAAU,CAAC,aAAa,CAAC,EAAE;gBAC9C,MAAME,SAAS,GAAG/C,IAAI,CAACI,IAAI,CAAC4C,SAAS,CAAC,EAAE,CAAC;gBACzC,IAAI,CAACC,mBAAmB,CAACF,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAACG,KAAK,CAAC,CAAC;cACzD;YACF;YACA,IAAI,CAACD,mBAAmB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;UACvD;UACA;QAAA,IAECzF,QAAQ,CAACuC,IAAI,CAACG,IAAI,CACf,CAAC;MAEX,CAAC,CAAC,EACAlC,KAAK,CAACkF,QAAQ,IAAI,IAAI,CAACjF,WAAW,CAAC,CACjC,CACE,CAAC;IAAC,CACa,CACf,CAAC,GACb,IAAI;EACV;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","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 alignSelf: 'flex-start'\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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CAAkB,CAAC,CAAC;EACnH1B,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACmD,gBAAgB,CAAC,CAAC;EACrElD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACoD,gBAAgB,CAAC,CAAC;EACrEnD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACqD,gBAAgB,CAAC,CAAC;EACrEpD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACsD,gBAAgB,CAAC,CAAC;EACrErD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;EACnBL,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACzBI,IAAI,EAAG;MACLE,KAAK,EAAEP,cAAc,CAACuD;IACxB;EACF,CAAkB,CAAC;EACnBtD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE;IAChBI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;AACrB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","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 alignSelf: 'flex-start',\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;IAChDM,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACFC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEP,cAAc,CAACQ;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRF,KAAK,EAAEP,cAAc,CAACU,kBAAkB;MACxCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRT,IAAI,EAAC;QACHU,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;EAEFhB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLe,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EACF,MAAMC,cAAc,GAAGA,CAACb,KAAa,EAAEc,SAAiB,KAAoB;IAC1E,OAAO;MACLlB,IAAI,EAAE;QACJmB,eAAe,EAAEf,KAAK;QACtBgB,WAAW,EAAE,EAAE;QACfC,UAAU,EAAE,EAAE;QACdC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,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACkD,gBAAgB,EAAE;IAAC7C,IAAI,EAAE;MAACsB,UAAU,EAAE;IAAK;EAAC,CAAkB,CAAC,CAAC;EACnH1B,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACmD,gBAAgB,CAAC,CAAC;EACrElD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACoD,gBAAgB,CAAC,CAAC;EACrEnD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACqD,gBAAgB,CAAC,CAAC;EACrEpD,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE4C,gBAAgB,CAAC7C,cAAc,CAACsD,gBAAgB,CAAC,CAAC;EACrErD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;EACnBL,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACzBI,IAAI,EAAG;MACLE,KAAK,EAAEP,cAAc,CAACuD;IACxB;EACF,CAAkB,CAAC;EACnBtD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE;IAChBI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;AACrB,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmMessageProps","DEFAULT_CLASS","WmIcon","WmButton","Animatedview","AccessibilityWidgetType","getAccessibilityProps","WmMessageState","MESSAGE_ICONS","DEFAULT_TITLE","WmMessage","constructor","props","_defineProperty","updateState","show","invokeEventCallback","showMessage","hideMessage","renderWidget","styles","theme","mergeStyle","getStyle","type","variant","createElement","entryanimation","animation","delay","animationdelay","style","root","_background","id","getTestId","iconclass","icon","message","_extends","getTestPropsForLabel","title","MESSAGE","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';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\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} delay={props.animationdelay} 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} {...getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)}>{props.title || DEFAULT_TITLE[props.type || '']}</Text>\n <Text {...this.getTestPropsForLabel('caption')} style={styles.text} {...getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)}>{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;AAChG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,cAAc,SAASR,kBAAkB,CAAiB;AAEvE,MAAMS,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,SAASZ,aAAa,CAAkD;EAEpGa,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;IAACa,eAAA,gBAmB5C,MAAM;MACZ,IAAI,CAACC,WAAW,CA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BAAoB,CAAC,OAAO,CAAC;MAAET,KAAK,EAAEX,MAAM,CAACqB;IAAM,GAAKnC,qBAAqB,CAACD,uBAAuB,CAACqC,OAAO,EAAE9B,KAAK,CAAC,GAAGA,KAAK,CAAC6B,KAAK,IAAIhC,aAAa,CAACG,KAAK,CAACY,IAAI,IAAI,EAAE,CAAQ,CAAC,eAC7L7B,KAAA,CAAA+B,aAAA,CAAC7B,IAAI,EAAA0C,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,SAAS,CAAC;MAAET,KAAK,EAAEX,MAAM,CAACuB;IAAK,GAAKrC,qBAAqB,CAACD,uBAAuB,CAACqC,OAAO,EAAE9B,KAAK,CAAC,GAAGA,KAAK,CAACgC,OAAc,CACxJ,CAAC,EACNhC,KAAK,CAACiC,SAAS,GAAG,IAAI,gBACrBlD,KAAA,CAAA+B,aAAA,CAACvB,QAAQ;MACP+B,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO,CAAE;MAC5BC,SAAS,EAAC,aAAa;MACvBhB,MAAM,EAAEA,MAAM,CAAC0B,QAAS;MACxBC,KAAK,EAAE,IAAI,CAACC;IAAM,CAAW,CAErB,CAAC;EACjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","BaseComponent","BaseComponentState","WmMessageProps","DEFAULT_CLASS","WmIcon","WmButton","Animatedview","AccessibilityWidgetType","getAccessibilityProps","WmMessageState","MESSAGE_ICONS","DEFAULT_TITLE","WmMessage","constructor","props","_defineProperty","updateState","show","invokeEventCallback","showMessage","hideMessage","renderWidget","styles","theme","mergeStyle","getStyle","type","variant","createElement","entryanimation","animation","delay","animationdelay","style","root","_background","id","getTestId","iconclass","icon","message","_extends","getTestPropsForLabel","title","MESSAGE","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';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\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} delay={props.animationdelay} 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} {...getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)}>{props.title || DEFAULT_TITLE[props.type || '']}</Text>\n <Text {...this.getTestPropsForLabel('caption')} style={styles.text} {...getAccessibilityProps(AccessibilityWidgetType.MESSAGE, props)}>{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;AAChG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,cAAc,SAASR,kBAAkB,CAAiB;AAEvE,MAAMS,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,SAASZ,aAAa,CAAkD;EAEpGa,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;IAACa,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,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AK,CAACY,IAAI,IAAI,EAAE,CAAQ,CAAC,eAC7L7B,KAAA,CAAA+B,aAAA,CAAC7B,IAAI,EAAA0C,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,SAAS,CAAC;MAAET,KAAK,EAAEX,MAAM,CAACuB;IAAK,GAAKrC,qBAAqB,CAACD,uBAAuB,CAACqC,OAAO,EAAE9B,KAAK,CAAC,GAAGA,KAAK,CAACgC,OAAc,CACxJ,CAAC,EACNhC,KAAK,CAACiC,SAAS,GAAG,IAAI,gBACrBlD,KAAA,CAAA+B,aAAA,CAACvB,QAAQ;MACP+B,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO,CAAE;MAC5BC,SAAS,EAAC,aAAa;MACvBhB,MAAM,EAAEA,MAAM,CAAC0B,QAAS;MACxBC,KAAK,EAAE,IAAI,CAACC;IAAM,CAAW,CAErB,CAAC;EACjB;AACF","ignoreList":[]}
@@ -124,8 +124,7 @@ export default class WmPicture extends BaseComponent {
124
124
  source = imgSrc;
125
125
  }
126
126
  if (this.state.naturalImageWidth) {
127
- elementToshow = /*#__PURE__*/React.createElement(Image, _extends({
128
- testID: this.getTestId('picture'),
127
+ elementToshow = /*#__PURE__*/React.createElement(Image, _extends({}, this.getTestProps('picture'), {
129
128
  style: [this.styles.picture, shapeStyles.picture],
130
129
  resizeMode: props.resizemode,
131
130
  source: source