@wavemaker/app-rn-runtime 11.5.0-next.40301 → 11.5.0-rc.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. app-rn-runtime/actions/login-action.js +4 -0
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js +4 -0
  4. app-rn-runtime/actions/logout-action.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +4 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +1 -2
  8. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel.component.js +130 -68
  10. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel.props.js +3 -0
  12. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  13. app-rn-runtime/components/advanced/carousel/carousel.styles.js +17 -9
  14. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  15. app-rn-runtime/components/advanced/login/login.component.js +3 -2
  16. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  17. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +17 -16
  18. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  19. app-rn-runtime/components/advanced/webview/webview.component.js +1 -0
  20. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  21. app-rn-runtime/components/basic/anchor/anchor.component.js +7 -5
  22. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  23. app-rn-runtime/components/basic/animatedview.component.js +50 -0
  24. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  25. app-rn-runtime/components/basic/audio/audio.component.js +5 -0
  26. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  27. app-rn-runtime/components/basic/button/button.component.js +7 -6
  28. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  29. app-rn-runtime/components/basic/button/button.styles.js +14 -4
  30. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +2 -1
  32. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  33. app-rn-runtime/components/basic/icon/icon.component.js +11 -5
  34. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  35. app-rn-runtime/components/basic/icon/icon.props.js +1 -0
  36. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  37. app-rn-runtime/components/basic/label/label.component.js +60 -3
  38. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  39. app-rn-runtime/components/basic/label/label.styles.js +2 -1
  40. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  41. app-rn-runtime/components/basic/message/message.component.js +6 -3
  42. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  43. app-rn-runtime/components/basic/picture/picture.component.js +7 -5
  44. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  45. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +4 -2
  46. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  47. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +1 -1
  48. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +3 -2
  50. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  51. app-rn-runtime/components/basic/search/search.component.js +12 -6
  52. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  53. app-rn-runtime/components/basic/search/search.styles.js +11 -10
  54. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  55. app-rn-runtime/components/basic/spinner/spinner.component.js +6 -2
  56. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  57. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  58. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  59. app-rn-runtime/components/basic/video/video.component.js +2 -1
  60. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  61. app-rn-runtime/components/chart/basechart.component.js +19 -8
  62. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  63. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +23 -2
  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.props.js +1 -0
  66. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  67. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +213 -0
  68. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -0
  69. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +15 -0
  70. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -0
  71. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +7 -0
  72. app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +1 -0
  73. app-rn-runtime/components/container/accordion/accordion.component.js +22 -15
  74. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  75. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +6 -24
  76. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  77. app-rn-runtime/components/container/container.component.js +3 -2
  78. app-rn-runtime/components/container/container.component.js.map +1 -1
  79. app-rn-runtime/components/container/panel/collapsible-pane.component.js +26 -0
  80. app-rn-runtime/components/container/panel/collapsible-pane.component.js.map +1 -0
  81. app-rn-runtime/components/container/panel/panel.component.js +44 -62
  82. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  83. app-rn-runtime/components/container/panel/panel.styles.js +9 -2
  84. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  85. app-rn-runtime/components/container/partial-host.component.js +1 -1
  86. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  87. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +7 -5
  88. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  89. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +9 -5
  90. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  91. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  92. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  93. app-rn-runtime/components/container/tabs/tabs.component.js +1 -0
  94. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  95. app-rn-runtime/components/container/tile/tile.component.js +3 -2
  96. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  97. app-rn-runtime/components/container/wizard/wizard.component.js +9 -4
  98. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  99. app-rn-runtime/components/container/wizard/wizard.styles.js +18 -5
  100. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  101. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  102. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  103. app-rn-runtime/components/data/card/card.component.js +3 -2
  104. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  105. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
  106. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  107. app-rn-runtime/components/data/form/form-field/form-field.component.js +3 -2
  108. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  109. app-rn-runtime/components/data/form/form.component.js +3 -0
  110. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  111. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  112. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  113. app-rn-runtime/components/data/list/list-template/list-template.styles.js +9 -1
  114. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  115. app-rn-runtime/components/data/list/list.component.js +41 -31
  116. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  117. app-rn-runtime/components/data/list/list.props.js +6 -0
  118. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  119. app-rn-runtime/components/data/list/list.styles.js +12 -5
  120. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  121. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -0
  122. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  123. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +2 -1
  124. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  125. app-rn-runtime/components/device/camera/camera.component.js +1 -0
  126. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  127. app-rn-runtime/components/device/camera/camera.styles.js +2 -1
  128. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  129. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -1
  130. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  131. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +9 -3
  132. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  133. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +6 -2
  134. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  135. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +10 -10
  136. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  137. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -0
  138. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  139. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +17 -8
  140. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  141. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +4 -2
  142. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  143. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +2 -1
  144. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
  145. app-rn-runtime/components/input/calendar/calendar.component.js +4 -0
  146. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  147. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -11
  148. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  149. app-rn-runtime/components/input/calendar/views/month-view.js +4 -0
  150. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  151. app-rn-runtime/components/input/checkbox/checkbox.component.js +6 -6
  152. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  153. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -6
  154. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  155. app-rn-runtime/components/input/chips/chips.component.js +8 -4
  156. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  157. app-rn-runtime/components/input/chips/chips.styles.js +20 -12
  158. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  159. app-rn-runtime/components/input/composite/composite.component.js +8 -1
  160. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  161. app-rn-runtime/components/input/composite/composite.props.js +1 -0
  162. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  163. app-rn-runtime/components/input/composite/composite.styles.js +16 -1
  164. app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
  165. app-rn-runtime/components/input/currency/currency.component.js +1 -1
  166. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  167. app-rn-runtime/components/input/currency/currency.styles.js +12 -4
  168. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  169. app-rn-runtime/components/input/epoch/base-datetime.component.js +6 -4
  170. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  171. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -0
  172. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  173. app-rn-runtime/components/input/number/number.component.js +1 -1
  174. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  175. app-rn-runtime/components/input/number/number.styles.js +6 -2
  176. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  177. app-rn-runtime/components/input/radioset/radioset.component.js +10 -5
  178. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  179. app-rn-runtime/components/input/radioset/radioset.props.js +6 -0
  180. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  181. app-rn-runtime/components/input/radioset/radioset.styles.js +4 -8
  182. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  183. app-rn-runtime/components/input/rating/rating.component.js +2 -0
  184. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  185. app-rn-runtime/components/input/select/select.component.js +17 -13
  186. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  187. app-rn-runtime/components/input/select/select.styles.js +8 -4
  188. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  189. app-rn-runtime/components/input/slider/slider.component.js +94 -23
  190. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  191. app-rn-runtime/components/input/slider/slider.styles.js +27 -2
  192. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  193. app-rn-runtime/components/input/switch/switch.component.js +6 -4
  194. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  195. app-rn-runtime/components/input/switch/switch.styles.js +7 -4
  196. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  197. app-rn-runtime/components/input/text/text.component.js +1 -1
  198. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  199. app-rn-runtime/components/input/text/text.styles.js +5 -1
  200. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  201. app-rn-runtime/components/input/textarea/textarea.component.js +1 -1
  202. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  203. app-rn-runtime/components/input/toggle/toggle.component.js +3 -2
  204. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  205. app-rn-runtime/components/input/toggle/toggle.styles.js +21 -9
  206. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  207. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +7 -2
  208. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  209. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -1
  210. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  211. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -0
  212. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  213. app-rn-runtime/components/navigation/menu/menu.component.js +5 -3
  214. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  215. app-rn-runtime/components/navigation/menu/menu.styles.js +10 -6
  216. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  217. app-rn-runtime/components/navigation/navbar/navbar.component.js +7 -4
  218. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  219. app-rn-runtime/components/navigation/navitem/navitem.component.js +6 -3
  220. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  221. app-rn-runtime/components/navigation/navitem/navitem.styles.js +14 -10
  222. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  223. app-rn-runtime/components/navigation/popover/popover.component.js +10 -5
  224. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  225. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  226. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  227. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  228. app-rn-runtime/components/page/left-panel/left-panel.component.js +2 -2
  229. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  230. app-rn-runtime/components/page/left-panel/left-panel.styles.js +6 -1
  231. app-rn-runtime/components/page/left-panel/left-panel.styles.js.map +1 -1
  232. app-rn-runtime/components/page/tabbar/tabbar.component.js +7 -6
  233. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  234. app-rn-runtime/components/page/tabbar/tabbar.styles.js +22 -0
  235. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  236. app-rn-runtime/core/base.component.js +80 -37
  237. app-rn-runtime/core/base.component.js.map +1 -1
  238. app-rn-runtime/core/constant.service.js +22 -0
  239. app-rn-runtime/core/constant.service.js.map +1 -0
  240. app-rn-runtime/core/formatters.js +9 -2
  241. app-rn-runtime/core/formatters.js.map +1 -1
  242. app-rn-runtime/core/imageSizeEstimator.js +4 -0
  243. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  244. app-rn-runtime/core/key.extractor.js +22 -0
  245. app-rn-runtime/core/key.extractor.js.map +1 -0
  246. app-rn-runtime/core/tappable.component.js +15 -5
  247. app-rn-runtime/core/tappable.component.js.map +1 -1
  248. app-rn-runtime/core/testid.provider.js +5 -0
  249. app-rn-runtime/core/testid.provider.js.map +1 -0
  250. app-rn-runtime/gestures/swipe.animation.js +34 -11
  251. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  252. app-rn-runtime/package.json +4 -3
  253. app-rn-runtime/runtime/App.js +29 -4
  254. app-rn-runtime/runtime/App.js.map +1 -1
  255. app-rn-runtime/runtime/base-fragment.component.js +13 -3
  256. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  257. app-rn-runtime/runtime/base-page.component.js +17 -0
  258. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  259. app-rn-runtime/runtime/services/app-security.service.js +14 -3
  260. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  261. app-rn-runtime/runtime/services/device/camera-service.js +26 -9
  262. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  263. app-rn-runtime/runtime/services/device/scan-service.js +16 -2
  264. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  265. app-rn-runtime/styles/theme.js +30 -1
  266. app-rn-runtime/styles/theme.js.map +1 -1
  267. app-rn-runtime/styles/theme.variables.js +14 -3
  268. app-rn-runtime/styles/theme.variables.js.map +1 -1
  269. app-rn-runtime/variables/http.service.js +1 -1
  270. app-rn-runtime/variables/http.service.js.map +1 -1
  271. app-rn-runtime/variables/live-variable.js +1 -0
  272. app-rn-runtime/variables/live-variable.js.map +1 -1
  273. app-rn-runtime/variables/model-variable.js +11 -0
  274. app-rn-runtime/variables/model-variable.js.map +1 -1
  275. app-rn-runtime/variables/service-variable.js +1 -0
  276. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","listIcon","marginTop","marginRight","groupHeading","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","heading","padding","marginBottom","listHeaderBgColor","title","listTitleColor","subheading","emptyMessage","item","getStyle","shadowColor","flexDirection","paddingTop","paddingBottom","itemBgColor","borderRadius","borderStyle","selectedItem","selectedIcon","position","right","top","primaryColor","minWidth","width","borderBottomWidth","borderBottomColor","listDividerColor","borderRightWidth","borderRightColor"],"sources":["list.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmLabelStyles } from '@wavemaker/app-rn-runtime/components/basic/label/label.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmListStyles = BaseStyles & {\n heading: AllStyle,\n groupHeading: TextStyle,\n listIcon: WmIconStyles,\n loadingIcon: WmIconStyles,\n title: WmLabelStyles,\n subheading: WmLabelStyles,\n emptyMessage: WmLabelStyles,\n item: AllStyle,\n selectedItem: AllStyle,\n selectedIcon: WmIconStyles\n};\n\nexport const DEFAULT_CLASS = 'app-list';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListStyles = defineStyles({\n root: {},\n text: {},\n listIcon: {\n root: {\n marginTop: 4,\n marginRight: 8\n }\n } as WmIconStyles,\n groupHeading: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\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 heading : {\n padding: 8,\n marginBottom: 6,\n backgroundColor: themeVariables.listHeaderBgColor\n },\n title: {\n text: {\n color: themeVariables.listTitleColor,\n fontSize: 16,\n lineHeight: 24,\n }\n } as WmLabelStyles,\n subheading: {\n text: {\n fontSize: 12,\n lineHeight: 16,\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n emptyMessage: {\n root: {\n flex: 1,\n alignSelf: 'center',\n fontSize: 16,\n lineHeight: 18,\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n item: {\n ...BASE_THEME.getStyle('elevate1').root,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n flexDirection: 'row',\n flex: 1,\n paddingLeft: 4,\n paddingRight: 4,\n paddingTop: 4,\n paddingBottom: 4,\n backgroundColor: themeVariables.itemBgColor,\n borderRadius: 6,\n borderStyle: 'solid',\n },\n selectedItem : {} as AllStyle,\n selectedIcon : {\n root: {\n position: 'absolute',\n right: 0,\n top: 0\n },\n text: {\n color: themeVariables.primaryColor,\n fontSize: 16\n }\n } as WmIconStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('app-horizontal-list', '', {\n groupHeading: {\n minWidth: 120,\n backgroundColor: themeVariables.groupHeadingBgColor,\n },\n item: {\n marginRight: 6\n }\n } as WmListStyles);\n\n addStyle('app-vertical-list', '', {\n item: {\n marginBottom: 6,\n width: '100%',\n borderBottomWidth: 0,\n borderBottomColor: themeVariables.listDividerColor,\n }\n } as any as WmListStyles);\n\n addStyle('app-horizontal-list-dense', '', {\n item: {\n marginRight: 0,\n borderRadius: 0,\n borderRightWidth: 1,\n borderRightColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n\n addStyle('app-list-dense', '', {\n item: {\n marginBottom: 0,\n borderRadius: 0,\n borderBottomWidth: 1,\n borderBottomColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNF,IAAI,EAAE;QACFG,SAAS,EAAE,CAAC;QACZC,WAAW,EAAE;MACjB;IACJ,CAAiB;IACjBC,YAAY,EAAE;MACVC,eAAe,EAAET,cAAc,CAACU,mBAAmB;MACnDC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdC,UAAU,EAAEf,cAAc,CAACgB;IAC/B,CAAC;IACDC,WAAW,EAAE;MACTd,IAAI,EAAE;QACFe,IAAI,EAAE,CAAC;QACPC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBT,QAAQ,EAAE;MACd,CAAC;MACDP,IAAI,EAAE;QACFiB,KAAK,EAAErB,cAAc,CAACsB;MAC1B;IACJ,CAAiB;IACj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EAAE,EAAE,EAAEI,aAAa,CAAC;EAE1CD,QAAQ,CAAC,qBAAqB,EAAE,EAAE,EAAE;IAChCO,YAAY,EAAE;MACVsC,QAAQ,EAAE,GAAG;MACbrC,eAAe,EAAET,cAAc,CAACU;IACpC,CAAC;IACDqB,IAAI,EAAE;MACFxB,WAAW,EAAE;IACjB;EACJ,CAAiB,CAAC;EAElBN,QAAQ,CAAC,mBAAmB,EAAE,EAAE,EAAE;IAC9B8B,IAAI,EAAE;MACFN,YAAY,EAAE,CAAC;MACfsB,KAAK,EAAE,MAAM;MACbC,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAEjD,cAAc,CAACkD;IACtC;EACJ,CAAwB,CAAC;EAEzBjD,QAAQ,CAAC,2BAA2B,EAAE,EAAE,EAAE;IACtC8B,IAAI,EAAE;MACFxB,WAAW,EAAE,CAAC;MACd+B,YAAY,EAAE,CAAC;MACfa,gBAAgB,EAAE,CAAC;MACnBC,gBAAgB,EAAE;IACtB;EACJ,CAAiB,CAAC;EAElBnD,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC3B8B,IAAI,EAAE;MACFN,YAAY,EAAE,CAAC;MACfa,YAAY,EAAE,CAAC;MACfU,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAE;IACvB;EACJ,CAAiB,CAAC;AACtB,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","listIcon","marginTop","marginRight","groupHeading","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","heading","padding","marginBottom","listHeaderBgColor","title","listTitleColor","fontWeight","subheading","emptyMessage","item","getStyle","shadowColor","flexDirection","paddingTop","paddingBottom","minHeight","itemBgColor","borderColor","selectedItemBorderColor","borderRadius","borderStyle","selectedItem","selectedIcon","position","right","top","primaryColor","minWidth","width","borderBottomWidth","borderBottomColor","listDividerColor","borderRightWidth","borderRightColor"],"sources":["list.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmLabelStyles } from '@wavemaker/app-rn-runtime/components/basic/label/label.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmListStyles = BaseStyles & {\n heading: AllStyle,\n groupHeading: TextStyle,\n listIcon: WmIconStyles,\n loadingIcon: WmIconStyles,\n title: WmLabelStyles,\n subheading: WmLabelStyles,\n emptyMessage: WmLabelStyles,\n item: AllStyle,\n selectedItem: AllStyle,\n selectedIcon: WmIconStyles\n};\n\nexport const DEFAULT_CLASS = 'app-list';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListStyles = defineStyles({\n root: {},\n text: {},\n listIcon: {\n root: {\n marginTop: 10,\n marginRight: 8\n }\n } as WmIconStyles,\n groupHeading: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\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 heading : {\n padding: 8,\n marginBottom: 6,\n backgroundColor: themeVariables.listHeaderBgColor\n },\n title: {\n text: {\n color: themeVariables.listTitleColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n lineHeight: 24,\n fontWeight: '400' \n }\n } as WmLabelStyles,\n subheading: {\n text: {\n fontSize: 14,\n lineHeight: 20,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400',\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n emptyMessage: {\n root: {\n flex: 1,\n alignSelf: 'center',\n fontSize: 16,\n lineHeight: 18,\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n item: {\n ...BASE_THEME.getStyle('elevate1').root,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n flexDirection: 'row',\n flex: 1,\n paddingLeft: 4,\n paddingRight: 4,\n paddingTop: 4,\n paddingBottom: 4,\n minHeight: 56,\n backgroundColor: themeVariables.itemBgColor,\n borderColor: themeVariables.selectedItemBorderColor,\n borderRadius: 6,\n borderStyle: 'solid',\n },\n selectedItem : {} as AllStyle,\n selectedIcon : {\n root: {\n position: 'absolute',\n right: 0,\n top: 0\n },\n text: {\n color: themeVariables.primaryColor,\n fontSize: 16\n }\n } as WmIconStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('app-horizontal-list', '', {\n groupHeading: {\n minWidth: 120,\n backgroundColor: themeVariables.groupHeadingBgColor,\n },\n item: {\n marginRight: 6,\n borderColor: themeVariables.selectedItemBorderColor,\n }\n } as WmListStyles);\n\n addStyle('app-vertical-list', '', {\n item: {\n marginBottom: 6,\n width: '100%',\n borderBottomWidth: 0,\n borderBottomColor: themeVariables.listDividerColor,\n }\n } as any as WmListStyles);\n\n addStyle('app-horizontal-list-dense', '', {\n item: {\n marginRight: 0,\n borderRadius: 0,\n borderRightWidth: 1,\n borderRightColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n\n addStyle('app-list-dense', '', {\n item: {\n marginBottom: 0,\n borderRadius: 0,\n borderBottomWidth: 1,\n borderBottomColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA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,EAAErD,cAAc,CAACsD;IACtC;EACJ,CAAwB,CAAC;EAEzBrD,QAAQ,CAAC,2BAA2B,EAAE,EAAE,EAAE;IACtC+B,IAAI,EAAE;MACFzB,WAAW,EAAE,CAAC;MACdmC,YAAY,EAAE,CAAC;MACfa,gBAAgB,EAAE,CAAC;MACnBC,gBAAgB,EAAE;IACtB;EACJ,CAAiB,CAAC;EAElBvD,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC3B+B,IAAI,EAAE;MACFP,YAAY,EAAE,CAAC;MACfiB,YAAY,EAAE,CAAC;MACfU,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAE;IACvB;EACJ,CAAiB,CAAC;AACtB,CAAC,CAAC"}
@@ -34,6 +34,7 @@ export default class WmBarcodescanner extends BaseComponent {
34
34
  return /*#__PURE__*/React.createElement(View, {
35
35
  style: this.styles.root
36
36
  }, this._background, /*#__PURE__*/React.createElement(WmButton, {
37
+ id: this.getTestId('button'),
37
38
  iconclass: props.iconclass,
38
39
  styles: this.styles.button,
39
40
  onTap: this.onScanTap.bind(this),
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","ScanConsumer","WmBarcodescannerProps","DEFAULT_CLASS","WmButton","WmBarcodescannerState","WmBarcodescanner","constructor","props","_defineProperty","onScanTap","params","barcodeFormat","state","barcodeformat","scanner","scanBarcode","then","res","updateState","datavalue","text","invokeEventCallback","proxy","renderWidget","createElement","scanService","style","styles","root","_background","iconclass","button","onTap","bind","caption","iconsize"],"sources":["barcodescanner.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ScanInput, ScanOutput } from '@wavemaker/app-rn-runtime/variables/device/scan/scan.operation';\nimport { ScanConsumer, ScanService } from '@wavemaker/app-rn-runtime/core/device/scan-service';\n\nimport WmBarcodescannerProps from './barcodescanner.props';\nimport { DEFAULT_CLASS, WmBarcodescannerStyles } from './barcodescanner.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nexport class WmBarcodescannerState extends BaseComponentState<WmBarcodescannerProps> {}\n\nexport default class WmBarcodescanner extends BaseComponent<WmBarcodescannerProps, WmBarcodescannerState, WmBarcodescannerStyles> {\n private scanner: ScanService = null as any;\n constructor(props: WmBarcodescannerProps) {\n super(props, DEFAULT_CLASS, new WmBarcodescannerProps());\n }\n\n onScanTap() {\n const params: ScanInput = {\n barcodeFormat: this.state.props.barcodeformat\n };\n this.scanner.scanBarcode(params).then((res: ScanOutput) => {\n this.updateState({\n props: {\n datavalue: res.text\n }\n } as WmBarcodescannerState, () => {\n this.invokeEventCallback('onSuccess', [null, this.proxy]);\n });\n })\n }\n\n renderWidget(props: WmBarcodescannerProps) {\n return (\n <ScanConsumer>\n {(scanService: ScanService) => {\n this.scanner = scanService;\n return <View style={this.styles.root}>\n {this._background}\n <WmButton iconclass={props.iconclass} styles={this.styles.button} onTap={this.onScanTap.bind(this)} caption={props.caption} iconsize={props.iconsize}></WmButton>\n </View>\n }}\n </ScanConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,YAAY,QAAqB,oDAAoD;AAE9F,OAAOC,qBAAqB,MAAM,wBAAwB;AAC1D,SAASC,aAAa,QAAgC,yBAAyB;AAC/E,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAO,MAAMC,qBAAqB,SAASL,kBAAkB,CAAwB;AAErF,eAAe,MAAMM,gBAAgB,SAASP,aAAa,CAAuE;EAEhIQ,WAAWA,CAACC,KAA4B,EAAE;IACxC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,qBAAqB,CAAC,CAAC,CAAC;IAACO,eAAA,kBAF5B,IAAI;EAGnC;EAEAC,SAASA,CAAA,EAAG;IACV,MAAMC,MAAiB,GAAG;MACxBC,aAAa,EAAE,IAAI,CAACC,KAAK,CAACL,KAAK,CAACM;IAClC,CAAC;IACD,IAAI,CAACC,OAAO,CAACC,WAAW,CAACL,MAAM,CAAC,CAACM,IAAI,CAAEC,GAAe,IAAK;MACzD,IAAI,CAACC,WAAW,CAAC;QACfX,KAAK,EAAE;UACLY,SAAS,EAAEF,GAAG,CAACG;QACjB;MACF,CAAC,EAA2B,MAAM;QAChC,IAAI,CAACC,mBAAmB,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;MAC3D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAC,YAAYA,CAAChB,KAA4B,EAAE;IACzC,oBACEX,KAAA,CAAA4B,aAAA,CAACxB,YAAY,QACTyB,WAAwB,IAAK;MAC7B,IAAI,CAACX,OAAO,GAAGW,WAAW;MAC1B,oBAAO7B,KAAA,CAAA4B,aAAA,CAAC3B,IAAI;QAAC6B,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;MAAK,GAClC,IAAI,CAACC,WAAW,eACjBjC,KAAA,CAAA4B,aAAA,CAACrB,QAAQ;QAAC2B,SAAS,EAAEvB,KAAK,CAACuB,SAAU;QAACH,MAAM,EAAE,IAAI,CAACA,MAAM,CAACI,MAAO;QAACC,KAAK,EAAE,IAAI,CAACvB,SAAS,CAACwB,IAAI,CAAC,IAAI,CAAE;QAACC,OAAO,EAAE3B,KAAK,CAAC2B,OAAQ;QAACC,QAAQ,EAAE5B,KAAK,CAAC4B;MAAS,CAAW,CAC5J,CAAC;IACT,CACY,CAAC;EAEnB;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","ScanConsumer","WmBarcodescannerProps","DEFAULT_CLASS","WmButton","WmBarcodescannerState","WmBarcodescanner","constructor","props","_defineProperty","onScanTap","params","barcodeFormat","state","barcodeformat","scanner","scanBarcode","then","res","updateState","datavalue","text","invokeEventCallback","proxy","renderWidget","createElement","scanService","style","styles","root","_background","id","getTestId","iconclass","button","onTap","bind","caption","iconsize"],"sources":["barcodescanner.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ScanInput, ScanOutput } from '@wavemaker/app-rn-runtime/variables/device/scan/scan.operation';\nimport { ScanConsumer, ScanService } from '@wavemaker/app-rn-runtime/core/device/scan-service';\n\nimport WmBarcodescannerProps from './barcodescanner.props';\nimport { DEFAULT_CLASS, WmBarcodescannerStyles } from './barcodescanner.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nexport class WmBarcodescannerState extends BaseComponentState<WmBarcodescannerProps> {}\n\nexport default class WmBarcodescanner extends BaseComponent<WmBarcodescannerProps, WmBarcodescannerState, WmBarcodescannerStyles> {\n private scanner: ScanService = null as any;\n constructor(props: WmBarcodescannerProps) {\n super(props, DEFAULT_CLASS, new WmBarcodescannerProps());\n }\n\n onScanTap() {\n const params: ScanInput = {\n barcodeFormat: this.state.props.barcodeformat\n };\n this.scanner.scanBarcode(params).then((res: ScanOutput) => {\n this.updateState({\n props: {\n datavalue: res.text\n }\n } as WmBarcodescannerState, () => {\n this.invokeEventCallback('onSuccess', [null, this.proxy]);\n });\n })\n }\n\n renderWidget(props: WmBarcodescannerProps) {\n return (\n <ScanConsumer>\n {(scanService: ScanService) => {\n this.scanner = scanService;\n return <View style={this.styles.root}>\n {this._background}\n <WmButton id={this.getTestId('button')} iconclass={props.iconclass} styles={this.styles.button} onTap={this.onScanTap.bind(this)} caption={props.caption} iconsize={props.iconsize}></WmButton>\n </View>\n }}\n </ScanConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,YAAY,QAAqB,oDAAo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,CAACA,MAAM,CAACM,MAAO;QAACC,KAAK,EAAE,IAAI,CAACzB,SAAS,CAAC0B,IAAI,CAAC,IAAI,CAAE;QAACC,OAAO,EAAE7B,KAAK,CAAC6B,OAAQ;QAACC,QAAQ,EAAE9B,KAAK,CAAC8B;MAAS,CAAW,CAC1L,CAAC;IACT,CACY,CAAC;EAEnB;AACF"}
@@ -10,7 +10,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
10
10
  borderWidth: 1,
11
11
  borderColor: themeVariables.barcodeScannerBorderColor,
12
12
  borderStyle: 'solid',
13
- backgroundColor: themeVariables.barcodeScannerBgColor
13
+ backgroundColor: themeVariables.barcodeScannerBgColor,
14
+ borderRadius: 4
14
15
  },
15
16
  text: {
16
17
  color: themeVariables.barcodeScannerTextColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","button","borderWidth","borderColor","barcodeScannerBorderColor","borderStyle","backgroundColor","barcodeScannerBgColor","color","barcodeScannerTextColor","icon","fontSize"],"sources":["barcodescanner.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmBarcodescannerStyles = BaseStyles & {\n button: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-barcodescanner';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmBarcodescannerStyles = defineStyles({\n root: {},\n text: {},\n button: {\n root: {\n borderWidth: 1,\n borderColor: themeVariables.barcodeScannerBorderColor,\n borderStyle: 'solid',\n backgroundColor: themeVariables.barcodeScannerBgColor\n },\n text: {\n color: themeVariables.barcodeScannerTextColor\n },\n icon: {\n text: {\n color: themeVariables.barcodeScannerTextColor\n },\n icon: {\n fontSize: 24\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,oBAAoB;AACjDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAqC,GAAGL,YAAY,CAAC;IACvDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNF,IAAI,EAAE;QACJG,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEP,cAAc,CAACQ,yBAAyB;QACrDC,WAAW,EAAE,OAAO;QACpBC,eAAe,EAAEV,cAAc,CAACW;MAClC,CAAC;MACDP,IAAI,EAAE;QACJQ,KAAK,EAAEZ,cAAc,CAACa;MACxB,CAAC;MACDC,IAAI,EAAE;QACJV,IAAI,EAAE;UACJQ,KAAK,EAAEZ,cAAc,CAACa;QACxB,CAAC;QACDC,IAAI,EAAE;UACJC,QAAQ,EAAE;QACZ;MACF;IACF;EACJ,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","button","borderWidth","borderColor","barcodeScannerBorderColor","borderStyle","backgroundColor","barcodeScannerBgColor","borderRadius","color","barcodeScannerTextColor","icon","fontSize"],"sources":["barcodescanner.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmBarcodescannerStyles = BaseStyles & {\n button: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-barcodescanner';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmBarcodescannerStyles = defineStyles({\n root: {},\n text: {},\n button: {\n root: {\n borderWidth: 1,\n borderColor: themeVariables.barcodeScannerBorderColor,\n borderStyle: 'solid',\n backgroundColor: themeVariables.barcodeScannerBgColor,\n borderRadius: 4\n },\n text: {\n color: themeVariables.barcodeScannerTextColor\n },\n icon: {\n text: {\n color: themeVariables.barcodeScannerTextColor\n },\n icon: {\n fontSize: 24\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,oBAAoB;AACjDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAqC,GAAGL,YAAY,CAAC;IACvDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNF,IAAI,EAAE;QACJG,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEP,cAAc,CAACQ,yBAAyB;QACrDC,WAAW,EAAE,OAAO;QACpBC,eAAe,EAAEV,cAAc,CAACW,qBAAqB;QACrDC,YAAY,EAAE;MAChB,CAAC;MACDR,IAAI,EAAE;QACJS,KAAK,EAAEb,cAAc,CAACc;MACxB,CAAC;MACDC,IAAI,EAAE;QACJX,IAAI,EAAE;UACJS,KAAK,EAAEb,cAAc,CAACc;QACxB,CAAC;QACDC,IAAI,EAAE;UACJC,QAAQ,EAAE;QACZ;MACF;IACF;EACJ,CAAC,CAAC;EAEFf,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
@@ -53,6 +53,7 @@ export default class WmCamera extends BaseComponent {
53
53
  return /*#__PURE__*/React.createElement(View, {
54
54
  style: this.styles.root
55
55
  }, /*#__PURE__*/React.createElement(WmButton, {
56
+ id: this.getTestId('button'),
56
57
  iconclass: props.iconclass,
57
58
  styles: this.styles.button,
58
59
  iconsize: props.iconsize,
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCameraProps","DEFAULT_CLASS","WmButton","CameraConsumer","WmCameraState","WmCamera","constructor","props","_defineProperty","onCameraTap","state","capturetype","params","allowImageEdit","allowedit","imageQuality","imagequality","imageEncodingType","imageencodingtype","imageTargetWidth","imagetargetwidth","imageTargetHeight","imagetargetheight","camera","captureImage","then","res","updateModel","imagePath","content","captureVideo","videoPath","$event","value","startsWith","localFile","updateState","datavalue","localFilePath","invokeEventCallback","bind","proxy","renderWidget","createElement","cameraService","_background","style","styles","root","iconclass","button","iconsize","onTap"],"sources":["camera.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCameraProps from './camera.props';\nimport { DEFAULT_CLASS, WmCameraStyles } from './camera.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { CaptureImageOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-image.operation';\nimport { CameraConsumer, CameraInput, CameraService } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { CaptureVideoOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-video.operation';\n\n\nexport class WmCameraState extends BaseComponentState<WmCameraProps> {}\n\nexport default class WmCamera extends BaseComponent<WmCameraProps, WmCameraState, WmCameraStyles> {\n private camera: CameraService = null as any;\n public localFile: string = '';\n constructor(props: WmCameraProps) {\n super(props, DEFAULT_CLASS, new WmCameraProps());\n }\n\n onCameraTap() {\n const props = this.state.props;\n if (props.capturetype === 'IMAGE') {\n const params: CameraInput = {\n allowImageEdit: props.allowedit,\n imageQuality: props.imagequality,\n imageEncodingType: props.imageencodingtype,\n imageTargetWidth: props.imagetargetwidth,\n imageTargetHeight: props.imagetargetheight\n };\n\n this.camera.captureImage(params).then((res: CaptureImageOutput) => {\n this.updateModel(null, res.imagePath, res.content);\n });\n } else {\n this.camera.captureVideo().then((res: CaptureVideoOutput) => {\n this.updateModel(null, res.videoPath, res.content);\n });\n }\n\n }\n\n private updateModel($event: any, value: any, content: string) {\n value = (value.startsWith('file://') ? '' : 'file://') + value;\n this.localFile = content;\n this.updateState({\n props: {\n datavalue: value,\n localFilePath: value\n }\n } as WmCameraState, this.invokeEventCallback.bind(this, 'onSuccess', [null, this.proxy, value, this.localFile]));\n }\n\n renderWidget(props: WmCameraProps) {\n return (\n <CameraConsumer>\n {(cameraService: CameraService) => {\n {this._background}\n this.camera = cameraService;\n return <View style={this.styles.root}>\n <WmButton iconclass={props.iconclass} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onCameraTap.bind(this)}></WmButton>\n </View>\n }}\n </CameraConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,SAASC,cAAc,QAAoC,sDAAsD;AAIjH,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;AAErE,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;EAGhGQ,WAAWA,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;IAACQ,eAAA,iBAHnB,IAAI;IAAAA,eAAA,oBACT,EAAE;EAG7B;EAEAC,WAAWA,CAAA,EAAG;IACZ,MAAMF,KAAK,GAAG,IAAI,CAACG,KAAK,CAACH,KAAK;IAC9B,IAA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AA+C,aAAA,CAACxC,cAAc,QACTyC,aAA4B,IAAK;MACnC;QAAC,IAAI,CAACC,WAAW;MAAA;MACjB,IAAI,CAACtB,MAAM,GAAGqB,aAAa;MAC3B,oBAAOhD,KAAA,CAAA+C,aAAA,CAAC9C,IAAI;QAACiD,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;MAAK,gBACnCpD,KAAA,CAAA+C,aAAA,CAACzC,QAAQ;QAAC+C,SAAS,EAAE1C,KAAK,CAAC0C,SAAU;QAACF,MAAM,EAAE,IAAI,CAACA,MAAM,CAACG,MAAO;QAACC,QAAQ,EAAE5C,KAAK,CAAC4C,QAAS;QAACC,KAAK,EAAE,IAAI,CAAC3C,WAAW,CAAC+B,IAAI,CAAC,IAAI;MAAE,CAAW,CACtI,CAAC;IACT,CACc,CAAC;EAEzB;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCameraProps","DEFAULT_CLASS","WmButton","CameraConsumer","WmCameraState","WmCamera","constructor","props","_defineProperty","onCameraTap","state","capturetype","params","allowImageEdit","allowedit","imageQuality","imagequality","imageEncodingType","imageencodingtype","imageTargetWidth","imagetargetwidth","imageTargetHeight","imagetargetheight","camera","captureImage","then","res","updateModel","imagePath","content","captureVideo","videoPath","$event","value","startsWith","localFile","updateState","datavalue","localFilePath","invokeEventCallback","bind","proxy","renderWidget","createElement","cameraService","_background","style","styles","root","id","getTestId","iconclass","button","iconsize","onTap"],"sources":["camera.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCameraProps from './camera.props';\nimport { DEFAULT_CLASS, WmCameraStyles } from './camera.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { CaptureImageOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-image.operation';\nimport { CameraConsumer, CameraInput, CameraService } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { CaptureVideoOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-video.operation';\n\n\nexport class WmCameraState extends BaseComponentState<WmCameraProps> {}\n\nexport default class WmCamera extends BaseComponent<WmCameraProps, WmCameraState, WmCameraStyles> {\n private camera: CameraService = null as any;\n public localFile: string = '';\n constructor(props: WmCameraProps) {\n super(props, DEFAULT_CLASS, new WmCameraProps());\n }\n\n onCameraTap() {\n const props = this.state.props;\n if (props.capturetype === 'IMAGE') {\n const params: CameraInput = {\n allowImageEdit: props.allowedit,\n imageQuality: props.imagequality,\n imageEncodingType: props.imageencodingtype,\n imageTargetWidth: props.imagetargetwidth,\n imageTargetHeight: props.imagetargetheight\n };\n\n this.camera.captureImage(params).then((res: CaptureImageOutput) => {\n this.updateModel(null, res.imagePath, res.content);\n });\n } else {\n this.camera.captureVideo().then((res: CaptureVideoOutput) => {\n this.updateModel(null, res.videoPath, res.content);\n });\n }\n\n }\n\n private updateModel($event: any, value: any, content: string) {\n value = (value.startsWith('file://') ? '' : 'file://') + value;\n this.localFile = content;\n this.updateState({\n props: {\n datavalue: value,\n localFilePath: value\n }\n } as WmCameraState, this.invokeEventCallback.bind(this, 'onSuccess', [null, this.proxy, value, this.localFile]));\n }\n\n renderWidget(props: WmCameraProps) {\n return (\n <CameraConsumer>\n {(cameraService: CameraService) => {\n {this._background}\n this.camera = cameraService;\n return <View style={this.styles.root}>\n <WmButton id={this.getTestId('button')} iconclass={props.iconclass} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onCameraTap.bind(this)}></WmButton>\n </View>\n }}\n </CameraConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AAE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IAAID,KAAK;IAC9D,IAAI,CAACE,SAAS,GAAGN,OAAO;IACxB,IAAI,CAACO,WAAW,CAAC;MACf7B,KAAK,EAAE;QACL8B,SAAS,EAAEJ,KAAK;QAChBK,aAAa,EAAEL;MACjB;IACF,CAAC,EAAmB,IAAI,CAACM,mBAAmB,CAACC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,EAAER,KAAK,EAAE,IAAI,CAACE,SAAS,CAAC,CAAC,CAAC;EAClH;EAEAO,YAAYA,CAACnC,KAAoB,EAAE;IACjC,oBACMX,KAAA,CAAA+C,aAAA,CAACxC,cAAc,QACTyC,aAA4B,IAAK;MACnC;QAAC,IAAI,CAACC,WAAW;MAAA;MACjB,IAAI,CAACtB,MAAM,GAAGqB,aAAa;MAC3B,oBAAOhD,KAAA,CAAA+C,aAAA,CAAC9C,IAAI;QAACiD,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;MAAK,gBACnCpD,KAAA,CAAA+C,aAAA,CAACzC,QAAQ;QAAC+C,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,QAAQ,CAAE;QAACC,SAAS,EAAE5C,KAAK,CAAC4C,SAAU;QAACJ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACK,MAAO;QAACC,QAAQ,EAAE9C,KAAK,CAAC8C,QAAS;QAACC,KAAK,EAAE,IAAI,CAAC7C,WAAW,CAAC+B,IAAI,CAAC,IAAI;MAAE,CAAW,CACpK,CAAC;IACT,CACc,CAAC;EAEzB;AACF"}
@@ -10,7 +10,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
10
10
  borderWidth: 1,
11
11
  borderColor: themeVariables.cameraBorderColor,
12
12
  borderStyle: 'solid',
13
- backgroundColor: themeVariables.cameraBgColor
13
+ backgroundColor: themeVariables.cameraBgColor,
14
+ borderRadius: 4
14
15
  },
15
16
  text: {
16
17
  color: themeVariables.cameraTextColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","button","borderWidth","borderColor","cameraBorderColor","borderStyle","backgroundColor","cameraBgColor","color","cameraTextColor","icon","fontSize"],"sources":["camera.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmCameraStyles = BaseStyles & {\n button: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-camera';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCameraStyles = defineStyles({\n root: {},\n text: {},\n button: {\n root: {\n borderWidth: 1,\n borderColor: themeVariables.cameraBorderColor,\n borderStyle: 'solid',\n backgroundColor: themeVariables.cameraBgColor\n },\n text: {\n color: themeVariables.cameraTextColor\n },\n icon: {\n text: {\n color: themeVariables.cameraTextColor\n },\n icon: {\n fontSize: 24\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\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,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNF,IAAI,EAAE;QACJG,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEP,cAAc,CAACQ,iBAAiB;QAC7CC,WAAW,EAAE,OAAO;QACpBC,eAAe,EAAEV,cAAc,CAACW;MAClC,CAAC;MACDP,IAAI,EAAE;QACJQ,KAAK,EAAEZ,cAAc,CAACa;MACxB,CAAC;MACDC,IAAI,EAAE;QACJV,IAAI,EAAE;UACJQ,KAAK,EAAEZ,cAAc,CAACa;QACxB,CAAC;QACDC,IAAI,EAAE;UACJC,QAAQ,EAAE;QACZ;MACF;IACF;EACJ,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","button","borderWidth","borderColor","cameraBorderColor","borderStyle","backgroundColor","cameraBgColor","borderRadius","color","cameraTextColor","icon","fontSize"],"sources":["camera.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmCameraStyles = BaseStyles & {\n button: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-camera';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCameraStyles = defineStyles({\n root: {},\n text: {},\n button: {\n root: {\n borderWidth: 1,\n borderColor: themeVariables.cameraBorderColor,\n borderStyle: 'solid',\n backgroundColor: themeVariables.cameraBgColor,\n borderRadius: 4\n },\n text: {\n color: themeVariables.cameraTextColor\n },\n icon: {\n text: {\n color: themeVariables.cameraTextColor\n },\n icon: {\n fontSize: 24\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\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,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNF,IAAI,EAAE;QACJG,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEP,cAAc,CAACQ,iBAAiB;QAC7CC,WAAW,EAAE,OAAO;QACpBC,eAAe,EAAEV,cAAc,CAACW,aAAa;QAC7CC,YAAY,EAAE;MAChB,CAAC;MACDR,IAAI,EAAE;QACJS,KAAK,EAAEb,cAAc,CAACc;MACxB,CAAC;MACDC,IAAI,EAAE;QACJX,IAAI,EAAE;UACJS,KAAK,EAAEb,cAAc,CAACc;QACxB,CAAC;QACDC,IAAI,EAAE;UACJC,QAAQ,EAAE;QACZ;MACF;IACF;EACJ,CAAC,CAAC;EAEFf,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC"}
@@ -34,6 +34,7 @@ export default class WmAlertdialog extends BaseComponent {
34
34
  renderWidget(props) {
35
35
  const messageStyle = this.theme.getStyle(MESSAGE_STYLES.get(props.alerttype || 'error'));
36
36
  return /*#__PURE__*/React.createElement(WmDialog, {
37
+ id: this.getTestId('dialog'),
37
38
  iconclass: props.iconclass,
38
39
  animation: props.animation,
39
40
  closable: props.closable,
@@ -47,13 +48,15 @@ export default class WmAlertdialog extends BaseComponent {
47
48
  }, /*#__PURE__*/React.createElement(WmDialogcontent, {
48
49
  styles: this.styles.dialogContent
49
50
  }, /*#__PURE__*/React.createElement(WmLabel, {
51
+ id: this.getTestId('msg'),
50
52
  caption: props.message || '',
51
53
  styles: this.styles.message
52
54
  })), /*#__PURE__*/React.createElement(WmDialogactions, {
53
55
  styles: this.styles.dialogActions
54
56
  }, /*#__PURE__*/React.createElement(WmButton, {
57
+ id: this.getTestId('okbtn'),
55
58
  caption: props.oktext,
56
- styles: this.theme.mergeStyle({}, this.theme.getStyle('btn-primary'), this.styles.okButton),
59
+ styles: this.theme.mergeStyle({}, this.styles.okButton, this.theme.getStyle('btn-only-label')),
57
60
  onTap: () => {
58
61
  this.dialogRef.close();
59
62
  this.invokeEventCallback('onOk', [null, this]);
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseComponent","BaseComponentState","WmButton","WmLabel","WmDialog","WmDialogcontent","WmDialogactions","WmAlertdialogProps","DEFAULT_CLASS","WmAlertdialogState","MESSAGE_STYLES","Map","WmAlertdialog","constructor","props","_defineProperty","onComponentInit","c","dialogRef","open","close","getMessageStyle","type","renderWidget","messageStyle","theme","getStyle","get","alerttype","createElement","iconclass","animation","closable","modal","styles","dialog","title","listener","onOpened","invokeEventCallback","dialogContent","caption","message","dialogActions","oktext","mergeStyle","okButton","onTap"],"sources":["alertdialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nimport WmDialog from '../dialog/dialog.component';\nimport WmDialogcontent from '../dialogcontent/dialogcontent.component';\nimport WmDialogactions from '../dialogactions/dialogactions.component';\n\nimport WmAlertdialogProps from './alertdialog.props';\nimport { DEFAULT_CLASS, WmAlertdialogStyles } from './alertdialog.styles';\n\nexport class WmAlertdialogState extends BaseComponentState<WmAlertdialogProps> {}\n\nconst MESSAGE_STYLES = new Map<string, string>([\n ['error', 'text-danger'],\n ['information', 'text-info'],\n ['warning', 'text-warning'],\n ['success', 'text-success']\n]);\n\nexport default class WmAlertdialog extends BaseComponent<WmAlertdialogProps, WmAlertdialogState, WmAlertdialogStyles> {\n\n private dialogRef: WmDialog = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmDialog) {\n this.dialogRef = c;\n }\n }\n };\n\n constructor(props: WmAlertdialogProps) {\n super(props, DEFAULT_CLASS, new WmAlertdialogProps());\n }\n\n open() {\n this.dialogRef.open();\n }\n\n close() {\n this.dialogRef.close();\n }\n\n getMessageStyle(type: string) {\n\n }\n\n renderWidget(props: WmAlertdialogProps) {\n const messageStyle = this.theme.getStyle(MESSAGE_STYLES.get(props.alerttype || 'error') as string);\n return (\n <WmDialog\n iconclass={props.iconclass}\n animation={props.animation}\n closable={props.closable}\n modal={props.modal}\n styles={this.styles.dialog}\n title={props.title}\n listener={this.listener} onOpened={() => {\n this.invokeEventCallback('onOpened', [null, this]);\n }}>\n <WmDialogcontent styles={this.styles.dialogContent}>\n <WmLabel\n caption={props.message || ''}\n styles={this.styles.message}></WmLabel>\n </WmDialogcontent>\n <WmDialogactions styles={this.styles.dialogActions}>\n <WmButton\n caption={props.oktext}\n styles={this.theme.mergeStyle({}, this.theme.getStyle('btn-primary'), this.styles.okButton)}\n onTap={() => {\n this.dialogRef.close();\n this.invokeEventCallback('onOk', [null, this]);\n }}></WmButton>\n </WmDialogactions>\n </WmDialog>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAA2B,+CAA+C;AAEpH,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,OAAOC,eAAe,MAAM,0CAA0C;AACtE,OAAOC,eAAe,MAAM,0CAA0C;AAEtE,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SAASC,aAAa,QAA6B,sBAAsB;AAEzE,OAAO,MAAMC,kBAAkB,SAASR,kBAAkB,CAAqB;AAE/E,MAAMS,cAAc,GAAG,IAAIC,GAAG,CAAiB,CAC7C,CAAC,OAAO,EAAE,aAAa,CAAC,EACxB,CAAC,aAAa,EAAE,WAAW,CAAC,EAC5B,CAAC,SAAS,EAAE,cAAc,CAAC,EAC3B,CAAC,SAAS,EAAE,cAAc,CAAC,CAC5B,CAAC;AAEF,eAAe,MAAMC,aAAa,SAASZ,aAAa,CAA8D;EAYpHa,WAAWA,CAACC,KAAyB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OAAO;MACNsC,OAAO,EAAE3B,KAAK,CAAC4B,OAAO,IAAI,EAAG;MAC7BR,MAAM,EAAE,IAAI,CAACA,MAAM,CAACQ;IAAQ,CAAU,CACzB,CAAC,eAClB3C,KAAA,CAAA8B,aAAA,CAACvB,eAAe;MAAC4B,MAAM,EAAE,IAAI,CAACA,MAAM,CAACS;IAAc,gBACjD5C,KAAA,CAAA8B,aAAA,CAAC3B,QAAQ;MACPuC,OAAO,EAAE3B,KAAK,CAAC8B,MAAO;MACtBV,MAAM,EAAE,IAAI,CAACT,KAAK,CAACoB,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAACpB,KAAK,CAACC,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,CAACQ,MAAM,CAACY,QAAQ,CAAE;MAC5FC,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAAC7B,SAAS,CAACE,KAAK,CAAC,CAAC;QACtB,IAAI,CAACmB,mBAAmB,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;MAChD;IAAE,CAAW,CACA,CACT,CAAC;EAEf;AACF"}
1
+ {"version":3,"names":["React","BaseComponent","BaseComponentState","WmButton","WmLabel","WmDialog","WmDialogcontent","WmDialogactions","WmAlertdialogProps","DEFAULT_CLASS","WmAlertdialogState","MESSAGE_STYLES","Map","WmAlertdialog","constructor","props","_defineProperty","onComponentInit","c","dialogRef","open","close","getMessageStyle","type","renderWidget","messageStyle","theme","getStyle","get","alerttype","createElement","id","getTestId","iconclass","animation","closable","modal","styles","dialog","title","listener","onOpened","invokeEventCallback","dialogContent","caption","message","dialogActions","oktext","mergeStyle","okButton","onTap"],"sources":["alertdialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nimport WmDialog from '../dialog/dialog.component';\nimport WmDialogcontent from '../dialogcontent/dialogcontent.component';\nimport WmDialogactions from '../dialogactions/dialogactions.component';\n\nimport WmAlertdialogProps from './alertdialog.props';\nimport { DEFAULT_CLASS, WmAlertdialogStyles } from './alertdialog.styles';\n\nexport class WmAlertdialogState extends BaseComponentState<WmAlertdialogProps> {}\n\nconst MESSAGE_STYLES = new Map<string, string>([\n ['error', 'text-danger'],\n ['information', 'text-info'],\n ['warning', 'text-warning'],\n ['success', 'text-success']\n]);\n\nexport default class WmAlertdialog extends BaseComponent<WmAlertdialogProps, WmAlertdialogState, WmAlertdialogStyles> {\n\n private dialogRef: WmDialog = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmDialog) {\n this.dialogRef = c;\n }\n }\n };\n\n constructor(props: WmAlertdialogProps) {\n super(props, DEFAULT_CLASS, new WmAlertdialogProps());\n }\n\n open() {\n this.dialogRef.open();\n }\n\n close() {\n this.dialogRef.close();\n }\n\n getMessageStyle(type: string) {\n\n }\n\n renderWidget(props: WmAlertdialogProps) {\n const messageStyle = this.theme.getStyle(MESSAGE_STYLES.get(props.alerttype || 'error') as string);\n return (\n <WmDialog\n id={this.getTestId('dialog')}\n iconclass={props.iconclass}\n animation={props.animation}\n closable={props.closable}\n modal={props.modal}\n styles={this.styles.dialog}\n title={props.title}\n listener={this.listener} onOpened={() => {\n this.invokeEventCallback('onOpened', [null, this]);\n }}>\n <WmDialogcontent styles={this.styles.dialogContent}>\n <WmLabel\n id={this.getTestId('msg')}\n caption={props.message || ''}\n styles={this.styles.message}></WmLabel>\n </WmDialogcontent>\n <WmDialogactions styles={this.styles.dialogActions}>\n <WmButton\n id={this.getTestId('okbtn')}\n caption={props.oktext}\n styles={this.theme.mergeStyle({},this.styles.okButton,this.theme.getStyle('btn-only-label'))}\n onTap={() => {\n this.dialogRef.close();\n this.invokeEventCallback('onOk', [null, this]);\n }}></WmButton>\n </WmDialogactions>\n </WmDialog>\n );\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AAI,CAACX,MAAM,CAACY,QAAQ,EAAC,IAAI,CAACvB,KAAK,CAACC,QAAQ,CAAC,gBAAgB,CAAC,CAAE;MAC7FuB,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAAC/B,SAAS,CAACE,KAAK,CAAC,CAAC;QACtB,IAAI,CAACqB,mBAAmB,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;MAChD;IAAE,CAAW,CACA,CACT,CAAC;EAEf;AACF"}
@@ -12,13 +12,19 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
12
12
  dialogActions: {},
13
13
  okButton: {
14
14
  root: {
15
- width: '100%',
16
- borderRadius: 4
15
+ border: 'none',
16
+ marginLeft: 4
17
+ },
18
+ text: {
19
+ fontsize: 16
17
20
  }
18
21
  },
19
22
  message: {
20
23
  text: {
21
- color: themeVariables.alertMessageColor
24
+ fontFamily: themeVariables.baseFont,
25
+ fontSize: 14,
26
+ fontWeight: '400',
27
+ color: themeVariables.dialogSupportingTextColor
22
28
  }
23
29
  }
24
30
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","dialog","dialogContent","dialogActions","okButton","width","borderRadius","message","color","alertMessageColor"],"sources":["alertdialog.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmDialogStyles } from '../dialog/dialog.styles';\nimport { WmDialogcontentStyles } from '../dialogcontent/dialogcontent.styles';\nimport { WmDialogactionsStyles } from '../dialogactions/dialogactions.styles';\nimport { WmLabelStyles } from '../../basic/label/label.styles';\n\nexport type WmAlertdialogStyles = BaseStyles & {\n dialog: WmDialogStyles,\n dialogContent: WmDialogcontentStyles,\n dialogActions: WmDialogactionsStyles,\n okButton: WmButtonStyles,\n message: WmLabelStyles\n};\n\nexport const DEFAULT_CLASS = 'app-alertdialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAlertdialogStyles = defineStyles({\n root: {},\n text: {},\n dialog: {} as WmDialogStyles,\n dialogContent: {\n root: {}\n } as WmDialogactionsStyles,\n dialogActions: {} as WmDialogcontentStyles,\n okButton: {\n root: {\n width: '100%',\n borderRadius: 4\n }\n } as any as WmButtonStyles,\n message: {\n text: {\n color: themeVariables.alertMessageColor\n }\n } as WmLabelStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE,CAAC,CAAmB;IAC5BC,aAAa,EAAE;MACXH,IAAI,EAAE,CAAC;IACX,CAA0B;IAC1BI,aAAa,EAAE,CAAC,CAA0B;IAC1CC,QAAQ,EAAE;MACNL,IAAI,EAAE;QACFM,KAAK,EAAE,MAAM;QACbC,YAAY,EAAE;MAClB;IACJ,CAA0B;IAC1BC,OAAO,EAAE;MACLP,IAAI,EAAE;QACFQ,KAAK,EAAEZ,cAAc,CAACa;MAC1B;IACJ;EACJ,CAAC,CAAC;EAEFZ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","dialog","dialogContent","dialogActions","okButton","border","marginLeft","fontsize","message","fontFamily","baseFont","fontSize","fontWeight","color","dialogSupportingTextColor"],"sources":["alertdialog.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmDialogStyles } from '../dialog/dialog.styles';\nimport { WmDialogcontentStyles } from '../dialogcontent/dialogcontent.styles';\nimport { WmDialogactionsStyles } from '../dialogactions/dialogactions.styles';\nimport { WmLabelStyles } from '../../basic/label/label.styles';\n\nexport type WmAlertdialogStyles = BaseStyles & {\n dialog: WmDialogStyles,\n dialogContent: WmDialogcontentStyles,\n dialogActions: WmDialogactionsStyles,\n okButton: WmButtonStyles,\n message: WmLabelStyles\n};\n\nexport const DEFAULT_CLASS = 'app-alertdialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAlertdialogStyles = defineStyles({\n root: {},\n text: {},\n dialog: {} as WmDialogStyles,\n dialogContent: {\n root: {}\n } as WmDialogactionsStyles,\n dialogActions: {} as WmDialogcontentStyles,\n okButton: {\n root: {\n border: 'none',\n marginLeft: 4\n },\n text : {\n fontsize: 16\n }\n } as any as WmButtonStyles,\n message: {\n text: {\n fontFamily: themeVariables.baseFont,\n fontSize: 14,\n fontWeight: '400',\n color: themeVariables.dialogSupportingTextColor\n }\n } as WmLabelStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE,CAAC,CAAmB;IAC5BC,aAAa,EAAE;MACXH,IAAI,EAAE,CAAC;IACX,CAA0B;IAC1BI,aAAa,EAAE,CAAC,CAA0B;IAC1CC,QAAQ,EAAE;MACNL,IAAI,EAAE;QACHM,MAAM,EAAE,MAAM;QACdC,UAAU,EAAE;MACf,CAAC;MACDN,IAAI,EAAG;QACLO,QAAQ,EAAE;MACZ;IACJ,CAA0B;IAC1BC,OAAO,EAAE;MACLR,IAAI,EAAE;QACFS,UAAU,EAAEb,cAAc,CAACc,QAAQ;QACnCC,QAAQ,EAAE,EAAE;QACZC,UAAU,EAAE,KAAK;QACjBC,KAAK,EAAEjB,cAAc,CAACkB;MAC1B;IACJ;EACJ,CAAC,CAAC;EAEFjB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -32,6 +32,7 @@ export default class WmConfirmdialog extends BaseComponent {
32
32
  getMessageStyle(type) {}
33
33
  renderWidget(props) {
34
34
  return /*#__PURE__*/React.createElement(WmDialog, {
35
+ id: this.getTestId('dialog'),
35
36
  iconclass: props.iconclass,
36
37
  animation: props.animation,
37
38
  closable: props.closable,
@@ -45,20 +46,23 @@ export default class WmConfirmdialog extends BaseComponent {
45
46
  }, /*#__PURE__*/React.createElement(WmDialogcontent, {
46
47
  styles: this.styles.dialogContent
47
48
  }, /*#__PURE__*/React.createElement(WmLabel, {
49
+ id: this.getTestId('msg'),
48
50
  caption: props.message || '',
49
51
  styles: this.styles.message
50
52
  })), /*#__PURE__*/React.createElement(WmDialogactions, {
51
53
  styles: this.styles.dialogActions
52
54
  }, /*#__PURE__*/React.createElement(WmButton, {
55
+ id: this.getTestId('cancelbtn'),
53
56
  caption: props.canceltext,
54
- styles: this.theme.mergeStyle({}, this.theme.getStyle('btn-secondary'), this.styles.cancelButton),
57
+ styles: this.theme.mergeStyle({}, this.theme.getStyle('btn-onlyLabel'), this.styles.cancelButton),
55
58
  onTap: () => {
56
59
  this.dialogRef.close();
57
60
  this.invokeEventCallback('onCancel', [null, this]);
58
61
  }
59
62
  }), /*#__PURE__*/React.createElement(WmButton, {
63
+ id: this.getTestId('okbtn'),
60
64
  caption: props.oktext,
61
- styles: this.theme.mergeStyle({}, this.theme.getStyle('btn-primary'), this.styles.okButton),
65
+ styles: this.theme.mergeStyle({}, this.theme.getStyle('btn-only-label'), this.styles.okButton),
62
66
  onTap: () => {
63
67
  this.dialogRef.close();
64
68
  this.invokeEventCallback('onOk', [null, this]);
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseComponent","BaseComponentState","WmButton","WmLabel","WmDialog","WmDialogcontent","WmDialogactions","WmConfirmdialogProps","DEFAULT_CLASS","WmConfirmdialogState","WmConfirmdialog","constructor","props","_defineProperty","onComponentInit","c","dialogRef","open","close","getMessageStyle","type","renderWidget","createElement","iconclass","animation","closable","modal","styles","dialog","title","listener","onOpened","invokeEventCallback","dialogContent","caption","message","dialogActions","canceltext","theme","mergeStyle","getStyle","cancelButton","onTap","oktext","okButton"],"sources":["confirmdialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nimport WmDialog from '../dialog/dialog.component';\nimport WmDialogcontent from '../dialogcontent/dialogcontent.component';\nimport WmDialogactions from '../dialogactions/dialogactions.component';\n\nimport WmConfirmdialogProps from './confirmdialog.props';\nimport { DEFAULT_CLASS, WmConfirmdialogStyles } from './confirmdialog.styles';\nimport { merge } from 'lodash-es';\n\nexport class WmConfirmdialogState extends BaseComponentState<WmConfirmdialogProps> {}\n\nexport default class WmConfirmdialog extends BaseComponent<WmConfirmdialogProps, WmConfirmdialogState, WmConfirmdialogStyles> {\n\n private dialogRef: WmDialog = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmDialog) {\n this.dialogRef = c;\n }\n }\n };\n\n constructor(props: WmConfirmdialogProps) {\n super(props, DEFAULT_CLASS, new WmConfirmdialogProps());\n }\n\n open() {\n this.dialogRef.open();\n }\n\n close() {\n this.dialogRef.close();\n }\n\n getMessageStyle(type: string) {\n\n }\n\n renderWidget(props: WmConfirmdialogProps) {\n return (\n <WmDialog\n iconclass={props.iconclass}\n animation={props.animation}\n closable={props.closable}\n modal={props.modal}\n styles={this.styles.dialog}\n title={props.title}\n listener={this.listener} onOpened={() => {\n this.invokeEventCallback('onOpened', [null, this]);\n }}>\n <WmDialogcontent styles={this.styles.dialogContent}>\n <WmLabel\n caption={props.message || ''}\n styles={this.styles.message}></WmLabel>\n </WmDialogcontent>\n <WmDialogactions styles={this.styles.dialogActions}>\n <WmButton\n caption={props.canceltext}\n styles={this.theme.mergeStyle({}, this.theme.getStyle('btn-secondary'), this.styles.cancelButton)}\n onTap={() => {\n this.dialogRef.close();\n this.invokeEventCallback('onCancel', [null, this]);\n }}></WmButton>\n <WmButton\n caption={props.oktext}\n styles={this.theme.mergeStyle({}, this.theme.getStyle('btn-primary'), this.styles.okButton)}\n onTap={() => {\n this.dialogRef.close();\n this.invokeEventCallback('onOk', [null, this]);\n }}></WmButton>\n </WmDialogactions>\n </WmDialog>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAA2B,+CAA+C;AAEpH,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,OAAOC,eAAe,MAAM,0CAA0C;AACtE,OAAOC,eAAe,MAAM,0CAA0C;AAEtE,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAG7E,OAAO,MAAMC,oBAAoB,SAASR,kBAAkB,CAAuB;AAEnF,eAAe,MAAMS,eAAe,SAASV,aAAa,CAAoE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AAU,CACzB,CAAC,eAClBpC,KAAA,CAAAuB,aAAA,CAAChB,eAAe;MAACqB,MAAM,EAAE,IAAI,CAACA,MAAM,CAACS;IAAc,gBACjDrC,KAAA,CAAAuB,aAAA,CAACpB,QAAQ;MACPgC,OAAO,EAAEtB,KAAK,CAACyB,UAAW;MAC1BV,MAAM,EAAE,IAAI,CAACW,KAAK,CAACC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAACD,KAAK,CAACE,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,CAACb,MAAM,CAACc,YAAY,CAAE;MAClGC,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAAC1B,SAAS,CAACE,KAAK,CAAC,CAAC;QACtB,IAAI,CAACc,mBAAmB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;MACpD;IAAE,CAAW,CAAC,eAChBjC,KAAA,CAAAuB,aAAA,CAACpB,QAAQ;MACPgC,OAAO,EAAEtB,KAAK,CAAC+B,MAAO;MACtBhB,MAAM,EAAE,IAAI,CAACW,KAAK,CAACC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAACD,KAAK,CAACE,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,CAACb,MAAM,CAACiB,QAAQ,CAAE;MAC5FF,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAAC1B,SAAS,CAACE,KAAK,CAAC,CAAC;QACtB,IAAI,CAACc,mBAAmB,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;MAChD;IAAE,CAAW,CACA,CACT,CAAC;EAEf;AACF"}
1
+ {"version":3,"names":["React","BaseComponent","BaseComponentState","WmButton","WmLabel","WmDialog","WmDialogcontent","WmDialogactions","WmConfirmdialogProps","DEFAULT_CLASS","WmConfirmdialogState","WmConfirmdialog","constructor","props","_defineProperty","onComponentInit","c","dialogRef","open","close","getMessageStyle","type","renderWidget","createElement","id","getTestId","iconclass","animation","closable","modal","styles","dialog","title","listener","onOpened","invokeEventCallback","dialogContent","caption","message","dialogActions","canceltext","theme","mergeStyle","getStyle","cancelButton","onTap","oktext","okButton"],"sources":["confirmdialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nimport WmDialog from '../dialog/dialog.component';\nimport WmDialogcontent from '../dialogcontent/dialogcontent.component';\nimport WmDialogactions from '../dialogactions/dialogactions.component';\n\nimport WmConfirmdialogProps from './confirmdialog.props';\nimport { DEFAULT_CLASS, WmConfirmdialogStyles } from './confirmdialog.styles';\nimport { merge } from 'lodash-es';\n\nexport class WmConfirmdialogState extends BaseComponentState<WmConfirmdialogProps> {}\n\nexport default class WmConfirmdialog extends BaseComponent<WmConfirmdialogProps, WmConfirmdialogState, WmConfirmdialogStyles> {\n\n private dialogRef: WmDialog = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmDialog) {\n this.dialogRef = c;\n }\n }\n };\n\n constructor(props: WmConfirmdialogProps) {\n super(props, DEFAULT_CLASS, new WmConfirmdialogProps());\n }\n\n open() {\n this.dialogRef.open();\n }\n\n close() {\n this.dialogRef.close();\n }\n\n getMessageStyle(type: string) {\n\n }\n\n renderWidget(props: WmConfirmdialogProps) {\n return (\n <WmDialog\n id={this.getTestId('dialog')}\n iconclass={props.iconclass}\n animation={props.animation}\n closable={props.closable}\n modal={props.modal}\n styles={this.styles.dialog}\n title={props.title}\n listener={this.listener} onOpened={() => {\n this.invokeEventCallback('onOpened', [null, this]);\n }}>\n <WmDialogcontent styles={this.styles.dialogContent}>\n <WmLabel\n id={this.getTestId('msg')}\n caption={props.message || ''}\n styles={this.styles.message}></WmLabel>\n </WmDialogcontent>\n <WmDialogactions styles={this.styles.dialogActions}>\n <WmButton\n id={this.getTestId('cancelbtn')}\n caption={props.canceltext}\n styles={this.theme.mergeStyle({}, this.theme.getStyle('btn-onlyLabel'), this.styles.cancelButton)}\n onTap={() => {\n this.dialogRef.close();\n this.invokeEventCallback('onCancel', [null, this]);\n }}></WmButton>\n <WmButton\n id={this.getTestId('okbtn')}\n caption={props.oktext}\n styles={this.theme.mergeStyle({}, this.theme.getStyle('btn-only-label'), this.styles.okButton)}\n onTap={() => {\n this.dialogRef.close();\n this.invokeEventCallback('onOk', [null, this]);\n }}></WmButton>\n </WmDialogactions>\n </WmDialog>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAA2B,+CAA+C;AAEpH,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,OAAOC,eAAe,MAAM,0CAA0C;AACtE,OAAOC,eAAe,MAAM,0CAA0C;AAEtE,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAG7E,OAAO,MAAMC,oBAAoB,SAASR,kBAAkB,CAAuB;AAEnF,eAAe,MAAMS,eAAe,SAASV,aAAa,CAAoE;EAY5HW,WAAWA,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,CAAC,CAAC,CAAC;IAACM,eAAA,oBAX5B,IAAI;IAAAA,eAAA,mBAEI;MACpCC,eAAe,EAAGC,CAAC,IAAK;QACtB,IAAIA,CAAC,YAAYX,QAAQ,EAAE;UACzB,IAAI,CAACY,SAAS,GAAGD,CAAC;QACpB;MACF;IACF,CAAC;EAID;EAEAE,IAAIA,CAAA,EAAG;IACL,IAAI,CAACD,SAAS,CAACC,IAAI,CAAC,CAAC;EACvB;EAEAC,KAAKA,CAAA,EAAG;IACN,IAAI,CAACF,SAAS,CAACE,KAAK,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,IAAI,CAACD,KAAK,CAACE,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,CAACb,MAAM,CAACc,YAAY,CAAE;MAClGC,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAAC5B,SAAS,CAACE,KAAK,CAAC,CAAC;QACtB,IAAI,CAACgB,mBAAmB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;MACpD;IAAE,CAAW,CAAC,eAChBnC,KAAA,CAAAuB,aAAA,CAACpB,QAAQ;MACPqB,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO,CAAE;MAC5BY,OAAO,EAAExB,KAAK,CAACiC,MAAO;MACtBhB,MAAM,EAAE,IAAI,CAACW,KAAK,CAACC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAACD,KAAK,CAACE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAACb,MAAM,CAACiB,QAAQ,CAAE;MAC/FF,KAAK,EAAEA,CAAA,KAAM;QACX,IAAI,CAAC5B,SAAS,CAACE,KAAK,CAAC,CAAC;QACtB,IAAI,CAACgB,mBAAmB,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;MAChD;IAAE,CAAW,CACA,CACT,CAAC;EAEf;AACF"}
@@ -23,25 +23,25 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
23
23
  }
24
24
  },
25
25
  okButton: {
26
- root: {
27
- flex: 1
28
- },
26
+ root: {},
29
27
  text: {
30
- textTransform: 'capitalize'
28
+ textTransform: 'capitalize',
29
+ fontSize: 16
31
30
  }
32
31
  },
33
32
  cancelButton: {
34
- root: {
35
- flex: 1,
36
- marginRight: 8
37
- },
33
+ root: {},
38
34
  text: {
39
- textTransform: 'capitalize'
35
+ textTransform: 'capitalize',
36
+ fontSize: 16
40
37
  }
41
38
  },
42
39
  message: {
43
40
  text: {
44
- color: themeVariables.alertMessageColor
41
+ fontFamily: themeVariables.baseFont,
42
+ fontSize: 14,
43
+ fontWeight: '400',
44
+ color: themeVariables.dialogSupportingTextColor
45
45
  }
46
46
  }
47
47
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","dialog","icon","fontSize","dialogContent","dialogActions","padding","flexDirection","okButton","flex","textTransform","cancelButton","marginRight","message","color","alertMessageColor","OS","marginLeft"],"sources":["confirmdialog.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmDialogStyles } from '../dialog/dialog.styles';\nimport { WmDialogcontentStyles } from '../dialogcontent/dialogcontent.styles';\nimport { WmDialogactionsStyles } from '../dialogactions/dialogactions.styles';\nimport { WmLabelStyles } from '../../basic/label/label.styles';\nimport { Platform } from 'react-native';\n\nexport type WmConfirmdialogStyles = BaseStyles & {\n dialog: WmDialogStyles,\n dialogContent: WmDialogcontentStyles,\n dialogActions: WmDialogactionsStyles,\n okButton: WmButtonStyles,\n cancelButton: WmButtonStyles,\n message: WmLabelStyles\n};\n\nexport const DEFAULT_CLASS = 'app-confirmdialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmConfirmdialogStyles = defineStyles({\n root: {},\n text: {},\n dialog: {\n icon: {\n icon: {\n fontSize: 16\n }\n }\n } as WmDialogStyles,\n dialogContent: {\n root: {}\n } as WmDialogcontentStyles,\n dialogActions: {\n root: {\n padding: 0,\n flexDirection: 'row',\n }\n } as WmDialogactionsStyles,\n okButton: {\n root : {\n flex: 1\n },\n text: {\n textTransform: 'capitalize'\n }\n } as WmButtonStyles,\n cancelButton: {\n root : {\n flex: 1,\n marginRight: 8,\n },\n text: {\n textTransform: 'capitalize'\n }\n } as WmButtonStyles,\n message: {\n text: {\n color: themeVariables.alertMessageColor\n }\n } as WmLabelStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n cancelButton: {\n root: {\n marginLeft: 8,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAMxF,SAASC,QAAQ,QAAQ,cAAc;AAWvC,OAAO,MAAMC,aAAa,GAAG,mBAAmB;AAChDH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAoC,GAAGN,YAAY,CAAC;IACtDO,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJC,IAAI,EAAE;QACFA,IAAI,EAAE;UACFC,QAAQ,EAAE;QACd;MACJ;IACJ,CAAmB;IACnBC,aAAa,EAAE;MACXL,IAAI,EAAE,CAAC;IACX,CAA0B;IAC1BM,aAAa,EAAE;MACXN,IAAI,EAAE;QACFO,OAAO,EAAE,CAAC;QACVC,aAAa,EAAE;MACnB;IACJ,CAA0B;IAC1BC,QAAQ,EAAE;MACNT,IAAI,EAAG;QACHU,IAAI,EAAE;MACV,CAAC;MACDT,IAAI,EAAE;QACFU,aAAa,EAAE;MACnB;IACJ,CAAmB;IACnBC,YAAY,EAAE;MACVZ,IAAI,EAAG;QACHU,IAAI,EAAE,CAAC;QACPG,WAAW,EAAE;MACjB,CAAC;MACDZ,IAAI,EAAE;QACFU,aAAa,EAAE;MACnB;IACJ,CAAoB;IACpBG,OAAO,EAAE;MACLb,IAAI,EAAE;QACFc,KAAK,EAAElB,cAAc,CAACmB;MAC1B;IACJ;EACJ,CAAC,CAAC;EAEFlB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACuB,EAAE,IAAE,KAAK,GAAC;IACpDL,YAAY,EAAE;MACVZ,IAAI,EAAE;QACFkB,UAAU,EAAE,CAAC;QACbL,WAAW,EAAE;MACjB;IACJ;EACJ,CAAC,GAAC,CAAC,CAAC,CAAC;AACT,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","dialog","icon","fontSize","dialogContent","dialogActions","padding","flexDirection","okButton","textTransform","cancelButton","message","fontFamily","baseFont","fontWeight","color","dialogSupportingTextColor","OS","marginLeft","marginRight"],"sources":["confirmdialog.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 { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmDialogStyles } from '../dialog/dialog.styles';\nimport { WmDialogcontentStyles } from '../dialogcontent/dialogcontent.styles';\nimport { WmDialogactionsStyles } from '../dialogactions/dialogactions.styles';\nimport { WmLabelStyles } from '../../basic/label/label.styles';\nimport { Platform } from 'react-native';\n\nexport type WmConfirmdialogStyles = BaseStyles & {\n dialog: WmDialogStyles,\n dialogContent: WmDialogcontentStyles,\n dialogActions: WmDialogactionsStyles,\n okButton: WmButtonStyles,\n cancelButton: WmButtonStyles,\n message: WmLabelStyles\n};\n\nexport const DEFAULT_CLASS = 'app-confirmdialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmConfirmdialogStyles = defineStyles({\n root: {},\n text: {},\n dialog: {\n icon: {\n icon: {\n fontSize: 16\n }\n }\n } as WmDialogStyles,\n dialogContent: {\n root: {}\n } as WmDialogcontentStyles,\n dialogActions: {\n root: {\n padding: 0,\n flexDirection: 'row',\n }\n } as WmDialogactionsStyles,\n okButton: {\n root : {},\n text: {\n textTransform: 'capitalize',\n fontSize: 16\n }\n } as WmButtonStyles,\n cancelButton: {\n root : {\n },\n text: {\n textTransform: 'capitalize',\n fontSize: 16\n }\n } as WmButtonStyles,\n message: {\n text: {\n fontFamily: themeVariables.baseFont,\n fontSize: 14,\n fontWeight: '400',\n color: themeVariables.dialogSupportingTextColor\n }\n } as WmLabelStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n cancelButton: {\n root: {\n marginLeft: 8,\n marginRight: 0\n }\n }\n }:{});\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAMxF,SAASC,QAAQ,QAAQ,cAAc;AAWvC,OAAO,MAAMC,aAAa,GAAG,mBAAmB;AAChDH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAoC,GAAGN,YAAY,CAAC;IACtDO,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJC,IAAI,EAAE;QACFA,IAAI,EAAE;UACFC,QAAQ,EAAE;QACd;MACJ;IACJ,CAAmB;IACnBC,aAAa,EAAE;MACXL,IAAI,EAAE,CAAC;IACX,CAA0B;IAC1BM,aAAa,EAAE;MACXN,IAAI,EAAE;QACFO,OAAO,EAAE,CAAC;QACVC,aAAa,EAAE;MACnB;IACJ,CAA0B;IAC1BC,QAAQ,EAAE;MACNT,IAAI,EAAG,CAAC,CAAC;MACTC,IAAI,EAAE;QACFS,aAAa,EAAE,YAAY;QAC3BN,QAAQ,EAAE;MACd;IACJ,CAAmB;IACnBO,YAAY,EAAE;MACVX,IAAI,EAAG,CACP,CAAC;MACDC,IAAI,EAAE;QACFS,aAAa,EAAE,YAAY;QAC3BN,QAAQ,EAAE;MACd;IACJ,CAAoB;IACpBQ,OAAO,EAAE;MACLX,IAAI,EAAE;QACFY,UAAU,EAAEhB,cAAc,CAACiB,QAAQ;QACnCV,QAAQ,EAAE,EAAE;QACZW,UAAU,EAAE,KAAK;QACjBC,KAAK,EAAEnB,cAAc,CAACoB;MAC1B;IACJ;EACJ,CAAC,CAAC;EAEFnB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAACwB,EAAE,IAAE,KAAK,GAAC;IACpDP,YAAY,EAAE;MACVX,IAAI,EAAE;QACFmB,UAAU,EAAE,CAAC;QACbC,WAAW,EAAE;MACjB;IACJ;EACJ,CAAC,GAAC,CAAC,CAAC,CAAC;AACT,CAAC,CAAC"}
@@ -76,10 +76,12 @@ export default class WmDialog extends BaseComponent {
76
76
  }, /*#__PURE__*/React.createElement(View, {
77
77
  style: this.styles.headerLabel
78
78
  }, /*#__PURE__*/React.createElement(WmIcon, {
79
+ id: this.getTestId('icon'),
79
80
  caption: props.title,
80
81
  iconclass: props.iconclass,
81
82
  styles: this.styles.icon
82
83
  })), props.closable && /*#__PURE__*/React.createElement(WmButton, {
84
+ id: this.getTestId('closebtn'),
83
85
  show: props.closable,
84
86
  iconclass: "wm-sl-l sl-close",
85
87
  onTap: () => this.close(),
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","ModalConsumer","AssetProvider","HideMode","ThemeProvider","BaseComponent","BaseComponentState","WmIcon","WmButton","WmDialogProps","DEFAULT_CLASS","WmDialogState","constructor","arguments","_defineProperty","WmDialog","props","hideMode","DONOT_ADD_TO_DOM","state","modalOptions","onClose","Promise","res","updateState","show","invokeEventCallback","onOpen","open","close","_close","prepareModalOptions","content","modalService","o","name","modalStyle","styles","modal","contentStyle","isModal","centered","animation","hideModal","renderWidget","createElement","showModal","value","loadAsset","theme","style","root","_background","showheader","header","headerLabel","caption","title","iconclass","icon","closable","onTap","closeBtn","children"],"sources":["dialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\n\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nimport WmDialogProps from './dialog.props';\nimport { DEFAULT_CLASS, WmDialogStyles } from './dialog.styles';\n\nexport class WmDialogState extends BaseComponentState<WmDialogProps> {\n modalOptions = {} as ModalOptions;\n}\n\nexport default class WmDialog extends BaseComponent<WmDialogProps, WmDialogState, WmDialogStyles> {\n\n private _close: Function = () => {};\n\n constructor(props: WmDialogProps) {\n super(props, DEFAULT_CLASS, new WmDialogProps(), new WmDialogState());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n this.state.modalOptions.onClose = () => {\n return new Promise<void>((res) => {\n this.updateState({\n props: {show: false}\n } as WmDialogState, () => {\n this.invokeEventCallback('onClose', [null, this]);\n res();\n });\n });\n };\n this.state.modalOptions.onOpen = () => {\n this.invokeEventCallback('onOpened', [null, this]);\n };\n }\n\n open() {\n if (!this.state.props.show) {\n this.updateState({\n props:{show: true}\n } as WmDialogState);\n }\n }\n\n close() {\n this._close();\n }\n\n prepareModalOptions(content: React.ReactNode, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.name = this.state.props.name;\n o.modalStyle = this.styles.modal;\n o.content = content;\n o.contentStyle = this.styles.content;\n o.isModal = !!this.state.props.modal;\n o.centered = true;\n o.animation = this.state.props.animation;\n this._close = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmDialogProps) {\n return (<ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <AssetProvider value={this.loadAsset}>\n <ThemeProvider value={this.theme}>\n <View style={this.styles.root}>\n {this._background}\n {props.showheader ? (<View style={this.styles.header}>\n <View style={this.styles.headerLabel}>\n <WmIcon caption={props.title} iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>\n </View>\n {props.closable && <WmButton show={props.closable} iconclass=\"wm-sl-l sl-close\" onTap={() => this.close()} styles={this.styles.closeBtn}></WmButton>}\n </View>) : null}\n {props.children}\n </View>\n </ThemeProvider>\n </AssetProvider>\n ), modalService));\n return null;\n }}\n </ModalConsumer>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AAEzC,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,uBACpD,CAAC,CAAC;EAAA;AACnB;AAEA,eAAe,MAAMC,QAAQ,SAASV,aAAa,CAA+C;EAIhGO,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIE,aAAa,CAAC,CAAC,CAAC;IAACG,eAAA,iBAH7C,MAAM,CAAC,CAAC;IAIjC,IAAI,CAACG,QAAQ,GAAGd,QAAQ,CAACe,gBAAgB;IACzC,IAAI,CAACC,KAAK,CAACC,YAAY,CAACC,OAAO,GAAG,MAAM;MACtC,OAAO,IA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AM,CAACyB;MAAS,CAAW,CAC/I,CAAC,GAAI,IAAI,EACd9C,KAAK,CAAC+C,QACH,CACO,CACF,CAAC,EACf9B,YAAY,CAAC,CAAC;MACjB,OAAO,IAAI;IACb,CACa,CAAC;EAClB;AACF"}
1
+ {"version":3,"names":["React","View","ModalConsumer","AssetProvider","HideMode","ThemeProvider","BaseComponent","BaseComponentState","WmIcon","WmButton","WmDialogProps","DEFAULT_CLASS","WmDialogState","constructor","arguments","_defineProperty","WmDialog","props","hideMode","DONOT_ADD_TO_DOM","state","modalOptions","onClose","Promise","res","updateState","show","invokeEventCallback","onOpen","open","close","_close","prepareModalOptions","content","modalService","o","name","modalStyle","styles","modal","contentStyle","isModal","centered","animation","hideModal","renderWidget","createElement","showModal","value","loadAsset","theme","style","root","_background","showheader","header","headerLabel","id","getTestId","caption","title","iconclass","icon","closable","onTap","closeBtn","children"],"sources":["dialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\n\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nimport WmDialogProps from './dialog.props';\nimport { DEFAULT_CLASS, WmDialogStyles } from './dialog.styles';\n\nexport class WmDialogState extends BaseComponentState<WmDialogProps> {\n modalOptions = {} as ModalOptions;\n}\n\nexport default class WmDialog extends BaseComponent<WmDialogProps, WmDialogState, WmDialogStyles> {\n\n private _close: Function = () => {};\n\n constructor(props: WmDialogProps) {\n super(props, DEFAULT_CLASS, new WmDialogProps(), new WmDialogState());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n this.state.modalOptions.onClose = () => {\n return new Promise<void>((res) => {\n this.updateState({\n props: {show: false}\n } as WmDialogState, () => {\n this.invokeEventCallback('onClose', [null, this]);\n res();\n });\n });\n };\n this.state.modalOptions.onOpen = () => {\n this.invokeEventCallback('onOpened', [null, this]);\n };\n }\n\n open() {\n if (!this.state.props.show) {\n this.updateState({\n props:{show: true}\n } as WmDialogState);\n }\n }\n\n close() {\n this._close();\n }\n\n prepareModalOptions(content: React.ReactNode, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.name = this.state.props.name;\n o.modalStyle = this.styles.modal;\n o.content = content;\n o.contentStyle = this.styles.content;\n o.isModal = !!this.state.props.modal;\n o.centered = true;\n o.animation = this.state.props.animation;\n this._close = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmDialogProps) {\n return (<ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <AssetProvider value={this.loadAsset}>\n <ThemeProvider value={this.theme}>\n <View style={this.styles.root}>\n {this._background}\n {props.showheader ? (<View style={this.styles.header}>\n <View style={this.styles.headerLabel}>\n <WmIcon id={this.getTestId('icon')} caption={props.title} iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>\n </View>\n {props.closable && <WmButton id={this.getTestId('closebtn')} show={props.closable} iconclass=\"wm-sl-l sl-close\" onTap={() => this.close()} styles={this.styles.closeBtn}></WmButton>}\n </View>) : null}\n {props.children}\n </View>\n </ThemeProvider>\n </AssetProvider>\n ), modalService));\n return null;\n }}\n </ModalConsumer>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AAEzC,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,EAAEC,kB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C,KAAK,CAACqC,UAAU,gBAAItD,KAAA,CAAA8C,aAAA,CAAC7C,IAAI;QAACkD,KAAK,EAAE,IAAI,CAACb,MAAM,CAACiB;MAAO,gBACnDvD,KAAA,CAAA8C,aAAA,CAAC7C,IAAI;QAACkD,KAAK,EAAE,IAAI,CAACb,MAAM,CAACkB;MAAY,gBACnCxD,KAAA,CAAA8C,aAAA,CAACtC,MAAM;QAACiD,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;QAACC,OAAO,EAAE1C,KAAK,CAAC2C,KAAM;QAACC,SAAS,EAAE5C,KAAK,CAAC4C,SAAU;QAACvB,MAAM,EAAE,IAAI,CAACA,MAAM,CAACwB;MAAK,CAAS,CACpH,CAAC,EACN7C,KAAK,CAAC8C,QAAQ,iBAAI/D,KAAA,CAAA8C,aAAA,CAACrC,QAAQ;QAACgD,EAAE,EAAE,IAAI,CAACC,SAAS,CAAC,UAAU,CAAE;QAAChC,IAAI,EAAET,KAAK,CAAC8C,QAAS;QAACF,SAAS,EAAC,kBAAkB;QAACG,KAAK,EAAEA,CAAA,KAAM,IAAI,CAAClC,KAAK,CAAC,CAAE;QAACQ,MAAM,EAAE,IAAI,CAACA,MAAM,CAAC2B;MAAS,CAAW,CAC/K,CAAC,GAAI,IAAI,EACdhD,KAAK,CAACiD,QACH,CACO,CACF,CAAC,EACfhC,YAAY,CAAC,CAAC;MACjB,OAAO,IAAI;IACb,CACa,CAAC;EAClB;AACF"}
@@ -5,11 +5,15 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
5
  const defaultStyles = defineStyles({
6
6
  root: {
7
7
  minWidth: 320,
8
+ paddingTop: 24,
9
+ paddingBottom: 24,
10
+ paddingLeft: 24,
11
+ paddingRight: 24,
12
+ elevation: 6,
8
13
  width: '90%',
9
14
  maxHeight: themeVariables.maxModalHeight,
10
15
  backgroundColor: themeVariables.dialogBackgroundColor,
11
- borderRadius: 6,
12
- padding: 16
16
+ borderRadius: 28
13
17
  },
14
18
  text: {},
15
19
  modal: {},
@@ -21,11 +25,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
21
25
  alignSelf: 'center'
22
26
  },
23
27
  text: {
24
- fontSize: 20,
25
- fontWeight: 'bold'
28
+ fontFamily: themeVariables.baseFont,
29
+ fontSize: 24,
30
+ fontWeight: '400',
31
+ color: themeVariables.dialogLabelColor
26
32
  },
27
33
  icon: {
28
- fontSize: 24
34
+ fontSize: 24,
35
+ color: themeVariables.dialogIconColor
29
36
  }
30
37
  },
31
38
  header: {
@@ -37,13 +44,15 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
37
44
  flex: 1,
38
45
  flexDirection: 'row',
39
46
  justifyContent: 'flex-start',
40
- alignItems: 'center'
47
+ alignItems: 'center',
48
+ paddingBottom: 16
41
49
  },
42
50
  closeBtn: {
43
51
  root: {
44
52
  alignSelf: 'flex-end',
45
53
  backgroundColor: 'transparent',
46
- padding: 8
54
+ paddingRight: 0,
55
+ paddingTop: 0
47
56
  },
48
57
  icon: {
49
58
  root: {
@@ -51,7 +60,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
51
60
  },
52
61
  text: {
53
62
  color: themeVariables.dialogCloseIconColor,
54
- fontSize: 16
63
+ fontSize: 14
55
64
  }
56
65
  }
57
66
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minWidth","width","maxHeight","maxModalHeight","backgroundColor","dialogBackgroundColor","borderRadius","padding","text","modal","modalContent","undefined","icon","alignSelf","fontSize","fontWeight","header","flexDirection","borderStyle","borderColor","dialogBorderColor","headerLabel","flex","justifyContent","alignItems","closeBtn","color","dialogCloseIconColor"],"sources":["dialog.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME 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 { WmButtonStyles } from '../../basic/button/button.styles';\n\nexport type WmDialogStyles = BaseStyles & {\n modal: ViewStyle,\n modalContent: ViewStyle,\n icon: WmIconStyles,\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-dialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDialogStyles = defineStyles<WmDialogStyles>({\n root: {\n minWidth: 320,\n width: '90%',\n maxHeight: themeVariables.maxModalHeight,\n backgroundColor: themeVariables.dialogBackgroundColor,\n borderRadius: 6,\n padding: 16\n },\n text: {},\n modal: {},\n modalContent: {\n width: undefined\n },\n icon: {\n root: {\n alignSelf: 'center',\n },\n text: {\n fontSize: 20,\n fontWeight: 'bold'\n },\n icon: {\n fontSize: 24,\n }\n } as WmIconStyles,\n header: {\n flexDirection: 'row',\n borderStyle: 'solid',\n borderColor: themeVariables.dialogBorderColor\n },\n headerLabel: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center'\n },\n closeBtn: {\n root: {\n alignSelf: 'flex-end',\n backgroundColor: 'transparent',\n padding: 8\n },\n icon : {\n root: {\n alignItems: 'center'\n },\n text: {\n color: themeVariables.dialogCloseIconColor,\n fontSize: 16\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACFC,QAAQ,EAAE,GAAG;MACbC,KAAK,EAAE,KAAK;MACZC,SAAS,EAAEN,cAAc,CAACO,cAAc;MACxCC,eAAe,EAAER,cAAc,CAACS,qBAAqB;MACrDC,YAAY,EAAE,CAAC;MACfC,OAAO,EAAE;IACb,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE,CAAC,CAAC;IACTC,YAAY,EAAE;MACVT,KAAK,EAAEU;IACX,CAAC;IACDC,IAAI,EAAE;MACFb,IAAI,EAAE;QACFc,SAAS,EAAE;MACf,CAAC;MACDL,IAAI,EAAE;QACFM,QAAQ,EAAE,EAAE;QACZC,UAAU,EAAE;MAChB,CAAC;MACDH,IAAI,EAAE;QACFE,QAAQ,EAAE;MACd;IACJ,CAAiB;IACjBE,MAAM,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEvB,cAAc,CAACwB;IAChC,CAAC;IACDC,WAAW,EAAE;MACTC,IAAI,EAAE,CAAC;MACPL,aAAa,EAAE,KAAK;MACpBM,cAAc,EAAE,YAAY;MAC5BC,UAAU,EAAE;IAChB,CAAC;IACDC,QAAQ,EAAE;MACN1B,IAAI,EAAE;QACFc,SAAS,EAAE,UAAU;QACrBT,eAAe,EAAE,aAAa;QAC9BG,OAAO,EAAE;MACb,CAAC;MACDK,IAAI,EAAG;QACHb,IAAI,EAAE;UACFyB,UAAU,EAAE;QAChB,CAAC;QACDhB,IAAI,EAAE;UACFkB,KAAK,EAAE9B,cAAc,CAAC+B,oBAAoB;UAC1Cb,QAAQ,EAAE;QACd;MACJ;IACJ;EACJ,CAAC,CAAC;EAEFjB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","elevation","width","maxHeight","maxModalHeight","backgroundColor","dialogBackgroundColor","borderRadius","text","modal","modalContent","undefined","icon","alignSelf","fontFamily","baseFont","fontSize","fontWeight","color","dialogLabelColor","dialogIconColor","header","flexDirection","borderStyle","borderColor","dialogBorderColor","headerLabel","flex","justifyContent","alignItems","closeBtn","dialogCloseIconColor"],"sources":["dialog.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME 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 { WmButtonStyles } from '../../basic/button/button.styles';\n\nexport type WmDialogStyles = BaseStyles & {\n modal: ViewStyle,\n modalContent: ViewStyle,\n icon: WmIconStyles,\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-dialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDialogStyles = defineStyles<WmDialogStyles>({\n root: {\n minWidth: 320,\n paddingTop: 24,\n paddingBottom: 24,\n paddingLeft: 24,\n paddingRight: 24,\n elevation: 6,\n width: '90%',\n maxHeight: themeVariables.maxModalHeight,\n backgroundColor: themeVariables.dialogBackgroundColor,\n borderRadius: 28\n },\n text: {},\n modal: {},\n modalContent: {\n width: undefined\n },\n icon: {\n root: {\n alignSelf: 'center',\n },\n text: {\n fontFamily: themeVariables.baseFont,\n fontSize: 24,\n fontWeight: '400',\n color : themeVariables.dialogLabelColor,\n },\n icon: {\n fontSize: 24,\n color: themeVariables.dialogIconColor\n }\n } as WmIconStyles,\n header: {\n flexDirection: 'row',\n borderStyle: 'solid',\n borderColor: themeVariables.dialogBorderColor\n },\n headerLabel: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n paddingBottom: 16,\n },\n closeBtn: {\n root: {\n alignSelf: 'flex-end',\n backgroundColor: 'transparent',\n paddingRight: 0,\n paddingTop: 0\n },\n icon : {\n root: {\n alignItems: 'center'\n },\n text: {\n color: themeVariables.dialogCloseIconColor,\n fontSize: 14\n }\n }\n } as WmButtonStyles\n });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ACpB/B,aAAa,EAAE;IACnB,CAAC;IACDgC,QAAQ,EAAE;MACNnC,IAAI,EAAE;QACFkB,SAAS,EAAE,UAAU;QACrBR,eAAe,EAAE,aAAa;QAC9BL,YAAY,EAAE,CAAC;QACfH,UAAU,EAAE;MAChB,CAAC;MACDe,IAAI,EAAG;QACHjB,IAAI,EAAE;UACFkC,UAAU,EAAE;QAChB,CAAC;QACDrB,IAAI,EAAE;UACFU,KAAK,EAAE1B,cAAc,CAACuC,oBAAoB;UAC1Cf,QAAQ,EAAE;QACd;MACJ;IACJ;EACJ,CAAC,CAAC;EAEFvB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -10,9 +10,11 @@ export default class WmDialogcontent extends BaseComponent {
10
10
  }
11
11
  renderWidget(props) {
12
12
  return /*#__PURE__*/React.createElement(ScrollView, {
13
- contentContainerStyle: this.styles.root,
13
+ contentContainerStyle: [this.styles.root, {
14
+ maxHeight: undefined
15
+ }],
14
16
  style: {
15
- maxHeight: '90%'
17
+ maxHeight: this.styles.root.maxHeight
16
18
  }
17
19
  }, this._background, props.children);
18
20
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","ScrollView","BaseComponent","BaseComponentState","WmDialogcontentProps","DEFAULT_CLASS","WmDialogcontentState","WmDialogcontent","constructor","props","renderWidget","createElement","contentContainerStyle","styles","root","style","maxHeight","_background","children"],"sources":["dialogcontent.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmDialogcontentProps from './dialogcontent.props';\nimport { DEFAULT_CLASS, WmDialogcontentStyles } from './dialogcontent.styles';\n\nexport class WmDialogcontentState extends BaseComponentState<WmDialogcontentProps> {}\n\nexport default class WmDialogcontent extends BaseComponent<WmDialogcontentProps, WmDialogcontentState, WmDialogcontentStyles> {\n\n constructor(props: WmDialogcontentProps) {\n super(props, DEFAULT_CLASS, new WmDialogcontentProps());\n }\n\n renderWidget(props: WmDialogcontentProps) {\n return (<ScrollView contentContainerStyle={this.styles.root} style={{maxHeight: '90%'}}>{this._background}{props.children}</ScrollView>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,OAAO,MAAMC,oBAAoB,SAASH,kBAAkB,CAAuB;AAEnF,eAAe,MAAMI,eAAe,SAASL,aAAa,CAAoE;EAE5HM,WAAWA,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,CAAC,CAAC,CAAC;EACzD;EAEAM,YAAYA,CAACD,KAA2B,EAAE;IACxC,oBAAQT,KAAA,CAAAW,aAAA,CAACV,UAAU;MAACW,qBAAqB,EAAE,IAAI,CAACC,MAAM,CAACC,IAAK;MAACC,KAAK,EAAE;QAACC,SAAS,EAAE;MAAK;IAAE,GAAE,IAAI,CAACC,WAAW,EAAER,KAAK,CAACS,QAAqB,CAAC;EACzI;AACF"}
1
+ {"version":3,"names":["React","ScrollView","BaseComponent","BaseComponentState","WmDialogcontentProps","DEFAULT_CLASS","WmDialogcontentState","WmDialogcontent","constructor","props","renderWidget","createElement","contentContainerStyle","styles","root","maxHeight","undefined","style","_background","children"],"sources":["dialogcontent.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmDialogcontentProps from './dialogcontent.props';\nimport { DEFAULT_CLASS, WmDialogcontentStyles } from './dialogcontent.styles';\n\nexport class WmDialogcontentState extends BaseComponentState<WmDialogcontentProps> {}\n\nexport default class WmDialogcontent extends BaseComponent<WmDialogcontentProps, WmDialogcontentState, WmDialogcontentStyles> {\n\n constructor(props: WmDialogcontentProps) {\n super(props, DEFAULT_CLASS, new WmDialogcontentProps());\n }\n\n renderWidget(props: WmDialogcontentProps) {\n return (<ScrollView\n contentContainerStyle={[this.styles.root, {maxHeight: undefined}]}\n style={{maxHeight: this.styles.root.maxHeight}}>\n {this._background}\n {props.children}\n </ScrollView>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,OAAO,MAAMC,oBAAoB,SAASH,kBAAkB,CAAuB;AAEnF,eAAe,MAAMI,eAAe,SAASL,aAAa,CAAoE;EAE5HM,WAAWA,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,CAAC,CAAC,CAAC;EACzD;EAEAM,YAAYA,CAACD,KAA2B,EAAE;IACxC,oBAAQT,KAAA,CAAAW,aAAA,CAACV,UAAU;MACjBW,qBAAqB,EAAE,CAAC,IAAI,CAACC,MAAM,CAACC,IAAI,EAAE;QAACC,SAAS,EAAEC;MAAS,CAAC,CAAE;MAClEC,KAAK,EAAE;QAACF,SAAS,EAAE,IAAI,CAACF,MAAM,CAACC,IAAI,CAACC;MAAS;IAAE,GAC5C,IAAI,CAACG,WAAW,EAChBT,KAAK,CAACU,QACC,CAAC;EACf;AACF"}
@@ -5,7 +5,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
5
  const defaultStyles = defineStyles({
6
6
  root: {
7
7
  padding: 16,
8
- minHeight: 80
8
+ minHeight: 80,
9
+ maxHeight: 0.9 * themeVariables.maxModalHeight
9
10
  },
10
11
  text: {}
11
12
  });