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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -2
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  8. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  11. app-rn-runtime/components/basic/audio/audio.component.js +9 -2
  12. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  13. app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
  14. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +15 -2
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  18. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  19. app-rn-runtime/components/basic/icon/icon.component.js +10 -2
  20. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.component.js +13 -3
  22. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  23. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  24. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  25. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  26. app-rn-runtime/components/basic/search/search.component.js +10 -1
  27. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  28. app-rn-runtime/components/basic/search/search.props.js +3 -0
  29. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  30. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  31. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  32. app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
  33. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  34. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  35. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  36. app-rn-runtime/components/basic/video/video.component.js +6 -0
  37. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  38. app-rn-runtime/components/basic/video/video.styles.js +7 -1
  39. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  40. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  41. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  42. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  43. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  44. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  45. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  46. app-rn-runtime/components/chart/basechart.component.js +23 -0
  47. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  48. app-rn-runtime/components/chart/basechart.props.js +2 -2
  49. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  50. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  51. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
  52. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  53. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  54. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  55. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  56. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  57. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  58. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  59. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  60. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  61. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  62. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  63. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
  64. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  65. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  66. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  67. app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
  68. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  69. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  70. app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
  71. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  72. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  73. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  74. app-rn-runtime/components/container/container.component.js +44 -3
  75. app-rn-runtime/components/container/container.component.js.map +1 -1
  76. app-rn-runtime/components/container/container.props.js +1 -0
  77. app-rn-runtime/components/container/container.props.js.map +1 -1
  78. app-rn-runtime/components/container/container.styles.js +7 -0
  79. app-rn-runtime/components/container/container.styles.js.map +1 -1
  80. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  81. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  82. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  83. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  84. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  85. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  86. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  87. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  88. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  89. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  90. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  91. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  92. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  93. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  94. app-rn-runtime/components/container/panel/panel.component.js +43 -4
  95. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  96. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  97. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  98. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  99. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  100. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
  101. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  102. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  103. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  104. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  105. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  106. app-rn-runtime/components/container/tabs/tabs.component.js +41 -6
  107. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  108. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  109. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  110. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  111. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  112. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  113. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  114. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  115. app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
  116. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  117. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  118. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  119. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  120. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +8 -1
  121. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  122. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  123. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  124. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  125. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  126. app-rn-runtime/components/data/card/card.component.js +18 -0
  127. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  128. app-rn-runtime/components/data/card/card.styles.js +3 -0
  129. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  130. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
  131. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  132. app-rn-runtime/components/data/form/form.component.js +1 -1
  133. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  134. app-rn-runtime/components/data/form/form.props.js +1 -0
  135. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  136. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  137. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  138. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  139. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  140. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  141. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  142. app-rn-runtime/components/data/list/list.component.js +32 -24
  143. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  144. app-rn-runtime/components/data/list/list.props.js +1 -0
  145. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  146. app-rn-runtime/components/data/list/list.styles.js +9 -0
  147. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  148. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  149. app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
  150. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  151. app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
  152. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  153. app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
  154. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  155. app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
  156. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  157. app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
  158. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  159. app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
  160. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  161. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
  162. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  163. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  164. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  165. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  166. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  167. app-rn-runtime/components/input/chips/chips.component.js +16 -2
  168. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  169. app-rn-runtime/components/input/chips/chips.styles.js +8 -0
  170. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  171. app-rn-runtime/components/input/currency/currency.component.js +14 -4
  172. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  173. app-rn-runtime/components/input/currency/currency.styles.js +43 -1
  174. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  175. app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
  176. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  177. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
  178. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  179. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
  180. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  181. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
  182. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  183. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
  184. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  185. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
  186. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
  187. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
  188. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
  189. app-rn-runtime/components/input/number/number.component.js +17 -3
  190. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  191. app-rn-runtime/components/input/number/number.styles.js +24 -1
  192. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  193. app-rn-runtime/components/input/radioset/radioset.component.js +33 -8
  194. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  195. app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
  196. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  197. app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
  198. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  199. app-rn-runtime/components/input/select/select.component.js +11 -3
  200. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  201. app-rn-runtime/components/input/select/select.styles.js +24 -0
  202. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  203. app-rn-runtime/components/input/switch/switch.component.js +13 -3
  204. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  205. app-rn-runtime/components/input/switch/switch.styles.js +15 -0
  206. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  207. app-rn-runtime/components/input/text/text.component.js +26 -2
  208. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  209. app-rn-runtime/components/input/text/text.props.js +3 -0
  210. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  211. app-rn-runtime/components/input/text/text.styles.js +3 -0
  212. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  213. app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
  214. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  215. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  216. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  217. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  218. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  219. app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
  220. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  221. app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
  222. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  223. app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
  224. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  225. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  226. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  227. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  228. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  229. app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
  230. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  231. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  232. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  233. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  234. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  235. app-rn-runtime/components/page/page.component.js.map +1 -1
  236. app-rn-runtime/components/page/page.props.js.map +1 -1
  237. app-rn-runtime/components/page/page.styles.js +7 -1
  238. app-rn-runtime/components/page/page.styles.js.map +1 -1
  239. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  240. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  241. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  242. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  243. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  244. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  245. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  246. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  247. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  248. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  249. app-rn-runtime/core/AppConfig.js.map +1 -1
  250. app-rn-runtime/core/base.component.js +33 -6
  251. app-rn-runtime/core/base.component.js.map +1 -1
  252. app-rn-runtime/core/components/textinput.component.js +9 -7
  253. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  254. app-rn-runtime/core/props.provider.js +0 -1
  255. app-rn-runtime/core/props.provider.js.map +1 -1
  256. app-rn-runtime/core/storage.service.js +15 -0
  257. app-rn-runtime/core/storage.service.js.map +1 -1
  258. app-rn-runtime/core/tappable.component.js +10 -4
  259. app-rn-runtime/core/tappable.component.js.map +1 -1
  260. app-rn-runtime/core/utils.js +5 -0
  261. app-rn-runtime/core/utils.js.map +1 -1
  262. app-rn-runtime/core/wm-component-tree.js +58 -0
  263. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  264. app-rn-runtime/package.json +13 -6
  265. app-rn-runtime/runtime/App.js +23 -9
  266. app-rn-runtime/runtime/App.js.map +1 -1
  267. app-rn-runtime/runtime/App.navigator.js +1 -0
  268. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  269. app-rn-runtime/runtime/base-fragment.component.js +46 -13
  270. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  271. app-rn-runtime/runtime/base-page.component.js +38 -2
  272. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  273. app-rn-runtime/runtime/base-partial.component.js +3 -0
  274. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  275. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  276. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  277. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  278. app-rn-runtime/runtime/services/app-modal.service.js +4 -4
  279. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  280. app-rn-runtime/runtime/services/app-security.service.js +17 -1
  281. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  282. app-rn-runtime/styles/theme.js +10 -0
  283. app-rn-runtime/styles/theme.js.map +1 -1
  284. app-rn-runtime/styles/theme.variables.js +2 -1
  285. app-rn-runtime/styles/theme.variables.js.map +1 -1
  286. app-rn-runtime/variables/http.service.js +5 -1
  287. app-rn-runtime/variables/http.service.js.map +1 -1
  288. app-rn-runtime/variables/live-variable.js +14 -0
  289. app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","padding","flexDirection","text","fontWeight","fontSize","textTransform","userSelect","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","height","paddingLeft","paddingRight","borderTopLeftRadius","borderBottomLeftRadius","borderBottomRightRadius","borderTopRightRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","fontFamily","baseFont","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","selectedButtonText","firstButton","lastButton","OS","borderLeftWidth"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\nimport { Platform } from 'react-native';\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n selectedButtonText: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n minHeight: 24,\n padding: 4,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'uppercase',\n userSelect: 'none',\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n fontSize: 14,\n minWidth: 64,\n height: 40,\n paddingLeft: 16,\n paddingRight: 16,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n borderTopRightRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchBorderColor\n } as AllStyle,\n selectedButtonText: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'uppercase'\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 18,\n borderBottomLeftRadius: 18,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 18,\n borderBottomRightRadius: 18,\n borderRightWidth: 1\n } as AllStyle\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1,\n borderLeftWidth: 0\n } ,\n lastButton:{\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 0\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500,\n borderRightWidth: 0,\n borderLeftWidth: 1\n } ,\n lastButton:{\n flex: 1,\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 1\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY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AAC8C,EAAE,IAAE,KAAK,GAAC;IACvDF,WAAW,EAAC;MACVf,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBE,oBAAoB,EAAE,GAAG;MACzBD,uBAAuB,EAAE,GAAG;MAC5BK,gBAAgB,EAAE,CAAC;MACnBW,eAAe,EAAE;IACnB,CAAC;IACDF,UAAU,EAAC;MACT7B,IAAI,EAAE,CAAC;MACPa,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BE,oBAAoB,EAAE,CAAC;MACvBD,uBAAuB,EAAE,CAAC;MAC1BK,gBAAgB,EAAE;IACpB;EACF,CAAC,GAAC,CAAC,CAAC,CAAC;EACLhC,QAAQ,CAACH,aAAa,GAAG,GAAG,EAAE,EAAE,EAAE;IAChC2C,WAAW,EAAE;MACXf,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BE,oBAAoB,EAAE,CAAC;MACvBD,uBAAuB,EAAE;IAC3B,CAAa;IACbc,UAAU,EAAE;MACV7B,IAAI,EAAE,CAAC;MACPa,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBE,oBAAoB,EAAE,GAAG;MACzBD,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","padding","flexDirection","text","fontWeight","fontSize","textTransform","userSelect","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","height","paddingLeft","paddingRight","borderTopLeftRadius","borderBottomLeftRadius","borderBottomRightRadius","borderTopRightRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","fontFamily","baseFont","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","selectedButtonText","firstButton","lastButton","skeleton","width","textSkeleton","borderRadius","OS","borderLeftWidth"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\nimport { Platform } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n selectedButtonText: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle,\n skeleton: WmSkeletonStyles,\n textSkeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n minHeight: 24,\n padding: 4,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'uppercase',\n userSelect: 'none',\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n fontSize: 14,\n minWidth: 64,\n height: 40,\n paddingLeft: 16,\n paddingRight: 16,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n borderTopRightRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchBorderColor\n } as AllStyle,\n selectedButtonText: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'uppercase'\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 18,\n borderBottomLeftRadius: 18,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 18,\n borderBottomRightRadius: 18,\n borderRightWidth: 1\n } as AllStyle,\n skeleton: {\n root: {\n width:64,\n height: 40,\n paddingLeft: 16,\n paddingRight: 16,\n },\n } as any as WmSkeletonStyles,\n textSkeleton: {\n root: {\n width: 30,\n height: 10,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1,\n borderLeftWidth: 0\n } ,\n lastButton:{\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 0\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1-rtl', '', Platform.OS==\"web\"?{\n firstButton:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500,\n borderRightWidth: 0,\n borderLeftWidth: 1\n } ,\n lastButton:{\n flex: 1,\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderRightWidth: 1\n }\n }:{});\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AAcvC,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGN,YAAY,CAAiB;IAC/DO,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,OAAO,EAAE,CAAC;MACVC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE,WAAW;MAC1BC,UAAU,EAAE;IACd,CAAC;IACHC,WAAW,EAAE;MACXT,IAAI,EAAE;QACJU,IAAI,EAAE,CAAC;QACPC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBN,QAAQ,EAAE;MACZ,CAAC;MACDF,IAAI,EAAE;QACJS,KAAK,EAAEhB,cAAc,CAACiB;MACxB;IACF,CAAiB;IACjBC,MAAM,EAAE;MACNC,eAAe,EAAEnB,cAAc,CAACoB,aAAa;MAC7CJ,KAAK,EAAEhB,cAAc,CAACqB,eAAe;MACrCZ,QAAQ,EAAE,EAAE;MACZa,QAAQ,EAAE,EAAE;MACZC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,uBAAuB,EAAE,CAAC;MAC1BC,oBAAoB,EAAE,CAAC;MACvBC,WAAW,EAAE9B,cAAc,CAAC+B,iBAAiB;MAC7CC,WAAW,EAAE,CAAC;MACdC,gBAAgB,E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IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput
7
7
  import { BaseInputComponent, BaseInputState } from "@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component";
8
8
  import { isNull } from 'lodash';
9
9
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
10
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
10
11
  export class WmTextState extends BaseInputState {}
11
12
  export default class WmText extends BaseInputComponent {
12
13
  constructor(props) {
@@ -20,6 +21,26 @@ export default class WmText extends BaseInputComponent {
20
21
  classes.push(super.getStyleClassName());
21
22
  return classes.join(' ');
22
23
  }
24
+ renderSkeleton(props) {
25
+ let skeletonWidth, skeletonHeight;
26
+ if (this.props.skeletonwidth == "0") {
27
+ skeletonWidth = 0;
28
+ } else {
29
+ var _this$styles$root;
30
+ skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
31
+ }
32
+ if (this.props.skeletonheight == "0") {
33
+ skeletonHeight = 0;
34
+ } else {
35
+ var _this$styles$root2;
36
+ skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height);
37
+ }
38
+ return createSkeleton(this.theme, this.styles.skeleton, {
39
+ ...this.styles.root,
40
+ width: skeletonWidth,
41
+ height: skeletonHeight
42
+ });
43
+ }
23
44
  renderWidget(props) {
24
45
  var _this$state$textValue;
25
46
  let opts = {};
@@ -39,13 +60,15 @@ export default class WmText extends BaseInputComponent {
39
60
  floatingLabelStyle: this.styles.floatingLabel,
40
61
  activeFloatingLabelStyle: this.styles.activeFloatingLabel,
41
62
  placeholderTextColor: this.styles.placeholderText.color,
42
- style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid],
63
+ isInputFocused: this.state.isInputFocused,
64
+ style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
43
65
  keyboardType: this.state.keyboardType,
44
66
  autoComplete: props.autocomplete ? 'username' : 'off',
45
67
  autoFocus: props.autofocus,
46
68
  editable: props.disabled || props.readonly ? false : true,
47
69
  secureTextEntry: props.type === 'password' && !props.maskchar ? true : false,
48
70
  displayformat: props.displayformat,
71
+ background: this._background,
49
72
  maskchar: props.maskchar,
50
73
  maxLength: props.maxchars,
51
74
  placeholder: props.placeholder,
@@ -54,7 +77,8 @@ export default class WmText extends BaseInputComponent {
54
77
  onKeyPress: this.onKeyPress.bind(this),
55
78
  onChangeText: this.onChangeText.bind(this),
56
79
  onChange: this.invokeChange.bind(this),
57
- allowContentSelection: this.styles.text.userSelect === 'text'
80
+ allowContentSelection: this.styles.text.userSelect === 'text',
81
+ autoCapitalize: props.autocapitalize
58
82
  }));
59
83
  }
60
84
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","styles","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","placeholderText","color","style","root","text","isValid","invalid","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maskchar","displayformat","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXT,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' && !props.maskchar ? true : false}\n displayformat={props.displayformat}\n maskchar={props.maskchar}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,WAAW,SAASJ,cAAc,CAAc;AAG7D,eAAe,MAAMK,MAAM,SAASN,kBAAkB,CAAyC;EAE7FO,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIQ,WAAW,CAAC,CAAC,CAAC;EACnE;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,qBAAqB,CAAC;IACrC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAkB,EAAE;IAAA,IAAAQ,qBAAA;IAC/B,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGtB,QAAQ,CAACuB,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,cAAc;IAClEF,IAAI,CAACC,SAAS,CAAC,GAAG,EAAAF,qBAAA,OA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AAG,IAAK;MAC1DC,eAAe,EAAE5C,KAAK,CAAC6C,IAAI,KAAK,UAAU,IAAI,CAAC7C,KAAK,CAAC8C,QAAQ,GAAG,IAAI,GAAG,KAAM;MAC7EC,aAAa,EAAE/C,KAAK,CAAC+C,aAAc;MACnCD,QAAQ,EAAE9C,KAAK,CAAC8C,QAAS;MACzBE,SAAS,EAAEhD,KAAK,CAACiD,QAAS;MAC1BC,WAAW,EAAElD,KAAK,CAACkD,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAACjC,MAAM,CAACQ,IAAI,CAAC0B,UAAU,KAAK;IAAO,EAC/D,CAAC;EAER;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","placeholderText","color","isInputFocused","style","text","isValid","invalid","focused","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maskchar","displayformat","background","_background","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect","autoCapitalize","autocapitalize"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextProps): React.ReactNode { \n let skeletonWidth, skeletonHeight;\n \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: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXT,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' && !props.maskchar ? true : false}\n displayformat={props.displayformat}\n background={this._background}\n maskchar={props.maskchar}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n autoCapitalize={props.autocapitalize}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,QAAQ,cAAc;AAEvD,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO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AAM,CAACiC,IAAI,CAAC6B,UAAU,KAAK,MAAO;MAC9DC,cAAc,EAAE3E,KAAK,CAAC4E;IAAe,EACtC,CAAC;EAER;AACF","ignoreList":[]}
@@ -7,6 +7,9 @@ export default class WmTextProps extends BaseInputProps {
7
7
  super(...args);
8
8
  _defineProperty(this, "floatinglabel", void 0);
9
9
  _defineProperty(this, "placeholder", 'Enter text');
10
+ _defineProperty(this, "skeletonheight", null);
11
+ _defineProperty(this, "skeletonwidth", null);
12
+ _defineProperty(this, "autocapitalize", 'none');
10
13
  }
11
14
  }
12
15
  //# sourceMappingURL=text.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseInputProps","WmTextProps","constructor","args","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Enter text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEhC,YAAY;EAAA;AACpC","ignoreList":[]}
1
+ {"version":3,"names":["BaseInputProps","WmTextProps","constructor","args","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Enter text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n autocapitalize?: string = 'none';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEhC,YAAY;IAAAA,eAAA,yBACR,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,yBACH,MAAM;EAAA;AAClC","ignoreList":[]}
@@ -22,6 +22,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
22
22
  invalid: {
23
23
  borderBottomColor: themeVariables.inputInvalidBorderColor
24
24
  },
25
+ focused: {
26
+ borderColor: themeVariables.inputFocusBorderColor
27
+ },
25
28
  placeholderText: {
26
29
  color: themeVariables.inputPlaceholderColor
27
30
  },
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n paddingLeft: 16,\n paddingRight: 16,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48,\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAYxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEX,cAAc,CAACY,gBAAgB;MAC5CC,eAAe,EAAEb,cAAc,CAACc,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEhB,cAAc,CAACiB;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAErB,cAAc,CAACsB;IACpC,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAExB,cAAc,CAACyB;IACtB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,QAAQ,EAAE;MACRzB,IAAI,EAAE;QACJ0B,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVf,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLU,eAAe,EAAEb,cAAc,CAAC+B;IAClC;EACJ,CAAC,CAAC;EACF9B,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACH6B,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACF/B,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDsB,aAAa,EAAE;MACbO,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRhB,QAAQ,EAAE,EAAE;MACZK,KAAK,EAAExB,cAAc,CAACoC;IACxB,CAAC;IACDT,mBAAmB,EAAE;MACnBH,KAAK,EAAExB,cAAc,CAACqC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n paddingLeft: 16,\n paddingRight: 16,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48,\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEX,cAAc,CAACY,gBAAgB;MAC5CC,eAAe,EAAEb,cAAc,CAACc,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEhB,cAAc,CAACiB;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAErB,cAAc,CAACsB;IACpC,CAAC;IACDC,OAAO,EAAG;MACRZ,WAAW,EAAEX,cAAc,CAACwB;IAC9B,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAE1B,cAAc,CAAC2B;IACtB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,QAAQ,EAAE;MACR3B,IAAI,EAAE;QACJ4B,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVjB,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLU,eAAe,EAAEb,cAAc,CAACiC;IAClC;EACJ,CAAC,CAAC;EACFhC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACH+B,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACFjC,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDwB,aAAa,EAAE;MACbO,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRlB,QAAQ,EAAE,EAAE;MACZO,KAAK,EAAE1B,cAAc,CAACsC;IACxB,CAAC;IACDT,mBAAmB,EAAE;MACnBH,KAAK,EAAE1B,cAAc,CAACuC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ import { BaseInputComponent, BaseInputState } from '@wavemaker/app-rn-runtime/co
7
7
  import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
8
8
  import { isNull } from 'lodash';
9
9
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
10
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
10
11
  export class WmTextareaState extends BaseInputState {}
11
12
  export default class WmTextarea extends BaseInputComponent {
12
13
  constructor(props) {
@@ -20,6 +21,26 @@ export default class WmTextarea extends BaseInputComponent {
20
21
  classes.push(super.getStyleClassName());
21
22
  return classes.join(' ');
22
23
  }
24
+ renderSkeleton(props) {
25
+ let skeletonWidth, skeletonHeight;
26
+ if (this.props.skeletonwidth == "0") {
27
+ skeletonWidth = 0;
28
+ } else {
29
+ var _this$styles$root;
30
+ skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
31
+ }
32
+ if (this.props.skeletonheight == "0") {
33
+ skeletonHeight = 0;
34
+ } else {
35
+ var _this$styles$root2;
36
+ skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height);
37
+ }
38
+ return createSkeleton(this.theme, this.styles.skeleton, {
39
+ ...this.styles.root,
40
+ width: skeletonWidth,
41
+ height: skeletonHeight
42
+ });
43
+ }
23
44
  renderWidget(props) {
24
45
  var _this$state$textValue;
25
46
  let opts = {};
@@ -35,9 +56,11 @@ export default class WmTextarea extends BaseInputComponent {
35
56
  }
36
57
  },
37
58
  placeholderTextColor: this.styles.placeholderText.color,
38
- style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid],
59
+ isInputFocused: this.state.isInputFocused,
60
+ style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
39
61
  multiline: true,
40
62
  numberOfLines: 4,
63
+ background: this._background,
41
64
  keyboardType: this.state.keyboardType
42
65
  }, opts, {
43
66
  floatingLabel: props.floatinglabel,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXTAREA","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","text","isValid","invalid","multiline","numberOfLines","keyboardType","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput, View } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-textarea-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXTAREA,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n multiline={true}\n numberOfLines={4}\n keyboardType={this.state.keyboardType}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAyB,cAAc;AACxD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,eAAe,SAASL,cAAc,CAAkB;AAErE,eAAe,MAAMM,UAAU,SAASP,kBAAkB,CAAqD;EAE7GQ,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIQ,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,yBAAyB,CAAC;IACzC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAsB,EAAE;IAAA,IAAAQ,qBAAA;IACnC,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGtB,QAA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AACwC,YAAY,GAAG,UAAU,GAAG,KAAM;MACtDC,SAAS,EAAEzC,KAAK,CAAC0C,SAAU;MAC3BC,QAAQ,EAAE3C,KAAK,CAAC4C,QAAQ,IAAI5C,KAAK,CAAC6C,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,SAAS,EAAE9C,KAAK,CAAC+C,QAAS;MAC1BC,WAAW,EAAEhD,KAAK,CAACgD,WAAW,IAAI,iBAAkB;MACpDC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAChC,MAAM,CAACK,IAAI,CAAC4B,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXTAREA","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","placeholderText","color","isInputFocused","style","text","isValid","invalid","focused","multiline","numberOfLines","background","_background","keyboardType","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-textarea-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextareaProps): React.ReactNode {\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: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXTAREA,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n multiline={true}\n numberOfLines={4}\n background={this._background}\n keyboardType={this.state.keyboardType}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,QAAQ,cAAc;AACvD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,eAAe,SAASN,cAAc,CAAkB;AAErE,eAAe,MAAMO,UAAU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MAAM,CAACgC,OAAO,GAAG,CAAC,CAAC,CAAE;MACjJC,SAAS,EAAE,IAAK;MAChBC,aAAa,EAAE,CAAE;MACjBC,UAAU,EAAE,IAAI,CAACC,WAAY;MAC7BC,YAAY,EAAE,IAAI,CAAC9C,KAAK,CAAC8C;IAAa,GAClC3B,IAAI;MACR4B,aAAa,EAAElD,KAAK,CAACI,aAAc;MACnC+C,kBAAkB,EAAE,IAAI,CAACvC,MAAM,CAACsC,aAAc;MAC9CE,wBAAwB,EAAE,IAAI,CAACxC,MAAM,CAACyC,mBAAoB;MAC1DC,YAAY,EAAEtD,KAAK,CAACuD,YAAY,GAAG,UAAU,GAAG,KAAM;MACtDC,SAAS,EAAExD,KAAK,CAACyD,SAAU;MAC3BC,QAAQ,EAAE1D,KAAK,CAAC2D,QAAQ,IAAI3D,KAAK,CAAC4D,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,SAAS,EAAE7D,KAAK,CAAC8D,QAAS;MAC1BC,WAAW,EAAE/D,KAAK,CAAC+D,WAAW,IAAI,iBAAkB;MACpDC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC3D,MAAM,CAAC6B,IAAI,CAAC+B,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF","ignoreList":[]}
@@ -7,6 +7,8 @@ export default class WmTextareaProps extends BaseInputProps {
7
7
  super(...args);
8
8
  _defineProperty(this, "floatinglabel", void 0);
9
9
  _defineProperty(this, "placeholder", 'Place your text');
10
+ _defineProperty(this, "skeletonheight", null);
11
+ _defineProperty(this, "skeletonwidth", null);
10
12
  }
11
13
  }
12
14
  //# sourceMappingURL=textarea.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseInputProps","WmTextareaProps","constructor","args","_defineProperty"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Place your text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEpC,iBAAiB;EAAA;AACzC","ignoreList":[]}
1
+ {"version":3,"names":["BaseInputProps","WmTextareaProps","constructor","args","_defineProperty"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Place your text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEpC,iBAAiB;IAAAA,eAAA,yBACb,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
@@ -22,6 +22,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
22
22
  invalid: {
23
23
  borderBottomColor: 'red'
24
24
  },
25
+ focused: {
26
+ borderColor: themeVariables.inputFocusBorderColor
27
+ },
25
28
  placeholderText: {
26
29
  color: themeVariables.inputPlaceholderColor
27
30
  },
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","floatingLabel","activeFloatingLabel","invalid","borderBottomColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n invalid: {\n borderBottomColor: 'red'\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa,QAAQ;MACnCC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,iBAAiB,EAAE;IACrB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,OAAO,EAAE;MACPC,iBAAiB,EAAE;IACrB,CAAC;IACDC,eAAe,EAAE;MACfC,KAAK,EAAEvB,cAAc,CAACwB;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRtB,IAAI,EAAE;QACJuB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVhB,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAAC4B;IAClC;EACJ,CAAC,CAAC;EACF3B,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAC;MACH0B,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EACF5B,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CiB,IAAI,EAAC;MACHe,UAAU,EAAE;IACd,CAAC;IACDZ,aAAa,EAAE;MACba,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRjB,QAAQ,EAAE,EAAE;MACZO,KAAK,EAAEvB,cAAc,CAACkC;IACxB,CAAC;IACDf,mBAAmB,EAAE;MACnBI,KAAK,EAAEvB,cAAc,CAACmC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","floatingLabel","activeFloatingLabel","invalid","borderBottomColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n invalid: {\n borderBottomColor: 'red'\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAYxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CA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AC,CAAC","ignoreList":[]}
@@ -10,6 +10,7 @@ import { unStringify, validateField } from '@wavemaker/app-rn-runtime/core/utils
10
10
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
11
11
  import WmToggleProps from './toggle.props';
12
12
  import { DEFAULT_CLASS } from './toggle.styles';
13
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
13
14
  export class WmToggleState extends BaseComponentState {
14
15
  constructor(...args) {
15
16
  super(...args);
@@ -92,6 +93,11 @@ export default class WmToggle extends BaseComponent {
92
93
  viewWidth: width
93
94
  });
94
95
  }
96
+ renderSkeleton(props) {
97
+ return createSkeleton(this.theme, this.styles.skeleton, {
98
+ ...this.styles.skeleton.root
99
+ });
100
+ }
95
101
  renderWidget(props) {
96
102
  const styles = this.theme.mergeStyle(this.styles, this.theme.getStyle(this.state.isSwitchOn ? 'app-toggle-on' : 'app-toggle-off'));
97
103
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","TouchableOpacity","Animated","Easing","View","BackgroundComponent","BaseComponent","BaseComponentState","unStringify","validateField","AccessibilityWidgetType","getAccessibilityProps","WmToggleProps","DEFAULT_CLASS","WmToggleState","constructor","args","_defineProperty","WmToggle","props","Value","onPropertyChange","name","$new","$old","value","state","checkedvalue","updateState","isSwitchOn","updateDatavalue","datavalue","validate","validationObj","isValid","errorType","onToggleSwitch","oldValue","dataValue","uncheckedvalue","sequence","timing","scaleValue","toValue","duration","useNativeDriver","animationValue","easing","linear","start","onFieldChange","invokeEventCallback","proxy","onLayoutChange","event","width","nativeEvent","layout","setState","viewWidth","renderWidget","styles","theme","mergeStyle","getStyle","createElement","_extends","onLayout","e","TOGGLE","selected","onPress","disabled","readonly","setTimeout","getTestPropsForAction","style","root","animation","handle","size","backgroundSize","position","backgroundPosition","image","backgroundImage","repeat","backgroundRepeat","transform","translateX","interpolate","inputRange","outputRange","scale"],"sources":["toggle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { TouchableOpacity, Animated, Easing, LayoutChangeEvent, View } from 'react-native';\n\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport WmToggleProps from './toggle.props';\nimport { DEFAULT_CLASS, WmToggleStyles } from './toggle.styles';\n\nexport class WmToggleState extends BaseComponentState<WmToggleProps> {\n isSwitchOn: boolean = false;\n isValid: boolean = true;\n errorType = '';\n viewWidth: number = 0;\n}\n\nexport default class WmToggle extends BaseComponent<WmToggleProps, WmToggleState, WmToggleStyles> {\n\n private animationValue = new Animated.Value(0);\n private scaleValue = new Animated.Value(1);\n\n constructor(props: WmToggleProps) {\n super(props, DEFAULT_CLASS, new WmToggleProps(), new WmToggleState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n let value =\n unStringify($new) ===\n unStringify(this.state.props.checkedvalue, true);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmToggleState);\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as WmToggleState);\n }\n\n onToggleSwitch(value: any) {\n const oldValue = this.state.props.datavalue;\n this.validate(value);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n Animated.sequence([\n Animated.timing(this.scaleValue, {\n toValue: 1.6,\n duration: 300,\n useNativeDriver: true,\n }),\n Animated.timing(this.animationValue, {\n toValue: value ? 1 : 0,\n duration: 300,\n easing: Easing.linear,\n useNativeDriver: true,\n }),\n ]).start(() => {\n Animated.timing(this.scaleValue, {\n toValue: value ? 1.5 : 1,\n duration: 0,\n useNativeDriver: true,\n }).start();\n });\n // @ts-ignore\n this.updateState({ props: { datavalue: dataValue } },\n ()=> {\n if (!this.props.onFieldChange) {\n this.invokeEventCallback('onChange', [null, this.proxy, dataValue, oldValue]);\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', dataValue, oldValue);\n }\n this.invokeEventCallback('onBlur', [ null, this.proxy ]);\n });\n }\n\n onLayoutChange(event: LayoutChangeEvent){\n let width = event.nativeEvent.layout.width;\n this.setState({\n viewWidth: width,\n } as WmToggleState);\n }\n\n renderWidget(props: WmToggleProps) {\n const styles = this.theme.mergeStyle(this.styles, \n this.theme.getStyle(this.state.isSwitchOn ? 'app-toggle-on' : 'app-toggle-off'));\n return (\n <TouchableOpacity \n onLayout={(e) => {\n this.onLayoutChange(e);\n }}\n {...getAccessibilityProps(AccessibilityWidgetType.TOGGLE, {...this.props, selected: this.state.isSwitchOn})}\n onPress={() => {\n if (this.props.disabled || this.props.readonly) {\n return;\n }\n // Added setTimeout to smooth animation\n setTimeout(() => {\n this.invokeEventCallback('onFocus', [null, this]);\n this.invokeEventCallback('onTap', [null, this]);\n }, 500);\n this.onToggleSwitch(!this.state.isSwitchOn);\n }}{...this.getTestPropsForAction()}\n style={styles.root}>\n {styles.root.animation && styles.root.animation === 'none' ? (\n <View style={styles.handle}>\n <BackgroundComponent\n size={styles.handle.backgroundSize || 'contain'}\n position={styles.handle.backgroundPosition}\n image={styles.handle.backgroundImage}\n repeat={styles.handle.backgroundRepeat || 'no-repeat'}\n />\n </View>\n ): ( <Animated.View\n style={[\n styles.handle,\n {\n transform: [\n {\n translateX: this.animationValue.interpolate({\n inputRange: [0, 1],\n outputRange: [0, this.state.viewWidth - (this.styles.handle.width as number + 18)],\n }),\n },\n { scale: this.scaleValue }\n ],\n },\n ]}>\n <BackgroundComponent\n size={styles.handle.backgroundSize || 'contain'}\n position={styles.handle.backgroundPosition}\n image={styles.handle.backgroundImage}\n repeat={styles.handle.backgroundRepeat || 'no-repeat'}\n />\n </Animated.View>)}\n </TouchableOpacity>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,MAAM,EAAqBC,IAAI,QAAQ,cAAc;AAE1F,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,WAAW,EAAEC,aAAa,QAAO,sCAAsC;AAChF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASP,kBAAkB,CAAgB;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAC7C,KAAK;IAAAA,eAAA,kBACR,IAAI;IAAAA,eAAA,oBACX,EAAE;IAAAA,eAAA,oBACM,CAAC;EAAA;AACvB;AAEA,eAAe,MAAMC,QAAQ,SAASZ,aAAa,CAA+C;EAKhGS,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIE,aAAa,CAAC,CAAC,CAAC;IAACG,eAAA,yBAJ/C,IAAIf,QAAQ,CAACkB,KAAK,CAAC,CAAC,CAAC;IAAAH,eAAA,qBACzB,IAAIf,QAAQ,CAACkB,KAAK,CAAC,CAAC,CAAC;EAI1C;EAEAC,gBAAgBA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,EAAE;IACnD,QAAQF,IAAI;MACV,KAAK,WAAW;QACd,IAAIG,KAAK,GACPjB,WAAW,CAACe,IAAI,CAAC,KACjBf,WAAW,CAAC,IAAI,CAACkB,KAAK,CAACP,KAAK,CAACQ,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AAEzB,MAAM,CAACkB,MAAM,CAACQ,gBAAgB,IAAI;IAAY,CACvD,CACG,CAAC,gBACFvF,KAAA,CAAAiE,aAAA,CAAC/D,QAAQ,CAACE,IAAI;MACjBwE,KAAK,EAAE,CACLf,MAAM,CAACkB,MAAM,EACb;QACES,SAAS,EAAE,CACT;UACEC,UAAU,EAAE,IAAI,CAAC3C,cAAc,CAAC4C,WAAW,CAAC;YAC1CC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YAClBC,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,CAAClE,KAAK,CAACiC,SAAS,IAAI,IAAI,CAACE,MAAM,CAACkB,MAAM,CAACxB,KAAK,GAAa,EAAE,CAAC;UACnF,CAAC;QACH,CAAC,EACD;UAAEsC,KAAK,EAAE,IAAI,CAACnD;QAAW,CAAC;MAE9B,CAAC;IACD,gBACF1C,KAAA,CAAAiE,aAAA,CAAC5D,mBAAmB;MAClB2E,IAAI,EAAEnB,MAAM,CAACkB,MAAM,CAACE,cAAc,IAAI,SAAU;MAChDC,QAAQ,EAAErB,MAAM,CAACkB,MAAM,CAACI,kBAAmB;MAC3CC,KAAK,EAAEvB,MAAM,CAACkB,MAAM,CAACM,eAAgB;MACrCC,MAAM,EAAEzB,MAAM,CAACkB,MAAM,CAACQ,gBAAgB,IAAI;IAAY,CACvD,CACY,CACD,CAAC;EAEvB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","TouchableOpacity","Animated","Easing","View","BackgroundComponent","BaseComponent","BaseComponentState","unStringify","validateField","AccessibilityWidgetType","getAccessibilityProps","WmToggleProps","DEFAULT_CLASS","createSkeleton","WmToggleState","constructor","args","_defineProperty","WmToggle","props","Value","onPropertyChange","name","$new","$old","value","state","checkedvalue","updateState","isSwitchOn","updateDatavalue","datavalue","validate","validationObj","isValid","errorType","onToggleSwitch","oldValue","dataValue","uncheckedvalue","sequence","timing","scaleValue","toValue","duration","useNativeDriver","animationValue","easing","linear","start","onFieldChange","invokeEventCallback","proxy","onLayoutChange","event","width","nativeEvent","layout","setState","viewWidth","renderSkeleton","theme","styles","skeleton","root","renderWidget","mergeStyle","getStyle","createElement","_extends","onLayout","e","TOGGLE","selected","onPress","disabled","readonly","setTimeout","getTestPropsForAction","style","animation","handle","size","backgroundSize","position","backgroundPosition","image","backgroundImage","repeat","backgroundRepeat","transform","translateX","interpolate","inputRange","outputRange","scale"],"sources":["toggle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { TouchableOpacity, Animated, Easing, LayoutChangeEvent, View, DimensionValue } from 'react-native';\n\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport WmToggleProps from './toggle.props';\nimport { DEFAULT_CLASS, WmToggleStyles } from './toggle.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmToggleState extends BaseComponentState<WmToggleProps> {\n isSwitchOn: boolean = false;\n isValid: boolean = true;\n errorType = '';\n viewWidth: number = 0;\n}\n\nexport default class WmToggle extends BaseComponent<WmToggleProps, WmToggleState, WmToggleStyles> {\n\n private animationValue = new Animated.Value(0);\n private scaleValue = new Animated.Value(1);\n\n constructor(props: WmToggleProps) {\n super(props, DEFAULT_CLASS, new WmToggleProps(), new WmToggleState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n let value =\n unStringify($new) ===\n unStringify(this.state.props.checkedvalue, true);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmToggleState);\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as WmToggleState);\n }\n\n onToggleSwitch(value: any) {\n const oldValue = this.state.props.datavalue;\n this.validate(value);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n Animated.sequence([\n Animated.timing(this.scaleValue, {\n toValue: 1.6,\n duration: 300,\n useNativeDriver: true,\n }),\n Animated.timing(this.animationValue, {\n toValue: value ? 1 : 0,\n duration: 300,\n easing: Easing.linear,\n useNativeDriver: true,\n }),\n ]).start(() => {\n Animated.timing(this.scaleValue, {\n toValue: value ? 1.5 : 1,\n duration: 0,\n useNativeDriver: true,\n }).start();\n });\n // @ts-ignore\n this.updateState({ props: { datavalue: dataValue } },\n ()=> {\n if (!this.props.onFieldChange) {\n this.invokeEventCallback('onChange', [null, this.proxy, dataValue, oldValue]);\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', dataValue, oldValue);\n }\n this.invokeEventCallback('onBlur', [ null, this.proxy ]);\n });\n }\n\n onLayoutChange(event: LayoutChangeEvent){\n let width = event.nativeEvent.layout.width;\n this.setState({\n viewWidth: width,\n } as WmToggleState);\n }\n\n public renderSkeleton(props: WmToggleProps): React.ReactNode {\n \n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.skeleton.root,\n });\n }\n\n renderWidget(props: WmToggleProps) {\n const styles = this.theme.mergeStyle(this.styles, \n this.theme.getStyle(this.state.isSwitchOn ? 'app-toggle-on' : 'app-toggle-off'));\n return (\n <TouchableOpacity \n onLayout={(e) => {\n this.onLayoutChange(e);\n }}\n {...getAccessibilityProps(AccessibilityWidgetType.TOGGLE, {...this.props, selected: this.state.isSwitchOn})}\n onPress={() => {\n if (this.props.disabled || this.props.readonly) {\n return;\n }\n // Added setTimeout to smooth animation\n setTimeout(() => {\n this.invokeEventCallback('onFocus', [null, this]);\n this.invokeEventCallback('onTap', [null, this]);\n }, 500);\n this.onToggleSwitch(!this.state.isSwitchOn);\n }}{...this.getTestPropsForAction()}\n style={styles.root}>\n {styles.root.animation && styles.root.animation === 'none' ? (\n <View style={styles.handle}>\n <BackgroundComponent\n size={styles.handle.backgroundSize || 'contain'}\n position={styles.handle.backgroundPosition}\n image={styles.handle.backgroundImage}\n repeat={styles.handle.backgroundRepeat || 'no-repeat'}\n />\n </View>\n ): ( <Animated.View\n style={[\n styles.handle,\n {\n transform: [\n {\n translateX: this.animationValue.interpolate({\n inputRange: [0, 1],\n outputRange: [0, this.state.viewWidth - (this.styles.handle.width as number + 18)],\n }),\n },\n { scale: this.scaleValue }\n ],\n },\n ]}>\n <BackgroundComponent\n size={styles.handle.backgroundSize || 'contain'}\n position={styles.handle.backgroundPosition}\n image={styles.handle.backgroundImage}\n repeat={styles.handle.backgroundRepeat || 'no-repeat'}\n />\n </Animated.View>)}\n </TouchableOpacity>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,MAAM,EAAqBC,IAAI,QAAwB,cAAc;AAE1G,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,WAAW,EAAEC,aAAa,QAAO,sCAAsC;AAChF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,aAAa,SAASR,kBAAkB,CAAgB;EAAAS,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAC7C,KAAK;IAAAA,eAAA,kBACR,IAAI;IAAAA,eAAA,oBACX,EAAE;IAAAA,eAAA,oBACM,CAAC;EAAA;AACvB;AAEA,eAAe,MAAMC,QAAQ,SAASb,aAAa,CAA+C;EAKhGU,WAAWA,CAACI,KAAoB,EAAE;IAChC,K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;MAClB8E,IAAI,EAAEpB,MAAM,CAACmB,MAAM,CAACE,cAAc,IAAI,SAAU;MAChDC,QAAQ,EAAEtB,MAAM,CAACmB,MAAM,CAACI,kBAAmB;MAC3CC,KAAK,EAAExB,MAAM,CAACmB,MAAM,CAACM,eAAgB;MACrCC,MAAM,EAAE1B,MAAM,CAACmB,MAAM,CAACQ,gBAAgB,IAAI;IAAY,CACvD,CACY,CACD,CAAC;EAEvB;AACF","ignoreList":[]}
@@ -15,6 +15,8 @@ export default class WmToggleProps extends BaseProps {
15
15
  _defineProperty(this, "accessibilityrole", "togglebutton");
16
16
  _defineProperty(this, "accessibilitylabelledby", undefined);
17
17
  _defineProperty(this, "invokeEvent", void 0);
18
+ _defineProperty(this, "skeletonheight", null);
19
+ _defineProperty(this, "skeletonwidth", null);
18
20
  }
19
21
  }
20
22
  //# sourceMappingURL=toggle.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmToggleProps","constructor","args","_defineProperty","undefined"],"sources":["toggle.props.ts"],"sourcesContent":["import {AccessibilityRole} from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmToggleProps extends BaseProps {\n checkedvalue: any = true;\n uncheckedvalue: any = false;\n datavalue: any;\n readonly? = false;\n onFieldChange: any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = \"togglebutton\";\n accessibilitylabelledby?: string = undefined;\n invokeEvent?: Function;\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAC/B,IAAI;IAAAA,eAAA,yBACF,KAAK;IAAAA,eAAA;IAAAA,eAAA,mBAEf,KAAK;IAAAA,eAAA;IAAAA,eAAA,6BAEaC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,cAAc;IAAAA,eAAA,kCACnBC,SAAS;IAAAD,eAAA;EAAA;AAE9C","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmToggleProps","constructor","args","_defineProperty","undefined"],"sources":["toggle.props.ts"],"sourcesContent":["import {AccessibilityRole} from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmToggleProps extends BaseProps {\n checkedvalue: any = true;\n uncheckedvalue: any = false;\n datavalue: any;\n readonly? = false;\n onFieldChange: any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = \"togglebutton\";\n accessibilitylabelledby?: string = undefined;\n invokeEvent?: Function;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAC/B,IAAI;IAAAA,eAAA,yBACF,KAAK;IAAAA,eAAA;IAAAA,eAAA,mBAEf,KAAK;IAAAA,eAAA;IAAAA,eAAA,6BAEaC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,cAAc;IAAAA,eAAA,kCACnBC,SAAS;IAAAD,eAAA;IAAAA,eAAA,yBAElB,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
@@ -19,6 +19,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
19
19
  marginRight: 0,
20
20
  backgroundSize: '100% 100%',
21
21
  backgroundPosition: 'center'
22
+ },
23
+ skeleton: {
24
+ root: {
25
+ width: 52,
26
+ height: 32,
27
+ borderRadius: 18
28
+ }
22
29
  }
23
30
  });
24
31
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","height","flexDirection","alignItems","borderRadius","text","handle","marginLeft","marginRight","backgroundSize","backgroundPosition","backgroundColor","toggleOnColor","toggleHandleColor","toggleOffColor","borderColor","toggleOffBorderColor","borderWidth","toggleHandleDisableColor"],"sources":["toggle.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ViewStyle } from 'react-native';\n\nexport type WmToggleStyles = BaseStyles & {\n handle: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-toggle';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmToggleStyles = defineStyles({\n root: {\n width: 52,\n height: 32,\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: 18\n },\n text: {},\n handle: {\n width: 16,\n height: 16,\n borderRadius: 18,\n marginLeft : 8,\n marginRight: 0,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-on', '', {\n root : {\n backgroundColor: themeVariables.toggleOnColor,\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-off', '', {\n root : {\n backgroundColor: themeVariables.toggleOffColor,\n borderColor: themeVariables.toggleOffBorderColor,\n borderWidth: 2\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleDisableColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {}\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNN,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVG,YAAY,EAAE,EAAE;MAChBG,UAAU,EAAG,CAAC;MACdC,WAAW,EAAE,CAAC;MACdC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE;IACtB;EACJ,CAAC,CAAC;EAEFb,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,KAAK,EAAE,EAAE,EAAE;IAClCK,IAAI,EAAG;MACLY,eAAe,EAAEf,cAAc,CAACgB;IAClC,CAAC;IACDN,MAAM,EAAE;MACNK,eAAe,EAAEf,cAAc,CAACiB;IAClC;EACF,CAAmB,CAAC;EACpBhB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLY,eAAe,EAAEf,cAAc,CAACkB,cAAc;MAC9CC,WAAW,EAAEnB,cAAc,CAACoB,oBAAoB;MAChDC,WAAW,EAAE;IACf,CAAC;IACDX,MAAM,EAAE;MACNK,eAAe,EAAEf,cAAc,CAACsB;IAClC;EACF,CAAmB,CAAC;EACpBrB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;EACxCG,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG,CAAC;EACZ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","height","flexDirection","alignItems","borderRadius","text","handle","marginLeft","marginRight","backgroundSize","backgroundPosition","skeleton","backgroundColor","toggleOnColor","toggleHandleColor","toggleOffColor","borderColor","toggleOffBorderColor","borderWidth","toggleHandleDisableColor"],"sources":["toggle.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ViewStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmToggleStyles = BaseStyles & {\n handle: ViewStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-toggle';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmToggleStyles = defineStyles({\n root: {\n width: 52,\n height: 32,\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: 18\n },\n text: {},\n handle: {\n width: 16,\n height: 16,\n borderRadius: 18,\n marginLeft : 8,\n marginRight: 0,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n },\n skeleton: {\n root: {\n width: 52,\n height: 32,\n borderRadius: 18,\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-on', '', {\n root : {\n backgroundColor: themeVariables.toggleOnColor,\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-off', '', {\n root : {\n backgroundColor: themeVariables.toggleOffColor,\n borderColor: themeVariables.toggleOffBorderColor,\n borderWidth: 2\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleDisableColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {}\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAq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AAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;EACxCG,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG,CAAC;EACZ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","isString","TouchableOpacity","Text","View","Dimensions","Animated","PanResponder","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","AccessibilityWidgetType","getAccessibilityProps","ScrollView","GestureHandlerRootView","WmPopoverState","constructor","args","_defineProperty","WmPopover","props","Value","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","_","gestureState","dy","Number","styles","popover","minHeight","dragY","setValue","onPanResponderRelease","timing","toValue","maxHeight","duration","useNativeDriver","start","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","isOpened","invokeEventCallback","stopPropagation","autoopen","showPopover","getDefaultStyles","isActionSheet","theme","getStyle","defaultClass","renderPopoverContent","dimensions","createElement","style","mergeStyle","onScroll","event","notify","scrollEventThrottle","accessible","accessibilityViewIsModal","title","_extends","getTestPropsForAction","activeOpacity","onPress","autoclose","hide","popoverContent","root","onLoad","renderPartial","p","children","onPropertyChange","name","$new","$old","prepareModalOptions","content","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","animation","contentanimation","onClose","setState","isPartialLoaded","hideModal","renderWidget","popoverheight","onLayout","computePosition","ref","POVOVER","_background","id","getTestId","caption","badgevalue","iconclass","iconposition","iconheight","iconwidth","iconmargin","iconurl","link","onTap","showModal","panResponder","panHandlers"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, Dimensions, Animated, PanResponder } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { SyntheticEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { ScrollView, GestureHandlerRootView } from 'react-native-gesture-handler';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n dragY = new Animated.Value(0);\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n\n if (this.state.props.autoopen) {\n this.showPopover(); \n }\n }\n\n public panResponder = PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0 && gestureState.dy < Number(this.styles.popover.minHeight)) {\n this.dragY.setValue(Number(this.styles.popover.minHeight) - gestureState.dy);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n if (gestureState.dy < -50) {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.maxHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n } else {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.minHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n }\n },\n });\n \n getDefaultStyles() {\n const isActionSheet = this.state.props.type === 'action-sheet';\n return this.theme.getStyle(`${this.defaultClass} ${isActionSheet ? 'app-popover-action-sheet' : ''}`);\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public renderPopoverContent (props : WmPopoverProps , styles : WmPopoverStyles, dimensions: any) {\n return (\n <ScrollView style={props.type === \"action-sheet\" ? {dimensions} : this.theme.mergeStyle(styles.popover, dimensions)} \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n accessible={props.type !== \"dropdown\"} accessibilityViewIsModal>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity \n {...this.getTestPropsForAction('outercontent')}\n activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n {... props.renderPartial ? {\n renderPartial : (p: any, onLoad: Function) => {\n return props.renderPartial && props.renderPartial(props, onLoad);\n }\n } : {}}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n )}\n\n public showPopover = (e?: SyntheticEvent) => {\n this.updateState({ isOpened: true } as WmPopoverState);\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"autoopen\":\n if($new){\n this.showPopover && this.showPopover()\n }\n else{\n this.hide && this.hide()\n }\n }\n }\n\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}} {...getAccessibilityProps(AccessibilityWidgetType.POVOVER, props)}>\n {this._background}\n <WmAnchor\n id={this.getTestId('trigger')}\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n styles={styles.link}\n onTap={this.showPopover}/>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions(props.type === 'action-sheet' ? (\n <Animated.View style= {[styles.popover,{ height: this.dragY }]} {...this.panResponder.panHandlers}>\n <GestureHandlerRootView>\n {this.renderPopoverContent(props, styles, dimensions)}\n </GestureHandlerRootView>\n </Animated.View>\n ): (this.renderPopoverContent(props, styles, dimensions)), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,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"version":3,"names":["React","isString","TouchableOpacity","Text","View","Dimensions","Animated","PanResponder","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","AccessibilityWidgetType","getAccessibilityProps","ScrollView","GestureHandlerRootView","WmPopoverState","constructor","args","_defineProperty","WmPopover","props","Value","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","_","gestureState","dy","Number","styles","popover","minHeight","dragY","setValue","onPanResponderRelease","timing","toValue","maxHeight","duration","useNativeDriver","start","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","isOpened","invokeEventCallback","stopPropagation","autoopen","showPopover","getDefaultStyles","isActionSheet","theme","getStyle","defaultClass","renderPopoverContent","dimensions","createElement","style","mergeStyle","onScroll","event","notify","scrollEventThrottle","accessible","accessibilityViewIsModal","title","_extends","getTestPropsForAction","activeOpacity","onPress","autoclose","hide","popoverContent","root","onLoad","renderPartial","p","children","onPropertyChange","name","$new","$old","prepareModalOptions","content","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","animation","contentanimation","onClose","setState","isPartialLoaded","hideModal","renderWidget","popoverheight","onLayout","computePosition","ref","POVOVER","_background","id","getTestId","caption","badgevalue","iconclass","iconposition","iconheight","iconwidth","iconmargin","iconurl","link","onTap","showModal","panResponder","panHandlers"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, Dimensions, Animated, PanResponder } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { SyntheticEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { ScrollView, GestureHandlerRootView } from 'react-native-gesture-handler';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n dragY = new Animated.Value(0);\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n\n if (this.state.props.autoopen) {\n this.showPopover(); \n }\n }\n\n public panResponder = PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0 && gestureState.dy < Number(this.styles.popover.minHeight)) {\n this.dragY.setValue(Number(this.styles.popover.minHeight) - gestureState.dy);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n if (gestureState.dy < -50) {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.maxHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n } else {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.minHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n }\n },\n });\n \n getDefaultStyles() {\n const isActionSheet = this.state.props.type === 'action-sheet';\n return this.theme.getStyle(`${this.defaultClass} ${isActionSheet ? 'app-popover-action-sheet' : ''}`);\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public renderPopoverContent (props : WmPopoverProps , styles : WmPopoverStyles, dimensions: any) {\n return (\n <ScrollView style={props.type === \"action-sheet\" ? {dimensions} : this.theme.mergeStyle(styles.popover, dimensions)} \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n accessible={props.type !== \"dropdown\"} accessibilityViewIsModal>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity \n {...this.getTestPropsForAction('outercontent')}\n activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n {...props.renderPartial ? {\n renderPartial: (p: any, onLoad: Function) => {\n return props.renderPartial && props.renderPartial(props, onLoad);\n }\n } : {}}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n )}\n\n public showPopover = (e?: SyntheticEvent) => {\n this.updateState({ isOpened: true } as WmPopoverState);\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"autoopen\":\n if($new){\n this.showPopover && this.showPopover()\n }\n else{\n this.hide && this.hide()\n }\n }\n }\n\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}} {...getAccessibilityProps(AccessibilityWidgetType.POVOVER, props)}>\n {this._background}\n <WmAnchor\n id={this.getTestId('trigger')}\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n styles={styles.link}\n onTap={this.showPopover}/>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions(props.type === 'action-sheet' ? (\n <Animated.View style= {[styles.popover,{ height: this.dragY }]} {...this.panResponder.panHandlers}>\n <GestureHandlerRootView>\n {this.renderPopoverContent(props, styles, dimensions)}\n </GestureHandlerRootView>\n </Animated.View>\n ): (this.renderPopoverContent(props, styles, dimensions)), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAA4BC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,YAAY,QAAQ,cAAc;AAClH,SAASC,aAAa,EAAEC,kBAAkB,QAAmB,+CAA+C;AAG5G,SAASC,aAAa,QAA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