@wavemaker/app-rn-runtime 11.4.0-next.141072 → 11.4.0-next.141074

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 (424) hide show
  1. app-rn-runtime/actions/base-action.js.map +1 -1
  2. app-rn-runtime/actions/login-action.js.map +1 -1
  3. app-rn-runtime/actions/logout-action.js.map +1 -1
  4. app-rn-runtime/actions/navigation-action.js +14 -2
  5. app-rn-runtime/actions/navigation-action.js.map +1 -1
  6. app-rn-runtime/actions/notification-action.js.map +1 -1
  7. app-rn-runtime/actions/timer-action.js.map +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
  10. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
  12. app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
  13. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  14. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  15. app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
  16. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  17. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  18. app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
  19. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  20. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
  21. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  22. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  23. app-rn-runtime/components/basic/anchor/anchor.component.js +1 -0
  24. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  25. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  26. app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
  27. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  28. app-rn-runtime/components/basic/animatedview.component.js +1 -3
  29. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  30. app-rn-runtime/components/basic/audio/audio.component.js +232 -0
  31. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
  32. app-rn-runtime/components/basic/audio/audio.props.js +15 -0
  33. app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
  34. app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
  35. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
  36. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  37. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  38. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  39. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
  40. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
  41. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  42. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  43. app-rn-runtime/components/basic/custom/custom.props.js.map +1 -1
  44. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  45. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  46. app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
  47. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  48. app-rn-runtime/components/basic/label/label.component.js +2 -1
  49. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  50. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  51. app-rn-runtime/components/basic/label/label.styles.js +8 -0
  52. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  53. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  54. app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -1
  55. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  56. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  57. app-rn-runtime/components/basic/message/message.styles.js +22 -0
  58. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  59. app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
  60. app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
  61. app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
  62. app-rn-runtime/components/basic/picture/picture.component.js +3 -3
  63. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  64. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  65. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  66. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  67. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  68. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  69. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  70. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  71. app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
  72. app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
  73. app-rn-runtime/components/basic/search/search.component.js +1 -1
  74. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  75. app-rn-runtime/components/basic/search/search.props.js +1 -0
  76. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  77. app-rn-runtime/components/basic/search/search.styles.js +47 -0
  78. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  79. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  80. app-rn-runtime/components/basic/spinner/spinner.component.js +3 -1
  81. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  82. app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
  83. app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
  84. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  85. app-rn-runtime/components/basic/video/video.component.js +2 -2
  86. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  87. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  88. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  89. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  90. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  91. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  92. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  93. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  94. app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
  95. app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
  96. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
  97. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  98. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  99. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +1 -1
  100. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  101. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
  102. app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
  103. app-rn-runtime/components/container/accordion/accordion.component.js +75 -119
  104. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  105. app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
  106. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  107. app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
  108. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  109. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +48 -7
  110. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  111. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
  112. app-rn-runtime/components/container/container.component.js.map +1 -1
  113. app-rn-runtime/components/container/container.props.js.map +1 -1
  114. app-rn-runtime/components/container/container.styles.js.map +1 -1
  115. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  116. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js.map +1 -1
  117. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  118. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
  119. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  120. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  121. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  122. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  123. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  124. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  125. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  126. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  127. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
  128. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  129. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
  130. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  131. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  132. app-rn-runtime/components/container/panel/panel.styles.js +9 -0
  133. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  134. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  135. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +30 -5
  136. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  137. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  138. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +10 -1
  139. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  140. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  141. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  142. app-rn-runtime/components/container/tabs/tabs.component.js +5 -2
  143. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  144. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  145. app-rn-runtime/components/container/tabs/tabs.styles.js +39 -0
  146. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  147. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  148. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  149. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  150. app-rn-runtime/components/container/wizard/wizard.component.js +15 -6
  151. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  152. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  153. app-rn-runtime/components/container/wizard/wizard.styles.js +53 -1
  154. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  155. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  156. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  157. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  158. app-rn-runtime/components/data/card/card-content/card-content.props.js.map +1 -1
  159. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  160. app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
  161. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  162. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  163. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  164. app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
  165. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  166. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  167. app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
  168. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -2
  169. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  170. app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
  171. app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
  172. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  173. app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
  174. app-rn-runtime/components/data/form/form.component.js +1 -2
  175. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  176. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  177. app-rn-runtime/components/data/form/form.styles.js.map +1 -1
  178. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  179. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  180. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  181. app-rn-runtime/components/data/list/list.component.js +77 -16
  182. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  183. app-rn-runtime/components/data/list/list.props.js +2 -0
  184. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  185. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  186. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  187. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  188. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  189. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  190. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  191. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  192. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  193. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  194. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
  195. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
  196. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -2
  197. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  198. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  199. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  200. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
  201. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  202. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
  203. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  204. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  205. app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
  206. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  207. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  208. app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
  209. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  210. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  211. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  212. app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
  213. app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
  214. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  215. app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
  216. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  217. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  218. app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
  219. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  220. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  221. app-rn-runtime/components/input/chips/chips.component.js +1 -0
  222. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  223. app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
  224. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  225. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  226. app-rn-runtime/components/input/currency/currency.component.js +6 -4
  227. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  228. app-rn-runtime/components/input/currency/currency.props.js +1 -1
  229. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  230. app-rn-runtime/components/input/currency/currency.styles.js +9 -0
  231. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  232. app-rn-runtime/components/input/epoch/base-datetime.component.js +5 -2
  233. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  234. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  235. app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
  236. app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
  237. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  238. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  239. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  240. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  241. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
  242. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  243. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  244. app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
  245. app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
  246. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  247. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  248. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  249. app-rn-runtime/components/input/number/number.component.js +6 -4
  250. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  251. app-rn-runtime/components/input/number/number.props.js +1 -1
  252. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  253. app-rn-runtime/components/input/number/number.styles.js +5 -0
  254. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  255. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  256. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  257. app-rn-runtime/components/input/rating/rating.component.js +1 -1
  258. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  259. app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
  260. app-rn-runtime/components/input/select/select.component.js +1 -1
  261. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  262. app-rn-runtime/components/input/select/select.props.js.map +1 -1
  263. app-rn-runtime/components/input/select/select.styles.js +10 -0
  264. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  265. app-rn-runtime/components/input/slider/slider.component.js +2 -1
  266. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  267. app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
  268. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  269. app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
  270. app-rn-runtime/components/input/switch/switch.styles.js +36 -0
  271. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  272. app-rn-runtime/components/input/text/text.component.js +5 -3
  273. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  274. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  275. app-rn-runtime/components/input/text/text.styles.js +5 -0
  276. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  277. app-rn-runtime/components/input/textarea/textarea.component.js +5 -3
  278. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  279. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  280. app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
  281. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  282. app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
  283. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  284. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  285. app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
  286. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  287. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  288. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  289. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  290. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  291. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  292. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  293. app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
  294. app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
  295. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  296. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  297. app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
  298. app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
  299. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  300. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  301. app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
  302. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  303. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  304. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  305. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  306. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  307. app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
  308. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  309. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  310. app-rn-runtime/components/page/page.component.js.map +1 -1
  311. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  312. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  313. app-rn-runtime/components/page/partial-container/partial-container.props.js.map +1 -1
  314. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  315. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  316. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  317. app-rn-runtime/core/asset.provider.js.map +1 -1
  318. app-rn-runtime/core/base.component.js +19 -14
  319. app-rn-runtime/core/base.component.js.map +1 -1
  320. app-rn-runtime/core/components/textinput.component.js +37 -0
  321. app-rn-runtime/core/components/textinput.component.js.map +1 -0
  322. app-rn-runtime/core/device/camera-service.js.map +1 -1
  323. app-rn-runtime/core/device/scan-service.js.map +1 -1
  324. app-rn-runtime/core/display.manager.js.map +1 -1
  325. app-rn-runtime/core/event-notifier.js.map +1 -1
  326. app-rn-runtime/core/fixed-view.component.js.map +1 -1
  327. app-rn-runtime/core/formatters.js.map +1 -1
  328. app-rn-runtime/core/i18n.service.js +2 -0
  329. app-rn-runtime/core/i18n.service.js.map +1 -0
  330. app-rn-runtime/core/if.component.js +3 -3
  331. app-rn-runtime/core/if.component.js.map +1 -1
  332. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  333. app-rn-runtime/core/injector.js +2 -1
  334. app-rn-runtime/core/injector.js.map +1 -1
  335. app-rn-runtime/core/logger.js +4 -1
  336. app-rn-runtime/core/logger.js.map +1 -1
  337. app-rn-runtime/core/modal.service.js.map +1 -1
  338. app-rn-runtime/core/navigation.service.js.map +1 -1
  339. app-rn-runtime/core/network.service.js +17 -15
  340. app-rn-runtime/core/network.service.js.map +1 -1
  341. app-rn-runtime/core/partial.service.js.map +1 -1
  342. app-rn-runtime/core/props.provider.js.map +1 -1
  343. app-rn-runtime/core/scroll-view.component.js.map +1 -1
  344. app-rn-runtime/core/security.service.js.map +1 -1
  345. app-rn-runtime/core/spinner.service.js.map +1 -1
  346. app-rn-runtime/core/storage.service.js.map +1 -1
  347. app-rn-runtime/core/tappable.component.js +11 -2
  348. app-rn-runtime/core/tappable.component.js.map +1 -1
  349. app-rn-runtime/core/toast.service.js.map +1 -1
  350. app-rn-runtime/core/utils.js +3 -0
  351. app-rn-runtime/core/utils.js.map +1 -1
  352. app-rn-runtime/core/viewport.js.map +1 -1
  353. app-rn-runtime/gestures/swipe.animation.js +9 -4
  354. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  355. app-rn-runtime/package.json +30 -30
  356. app-rn-runtime/runtime/App.js +14 -6
  357. app-rn-runtime/runtime/App.js.map +1 -1
  358. app-rn-runtime/runtime/App.navigator.js +11 -2
  359. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  360. app-rn-runtime/runtime/base-fragment.component.js +6 -6
  361. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  362. app-rn-runtime/runtime/base-page.component.js +2 -0
  363. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  364. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  365. app-rn-runtime/runtime/base-prefab.component.js +1 -5
  366. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  367. app-rn-runtime/runtime/lib-patch.js.map +1 -1
  368. app-rn-runtime/runtime/memo.component.js.map +1 -1
  369. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  370. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  371. app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
  372. app-rn-runtime/runtime/services/app-i18n.service.js +20 -0
  373. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  374. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  375. app-rn-runtime/runtime/services/app-security.service.js +7 -7
  376. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  377. app-rn-runtime/runtime/services/app-spinner.service.js +3 -2
  378. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  379. app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
  380. app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
  381. app-rn-runtime/runtime/services/device/camera-service.js +2 -3
  382. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  383. app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
  384. app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
  385. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  386. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  387. app-rn-runtime/runtime/services/partial.service.js.map +1 -1
  388. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  389. app-rn-runtime/runtime/watcher.js.map +1 -1
  390. app-rn-runtime/styles/MediaQueryList.js.map +1 -1
  391. app-rn-runtime/styles/background.component.js +51 -12
  392. app-rn-runtime/styles/background.component.js.map +1 -1
  393. app-rn-runtime/styles/style-prop.validator.js +4 -0
  394. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  395. app-rn-runtime/styles/style-props.js.map +1 -1
  396. app-rn-runtime/styles/theme.js +8 -3
  397. app-rn-runtime/styles/theme.js.map +1 -1
  398. app-rn-runtime/styles/theme.variables.js +53 -1
  399. app-rn-runtime/styles/theme.variables.js.map +1 -1
  400. app-rn-runtime/variables/base-variable.js +3 -3
  401. app-rn-runtime/variables/base-variable.js.map +1 -1
  402. app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
  403. app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
  404. app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
  405. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  406. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  407. app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
  408. app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
  409. app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
  410. app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
  411. app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
  412. app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
  413. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  414. app-rn-runtime/variables/device/operation.provider.js.map +1 -1
  415. app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
  416. app-rn-runtime/variables/device-variable.js.map +1 -1
  417. app-rn-runtime/variables/http.service.js +1 -1
  418. app-rn-runtime/variables/http.service.js.map +1 -1
  419. app-rn-runtime/variables/model-variable.js.map +1 -1
  420. app-rn-runtime/variables/service-variable.js +8 -3
  421. app-rn-runtime/variables/service-variable.js.map +1 -1
  422. app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
  423. app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
  424. app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","get","filter","isNil","injector","toBoolean","toNumber","BaseComponent","BaseProps","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","FragmentProps","BaseFragment","constructor","props","defaultProps","createElement","text","title","okButtonText","cancelButtonText","onOk","onCancel","onClose","App","appConfig","app","formatters","Actions","Object","assign","Variables","cleanup","push","subscribe","ORIENTATION_CHANGE","$new","$old","isDetached","targetWidget","invokeEventCallback","proxy","screenWidth","width","screenHeight","height","SIZE_CHANGE","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","Widgets","formWidgets","formFields","parentFormRef","pid","forEach","ff","formKey","registerFormFields","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","map","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","s","catch","then","startUpVariablesLoaded","showContent","onAttach","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","mute","componentWillDetach","forceUpdate","render","autoUpdateVariables","value","invokeOnParamChange","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { get, filter, isNil } from 'lodash';\n\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { Formatter } from '@wavemaker/app-rn-runtime/core/formatters';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { Theme, ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseVariable, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport { default as _viewPort, EVENTS as viewportEvents } from '@wavemaker/app-rn-runtime/core/viewport';\nimport App from './App';\nimport WmFormField from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmForm from '@wavemaker/app-rn-runtime/components/data/form/form.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';\n\nimport AppI18nService from './services/app-i18n.service';\nimport { Watcher } from './watcher';\n\nexport class FragmentProps extends BaseProps {\n\n}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {};\nexport default abstract class BaseFragment<P extends FragmentProps, S extends FragmentState<P>> extends BaseComponent<P, S, FragmentStyles> implements LifecycleListener {\n public App: App;\n public onReady: Function = () => {};\n public baseUrl = '';\n public resourceBaseUrl = '';\n public targetWidget = null as unknown as BaseComponent<any, any, any>;\n public Widgets: any = {};\n public Variables: any = {};\n public theme: Theme = BASE_THEME;\n public appLocale: any = {};\n private startUpVariables: string[] = [];\n private startUpVariablesLoaded = false;\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private cleanUpVariablesandActions: BaseVariable<any>[] = [];\n public fragmentVariables: any = {};\n public fragmentActions: any = {};\n public Actions: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n public cache = false;\n public refreshdataonattach= true;\n public isReactNativeApp = true;\n public fragments: any = {};\n public isDetached = false;\n public _memoize = {} as any;\n public toaster: any;\n public formatters: Map<string, Formatter>;\n public serviceDefinitions = {} as any;\n public Viewport = _viewPort;\n public loadingMessage = React.createElement(Text, [] as any, ['loading...']);\n public showContent = false;\n public notification = {\n text: '',\n title: '',\n okButtonText: '',\n cancelButtonText: '',\n onOk: () => {},\n onCancel: () => {},\n onClose: () => {}\n };\n public watcher: Watcher = null as any;\n constructor(props: P, defaultProps?: P) {\n super(props, null as any, defaultProps);\n this.App = this.appConfig.app;\n this.formatters = this.App.formatters;\n this.Actions = Object.assign({}, this.App.Actions);\n this.Variables = Object.assign({}, this.App.Variables);\n this.cleanup.push(_viewPort.subscribe(viewportEvents.ORIENTATION_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onOrientationchange', [null, this.proxy,\n {screenWidth: _viewPort.width,\n screenHeight: _viewPort.height}]);\n }));\n this.cleanup.push(_viewPort.subscribe(viewportEvents.SIZE_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onResize', [null, this.proxy,\n {screenWidth: $new.width,\n screenHeight: $new.height}]);\n }));\n this.cleanup.push(() => this.theme?.destroy());\n this.baseUrl = this.appConfig.url;\n this.resourceBaseUrl = this.appConfig.url;\n this.cleanup.push(() => this.onDestroy());\n }\n\n onContentReady() {\n this.onReady();\n this.appConfig.refresh();\n this.targetWidget && this.targetWidget.invokeEventCallback('onLoad', [null, this.proxy]);\n this.onContentReady = () => {};\n }\n\n onComponentChange(w: BaseComponent<any, any, any>) {\n this.refresh();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n const formWidgets = this.Widgets[id].formWidgets;\n const formFields = this.Widgets[id].formFields;\n this.Widgets[id] = w;\n if (w.parentFormRef) {\n let pid = w.parentFormRef.props.id || w.parentFormRef.props.name;\n formFields.forEach((ff: any) => {\n const formKey = ff.props.formKey || ff.props.name;\n this.Widgets[pid].formFields.push(ff);\n this.Widgets[pid].formWidgets[formKey] = formWidgets[ff.props.name];\n });\n }\n w.registerFormFields(formFields, formWidgets);\n return;\n }\n if (w.props.formfield) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {formFields: [], formWidgets: {}};\n } else if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormField) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {};\n }\n if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets = this.Widgets[w.props.formRef].formWidgets || {};\n this.Widgets[w.props.formRef].formFields.push(w);\n return;\n }\n this.Widgets[id] = w;\n if (w instanceof BaseFragment && w !== this) {\n this.fragments[id] = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n delete this.Widgets[id];\n if (w instanceof BaseFragment) {\n delete this.fragments[id];\n }\n if (w instanceof WmForm) {\n w.formWidgets = {};\n w.formFields = [];\n w.formfields = {};\n }\n }\n\n handleUrl(url: string) {\n if (!url.startsWith('http') && !url.startsWith('file:')) {\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + url;\n }\n return url;\n }\n\n getDateFormat(fmt?: string) {\n // getting formats from appLocale when app locale is loaded locally.\n return (fmt || AppI18nService.dateFormat || get(this.appConfig, 'appLocale.formats.date')).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getTimeFormat(fmt?: string) {\n return fmt || AppI18nService.timeFormat || get(this.appConfig, 'appLocale.formats.time');\n }\n\n getDateTimeFormat(fmt?: string) {\n return (fmt || AppI18nService.dateTimeFormat || (get(this.appConfig, 'appLocale.formats.date') + ' ' + get(this.appConfig, 'appLocale.formats.time'))).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getCurrencySymbol(fmt?: string) {\n return (fmt || AppI18nService.currencyCode || 'USD');\n }\n\n getStyle(classes: string, inlineStyles:any = {}) {\n if (classes && classes.trim().length > 0) {\n return this.theme.mergeStyle({}, this.theme.getStyle(classes), inlineStyles);\n }\n return inlineStyles;\n }\n\n resetAppLocale() {\n this.appLocale = this.appConfig.appLocale.messages;\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n toBoolean(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toBoolean(val);\n }\n\n toNumber(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toNumber(val);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.targetWidget && this.targetWidget.invokeEventCallback('onDestroy', [null, this.proxy]);\n }\n\n componentDidMount(): void {\n this.resetAppLocale();\n super.componentDidMount();\n }\n\n memoize(key: string, o: any) {\n if (!this._memoize[key]) {\n this._memoize[key] = o;\n }\n return this._memoize[key];\n }\n\n initVariableSpinner() {\n let variables = filter(this.Variables, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n const actions = filter(this.Actions, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n variables = variables.concat(actions);\n if (!variables.length) {\n return;\n }\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.BEFORE_INVOKE, () => {\n spinnerService.show({\n message: get(v, 'config.spinnerMessage'),\n spinner: this.App.appConfig.spinner\n });\n }))\n }));\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => {\n spinnerService.hide();\n }));\n }));\n }\n\n onFragmentReady() {\n this.cleanup.push(...Object.values({...this.Variables, ...this.Actions}).map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh()));\n }));\n this.initVariableSpinner();\n this.cleanUpVariablesandActions.push(...Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>));\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch(() => {\n // catch errors and show content\n })\n .then(() => {\n this.startUpVariablesLoaded = true;\n this.showContent = true;\n this.appConfig.refresh();\n });\n }\n\n onAttach() {\n this.isDetached = false;\n this.watcher.isActive = true;\n this.resetAppLocale();\n Object.values(this.fragments).forEach((f: any) => f.onAttach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.unmute && v.unmute());\n this.targetWidget?.invokeEventCallback('onAttach', [null, this.proxy]);\n if (this.refreshdataonattach) {\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()));\n }\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillAttach && w.componentWillAttach();\n });\n }\n\n onDetach() {\n this.isDetached = true;\n this.watcher.isActive = false;\n Object.values(this.fragments).forEach((f: any) => f.onDetach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.mute && v.mute());\n this.targetWidget?.invokeEventCallback('onDetach', [null, this.proxy]);\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillDetach && w.componentWillDetach();\n });\n }\n\n onDestroy() {\n this.cleanUpVariablesandActions.forEach((v: any) => v.destroy());\n this.watcher.destroy();\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n forceUpdate() {\n super.forceUpdate();\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).forceUpdate());\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return (<ThemeProvider value={this.theme}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n\n </ThemeProvider>);\n }\n}\n\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,QAAQ;AAI3C,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,SAASC,SAAS,EAAEC,QAAQ,QAAQ,sCAAsC;AAC1E,SAASC,aAAa,EAAkCC,SAAS,QAA2B,+CAA+C;AAC3I,OAAOC,UAAU,IAAWC,aAAa,QAAQ,wCAAwC;AACzF,SAAuBC,cAAc,QAAQ,mDAAmD;AAChG,SAASC,OAAO,IAAIC,SAAS,EAAEC,MAAM,IAAIC,cAAc,QAAQ,yCAAyC;AAExG,OAAOC,WAAW,MAAM,gFAAgF;AACxG,OAAOC,MAAM,MAAM,+DAA+D;AAClF,SAASC,aAAa,QAAsB,8CAA8C;AAC1F,OAAOC,cAAc,MAAM,gEAAgE;AAE3F,OAAOC,cAAc,MAAM,6BAA6B;AAGxD,OAAO,MAAMC,aAAa,SAASb,SAAS,CAAC;AAO7C,eAAe,MAAec,YAAY,SAA8Df,aAAa,CAAoD;EAyCrKgB,WAAW,CAACC,KAAQ,EAAEC,Y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","BaseComponent","BaseProps","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","FragmentProps","BaseFragment","constructor","props","defaultProps","_defineProperty","createElement","text","title","okButtonText","cancelButtonText","onOk","onCancel","onClose","App","appConfig","app","formatters","Actions","Object","assign","Variables","cleanup","push","subscribe","ORIENTATION_CHANGE","$new","$old","isDetached","targetWidget","invokeEventCallback","proxy","screenWidth","width","screenHeight","height","SIZE_CHANGE","_this$theme","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","Widgets","formWidgets","formFields","parentFormRef","pid","forEach","ff","formKey","registerFormFields","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","arguments","length","undefined","trim","mergeStyle","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","map","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","s","catch","then","startUpVariablesLoaded","showContent","onAttach","_this$targetWidget","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","_this$targetWidget2","mute","componentWillDetach","forceUpdate","render","autoUpdateVariables","value","_this$Variables$value","invokeOnParamChange","isVisible","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { get, filter, isNil } from 'lodash';\n\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { Formatter } from '@wavemaker/app-rn-runtime/core/formatters';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber, isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { Theme, ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseVariable, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport { default as _viewPort, EVENTS as viewportEvents } from '@wavemaker/app-rn-runtime/core/viewport';\nimport App from './App';\nimport WmFormField from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmForm from '@wavemaker/app-rn-runtime/components/data/form/form.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';\n\nimport AppI18nService from './services/app-i18n.service';\nimport { Watcher } from './watcher';\n\nexport class FragmentProps extends BaseProps {\n\n}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {};\nexport default abstract class BaseFragment<P extends FragmentProps, S extends FragmentState<P>> extends BaseComponent<P, S, FragmentStyles> implements LifecycleListener {\n public App: App;\n public onReady: Function = () => {};\n public baseUrl = '';\n public resourceBaseUrl = '';\n public targetWidget = null as unknown as BaseComponent<any, any, any>;\n public Widgets: any = {};\n public Variables: any = {};\n public theme: Theme = BASE_THEME;\n public appLocale: any = {};\n private startUpVariables: string[] = [];\n private startUpVariablesLoaded = false;\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private cleanUpVariablesandActions: BaseVariable<any>[] = [];\n public fragmentVariables: any = {};\n public fragmentActions: any = {};\n public Actions: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n public cache = false;\n public refreshdataonattach= true;\n public isReactNativeApp = true;\n public fragments: any = {};\n public isDetached = false;\n public _memoize = {} as any;\n public toaster: any;\n public formatters: Map<string, Formatter>;\n public serviceDefinitions = {} as any;\n public Viewport = _viewPort;\n public loadingMessage = React.createElement(Text, [] as any, ['loading...']);\n public showContent = false;\n public notification = {\n text: '',\n title: '',\n okButtonText: '',\n cancelButtonText: '',\n onOk: () => {},\n onCancel: () => {},\n onClose: () => {}\n };\n public watcher: Watcher = null as any;\n constructor(props: P, defaultProps?: P) {\n super(props, null as any, defaultProps);\n this.App = this.appConfig.app;\n this.formatters = this.App.formatters;\n this.Actions = Object.assign({}, this.App.Actions);\n this.Variables = Object.assign({}, this.App.Variables);\n this.cleanup.push(_viewPort.subscribe(viewportEvents.ORIENTATION_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onOrientationchange', [null, this.proxy,\n {screenWidth: _viewPort.width,\n screenHeight: _viewPort.height}]);\n }));\n this.cleanup.push(_viewPort.subscribe(viewportEvents.SIZE_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onResize', [null, this.proxy,\n {screenWidth: $new.width,\n screenHeight: $new.height}]);\n }));\n this.cleanup.push(() => this.theme?.destroy());\n this.baseUrl = this.appConfig.url;\n this.resourceBaseUrl = this.appConfig.url;\n this.cleanup.push(() => this.onDestroy());\n }\n\n onContentReady() {\n this.onReady();\n this.appConfig.refresh();\n this.targetWidget && this.targetWidget.invokeEventCallback('onLoad', [null, this.proxy]);\n this.onContentReady = () => {};\n }\n\n onComponentChange(w: BaseComponent<any, any, any>) {\n this.refresh();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n const formWidgets = this.Widgets[id].formWidgets;\n const formFields = this.Widgets[id].formFields;\n this.Widgets[id] = w;\n if (w.parentFormRef) {\n let pid = w.parentFormRef.props.id || w.parentFormRef.props.name;\n formFields.forEach((ff: any) => {\n const formKey = ff.props.formKey || ff.props.name;\n this.Widgets[pid].formFields.push(ff);\n this.Widgets[pid].formWidgets[formKey] = formWidgets[ff.props.name];\n });\n }\n w.registerFormFields(formFields, formWidgets);\n return;\n }\n if (w.props.formfield) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {formFields: [], formWidgets: {}};\n } else if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormField) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {};\n }\n if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets = this.Widgets[w.props.formRef].formWidgets || {};\n this.Widgets[w.props.formRef].formFields.push(w);\n return;\n }\n this.Widgets[id] = w;\n if (w instanceof BaseFragment && w !== this) {\n this.fragments[id] = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n delete this.Widgets[id];\n if (w instanceof BaseFragment) {\n delete this.fragments[id];\n }\n if (w instanceof WmForm) {\n w.formWidgets = {};\n w.formFields = [];\n w.formfields = {};\n }\n }\n\n handleUrl(url: string) {\n if (isFullPathUrl(url)) {\n return url;\n }\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + url;\n }\n\n getDateFormat(fmt?: string) {\n // getting formats from appLocale when app locale is loaded locally.\n return (fmt || AppI18nService.dateFormat || get(this.appConfig, 'appLocale.formats.date')).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getTimeFormat(fmt?: string) {\n return fmt || AppI18nService.timeFormat || get(this.appConfig, 'appLocale.formats.time');\n }\n\n getDateTimeFormat(fmt?: string) {\n return (fmt || AppI18nService.dateTimeFormat || (get(this.appConfig, 'appLocale.formats.date') + ' ' + get(this.appConfig, 'appLocale.formats.time'))).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getCurrencySymbol(fmt?: string) {\n return (fmt || AppI18nService.currencyCode || 'USD');\n }\n\n getStyle(classes: string, inlineStyles:any = {}) {\n if (classes && classes.trim().length > 0) {\n return this.theme.mergeStyle({}, this.theme.getStyle(classes), inlineStyles);\n }\n return inlineStyles;\n }\n\n resetAppLocale() {\n this.appLocale = this.appConfig.appLocale.messages;\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n toBoolean(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toBoolean(val);\n }\n\n toNumber(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toNumber(val);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.targetWidget && this.targetWidget.invokeEventCallback('onDestroy', [null, this.proxy]);\n }\n\n componentDidMount(): void {\n this.resetAppLocale();\n super.componentDidMount();\n }\n\n memoize(key: string, o: any) {\n if (!this._memoize[key]) {\n this._memoize[key] = o;\n }\n return this._memoize[key];\n }\n\n initVariableSpinner() {\n let variables = filter(this.Variables, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n const actions = filter(this.Actions, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n variables = variables.concat(actions);\n if (!variables.length) {\n return;\n }\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.BEFORE_INVOKE, () => {\n spinnerService.show({\n message: get(v, 'config.spinnerMessage'),\n spinner: this.App.appConfig.spinner\n });\n }))\n }));\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => {\n spinnerService.hide();\n }));\n }));\n }\n\n onFragmentReady() {\n this.cleanup.push(...Object.values({...this.Variables, ...this.Actions}).map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh()));\n }));\n this.initVariableSpinner();\n this.cleanUpVariablesandActions.push(...Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>));\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch(() => {\n // catch errors and show content\n })\n .then(() => {\n this.startUpVariablesLoaded = true;\n this.showContent = true;\n this.appConfig.refresh();\n });\n }\n\n onAttach() {\n this.isDetached = false;\n this.watcher.isActive = true;\n this.resetAppLocale();\n Object.values(this.fragments).forEach((f: any) => f.onAttach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.unmute && v.unmute());\n this.targetWidget?.invokeEventCallback('onAttach', [null, this.proxy]);\n if (this.refreshdataonattach) {\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()));\n }\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillAttach && w.componentWillAttach();\n });\n }\n\n onDetach() {\n this.isDetached = true;\n this.watcher.isActive = false;\n Object.values(this.fragments).forEach((f: any) => f.onDetach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.mute && v.mute());\n this.targetWidget?.invokeEventCallback('onDetach', [null, this.proxy]);\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillDetach && w.componentWillDetach();\n });\n }\n\n onDestroy() {\n this.cleanUpVariablesandActions.forEach((v: any) => v.destroy());\n this.watcher.destroy();\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n forceUpdate() {\n super.forceUpdate();\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).forceUpdate());\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return this.isVisible() ? (<ThemeProvider value={this.theme}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget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,qBAAA,uBAArBA,qBAAA,CAAuBC,mBAAmB,CAAC,CAAC;MAAA,EAAC;IACnE;IACA,OAAO,IAAI,CAACC,SAAS,CAAC,CAAC,gBAAI1K,KAAA,CAAA6B,aAAA,CAACjB,aAAa;MAAC2J,KAAK,EAAE,IAAI,CAAC1G;IAAM,gBAC1D7D,KAAA,CAAA6B,aAAA,CAACT,aAAa,QACRuJ,YAA0B,IAAK;MAC/B,IAAI,CAACC,OAAO,GAAGD,YAAY;MAC3B,OAAO,IAAI,CAACE,YAAY,CAAC,IAAI,CAACnJ,KAAK,CAAC;IACtC,CACa,CAEJ,CAAC,GAAI,IAAI;EAC1B;AACJ"}
@@ -96,6 +96,8 @@ export default class BasePage extends BaseFragment {
96
96
  } else {
97
97
  this.props.destroyMe();
98
98
  }
99
+ } else {
100
+ this.props.navigation.closeDrawer();
99
101
  }
100
102
  return Promise.resolve();
101
103
  }
@@ -1 +1 @@
1
- {"version":3,"names":["clone","isEqual","React","WmPage","NavigationServiceProvider","AppSpinnerService","BaseFragment","Watcher","BasePage","constructor","props","pageName","route","name","pageParams","params","appConfig","currentPage","drawer","setContent","serviceDefinitions","App","watcher","ROOT","create","onComponentInit","w","targetWidget","cache","refreshdataonattach","toggleDrawer","navigation","setDrawerContent","content","drawerContent","drawerType","hasDrawer","setTimeout","proxy","setAnimation","onAttach","onFragmentReady","then","onContentReady","onPageReady","hide","cleanup","push","addListener","refresh","componentWillUnmount","goToPage","_params","navigate","onDetach","destroyMe","Promise","resolve","goBack","canGoBack","window","history","back","openUrl","url","startsWith","substring","splits","split","length","map","p","forEach","openBrowser","isCurrentPage","link","includes","renderWidget","renderPage"],"sources":["base-page.component.tsx"],"sourcesContent":["import { clone, isEqual } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPage from '@wavemaker/app-rn-runtime/components/page/page.component';\nimport NavigationService, { NavigationServiceProvider } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport AppSpinnerService from './services/app-spinner.service';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { Watcher } from './watcher';\n\ndeclare const window: any;\n\nexport interface PageProps extends FragmentProps {\n route: any;\n navigation: any;\n destroyMe: Function;\n}\n\nexport interface PageState extends FragmentState<PageProps> {}\n\nexport default abstract class BasePage extends BaseFragment<PageProps, PageState> implements NavigationService {\n private pageName = null as unknown as string;\n private pageParams: any = {};\n private hasDrawer = false;\n private hasTabbar = false;\n private drawerContent = null as React.ReactNode;\n private drawerType = '';\n\n constructor(props: PageProps) {\n super(props);\n this.pageName = props.route.name;\n this.pageParams = props.route.params;\n this.appConfig.currentPage = this;\n this.appConfig.drawer?.setContent(null);\n this.serviceDefinitions = this.App.serviceDefinitions;\n this.watcher = Watcher.ROOT.create();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPage) {\n this.targetWidget = w;\n const props = w.props as any;\n this.cache = !(props.cache === false);\n this.refreshdataonattach = !(props.refreshdataonattach === false);\n }\n }\n\n toggleDrawer() {\n (this.props as PageProps).navigation.toggleDrawer();\n }\n\n setDrawerContent(content = this.drawerContent, drawerType = this.drawerType) {\n if (!content) {\n return;\n }\n this.drawerContent = content;\n this.drawerType = drawerType;\n this.hasDrawer = true;\n setTimeout(() => {\n if (this.appConfig.currentPage === this \n || this.appConfig.currentPage.proxy === this) {\n this.appConfig.drawer?.setContent(null);\n setTimeout(() => {\n this.appConfig.drawer?.setContent((\n <NavigationServiceProvider value={this}>\n {content}\n </NavigationServiceProvider>));\n }, 500);\n this.appConfig.drawer?.setAnimation(drawerType);\n }\n }, 10);\n }\n\n onAttach() {\n super.onAttach();\n this.setDrawerContent();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.App.onPageReady(this.pageName, this.proxy as BasePage);\n AppSpinnerService.hide(); \n this.cleanup.push((this.props as PageProps).navigation.addListener('focus', () => {\n if (this.appConfig.currentPage !== this) {\n this.appConfig.currentPage = this;\n this.onAttach();\n this.appConfig.refresh();\n }\n }));\n });\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n }\n\n goToPage(pageName: string, params: any) {\n const navigation = (this.props as PageProps).navigation;\n const _params = clone(params);\n _params && delete _params['pageName'];\n if (pageName !== this.pageName || !isEqual(_params, this.pageParams)) {\n if (pageName === this.pageName) {\n navigation.push(pageName, _params);\n } else {\n navigation.navigate(pageName, _params);\n }\n if (this.cache) {\n this.onDetach();\n } else {\n this.props.destroyMe();\n }\n }\n return Promise.resolve();\n }\n\n goBack() {\n const navigation = (this.props as PageProps).navigation;\n if (navigation.canGoBack()) {\n navigation.goBack();\n } else if (window && window.history) {\n window.history.back();\n }\n return Promise.resolve();\n }\n\n openUrl(url: string, params = {} as any) {\n if (url) {\n if (url.startsWith('#')) {\n url = url.substring(1);\n url = url.startsWith('/') ? url.substring(1) : url;\n const splits = url.split('?');\n const pageName = splits[0];\n let params = {} as any;\n if (splits.length > 1) {\n splits[1].split('&')\n .map(p => p.split('='))\n .forEach(p => params[p[0]] = p[1]);\n }\n return this.goToPage(pageName, params);\n } else {\n this.App.openBrowser(url, params);\n }\n }\n return Promise.resolve();\n }\n\n isCurrentPage(link: string) {\n const pageName = this.pageName;\n return [pageName, '#' + pageName, '#/' + pageName].includes(link)\n }\n\n abstract renderPage(): ReactNode;\n\n renderWidget(props: PageProps) {\n return this.renderPage();\n }\n}\n"],"mappings":";;;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,QAAQ;AACvC,OAAOC,KAAK,MAAqB,OAAO;AAGxC,OAAOC,MAAM,MAAM,0DAA0D;AAC7E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,OAAOC,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,YAAY,MAAwC,2BAA2B;AACtF,SAASC,OAAO,QAAQ,WAAW;AAYnC,eAAe,MAAeC,QAAQ,SAASF,YAAY,CAAoD;EAQ3GG,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qual","React","WmPage","NavigationServiceProvider","AppSpinnerService","BaseFragment","Watcher","BasePage","constructor","props","_this$appConfig$drawe","_defineProperty","pageName","route","name","pageParams","params","appConfig","currentPage","drawer","setContent","serviceDefinitions","App","watcher","ROOT","create","onComponentInit","w","targetWidget","cache","refreshdataonattach","toggleDrawer","navigation","setDrawerContent","content","arguments","length","undefined","drawerContent","drawerType","hasDrawer","setTimeout","proxy","_this$appConfig$drawe2","_this$appConfig$drawe4","_this$appConfig$drawe3","createElement","value","setAnimation","onAttach","onFragmentReady","then","onContentReady","onPageReady","hide","cleanup","push","addListener","refresh","componentWillUnmount","goToPage","_params","navigate","onDetach","destroyMe","closeDrawer","Promise","resolve","goBack","canGoBack","window","history","back","openUrl","url","startsWith","substring","splits","split","map","p","forEach","openBrowser","isCurrentPage","link","includes","renderWidget","renderPage"],"sources":["base-page.component.tsx"],"sourcesContent":["import { clone, isEqual } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPage from '@wavemaker/app-rn-runtime/components/page/page.component';\nimport NavigationService, { NavigationServiceProvider } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport AppSpinnerService from './services/app-spinner.service';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { Watcher } from './watcher';\n\ndeclare const window: any;\n\nexport interface PageProps extends FragmentProps {\n route: any;\n navigation: any;\n destroyMe: Function;\n}\n\nexport interface PageState extends FragmentState<PageProps> {}\n\nexport default abstract class BasePage extends BaseFragment<PageProps, PageState> implements NavigationService {\n private pageName = null as unknown as string;\n private pageParams: any = {};\n private hasDrawer = false;\n private hasTabbar = false;\n private drawerContent = null as React.ReactNode;\n private drawerType = '';\n\n constructor(props: PageProps) {\n super(props);\n this.pageName = props.route.name;\n this.pageParams = props.route.params;\n this.appConfig.currentPage = this;\n this.appConfig.drawer?.setContent(null);\n this.serviceDefinitions = this.App.serviceDefinitions;\n this.watcher = Watcher.ROOT.create();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPage) {\n this.targetWidget = w;\n const props = w.props as any;\n this.cache = !(props.cache === false);\n this.refreshdataonattach = !(props.refreshdataonattach === false);\n }\n }\n\n toggleDrawer() {\n (this.props as PageProps).navigation.toggleDrawer();\n }\n\n setDrawerContent(content = this.drawerContent, drawerType = this.drawerType) {\n if (!content) {\n return;\n }\n this.drawerContent = content;\n this.drawerType = drawerType;\n this.hasDrawer = true;\n setTimeout(() => {\n if (this.appConfig.currentPage === this \n || this.appConfig.currentPage.proxy === this) {\n this.appConfig.drawer?.setContent(null);\n setTimeout(() => {\n this.appConfig.drawer?.setContent((\n <NavigationServiceProvider value={this}>\n {content}\n </NavigationServiceProvider>));\n }, 500);\n this.appConfig.drawer?.setAnimation(drawerType);\n }\n }, 10);\n }\n\n onAttach() {\n super.onAttach();\n this.setDrawerContent();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.App.onPageReady(this.pageName, this.proxy as BasePage);\n AppSpinnerService.hide(); \n this.cleanup.push((this.props as PageProps).navigation.addListener('focus', () => {\n if (this.appConfig.currentPage !== this) {\n this.appConfig.currentPage = this;\n this.onAttach();\n this.appConfig.refresh();\n }\n }));\n });\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n }\n\n goToPage(pageName: string, params: any) {\n const navigation = (this.props as PageProps).navigation;\n const _params = clone(params);\n _params && delete _params['pageName'];\n if (pageName !== this.pageName || !isEqual(_params, this.pageParams)) {\n if (pageName === this.pageName) {\n navigation.push(pageName, _params);\n } else {\n navigation.navigate(pageName, _params);\n }\n if (this.cache) {\n this.onDetach();\n } else {\n this.props.destroyMe();\n }\n } else {\n (this.props as PageProps).navigation.closeDrawer();\n }\n return Promise.resolve();\n }\n\n goBack() {\n const navigation = (this.props as PageProps).navigation;\n if (navigation.canGoBack()) {\n navigation.goBack();\n } else if (window && window.history) {\n window.history.back();\n }\n return Promise.resolve();\n }\n\n openUrl(url: string, params = {} as any) {\n if (url) {\n if (url.startsWith('#')) {\n url = url.substring(1);\n url = url.startsWith('/') ? url.substring(1) : url;\n const splits = url.split('?');\n const pageName = splits[0];\n let params = {} as any;\n if (splits.length > 1) {\n splits[1].split('&')\n .map(p => p.split('='))\n .forEach(p => params[p[0]] = p[1]);\n }\n return this.goToPage(pageName, params);\n } else {\n this.App.openBrowser(url, params);\n }\n }\n return Promise.resolve();\n }\n\n isCurrentPage(link: string) {\n const pageName = this.pageName;\n return [pageName, '#' + pageName, '#/' + pageName].includes(link)\n }\n\n abstract renderPage(): ReactNode;\n\n renderWidget(props: PageProps) {\n return this.renderPage();\n }\n}\n"],"mappings":";;;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,QAAQ;AACvC,OAAOC,KAAK,MAAqB,OAAO;AAGxC,OAAOC,MAAM,MAAM,0DAA0D;AAC7E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,OAAOC,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,YAAY,MAAwC,2BAA2B;AACtF,SAASC,OAAO,QAAQ,WAAW;AAYnC,eAAe,MAAeC,QAAQ,SAASF,YAAY,CAAoD;EAQ3GG,WAAWA,CAACC,KAAgB,EAAE;IAAA,IAAAC,qBAAA;IAC5B,KAAK,CAACD,KAAK,CAAC;IAACE,eAAA,mBARI,IAAI;IAAAA,eAAA,qBACG,CAAC,CAAC;IAAAA,eAAA,oBACR,KAAK;IAAAA,eAAA,oBACL,KAAK;IAAAA,eAAA,wBACD,IAAI;IAAAA,eAAA,qBACP,EAAE;IAIrB,IAAI,CAACC,QAAQ,GAAGH,KAAK,CAACI,KAAK,CAACC,IAAI;IAChC,IAAI,CAACC,UAAU,GAAGN,KAAK,CAACI,KAAK,CAACG,MAAM;IACpC,IAAI,CAACC,SAAS,CAACC,WAAW,GAAG,IAAI;IACjC,CAAAR,qBAAA,OAAI,CAACO,SAAS,CAACE,MAAM,cAAAT,qBA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IAAI,CAACA,QAAQ;IAC9B,OAAO,CAACA,QAAQ,EAAE,GAAG,GAAGA,QAAQ,EAAE,IAAI,GAAGA,QAAQ,CAAC,CAACyE,QAAQ,CAACD,IAAI,CAAC;EACnE;EAIAE,YAAYA,CAAC7E,KAAgB,EAAE;IAC7B,OAAO,IAAI,CAAC8E,UAAU,CAAC,CAAC;EAC1B;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"names":["WmPartial","BaseFragment","BasePartial","constructor","props","isPartOfPrefab","prefab","App","appConfig","app","Actions","Object","assign","Variables","serviceDefinitions","Prefab","baseUrl","watcher","parentWatcher","create","onFragmentReady","then","onContentReady","parent","Widgets","fragmentVariables","invokeEventCallback","prefabname","onComponentInit","w","targetWidget","onComponentDestroy","renderWidget","renderPartial"],"sources":["base-partial.component.tsx"],"sourcesContent":["import { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmPartial from '@wavemaker/app-rn-runtime/components/page/partial/partial.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { ReactNode } from 'react';\nimport BasePrefab from './base-prefab.component';\nimport { Watcher } from './watcher';\nexport interface PartialProps extends FragmentProps {\n serviceDefinitions: any;\n prefab: any;\n parent: any;\n onLoad?: Function;\n parentWatcher: Watcher;\n}\n\nexport interface PartialState extends FragmentState<PartialProps> {}\n\nexport default abstract class BasePartial extends BaseFragment<PartialProps, PartialState> {\n private partialParams: any = {};\n Prefab: BasePrefab = null as any;\n\n constructor(props: PartialProps) {\n super(props);\n const isPartOfPrefab = !!this.props.prefab;\n this.App = this.appConfig.app;\n this.Actions = Object.assign({}, isPartOfPrefab ? {} : this.App.Actions);\n this.Variables = Object.assign({}, isPartOfPrefab ? {} : this.App.Variables);\n this.serviceDefinitions = this.props.serviceDefinitions;\n if (isPartOfPrefab) {\n this.Prefab = this.props.prefab;\n this.baseUrl =this.Prefab.baseUrl;\n }\n this.watcher = props.parentWatcher.create();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n const parent: any = this.props.parent;\n if (parent) {\n parent.Widgets = this.Widgets;\n parent.Variables = this.fragmentVariables;\n }\n this.invokeEventCallback('onLoad', [this]);\n });\n }\n\n get prefabname() {\n return this.Prefab?.props.prefabname;\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPartial) {\n this.targetWidget = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>): void {\n super.onComponentDestroy(w);\n const parent: any = this.props.parent;\n if (parent) {\n delete (parent as any).Widgets;\n delete (parent as any).Variables;\n }\n }\n\n abstract renderPartial(): ReactNode;\n\n renderWidget(props: PartialProps) {\n return this.renderPartial();\n }\n}\n"],"mappings":";;;AACA,OAAOA,SAAS,MAAM,qEAAqE;AAC3F,OAAOC,YAAY,MAAwC,2BAA2B;AActF,eAAe,MAAeC,WAAW,SAASD,YAAY,CAA6B;EAIvFE,WAAW,CAACC,KAAmB,EAAE;IAC7B,KAAK,CAACA,KAAK,CAAC;IAAC,uCAJY,CAAC,CAAC;IAAA,gCACV,IAAI;IAIrB,MAAMC,cAAc,GAAG,CAAC,CAAC,IAAI,CAACD,KAAK,CAACE,MAAM;IAC1C,IAAI,CAACC,GAAG,GAAG,IAAI,CAACC,SAAS,CAACC,GAAG;IAC7B,IAAI,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,CAACE,GAAG,CAACG,OAAO,CAAC;IACxE,IAAI,CAACG,SAAS,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,CAACE,GAAG,CAACM,SAAS,CAAC;IAC5E,IAAI,CAACC,kBAAkB,GAAG,IAAI,CAACV,KAAK,CAACU,kBAAkB;IACvD,IAAIT,cAAc,EAAE;MAClB,IAAI,CAACU,MAAM,GAAG,IAAI,CAACX,KAAK,CAACE,MAAM;MAC/B,IAAI,CAACU,OAAO,GAAE,IAAI,CAACD,MAAM,CAACC,OAAO;IACnC;IACA,IAAI,CAACC,OAAO,GAAGb,KAAK,CAACc,aAAa,CAACC,MAAM,EAAE;EAC/C;EAEAC,eAAe,GAAG;IAChB,OAAO,KAAK,CAACA,eAAe,EAAE,CAACC,IAAI,CAAC,MAAM;MACxC,IAAI,CAACC,cAAc,EAAE;MACrB,MAAMC,MAAW,GAAG,IAAI,CAACnB,KAAK,CAACmB,MAAM;MACrC,IAAIA,MAAM,EAAE;QACVA,MAAM,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO;QAC7BD,MAAM,CAACV,SAAS,GAAG,IAAI,CAACY,iBAAiB;MAC3C;MACA,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC;EACJ;EAEA,IAAIC,UAAU,GAAG;IAAA;IACf,uBAAO,IAAI,CAACZ,MAAM,iDAAX,aAAaX,KAAK,CAACuB,UAAU;EACtC;EAEAC,eAAe,CAACC,CAA+B,EAAE;IAC/C,KAAK,CAACD,eAAe,CAACC,CAAC,CAAC;IACxB,IAAIA,CAAC,YAAY7B,SAAS,EAAE;MAC1B,IAAI,CAAC8B,YAAY,GAAGD,CAAC;IACvB;EACF;EAEAE,kBAAkB,CAACF,CAA+B,EAAQ;IACxD,KAAK,CAACE,kBAAkB,CAACF,CAAC,CAAC;IAC3B,MAAMN,MAAW,GAAG,IAAI,CAACnB,KAAK,CAACmB,MAAM;IACrC,IAAIA,MAAM,EAAE;MACV,OAAQA,MAAM,CAASC,OAAO;MAC9B,OAAQD,MAAM,CAASV,SAAS;IAClC;EACF;EAIAmB,YAAY,CAAC5B,KAAmB,EAAE;IAChC,OAAO,IAAI,CAAC6B,aAAa,EAAE;EAC7B;AACJ"}
1
+ {"version":3,"names":["WmPartial","BaseFragment","BasePartial","constructor","props","_defineProperty","isPartOfPrefab","prefab","App","appConfig","app","Actions","Object","assign","Variables","serviceDefinitions","Prefab","baseUrl","watcher","parentWatcher","create","onFragmentReady","then","onContentReady","parent","Widgets","fragmentVariables","invokeEventCallback","prefabname","_this$Prefab","onComponentInit","w","targetWidget","onComponentDestroy","renderWidget","renderPartial"],"sources":["base-partial.component.tsx"],"sourcesContent":["import { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmPartial from '@wavemaker/app-rn-runtime/components/page/partial/partial.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { ReactNode } from 'react';\nimport BasePrefab from './base-prefab.component';\nimport { Watcher } from './watcher';\nexport interface PartialProps extends FragmentProps {\n serviceDefinitions: any;\n prefab: any;\n parent: any;\n onLoad?: Function;\n parentWatcher: Watcher;\n}\n\nexport interface PartialState extends FragmentState<PartialProps> {}\n\nexport default abstract class BasePartial extends BaseFragment<PartialProps, PartialState> {\n private partialParams: any = {};\n Prefab: BasePrefab = null as any;\n\n constructor(props: PartialProps) {\n super(props);\n const isPartOfPrefab = !!this.props.prefab;\n this.App = this.appConfig.app;\n this.Actions = Object.assign({}, isPartOfPrefab ? {} : this.App.Actions);\n this.Variables = Object.assign({}, isPartOfPrefab ? {} : this.App.Variables);\n this.serviceDefinitions = this.props.serviceDefinitions;\n if (isPartOfPrefab) {\n this.Prefab = this.props.prefab;\n this.baseUrl =this.Prefab.baseUrl;\n }\n this.watcher = props.parentWatcher.create();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n const parent: any = this.props.parent;\n if (parent) {\n parent.Widgets = this.Widgets;\n parent.Variables = this.fragmentVariables;\n }\n this.invokeEventCallback('onLoad', [this]);\n });\n }\n\n get prefabname() {\n return this.Prefab?.props.prefabname;\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPartial) {\n this.targetWidget = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>): void {\n super.onComponentDestroy(w);\n const parent: any = this.props.parent;\n if (parent) {\n delete (parent as any).Widgets;\n delete (parent as any).Variables;\n }\n }\n\n abstract renderPartial(): ReactNode;\n\n renderWidget(props: PartialProps) {\n return this.renderPartial();\n }\n}\n"],"mappings":";;;AACA,OAAOA,SAAS,MAAM,qEAAqE;AAC3F,OAAOC,YAAY,MAAwC,2BAA2B;AActF,eAAe,MAAeC,WAAW,SAASD,YAAY,CAA6B;EAIvFE,WAAWA,CAACC,KAAmB,EAAE;IAC7B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,wBAJY,CAAC,CAAC;IAAAA,eAAA,iBACV,IAAI;IAIrB,MAAMC,cAAc,GAAG,CAAC,CAAC,IAAI,CAACF,KAAK,CAACG,MAAM;IAC1C,IAAI,CAACC,GAAG,GAAG,IAAI,CAACC,SAAS,CAACC,GAAG;IAC7B,IAAI,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,CAACE,GAAG,CAACG,OAAO,CAAC;IACxE,IAAI,CAACG,SAAS,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,CAACE,GAAG,CAACM,SAAS,CAAC;IAC5E,IAAI,CAACC,kBAAkB,GAAG,IAAI,CAACX,KAAK,CAACW,kBAAkB;IACvD,IAAIT,cAAc,EAAE;MAClB,IAAI,CAACU,MAAM,GAAG,IAAI,CAACZ,KAAK,CAACG,MAAM;MAC/B,IAAI,CAACU,OAAO,GAAE,IAAI,CAACD,MAAM,CAACC,OAAO;IACnC;IACA,IAAI,CAACC,OAAO,GAAGd,KAAK,CAACe,aAAa,CAACC,MAAM,CAAC,CAAC;EAC/C;EAEAC,eAAeA,CAAA,EAAG;IAChB,OAAO,KAAK,CAACA,eAAe,CAAC,CAAC,CAACC,IAAI,CAAC,MAAM;MACxC,IAAI,CAACC,cAAc,CAAC,CAAC;MACrB,MAAMC,MAAW,GAAG,IAAI,CAACpB,KAAK,CAACoB,MAAM;MACrC,IAAIA,MAAM,EAAE;QACVA,MAAM,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO;QAC7BD,MAAM,CAACV,SAAS,GAAG,IAAI,CAACY,iBAAiB;MAC3C;MACA,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC;EACJ;EAEA,IAAIC,UAAUA,CAAA,EAAG;IAAA,IAAAC,YAAA;IACf,QAAAA,YAAA,GAAO,IAAI,CAACb,MAAM,cAAAa,YAAA,uBAAXA,YAAA,CAAazB,KAAK,CAACwB,UAAU;EACtC;EAEAE,eAAeA,CAACC,CAA+B,EAAE;IAC/C,KAAK,CAACD,eAAe,CAACC,CAAC,CAAC;IACxB,IAAIA,CAAC,YAAY/B,SAAS,EAAE;MAC1B,IAAI,CAACgC,YAAY,GAAGD,CAAC;IACvB;EACF;EAEAE,kBAAkBA,CAACF,CAA+B,EAAQ;IACxD,KAAK,CAACE,kBAAkB,CAACF,CAAC,CAAC;IAC3B,MAAMP,MAAW,GAAG,IAAI,CAACpB,KAAK,CAACoB,MAAM;IACrC,IAAIA,MAAM,EAAE;MACV,OAAQA,MAAM,CAASC,OAAO;MAC9B,OAAQD,MAAM,CAASV,SAAS;IAClC;EACF;EAIAoB,YAAYA,CAAC9B,KAAmB,EAAE;IAChC,OAAO,IAAI,CAAC+B,aAAa,CAAC,CAAC;EAC7B;AACJ"}
@@ -55,10 +55,6 @@ export default class BasePrefab extends BaseFragment {
55
55
  }
56
56
  renderWidget(props) {
57
57
  var _props$styles;
58
- Object.keys(this.props).forEach(k => {
59
- //@ts-ignore
60
- this[k] = this.state.props[k] || this.props[k];
61
- });
62
58
  return /*#__PURE__*/React.createElement(PartialProvider, {
63
59
  value: this.partialService
64
60
  }, /*#__PURE__*/React.createElement(View, {
@@ -76,7 +72,7 @@ _defineProperty(BasePrefab, "getServiceDefinitions", (prefabName, url) => {
76
72
  } else {
77
73
  return axios.get(url + '/servicedefs').catch(() => ({})).then(response => {
78
74
  var _response$data;
79
- const serviceDefinitions = (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.serviceDefs) || {};
75
+ const serviceDefinitions = (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.serviceDefs) || {};
80
76
  BasePrefab.SERVICE_DEFINITION_CACHE[prefabName] = serviceDefinitions;
81
77
  return Promise.resolve(serviceDefinitions);
82
78
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","merge","PartialProvider","WmPrefabContainer","BaseFragment","axios","BasePrefab","constructor","props","defualtProps","partialService","App","appConfig","app","Actions","Variables","appUrl","url","resourceBaseUrl","baseUrl","prefabname","watcher","parentWatcher","create","getServiceDefinitions","onComponentInit","w","targetWidget","onFragmentReady","_renderPrefab","component","renderPrefab","then","onContentReady","invokeEventCallback","refresh","Promise","resolve","resetAppLocale","appLocale","messages","prefabMessages","Object","values","fragments","forEach","f","componentWillUnmount","renderWidget","keys","k","state","width","styles","root","prefabName","defs","SERVICE_DEFINITION_CACHE","get","catch","response","serviceDefinitions","data","serviceDefs"],"sources":["base-prefab.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { merge } from 'lodash-es';\n\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport PartialService, { PartialProvider } from '@wavemaker/app-rn-runtime/core/partial.service';\nimport WmPrefabContainer from '@wavemaker/app-rn-runtime/components/prefab/prefab-container.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport axios from 'axios';\nimport { Watcher } from './watcher';\n\n\nexport interface PrefabProps extends FragmentProps {\n prefabname: string;\n parentWatcher: Watcher;\n}\n\nexport interface PrefabState extends FragmentState<PrefabProps> {}\n\nexport default abstract class BasePrefab extends BaseFragment<PrefabProps, PrefabState> {\n\n private static SERVICE_DEFINITION_CACHE = {} as any;\n\n public static getServiceDefinitions = (prefabName: string, url: string) => {\n const defs = BasePrefab.SERVICE_DEFINITION_CACHE[prefabName];\n if (defs) {\n return Promise.resolve(defs);\n } else {\n return axios.get(url + '/servicedefs')\n .catch(() => ({}))\n .then((response: any) => {\n const serviceDefinitions = response?.data?.serviceDefs || {};\n BasePrefab.SERVICE_DEFINITION_CACHE[prefabName] = serviceDefinitions;\n return Promise.resolve(serviceDefinitions);\n });\n }\n };\n\n private appUrl = '';\n private prefabParams: any = {};\n private _renderPrefab:() => React.ReactNode = null as any;\n\n constructor(props: PrefabProps, defualtProps: PrefabProps, private partialService: PartialService) {\n super(props, defualtProps);\n this.App = this.appConfig.app;\n this.Actions = {};\n this.Variables = {};\n this.appUrl = this.appConfig.url;\n this.resourceBaseUrl = `${this.baseUrl}/app/prefabs/${props.prefabname}`;\n this.baseUrl = `${this.baseUrl}/prefabs/${props.prefabname}`;\n this.watcher = props.parentWatcher.create();\n }\n\n getServiceDefinitions() {\n return BasePrefab.getServiceDefinitions(this.props.prefabname, `${this.appUrl}/services/prefabs/${this.props.prefabname}`);\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPrefabContainer) {\n this.targetWidget = w;\n }\n }\n\n onFragmentReady(): Promise<void> {\n this._renderPrefab = () => {\n const component = this.renderPrefab();\n super.onFragmentReady()\n .then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [null, this]);\n });\n this._renderPrefab = () => this.renderPrefab();\n return component;\n };\n this.refresh();\n return Promise.resolve();\n }\n\n resetAppLocale() {\n this.appLocale = merge({ }, this.appConfig.appLocale.messages, this.appConfig.appLocale.prefabMessages[this.props.prefabname]);\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.invokeEventCallback('onDestroy', [null, this]);\n }\n\n abstract renderPrefab(): React.ReactNode;\n\n renderWidget(props: PrefabProps) {\n Object.keys(this.props).forEach(k => {\n //@ts-ignore\n this[k] = this.state.props[k] || this.props[k];\n });\n return (\n <PartialProvider value={this.partialService}>\n <View style={[{width: '100%'}, props.styles?.root]}>\n {this._renderPrefab ? this._renderPrefab(): null}\n </View>\n </PartialProvider>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,WAAW;AAGjC,SAAyBC,eAAe,QAAQ,gDAAgD;AAChG,OAAOC,iBAAiB,MAAM,wEAAwE;AACtG,OAAOC,YAAY,MAAwC,2BAA2B;AACtF,OAAOC,KAAK,MAAM,OAAO;AAWzB,eAAe,MAAeC,UAAU,SAASF,YAAY,CAA2B;EAuBpFG,WAAW,CAACC,KAAkB,EAAEC,YAAyB,EAAUC,cAA8B,EAAE;IACjG,KAAK,CAACF,KAAK,EAAEC,YAAY,CAAC;IAAC,KADsCC,cAA8B,GAA9BA,cAA8B;IAAA,gCAJhF,EAAE;IAAA,sCACS,CAAC,CAAC;IAAA,uCACgB,IAAI;IAIhD,IAAI,CAACC,GAAG,GAAG,IAAI,CAACC,SAAS,CAACC,GAAG;IAC7B,IAAI,CAACC,OAAO,GAAG,CAAC,CAAC;IACjB,IAAI,CAACC,SAAS,GAAG,CAAC,CAAC;IACnB,IAAI,CAACC,MAAM,GAAG,IAAI,CAACJ,SAAS,CAACK,GAAG;IAChC,IAAI,CAACC,eAAe,GAAI,GAAE,IAAI,CAACC,OAAQ,gBAAeX,KAAK,CAACY,UAAW,EAAC;IACxE,IAAI,CAACD,OAAO,GAAI,GAAE,IAAI,CAACA,OAAQ,YAAWX,KAAK,CAACY,UAAW,EAAC;IAC5D,IAAI,CAACC,OAAO,GAAGb,KAAK,CAACc,aAAa,CAACC,MAAM,EAAE;EAC7C;EAEAC,qBAAqB,GAAG;IACtB,OAAOlB,UAAU,CAACkB,qBAAqB,CAAC,IAAI,CAAChB,KAAK,CAACY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IAC9C,CAAC,CAAC;EACN;AACF,CAAC"}
1
+ {"version":3,"names":["React","View","merge","PartialProvider","WmPrefabContainer","BaseFragment","axios","BasePrefab","constructor","props","defualtProps","partialService","_defineProperty","App","appConfig","app","Actions","Variables","appUrl","url","resourceBaseUrl","baseUrl","prefabname","watcher","parentWatcher","create","getServiceDefinitions","onComponentInit","w","targetWidget","onFragmentReady","_renderPrefab","component","renderPrefab","then","onContentReady","invokeEventCallback","refresh","Promise","resolve","resetAppLocale","appLocale","messages","prefabMessages","Object","values","fragments","forEach","f","componentWillUnmount","renderWidget","_props$styles","createElement","value","style","width","styles","root","prefabName","defs","SERVICE_DEFINITION_CACHE","get","catch","response","_response$data","serviceDefinitions","data","serviceDefs"],"sources":["base-prefab.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { merge } from 'lodash-es';\n\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport PartialService, { PartialProvider } from '@wavemaker/app-rn-runtime/core/partial.service';\nimport WmPrefabContainer from '@wavemaker/app-rn-runtime/components/prefab/prefab-container.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport axios from 'axios';\nimport { Watcher } from './watcher';\n\n\nexport interface PrefabProps extends FragmentProps {\n prefabname: string;\n parentWatcher: Watcher;\n}\n\nexport interface PrefabState extends FragmentState<PrefabProps> {}\n\nexport default abstract class BasePrefab extends BaseFragment<PrefabProps, PrefabState> {\n\n private static SERVICE_DEFINITION_CACHE = {} as any;\n\n public static getServiceDefinitions = (prefabName: string, url: string) => {\n const defs = BasePrefab.SERVICE_DEFINITION_CACHE[prefabName];\n if (defs) {\n return Promise.resolve(defs);\n } else {\n return axios.get(url + '/servicedefs')\n .catch(() => ({}))\n .then((response: any) => {\n const serviceDefinitions = response?.data?.serviceDefs || {};\n BasePrefab.SERVICE_DEFINITION_CACHE[prefabName] = serviceDefinitions;\n return Promise.resolve(serviceDefinitions);\n });\n }\n };\n\n private appUrl = '';\n private prefabParams: any = {};\n private _renderPrefab:() => React.ReactNode = null as any;\n\n constructor(props: PrefabProps, defualtProps: PrefabProps, private partialService: PartialService) {\n super(props, defualtProps);\n this.App = this.appConfig.app;\n this.Actions = {};\n this.Variables = {};\n this.appUrl = this.appConfig.url;\n this.resourceBaseUrl = `${this.baseUrl}/app/prefabs/${props.prefabname}`;\n this.baseUrl = `${this.baseUrl}/prefabs/${props.prefabname}`;\n this.watcher = props.parentWatcher.create();\n }\n\n getServiceDefinitions() {\n return BasePrefab.getServiceDefinitions(this.props.prefabname, `${this.appUrl}/services/prefabs/${this.props.prefabname}`);\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPrefabContainer) {\n this.targetWidget = w;\n }\n }\n\n onFragmentReady(): Promise<void> {\n this._renderPrefab = () => {\n const component = this.renderPrefab();\n super.onFragmentReady()\n .then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [null, this]);\n });\n this._renderPrefab = () => this.renderPrefab();\n return component;\n };\n this.refresh();\n return Promise.resolve();\n }\n\n resetAppLocale() {\n this.appLocale = merge({ }, this.appConfig.appLocale.messages, this.appConfig.appLocale.prefabMessages[this.props.prefabname]);\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.invokeEventCallback('onDestroy', [null, this]);\n }\n\n abstract renderPrefab(): React.ReactNode;\n\n renderWidget(props: PrefabProps) {\n return (\n <PartialProvider value={this.partialService}>\n <View style={[{width: '100%'}, props.styles?.root]}>\n {this._renderPrefab ? this._renderPrefab(): null}\n </View>\n </PartialProvider>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,WAAW;AAGjC,SAAyBC,eAAe,QAAQ,gDAAgD;AAChG,OAAOC,iBAAiB,MAAM,wEAAwE;AAC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AC+C,MAAM,cAAAL,aAAA,uBAAZA,aAAA,CAAcM,IAAI;IAAE,GAChD,IAAI,CAAC1B,aAAa,GAAG,IAAI,CAACA,aAAa,CAAC,CAAC,GAAE,IACxC,CACS,CAAC;EAEtB;AACJ;AAACnB,eAAA,CAjF6BL,UAAU,8BAEM,CAAC,CAAC;AAAAK,eAAA,CAFlBL,UAAU,2BAIE,CAACmD,UAAkB,EAAEvC,GAAW,KAAK;EACzE,MAAMwC,IAAI,GAAGpD,UAAU,CAACqD,wBAAwB,CAACF,UAAU,CAAC;EAC5D,IAAIC,IAAI,EAAE;IACR,OAAOrB,OAAO,CAACC,OAAO,CAACoB,IAAI,CAAC;EAC9B,CAAC,MAAM;IACL,OAAOrD,KAAK,CAACuD,GAAG,CAAC1C,GAAG,GAAG,cAAc,CAAC,CACnC2C,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACjB5B,IAAI,CAAE6B,QAAa,IAAK;MAAA,IAAAC,cAAA;MACrB,MAAMC,kBAAkB,GAAG,CAAAF,QAAQ,aAARA,QAAQ,gBAAAC,cAAA,GAARD,QAAQ,CAAEG,IAAI,cAAAF,cAAA,uBAAdA,cAAA,CAAgBG,WAAW,KAAI,CAAC,CAAC;MAC5D5D,UAAU,CAACqD,wBAAwB,CAACF,UAAU,CAAC,GAAGO,kBAAkB;MACpE,OAAO3B,OAAO,CAACC,OAAO,CAAC0B,kBAAkB,CAAC;IAC9C,CAAC,CAAC;EACN;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["setTimeout","onComplete","cb","millis","patch","global","setInterval","preparePatch"],"sources":["lib-patch.ts"],"sourcesContent":["\nexport const setTimeout = (onComplete: Function) => {\n return (cb: Function, millis: number) => {\n const patch = () => {\n cb && cb();\n onComplete && onComplete();\n };\n return global.setTimeout(patch, millis);\n };\n};\n\nexport const setInterval = (onComplete: Function) => {\n return (cb: Function, millis: number, ...params: any[]) => {\n const patch = () => {\n cb && cb();\n onComplete && onComplete();\n };\n return global.setInterval(patch, millis);\n };\n};\n\nexport const preparePatch = (onComplete: Function) => {\n return {\n 'setTimeout': setTimeout(onComplete),\n 'setInterval': setInterval(onComplete)\n };\n};\n"],"mappings":"AACA,OAAO,MAAMA,UAAU,GAAIC,UAAoB,IAAK;EAChD,OAAO,CAACC,EAAY,EAAEC,MAAc,KAAK;IACrC,MAAMC,KAAK,GAAG,MAAM;MAChBF,EAAE,IAAIA,EAAE,EAAE;MACVD,UAAU,IAAIA,UAAU,EAAE;IAC9B,CAAC;IACD,OAAOI,MAAM,CAACL,UAAU,CAACI,KAAK,EAAED,MAAM,CAAC;EAC3C,CAAC;AACL,CAAC;AAED,OAAO,MAAMG,WAAW,GAAIL,UAAoB,IAAK;EACjD,OAAO,UAACC,EAAY,EAAEC,MAAc,EAAuB;IACvD,MAAMC,KAAK,GAAG,MAAM;MAChBF,EAAE,IAAIA,EAAE,EAAE;MACVD,UAAU,IAAIA,UAAU,EAAE;IAC9B,CAAC;IACD,OAAOI,MAAM,CAACC,WAAW,CAACF,KAAK,EAAED,MAAM,CAAC;EAC5C,CAAC;AACL,CAAC;AAED,OAAO,MAAMI,YAAY,GAAIN,UAAoB,IAAK;EAClD,OAAO;IACH,YAAY,EAAED,UAAU,CAACC,UAAU,CAAC;IACpC,aAAa,EAAEK,WAAW,CAACL,UAAU;EACzC,CAAC;AACL,CAAC"}
1
+ {"version":3,"names":["setTimeout","onComplete","cb","millis","patch","global","setInterval","preparePatch"],"sources":["lib-patch.ts"],"sourcesContent":["\nexport const setTimeout = (onComplete: Function) => {\n return (cb: Function, millis: number) => {\n const patch = () => {\n cb && cb();\n onComplete && onComplete();\n };\n return global.setTimeout(patch, millis);\n };\n};\n\nexport const setInterval = (onComplete: Function) => {\n return (cb: Function, millis: number, ...params: any[]) => {\n const patch = () => {\n cb && cb();\n onComplete && onComplete();\n };\n return global.setInterval(patch, millis);\n };\n};\n\nexport const preparePatch = (onComplete: Function) => {\n return {\n 'setTimeout': setTimeout(onComplete),\n 'setInterval': setInterval(onComplete)\n };\n};\n"],"mappings":"AACA,OAAO,MAAMA,UAAU,GAAIC,UAAoB,IAAK;EAChD,OAAO,CAACC,EAAY,EAAEC,MAAc,KAAK;IACrC,MAAMC,KAAK,GAAGA,CAAA,KAAM;MAChBF,EAAE,IAAIA,EAAE,CAAC,CAAC;MACVD,UAAU,IAAIA,UAAU,CAAC,CAAC;IAC9B,CAAC;IACD,OAAOI,MAAM,CAACL,UAAU,CAACI,KAAK,EAAED,MAAM,CAAC;EAC3C,CAAC;AACL,CAAC;AAED,OAAO,MAAMG,WAAW,GAAIL,UAAoB,IAAK;EACjD,OAAO,UAACC,EAAY,EAAEC,MAAc,EAAuB;IACvD,MAAMC,KAAK,GAAGA,CAAA,KAAM;MAChBF,EAAE,IAAIA,EAAE,CAAC,CAAC;MACVD,UAAU,IAAIA,UAAU,CAAC,CAAC;IAC9B,CAAC;IACD,OAAOI,MAAM,CAACC,WAAW,CAACF,KAAK,EAAED,MAAM,CAAC;EAC5C,CAAC;AACL,CAAC;AAED,OAAO,MAAMI,YAAY,GAAIN,UAAoB,IAAK;EAClD,OAAO;IACH,YAAY,EAAED,UAAU,CAACC,UAAU,CAAC;IACpC,aAAa,EAAEK,WAAW,CAACL,UAAU;EACzC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","WmMemo","Component","constructor","props","setState","id","state","watcher","create","shouldComponentUpdate","nextProps","nextState","Object","keys","reduce","p","k","componentWillUnmount","destroy","watch","fn","refresh","value","render","clear","bind"],"sources":["memo.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Watcher } from \"./watcher\";\n\ninterface MemoProps {\n watcher: Watcher;\n render: (watch: Function) => React.ReactNode\n}\n\ninterface MemoState {\n id: number;\n}\n\nexport class WmMemo extends React.Component<MemoProps, MemoState> {\n\n private watcher: Watcher = null as any;\n\n constructor(props: MemoProps) {\n super(props);\n this.watcher = props.watcher.create();\n this.state = {\n id: 0\n }\n }\n\n shouldComponentUpdate(nextProps: any, nextState: any) {\n return Object.keys(nextProps).reduce((p, k) => {\n return p || (k !== 'render' && (this.props as any)[k] !== nextProps[k]);\n }, false) || this.state.id !== nextState.id;\n }\n\n componentWillUnmount() {\n this.watcher && this.watcher.destroy();\n }\n\n refresh = () => {\n this.setState({\n id: this.state.id + 1\n });\n }\n\n watch(fn: Function) {\n return this.watcher.watch(fn, this.refresh).value;\n }\n\n render() {\n this.watcher.clear();\n return this.props.render(this.watch.bind(this));\n }\n}"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAYzB,OAAO,MAAMC,MAAM,SAASD,KAAK,CAACE,SAAS,CAAuB;EAI9DC,WAAW,CAACC,KAAgB,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAAC,iCAHU,IAAI;IAAA,iCAoBrB,MAAM;MACZ,IAAI,CAACC,QAAQ,CAAC;QACVC,EAAE,EAAE,IAAI,CAACC,KAAK,CAACD,EAAE,GAAG;MACxB,CAAC,CAAC;IACN,CAAC;IApBG,IAAI,CAACE,OAAO,GAAGJ,KAAK,CAACI,OAAO,CAACC,MAAM,EAAE;IACrC,IAAI,CAACF,KAAK,GAAG;MACTD,EAAE,EAAE;IACR,CAAC;EACL;EAEAI,qBAAqB,CAACC,SAAc,EAAEC,SAAc,EAAE;IAClD,OAAOC,MAAM,CAACC,IAAI,CAACH,SAAS,CAAC,CAACI,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK;MAC3C,OAAOD,CAAC,IAAKC,CAAC,KAAK,QAAQ,IAAK,IAAI,CAACb,KAAK,CAASa,CAAC,CAAC,KAAKN,SAAS,CAACM,CAAC,CAAE;IAC3E,CAAC,EAAE,KAAK,CAAC,IAAI,IAAI,CAACV,KAAK,CAACD,EAAE,KAAKM,SAAS,CAACN,EAAE;EAC/C;EAEAY,oBAAoB,GAAG;IACnB,IAAI,CAACV,OAAO,IAAI,IAAI,CAACA,OAAO,CAACW,OAAO,EAAE;EAC1C;EAQCC,KAAK,CAACC,EAAY,EAAE;IACjB,OAAO,IAAI,CAACb,OAAO,CAACY,KAAK,CAACC,EAAE,EAAE,IAAI,CAACC,OAAO,CAAC,CAACC,KAAK;EACpD;EAEDC,MAAM,GAAG;IACL,IAAI,CAAChB,OAAO,CAACiB,KAAK,EAAE;IACpB,OAAO,IAAI,CAACrB,KAAK,CAACoB,MAAM,CAAC,IAAI,CAACJ,KAAK,CAACM,IAAI,CAAC,IAAI,CAAC,CAAC;EACnD;AACJ"}
1
+ {"version":3,"names":["React","WmMemo","Component","constructor","props","_defineProperty","setState","id","state","watcher","create","shouldComponentUpdate","nextProps","nextState","Object","keys","reduce","p","k","componentWillUnmount","destroy","watch","fn","refresh","value","render","clear","bind"],"sources":["memo.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Watcher } from \"./watcher\";\n\ninterface MemoProps {\n watcher: Watcher;\n render: (watch: Function) => React.ReactNode\n}\n\ninterface MemoState {\n id: number;\n}\n\nexport class WmMemo extends React.Component<MemoProps, MemoState> {\n\n private watcher: Watcher = null as any;\n\n constructor(props: MemoProps) {\n super(props);\n this.watcher = props.watcher.create();\n this.state = {\n id: 0\n }\n }\n\n shouldComponentUpdate(nextProps: any, nextState: any) {\n return Object.keys(nextProps).reduce((p, k) => {\n return p || (k !== 'render' && (this.props as any)[k] !== nextProps[k]);\n }, false) || this.state.id !== nextState.id;\n }\n\n componentWillUnmount() {\n this.watcher && this.watcher.destroy();\n }\n\n refresh = () => {\n this.setState({\n id: this.state.id + 1\n });\n }\n\n watch(fn: Function) {\n return this.watcher.watch(fn, this.refresh).value;\n }\n\n render() {\n this.watcher.clear();\n return this.props.render(this.watch.bind(this));\n }\n}"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAYzB,OAAO,MAAMC,MAAM,SAASD,KAAK,CAACE,SAAS,CAAuB;EAI9DC,WAAWA,CAACC,KAAgB,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,kBAHU,IAAI;IAAAA,eAAA,kBAoBrB,MAAM;MACZ,IAAI,CAACC,QAAQ,CAAC;QACVC,EAAE,EAAE,IAAI,CAACC,KAAK,CAACD,EAAE,GAAG;MACxB,CAAC,CAAC;IACN,CAAC;IApBG,IAAI,CAACE,OAAO,GAAGL,KAAK,CAACK,OAAO,CAACC,MAAM,CAAC,CAAC;IACrC,IAAI,CAACF,KAAK,GAAG;MACTD,EAAE,EAAE;IACR,CAAC;EACL;EAEAI,qBAAqBA,CAACC,SAAc,EAAEC,SAAc,EAAE;IAClD,OAAOC,MAAM,CAACC,IAAI,CAACH,SAAS,CAAC,CAACI,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK;MAC3C,OAAOD,CAAC,IAAKC,CAAC,KAAK,QAAQ,IAAK,IAAI,CAACd,KAAK,CAASc,CAAC,CAAC,KAAKN,SAAS,CAACM,CAAC,CAAE;IAC3E,CAAC,EAAE,KAAK,CAAC,IAAI,IAAI,CAACV,KAAK,CAACD,EAAE,KAAKM,SAAS,CAACN,EAAE;EAC/C;EAEAY,oBAAoBA,CAAA,EAAG;IACnB,IAAI,CAACV,OAAO,IAAI,IAAI,CAACA,OAAO,CAACW,OAAO,CAAC,CAAC;EAC1C;EAQCC,KAAKA,CAACC,EAAY,EAAE;IACjB,OAAO,IAAI,CAACb,OAAO,CAACY,KAAK,CAACC,EAAE,EAAE,IAAI,CAACC,OAAO,CAAC,CAACC,KAAK;EACpD;EAEDC,MAAMA,CAAA,EAAG;IACL,IAAI,CAAChB,OAAO,CAACiB,KAAK,CAAC,CAAC;IACpB,OAAO,IAAI,CAACtB,KAAK,CAACqB,MAAM,CAAC,IAAI,CAACJ,KAAK,CAACM,IAAI,CAAC,IAAI,CAAC,CAAC;EACnD;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","createDrawerNavigator","ThemeVariables","Drawer","AppDrawerNavigator","Component","constructor","props","render","content","drawerType","type","headerShown","gestureHandlerProps","enabled","hide","drawerStyle","backgroundColor","INSTANCE","pageContentBgColor","_props","rootComponent"],"sources":["drawer.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { createDrawerNavigator } from '@react-navigation/drawer';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nconst Drawer = createDrawerNavigator();\n\ninterface AppDrawerNavigatorProps {\n content: (props: any) => ReactNode;\n hide: boolean,\n type: any;\n rootComponent: React.ReactNode;\n}\n\nclass AppDrawerNavigator extends React.Component<AppDrawerNavigatorProps, any, any> {\n\n constructor(props: AppDrawerNavigatorProps) {\n super(props);\n }\n\n render(){\n return (<Drawer.Navigator\n initialRouteName=\"pages\"\n drawerContent={this.props.content}\n screenOptions={{\n drawerType: this.props.type,\n headerShown: false,\n gestureHandlerProps: { enabled: !this.props.hide },\n drawerStyle: { backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor }\n }}>\n <Drawer.Screen name=\"pages\">\n {(_props) => this.props.rootComponent}\n </Drawer.Screen>\n </Drawer.Navigator>);\n }\n}\n\nexport default AppDrawerNavigator;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,MAAMC,MAAM,GAAGF,qBAAqB,EAAE;AAStC,MAAMG,kBAAkB,SAASJ,KAAK,CAACK,SAAS,CAAoC;EAElFC,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;EACd;EAEAC,MAAM,GAAE;IACN,oBAAQ,oBAAC,MAAM,CAAC,SAAS;MACvB,gBAAgB,EAAC,OAAO;MACxB,aAAa,EAAE,IAAI,CAACD,KAAK,CAACE,OAAQ;MAClC,aAAa,EAAE;QACXC,UAAU,EAAE,IAAI,CAACH,KAAK,CAACI,IAAI;QAC3BC,WAAW,EAAE,KAAK;QAClBC,mBAAmB,EAAE;UAAEC,OAAO,EAAE,CAAC,IAAI,CAACP,KAAK,CAACQ;QAAK,CAAC;QAClDC,WAAW,EAAE;UAAEC,eAAe,EAAGf,cAAc,CAACgB,QAAQ,CAACC;QAAmB;MAChF;IAAE,gBACF,oBAAC,MAAM,CAAC,MAAM;MAAC,IAAI,EAAC;IAAO,GACvBC,MAAM,IAAK,IAAI,CAACb,KAAK,CAACc,aAAa,CACvB,CACC;EACrB;AACF;AAEA,eAAejB,kBAAkB"}
1
+ {"version":3,"names":["React","createDrawerNavigator","ThemeVariables","Drawer","AppDrawerNavigator","Component","constructor","props","render","createElement","Navigator","initialRouteName","drawerContent","content","screenOptions","drawerType","type","headerShown","gestureHandlerProps","enabled","hide","drawerStyle","backgroundColor","INSTANCE","pageContentBgColor","Screen","name","_props","rootComponent"],"sources":["drawer.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { createDrawerNavigator } from '@react-navigation/drawer';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nconst Drawer = createDrawerNavigator();\n\ninterface AppDrawerNavigatorProps {\n content: (props: any) => ReactNode;\n hide: boolean,\n type: any;\n rootComponent: React.ReactNode;\n}\n\nclass AppDrawerNavigator extends React.Component<AppDrawerNavigatorProps, any, any> {\n\n constructor(props: AppDrawerNavigatorProps) {\n super(props);\n }\n\n render(){\n return (<Drawer.Navigator\n initialRouteName=\"pages\"\n drawerContent={this.props.content}\n screenOptions={{\n drawerType: this.props.type,\n headerShown: false,\n gestureHandlerProps: { enabled: !this.props.hide },\n drawerStyle: { backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor }\n }}>\n <Drawer.Screen name=\"pages\">\n {(_props) => this.props.rootComponent}\n </Drawer.Screen>\n </Drawer.Navigator>);\n }\n}\n\nexport default AppDrawerNavigator;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,MAAMC,MAAM,GAAGF,qBAAqB,CAAC,CAAC;AAStC,MAAMG,kBAAkB,SAASJ,KAAK,CAACK,SAAS,CAAoC;EAElFC,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;EACd;EAEAC,MAAMA,CAAA,EAAE;IACN,oBAAQR,KAAA,CAAAS,aAAA,CAACN,MAAM,CAACO,SAAS;MACvBC,gBAAgB,EAAC,OAAO;MACxBC,aAAa,EAAE,IAAI,CAACL,KAAK,CAACM,OAAQ;MAClCC,aAAa,EAAE;QACXC,UAAU,EAAE,IAAI,CAACR,KAAK,CAACS,IAAI;QAC3BC,WAAW,EAAE,KAAK;QAClBC,mBAAmB,EAAE;UAAEC,OAAO,EAAE,CAAC,IAAI,CAACZ,KAAK,CAACa;QAAK,CAAC;QAClDC,WAAW,EAAE;UAAEC,eAAe,EAAGpB,cAAc,CAACqB,QAAQ,CAACC;QAAmB;MAChF;IAAE,gBACFxB,KAAA,CAAAS,aAAA,CAACN,MAAM,CAACsB,MAAM;MAACC,IAAI,EAAC;IAAO,GACvBC,MAAM,IAAK,IAAI,CAACpB,KAAK,CAACqB,aACX,CACC,CAAC;EACrB;AACF;AAEA,eAAexB,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","createStackNavigator","ThemeVariables","Stack","pages","Screen","Component","constructor","props","state","renew","page","createPage","navigation","cleanUp","push","addListener","setState","createElement","route","name","component","destroyMe","setTimeout","componentWillUnmount","forEach","fn","render","getPageId","pageName","pageParams","pageParamsStr","Object","keys","sort","map","k","join","AppStackNavigator","landingPage","p","params","headerShown","cardStyle","backgroundColor","INSTANCE","pageContentBgColor"],"sources":["stack.navigator.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { createStackNavigator } from '@react-navigation/stack';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nconst Stack = createStackNavigator();\n\ninterface AppStackNavigatorProps {\n pages: any[];\n landingPage: string; \n}\n\nconst pages = {} as any;\n\nclass Screen extends React.Component {\n\n private cleanUp = [] as Function[];\n\n constructor(props: any) {\n super(props);\n this.state = {\n renew: false,\n page: this.createPage()\n };\n const navigation = (this.props as any).navigation as any;\n this.cleanUp.push(navigation.addListener('focus', () => {\n const state = (this.state as any);\n if (state.renew) {\n state.page = this.createPage();\n this.setState(() => ({\n renew: false,\n page: state.page\n }));\n }\n }));\n }\n\n private createPage() {\n const props = this.props as any;\n return React.createElement(pages[props.route.name].component, {...props, destroyMe: () => {\n setTimeout(() => {\n this.setState(() => ({renew: true, page: null}));\n }, 100);\n }});\n }\n\n componentWillUnmount() {\n this.cleanUp.forEach(fn => fn && fn());\n }\n\n render() {\n return (this.state as any).page || (<View/>);\n }\n}\n\nconst getPageId = (pageName: string, pageParams: any) => {\n const pageParamsStr = pageParams ? Object.keys(pageParams)\n .sort()\n .map((k: string) => `${k}=${pageParams[k]}`)\n .join('&') : '';\n return `${pageName}?${pageParamsStr}`;\n}\n\nconst AppStackNavigator = (props: AppStackNavigatorProps) => {\n return (<Stack.Navigator initialRouteName={props.landingPage}>\n {props.pages.map(p => {\n pages[p.name] = p;\n return (\n <Stack.Screen key={p.name}\n name={p.name}\n component={Screen}\n getId={({params}) => getPageId(p.name, params)}\n options={{\n headerShown: false,\n cardStyle: {\n backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor\n }\n }}\n />);\n })}\n </Stack.Navigator>);\n};\n\nexport default AppStackNavigator;"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,MAAMC,KAAK,GAAGF,oBAAoB,EAAE;AAOpC,MAAMG,KAAK,GAAG,CAAC,CAAQ;AAEvB,MAAMC,MAAM,SAASN,KAAK,CAACO,SAAS,CAAC;EAInCC,WAAW,CAACC,KAAU,EAAE;IACtB,KAAK,CAACA,KAAK,CAAC;IAAC,iCAHG,EAAE;IAIlB,IAAI,CAACC,KAAK,G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AI,CAACH,UAAU,CAAC,CACvDI,IAAI,EAAE,CACNC,GAAG,CAAEC,CAAS,IAAM,GAAEA,CAAE,IAAGN,UAAU,CAACM,CAAC,CAAE,EAAC,CAAC,CAC3CC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;EACjB,OAAQ,GAAER,QAAS,IAAGE,aAAc,EAAC;AACvC,CAAC;AAED,MAAMO,iBAAiB,GAAI9B,KAA6B,IAAK;EAC3D,oBAAQ,oBAAC,KAAK,CAAC,SAAS;IAAC,gBAAgB,EAAEA,KAAK,CAAC+B;EAAY,GAC1D/B,KAAK,CAACJ,KAAK,CAAC+B,GAAG,CAACK,CAAC,IAAI;IACpBpC,KAAK,CAACoC,CAAC,CAACpB,IAAI,CAAC,GAAGoB,CAAC;IACjB,oBACE,oBAAC,KAAK,CAAC,MAAM;MAAC,GAAG,EAAEA,CAAC,CAACpB,IAAK;MACxB,IAAI,EAAEoB,CAAC,CAACpB,IAAK;MACb,SAAS,EAAEf,MAAO;MAClB,KAAK,EAAE;QAAA,IAAC;UAACoC;QAAM,CAAC;QAAA,OAAKb,SAAS,CAACY,CAAC,CAACpB,IAAI,EAAEqB,MAAM,CAAC;MAAA,CAAC;MAC/C,OAAO,EAAE;QACPC,WAAW,EAAE,KAAK;QAClBC,SAAS,EAAE;UACTC,eAAe,EAAE1C,cAAc,CAAC2C,QAAQ,CAACC;QAC3C;MACF;IAAE,EACF;EACJ,CAAC,CAAC,CACY;AACpB,CAAC;AAED,eAAeR,iBAAiB"}
1
+ {"version":3,"names":["React","View","createStackNavigator","ThemeVariables","Stack","pages","Screen","Component","constructor","props","_defineProperty","state","renew","page","createPage","navigation","cleanUp","push","addListener","setState","createElement","route","name","component","destroyMe","setTimeout","componentWillUnmount","forEach","fn","render","getPageId","pageName","pageParams","pageParamsStr","Object","keys","sort","map","k","join","AppStackNavigator","Navigator","initialRouteName","landingPage","p","key","getId","_ref","params","options","headerShown","cardStyle","backgroundColor","INSTANCE","pageContentBgColor"],"sources":["stack.navigator.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { createStackNavigator } from '@react-navigation/stack';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nconst Stack = createStackNavigator();\n\ninterface AppStackNavigatorProps {\n pages: any[];\n landingPage: string; \n}\n\nconst pages = {} as any;\n\nclass Screen extends React.Component {\n\n private cleanUp = [] as Function[];\n\n constructor(props: any) {\n super(props);\n this.state = {\n renew: false,\n page: this.createPage()\n };\n const navigation = (this.props as any).navigation as any;\n this.cleanUp.push(navigation.addListener('focus', () => {\n const state = (this.state as any);\n if (state.renew) {\n state.page = this.createPage();\n this.setState(() => ({\n renew: false,\n page: state.page\n }));\n }\n }));\n }\n\n private createPage() {\n const props = this.props as any;\n return React.createElement(pages[props.route.name].component, {...props, destroyMe: () => {\n setTimeout(() => {\n this.setState(() => ({renew: true, page: null}));\n }, 100);\n }});\n }\n\n componentWillUnmount() {\n this.cleanUp.forEach(fn => fn && fn());\n }\n\n render() {\n return (this.state as any).page || (<View/>);\n }\n}\n\nconst getPageId = (pageName: string, pageParams: any) => {\n const pageParamsStr = pageParams ? Object.keys(pageParams)\n .sort()\n .map((k: string) => `${k}=${pageParams[k]}`)\n .join('&') : '';\n return `${pageName}?${pageParamsStr}`;\n}\n\nconst AppStackNavigator = (props: AppStackNavigatorProps) => {\n return (<Stack.Navigator initialRouteName={props.landingPage}>\n {props.pages.map(p => {\n pages[p.name] = p;\n return (\n <Stack.Screen key={p.name}\n name={p.name}\n component={Screen}\n getId={({params}) => getPageId(p.name, params)}\n options={{\n headerShown: false,\n cardStyle: {\n backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor\n }\n }}\n />);\n })}\n </Stack.Navigator>);\n};\n\nexport default AppStackNavigator;"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,OAAOC,cAAc,M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e,EAAEjD,cAAc,CAACkD,QAAQ,CAACC;QAC3C;MACF;IAAE,CACH,CAAC;EACJ,CAAC,CACY,CAAC;AACpB,CAAC;AAED,eAAed,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"names":["BackHandler","injector","AppDisplayManagerService","displayOptions","content","destroy","clearBackButtonPress","removeEventListener","handleBackButtonPress","setBackButtonPress","addEventListener","show","options","refresh","displayContent","get","onDestroy","appDisplayManagerService"],"sources":["app-display-manager.service.tsx"],"sourcesContent":["import { BackHandler } from \"react-native\";\n\nimport {DisplayManager, DisplayOptions} from \"@wavemaker/app-rn-runtime/core/display.manager\";\nimport AppConfig from \"@wavemaker/app-rn-runtime/core/AppConfig\";\nimport injector from \"@wavemaker/app-rn-runtime/core/injector\";\n\nexport class AppDisplayManagerService implements DisplayManager {\n public displayOptions = {} as DisplayOptions;\n\n private clearBackButtonPress() {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n private setBackButtonPress() {\n this.clearBackButtonPress();\n if (this.displayOptions.content) {\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private handleBackButtonPress = () => {\n if (this.displayOptions.content) {\n this.destroy();\n return true;\n }\n return false;\n }\n\n show(options: DisplayOptions) {\n this.displayOptions = options;\n this.refresh();\n this.setBackButtonPress();\n return this.destroy;\n }\n\n displayContent(content: React.ReactNode) {\n this.displayOptions.content = content;\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n destroy() {\n this.clearBackButtonPress();\n this.displayOptions.onDestroy && this.displayOptions.onDestroy();\n this.displayOptions = {} as DisplayOptions;\n this.refresh();\n }\n}\n\nconst appDisplayManagerService = new AppDisplayManagerService();\n\nexport default appDisplayManagerService;\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,cAAc;AAI1C,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,wBAAwB,CAA2B;EAAA;IAAA,wCACtC,CAAC,CAAC;IAAA,+CAaM,MAAM;MACpC,IAAI,IAAI,CAACC,cAAc,CAACC,OAAO,EAAE;QAC/B,IAAI,CAACC,OAAO,EAAE;QACd,OAAO,IAAI;MACb;MACA,OAAO,KAAK;IACd,CAAC;EAAA;EAjBOC,oBAAoB,GAAG;IAC7BN,WAAW,CAACO,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAACC,qBAAqB,CAAC;EAClF;EAEQC,kBAAkB,GAAG;IAC3B,IAAI,CAACH,oBAAoB,EAAE;IAC3B,IAAI,IAAI,CAACH,cAAc,CAACC,OAAO,EAAE;MAC/BJ,WAAW,CAACU,gBAAgB,CAAC,mBAAmB,EAAE,IAAI,CAACF,qBAAqB,CAAC;IAC/E;EACF;EAUAG,IAAI,CAACC,OAAuB,EAAE;IAC5B,IAAI,CAACT,cAAc,GAAGS,OAAO;IAC7B,IAAI,CAACC,OAAO,EAAE;IACd,IAAI,CAACJ,kBAAkB,EAAE;IACzB,OAAO,IAAI,CAACJ,OAAO;EACrB;EAEAS,cAAc,CAACV,OAAwB,EAAE;IACvC,IAAI,CAACD,cAAc,CAACC,OAAO,GAAGA,OAAO;EACvC;EAEAS,OAAO,GAAG;IACPZ,QAAQ,CAACc,GAAG,CAAC,WAAW,CAAC,CAAeF,OAAO,EAAE;EACpD;EAEAR,OAAO,GAAG;IACR,IAAI,CAACC,oBAAoB,EAAE;IAC3B,IAAI,CAACH,cAAc,CAACa,SAAS,IAAI,IAAI,CAACb,cAAc,CAACa,SAAS,EAAE;IAChE,IAAI,CAACb,cAAc,GAAG,CAAC,CAAmB;IAC1C,IAAI,CAACU,OAAO,EAAE;EAChB;AACF;AAEA,MAAMI,wBAAwB,GAAG,IAAIf,wBAAwB,EAAE;AAE/D,eAAee,wBAAwB"}
1
+ {"version":3,"names":["BackHandler","injector","AppDisplayManagerService","constructor","_defineProperty","displayOptions","content","destroy","clearBackButtonPress","removeEventListener","handleBackButtonPress","setBackButtonPress","addEventListener","show","options","refresh","displayContent","get","onDestroy","appDisplayManagerService"],"sources":["app-display-manager.service.tsx"],"sourcesContent":["import { BackHandler } from \"react-native\";\n\nimport {DisplayManager, DisplayOptions} from \"@wavemaker/app-rn-runtime/core/display.manager\";\nimport AppConfig from \"@wavemaker/app-rn-runtime/core/AppConfig\";\nimport injector from \"@wavemaker/app-rn-runtime/core/injector\";\n\nexport class AppDisplayManagerService implements DisplayManager {\n public displayOptions = {} as DisplayOptions;\n\n private clearBackButtonPress() {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n private setBackButtonPress() {\n this.clearBackButtonPress();\n if (this.displayOptions.content) {\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private handleBackButtonPress = () => {\n if (this.displayOptions.content) {\n this.destroy();\n return true;\n }\n return false;\n }\n\n show(options: DisplayOptions) {\n this.displayOptions = options;\n this.refresh();\n this.setBackButtonPress();\n return this.destroy;\n }\n\n displayContent(content: React.ReactNode) {\n this.displayOptions.content = content;\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n destroy() {\n this.clearBackButtonPress();\n this.displayOptions.onDestroy && this.displayOptions.onDestroy();\n this.displayOptions = {} as DisplayOptions;\n this.refresh();\n }\n}\n\nconst appDisplayManagerService = new AppDisplayManagerService();\n\nexport default appDisplayManagerService;\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,cAAc;AAI1C,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,wBAAwB,CAA2B;EAAAC,YAAA;IAAAC,eAAA,yBACtC,CAAC,CAAC;IAAAA,eAAA,gCAaM,MAAM;MACpC,IAAI,IAAI,CAACC,cAAc,CAACC,OAAO,EAAE;QAC/B,IAAI,CAACC,OAAO,CAAC,CAAC;QACd,OAAO,IAAI;MACb;MACA,OAAO,KAAK;IACd,CAAC;EAAA;EAjBOC,oBAAoBA,CAAA,EAAG;IAC7BR,WAAW,CAACS,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAACC,qBAAqB,CAAC;EAClF;EAEQC,kBAAkBA,CAAA,EAAG;IAC3B,IAAI,CAACH,oBAAoB,CAAC,CAAC;IAC3B,IAAI,IAAI,CAACH,cAAc,CAACC,OAAO,EAAE;MAC/BN,WAAW,CAACY,gBAAgB,CAAC,mBAAmB,EAAE,IAAI,CAACF,qBAAqB,CAAC;IAC/E;EACF;EAUAG,IAAIA,CAACC,OAAuB,EAAE;IAC5B,IAAI,CAACT,cAAc,GAAGS,OAAO;IAC7B,IAAI,CAACC,OAAO,CAAC,CAAC;IACd,IAAI,CAACJ,kBAAkB,CAAC,CAAC;IACzB,OAAO,IAAI,CAACJ,OAAO;EACrB;EAEAS,cAAcA,CAACV,OAAwB,EAAE;IACvC,IAAI,CAACD,cAAc,CAACC,OAAO,GAAGA,OAAO;EACvC;EAEAS,OAAOA,CAAA,EAAG;IACPd,QAAQ,CAACgB,GAAG,CAAC,WAAW,CAAC,CAAeF,OAAO,CAAC,CAAC;EACpD;EAEAR,OAAOA,CAAA,EAAG;IACR,IAAI,CAACC,oBAAoB,CAAC,CAAC;IAC3B,IAAI,CAACH,cAAc,CAACa,SAAS,IAAI,IAAI,CAACb,cAAc,CAACa,SAAS,CAAC,CAAC;IAChE,IAAI,CAACb,cAAc,GAAG,CAAC,CAAmB;IAC1C,IAAI,CAACU,OAAO,CAAC,CAAC;EAChB;AACF;AAEA,MAAMI,wBAAwB,GAAG,IAAIjB,wBAAwB,CAAC,CAAC;AAE/D,eAAeiB,wBAAwB"}
@@ -3,8 +3,17 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import axios from 'axios';
5
5
  import StorageService from '@wavemaker/app-rn-runtime/core/storage.service';
6
+ import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
7
+ import { I18nManager } from 'react-native';
6
8
  const APP_LOCALE_ROOT_PATH = '/resources/i18n';
7
9
  const STORAGE_KEY = 'selectedLocale';
10
+ const RTL_LANGUAGE_CODES = (() => {
11
+ const map = {};
12
+ ["ar", "ar-001", "ar-ae", "ar-bh", "ar-dz", "ar-eg", "ar-iq", "ar-jo", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-om", "ar-qa", "ar-sa", "ar-sd", "ar-sy", "ar-tn", "ar-ye", "arc", "bcc", "bqi", "ckb", "dv", "fa", "glk", "he", "ku", "mzn", "pnb", "ps", "sd", "ug", "ur", "yi"].forEach(v => {
13
+ map[v] = true;
14
+ });
15
+ return map;
16
+ })();
8
17
  class AppI18nService {
9
18
  constructor() {
10
19
  _defineProperty(this, "appLocale", void 0);
@@ -15,6 +24,16 @@ class AppI18nService {
15
24
  _defineProperty(this, "dateTimeFormat", '');
16
25
  _defineProperty(this, "currencyCode", '');
17
26
  }
27
+ isRTLLocale() {
28
+ let newLocale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectedLocale;
29
+ return !!(newLocale && RTL_LANGUAGE_CODES[newLocale]);
30
+ }
31
+ setRTL(locale) {
32
+ const flag = this.isRTLLocale(locale);
33
+ const needsRestart = !isWebPreviewMode() && I18nManager.isRTL !== flag;
34
+ I18nManager.forceRTL(flag);
35
+ return needsRestart;
36
+ }
18
37
  loadAppLocaleBundle(url) {
19
38
  return this.getSelectedLocale().then(() => {
20
39
  const path = `${url + APP_LOCALE_ROOT_PATH}/${this.selectedLocale}.json`;
@@ -32,6 +51,7 @@ class AppI18nService {
32
51
  setSelectedLocale(locale) {
33
52
  this.selectedLocale = locale;
34
53
  StorageService.setItem(STORAGE_KEY, locale);
54
+ return this.setRTL(locale);
35
55
  }
36
56
  async getSelectedLocale() {
37
57
  return await StorageService.getItem(STORAGE_KEY);
@@ -1 +1 @@
1
- {"version":3,"names":["axios","StorageService","APP_LOCALE_ROOT_PATH","STORAGE_KEY","AppI18nService","constructor","loadAppLocaleBundle","url","getSelectedLocale","then","path","selectedLocale","get","bundle","dateFormat","data","formats","date","timeFormat","time","currencyCode","currency","dateTimeFormat","catch","console","warn","setSelectedLocale","locale","setItem","getItem","i18nService"],"sources":["app-i18n.service.tsx"],"sourcesContent":["import axios, { AxiosResponse } from 'axios';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\n\nconst APP_LOCALE_ROOT_PATH = '/resources/i18n';\nconst STORAGE_KEY = 'selectedLocale';\nclass AppI18nService {\n appLocale: any;\n defaultSupportedLocale = 'en';\n selectedLocale: any;\n dateFormat: string = '';\n timeFormat: string = '';\n dateTimeFormat: string = '';\n currencyCode: string = '';\n\n constructor() {}\n\n loadAppLocaleBundle(url: string) {\n return this.getSelectedLocale().then(() => {\n const path = `${url + APP_LOCALE_ROOT_PATH}/${this.selectedLocale}.json`;\n return axios.get(path)\n .then((bundle) => {\n this.dateFormat = bundle.data.formats.date;\n this.timeFormat = bundle.data.formats.time;\n this.currencyCode = bundle.data.formats.currency;\n this.dateTimeFormat = this.dateFormat + ' ' + this.timeFormat;\n return bundle;\n })\n .catch(() => {\n console.warn(`error loading locale resource from ${path}`);\n });\n\n });\n }\n\n setSelectedLocale(locale: string) {\n this.selectedLocale = locale;\n StorageService.setItem(STORAGE_KEY, locale);\n }\n\n async getSelectedLocale() {\n return await StorageService.getItem(STORAGE_KEY);\n }\n}\n\nconst i18nService = new AppI18nService();\n\nexport default i18nService;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAG5C,OAAOC,cAAc,MAAM,gDAAgD;AAI3E,MAAMC,oBAAoB,GAAG,iBAAiB;AAC9C,MAAMC,WAAW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,"names":["axios","StorageService","isWebPreviewMode","I18nManager","APP_LOCALE_ROOT_PATH","STORAGE_KEY","RTL_LANGUAGE_CODES","map","forEach","v","AppI18nService","constructor","_defineProperty","isRTLLocale","newLocale","arguments","length","undefined","selectedLocale","setRTL","locale","flag","needsRestart","isRTL","forceRTL","loadAppLocaleBundle","url","getSelectedLocale","then","path","get","bundle","dateFormat","data","formats","date","timeFormat","time","currencyCode","currency","dateTimeFormat","catch","console","warn","setSelectedLocale","setItem","getItem","i18nService"],"sources":["app-i18n.service.tsx"],"sourcesContent":["import axios, { AxiosResponse } from 'axios';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { I18nManager, Platform } from 'react-native';\nimport { I18nService } from '@wavemaker/app-rn-runtime/core/i18n.service';\n\nconst APP_LOCALE_ROOT_PATH = '/resources/i18n';\nconst STORAGE_KEY = 'selectedLocale';\nconst RTL_LANGUAGE_CODES = (()=>{\n const map = {} as any;\n [\"ar\", \"ar-001\", \"ar-ae\", \"ar-bh\", \"ar-dz\", \"ar-eg\", \"ar-iq\", \"ar-jo\", \"ar-kw\", \"ar-lb\",\n \"ar-ly\", \"ar-ma\", \"ar-om\", \"ar-qa\", \"ar-sa\", \"ar-sd\", \"ar-sy\", \"ar-tn\", \"ar-ye\", \"arc\",\n \"bcc\", \"bqi\", \"ckb\", \"dv\", \"fa\", \"glk\", \"he\", \"ku\", \"mzn\", \"pnb\", \"ps\", \"sd\", \"ug\", \"ur\", \"yi\"].forEach(v=>{\n map[v] = true;\n });\n return map;\n })();\n\nclass AppI18nService implements I18nService{\n appLocale: any;\n defaultSupportedLocale = 'en';\n selectedLocale: any;\n dateFormat: string = '';\n timeFormat: string = '';\n dateTimeFormat: string = '';\n currencyCode: string = '';\n\n constructor() {}\n\n isRTLLocale(newLocale: string = this.selectedLocale){\n return !!(newLocale && RTL_LANGUAGE_CODES[newLocale]);\n }\n\n setRTL(locale?: string){\n const flag = this.isRTLLocale(locale);\n const needsRestart = !isWebPreviewMode() && I18nManager.isRTL !== flag;\n I18nManager.forceRTL(flag);\n return needsRestart; \n }\n\n loadAppLocaleBundle(url: string) {\n return this.getSelectedLocale().then(() => {\n const path = `${url + APP_LOCALE_ROOT_PATH}/${this.selectedLocale}.json`;\n return axios.get(path)\n .then((bundle) => {\n this.dateFormat = bundle.data.formats.date;\n this.timeFormat = bundle.data.formats.time;\n this.currencyCode = bundle.data.formats.currency;\n this.dateTimeFormat = this.dateFormat + ' ' + this.timeFormat;\n return bundle;\n })\n .catch(() => {\n console.warn(`error loading locale resource from ${path}`);\n });\n\n });\n }\n\n setSelectedLocale(locale: string) {\n this.selectedLocale = locale;\n StorageService.setItem(STORAGE_KEY, locale);\n return this.setRTL(locale);\n }\n\n async getSelectedLocale() {\n return await StorageService.getItem(STORAGE_KEY);\n }\n}\n\nconst i18nService = new AppI18nService();\n\nexport default i18nService;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,cAAc,MAAM,gDAAgD;AAC3E,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,WAAW,QAAkB,cAAc;AAGpD,MAAMC,oBAAoB,GAAG,iBAAiB;AAC9C,MAAMC,WAAW,GAAG,gBAAgB;AACpC,MAAMC,kBAAkB,GAAG,CAAC,MAAI;EAC9B,MAAMC,GAAG,GAAG,CAAC,CAAQ;EACrB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EACtF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EACrF,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,E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AAI,CAACC,OAAO,CAACC,IAAI;QAC1C,IAAI,CAACC,UAAU,GAAGL,MAAM,CAACE,IAAI,CAACC,OAAO,CAACG,IAAI;QAC1C,IAAI,CAACC,YAAY,GAAGP,MAAM,CAACE,IAAI,CAACC,OAAO,CAACK,QAAQ;QAChD,IAAI,CAACC,cAAc,GAAG,IAAI,CAACR,UAAU,GAAG,GAAG,GAAG,IAAI,CAACI,UAAU;QAC7D,OAAOL,MAAM;MACf,CAAC,CAAC,CACDU,KAAK,CAAC,MAAM;QACXC,OAAO,CAACC,IAAI,CAAE,sCAAqCd,IAAK,EAAC,CAAC;MAC5D,CAAC,CAAC;IAEN,CAAC,CAAC;EACN;EAEAe,iBAAiBA,CAACxB,MAAc,EAAE;IAC9B,IAAI,CAACF,cAAc,GAAGE,MAAM;IAC5BnB,cAAc,CAAC4C,OAAO,CAACxC,WAAW,EAAEe,MAAM,CAAC;IAC3C,OAAO,IAAI,CAACD,MAAM,CAACC,MAAM,CAAC;EAC9B;EAEA,MAAMO,iBAAiBA,CAAA,EAAG;IACxB,OAAO,MAAM1B,cAAc,CAAC6C,OAAO,CAACzC,WAAW,CAAC;EAClD;AACJ;AAEA,MAAM0C,WAAW,GAAG,IAAIrC,cAAc,CAAC,CAAC;AAExC,eAAeqC,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"names":["BackHandler","injector","AppModalService","modalsOpened","length","hideModal","clearBackButtonPress","removeEventListener","handleBackButtonPress","setBackButtonPress","addEventListener","getAppConfig","appConfig","get","showLastModal","modalOptions","refresh","setTimeout","onOpen","showModal","options","i","findIndex","o","elevationIndex","parseInt","app","toastsOpened","push","Promise","resolve","then","animatedRefs","triggerExit","onClose","splice","appModalService"],"sources":["app-modal.service.tsx"],"sourcesContent":["import { BackHandler } from \"react-native\";\n\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\n\nclass AppModalService implements ModalService {\n public modalOptions = {} as ModalOptions;\n\n public modalsOpened = [] as ModalOptions[];\n public appConfig: any;\n\n animatedRefs: any = [];\n\n private clearBackButtonPress() {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n private setBackButtonPress() {\n this.clearBackButtonPress();\n if (this.modalsOpened.length > 0) {\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private handleBackButtonPress = () => {\n if (this.modalsOpened.length) {\n this.hideModal();\n return true;\n }\n return false;\n }\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n\n private showLastModal() {\n this.modalOptions = this.modalsOpened.length ? this.modalsOpened[this.modalsOpened.length - 1] : {} as ModalOptions;\n this.refresh();\n // widgets in dialog are not accessible. Hence adding setTimeout\n setTimeout(() => {\n this.modalOptions.onOpen && this.modalOptions.onOpen();\n });\n this.setBackButtonPress();\n }\n\n public refresh() {\n this.getAppConfig().refresh();\n }\n\n public showModal(options: ModalOptions) {\n const i = this.modalsOpened.findIndex(o => o === options);\n if (i < 0) {\n options.elevationIndex = parseInt(this.getAppConfig().app.toastsOpened + this.modalsOpened.length + 1);\n this.modalsOpened.push(options);\n this.showLastModal();\n }\n }\n\n public hideModal(options?: ModalOptions) {\n const i = options ? this.modalsOpened.findIndex(o => o === options) : (this.modalsOpened.length - 1);\n if (i >= 0) {\n Promise.resolve()\n .then(() => this.modalsOpened.length > 1 && this.animatedRefs && this.animatedRefs[i].triggerExit())\n .then(() => {\n const o = this.modalsOpened[i];\n return o && o.onClose && o.onClose();\n })\n .then(() => this.modalsOpened.splice(i, 1))\n .then(() => this.showLastModal());\n }\n this.clearBackButtonPress();\n }\n}\n\nconst appModalService = new AppModalService();\n\nexport default appModalService;\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,cAAc;AAE1C,OAAOC,QAAQ,MAAM,yCAAyC;AA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7C,eAAekC,eAAe"}
1
+ {"version":3,"names":["BackHandler","injector","AppModalService","constructor","_defineProperty","modalsOpened","length","hideModal","clearBackButtonPress","removeEventListener","handleBackButtonPress","setBackButtonPress","addEventListener","getAppConfig","appConfig","get","showLastModal","modalOptions","refresh","setTimeout","onOpen","showModal","options","i","findIndex","o","elevationIndex","parseInt","app","toastsOpened","push","Promise","resolve","then","animatedRefs","triggerExit","onClose","splice","appModalService"],"sources":["app-modal.service.tsx"],"sourcesContent":["import { BackHandler } from \"react-native\";\n\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\n\nclass AppModalService implements ModalService {\n public modalOptions = {} as ModalOptions;\n\n public modalsOpened = [] as ModalOptions[];\n public appConfig: any;\n\n animatedRefs: any = [];\n\n private clearBackButtonPress() {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n\n private setBackButtonPress() {\n this.clearBackButtonPress();\n if (this.modalsOpened.length > 0) {\n BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress);\n }\n }\n\n private handleBackButtonPress = () => {\n if (this.modalsOpened.length) {\n this.hideModal();\n return true;\n }\n return false;\n }\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n\n private showLastModal() {\n this.modalOptions = this.modalsOpened.length ? this.modalsOpened[this.modalsOpened.length - 1] : {} as ModalOptions;\n this.refresh();\n // widgets in dialog are not accessible. Hence adding setTimeout\n setTimeout(() => {\n this.modalOptions.onOpen && this.modalOptions.onOpen();\n });\n this.setBackButtonPress();\n }\n\n public refresh() {\n this.getAppConfig().refresh();\n }\n\n public showModal(options: ModalOptions) {\n const i = this.modalsOpened.findIndex(o => o === options);\n if (i < 0) {\n options.elevationIndex = parseInt(this.getAppConfig().app.toastsOpened + this.modalsOpened.length + 1);\n this.modalsOpened.push(options);\n this.showLastModal();\n }\n }\n\n public hideModal(options?: ModalOptions) {\n const i = options ? this.modalsOpened.findIndex(o => o === options) : (this.modalsOpened.length - 1);\n if (i >= 0) {\n Promise.resolve()\n .then(() => this.modalsOpened.length > 1 && this.animatedRefs && this.animatedRefs[i].triggerExit())\n .then(() => {\n const o = this.modalsOpened[i];\n return o && o.onClose && o.onClose();\n })\n .then(() => this.modalsOpened.splice(i, 1))\n .then(() => this.showLastModal());\n }\n this.clearBackButtonPress();\n }\n}\n\nconst appModalService = new AppModalService();\n\nexport default appModalService;\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,cAAc;AAE1C,OAAOC,QAAQ,MAAM,yCAAyC;AAI9D,MAAMC,eAAe,CAAyB;EAAAC,YAAA;IAAAC,eAAA,uBACpB,CAAC,CAAC;IAAAA,eAAA,uBAEF,EAAE;IAAAA,eAAA;IAAAA,eAAA,uBAGJ,EAAE;IAAAA,eAAA,gCAaU,MAAM;MACpC,IAAI,IAAI,CAACC,YAAY,CAACC,MAAM,EAAE;QAC5B,IAAI,CAACC,SAAS,CAAC,CAAC;QAChB,OAAO,IAAI;MACb;MACA,OAAO,KAAK;IACd,CAAC;EAAA;EAjBOC,oBAAoBA,CAAA,EAAG;IAC7BR,WAAW,CAACS,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAACC,qBAAqB,CAAC;EAClF;EAEQC,kBAAkBA,CAAA,EAAG;IAC3B,IAAI,CAACH,oBAAoB,CAAC,CAAC;IAC3B,IAAI,IAAI,CAACH,YAAY,CAACC,MAAM,GAAG,CAAC,EAAE;MAChCN,WAAW,CAACY,gBAAgB,CAAC,mBAAmB,EAAE,IAAI,CAACF,qBAAqB,CAAC;IAC/E;EACF;EAUQG,YAAYA,CAAA,EAAG;IACrB,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;MACnB,IAAI,CAACA,SAAS,GAAGb,QAAQ,CAACc,GAAG,CAAY,YAAY,CAAC;IACxD;IACA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AI,CAAC,MAAM,IAAI,CAAC5B,YAAY,CAACC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC4B,YAAY,IAAI,IAAI,CAACA,YAAY,CAACX,CAAC,CAAC,CAACY,WAAW,CAAC,CAAC,CAAC,CACnGF,IAAI,CAAC,MAAM;QACV,MAAMR,CAAC,GAAG,IAAI,CAACpB,YAAY,CAACkB,CAAC,CAAC;QAC9B,OAAOE,CAAC,IAAIA,CAAC,CAACW,OAAO,IAAIX,CAAC,CAACW,OAAO,CAAC,CAAC;MACtC,CAAC,CAAC,CACDH,IAAI,CAAC,MAAM,IAAI,CAAC5B,YAAY,CAACgC,MAAM,CAACd,CAAC,EAAE,CAAC,CAAC,CAAC,CAC1CU,IAAI,CAAC,MAAM,IAAI,CAACjB,aAAa,CAAC,CAAC,CAAC;IACrC;IACA,IAAI,CAACR,oBAAoB,CAAC,CAAC;EAC/B;AACJ;AAEA,MAAM8B,eAAe,GAAG,IAAIpC,eAAe,CAAC,CAAC;AAE7C,eAAeoC,eAAe"}
@@ -8,12 +8,12 @@ import networkService from '@wavemaker/app-rn-runtime/core/network.service';
8
8
  import injector from '@wavemaker/app-rn-runtime/core/injector';
9
9
  import StorageService from '@wavemaker/app-rn-runtime/core/storage.service';
10
10
  import WebProcessService from './webprocess.service';
11
- var USER_ROLE;
12
- (function (USER_ROLE) {
11
+ var USER_ROLE = /*#__PURE__*/function (USER_ROLE) {
13
12
  USER_ROLE["EVERYONE"] = "Everyone";
14
13
  USER_ROLE["ANONYMOUS"] = "Anonymous";
15
14
  USER_ROLE["AUTHENTICATED"] = "Authenticated";
16
- })(USER_ROLE || (USER_ROLE = {}));
15
+ return USER_ROLE;
16
+ }(USER_ROLE || {});
17
17
  const authCookieStr = 'AUTH_COOKIE';
18
18
  const XSRF_COOKIE_NAME = 'wm_xsrf_token';
19
19
  const xsrf_header_name = 'X-WM-XSRF-TOKEN';
@@ -117,8 +117,8 @@ class AppSecurityService {
117
117
  return this.load(baseURL);
118
118
  }
119
119
  redirectToLogin() {
120
- var _this$securityConfig, _this$securityConfig$;
121
- if (((_this$securityConfig = this.securityConfig) === null || _this$securityConfig === void 0 ? void 0 : (_this$securityConfig$ = _this$securityConfig.loginConfig) === null || _this$securityConfig$ === void 0 ? void 0 : _this$securityConfig$.type) === 'SSO') {
120
+ var _this$securityConfig;
121
+ if (((_this$securityConfig = this.securityConfig) === null || _this$securityConfig === void 0 || (_this$securityConfig = _this$securityConfig.loginConfig) === null || _this$securityConfig === void 0 ? void 0 : _this$securityConfig.type) === 'SSO') {
122
122
  const authUrl = this.appConfig.url + '/services/security/ssologin';
123
123
  if (Platform.OS === 'web') {
124
124
  (window.parent || window).location.href = authUrl;
@@ -142,8 +142,8 @@ class AppSecurityService {
142
142
  }, 1000);
143
143
  }
144
144
  } else {
145
- var _this$securityConfig$2, _this$appConfig$curre2;
146
- const loginPage = ((_this$securityConfig$2 = this.securityConfig.loginConfig) === null || _this$securityConfig$2 === void 0 ? void 0 : _this$securityConfig$2.pageName) || 'Login';
145
+ var _this$securityConfig$, _this$appConfig$curre2;
146
+ const loginPage = ((_this$securityConfig$ = this.securityConfig.loginConfig) === null || _this$securityConfig$ === void 0 ? void 0 : _this$securityConfig$.pageName) || 'Login';
147
147
  injector.get('APP_CONFIG').landingPage = loginPage;
148
148
  (_this$appConfig$curre2 = this.appConfig.currentPage) === null || _this$appConfig$curre2 === void 0 ? void 0 : _this$appConfig$curre2.goToPage(loginPage);
149
149
  }