@wavemaker/app-rn-runtime 11.9.2-rc.5853 → 11.9.3-1.5949

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 (271) hide show
  1. app-rn-runtime/actions/notification-action.js +1 -1
  2. app-rn-runtime/actions/timer-action.js +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js +1 -1
  4. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.component.js +62 -48
  6. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/carousel/carousel.props.js +2 -2
  8. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  9. app-rn-runtime/components/advanced/carousel/carousel.styles.js +7 -9
  10. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  11. app-rn-runtime/components/advanced/login/login.component.js +2 -2
  12. app-rn-runtime/components/advanced/login/login.props.js +1 -1
  13. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +2 -2
  14. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js +1 -1
  15. app-rn-runtime/components/advanced/webview/webview.component.js +2 -2
  16. app-rn-runtime/components/advanced/webview/webview.props.js +1 -1
  17. app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
  18. app-rn-runtime/components/basic/anchor/anchor.props.js +1 -1
  19. app-rn-runtime/components/basic/animatedview.component.js +2 -2
  20. app-rn-runtime/components/basic/audio/audio.component.js +1 -1
  21. app-rn-runtime/components/basic/audio/audio.props.js +1 -1
  22. app-rn-runtime/components/basic/button/button.component.js +1 -1
  23. app-rn-runtime/components/basic/button/button.props.js +1 -1
  24. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js +1 -1
  25. app-rn-runtime/components/basic/custom/custom.props.js +1 -1
  26. app-rn-runtime/components/basic/icon/icon.component.js +2 -2
  27. app-rn-runtime/components/basic/icon/icon.props.js +1 -1
  28. app-rn-runtime/components/basic/label/label.component.js +2 -2
  29. app-rn-runtime/components/basic/label/label.props.js +1 -1
  30. app-rn-runtime/components/basic/lottie/lottie.component.js +1 -1
  31. app-rn-runtime/components/basic/lottie/lottie.props.js +1 -1
  32. app-rn-runtime/components/basic/message/message.component.js +2 -2
  33. app-rn-runtime/components/basic/message/message.props.js +1 -1
  34. app-rn-runtime/components/basic/modal/modal.props.js +1 -1
  35. app-rn-runtime/components/basic/picture/picture.component.js +12 -6
  36. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  37. app-rn-runtime/components/basic/picture/picture.props.js +2 -1
  38. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  39. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  40. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  41. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +1 -1
  42. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +2 -2
  43. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +1 -1
  44. app-rn-runtime/components/basic/search/local-data-provider.js +1 -1
  45. app-rn-runtime/components/basic/search/search.component.js +5 -5
  46. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  47. app-rn-runtime/components/basic/search/search.props.js +1 -1
  48. app-rn-runtime/components/basic/skeleton/skeleton.component.js +1 -1
  49. app-rn-runtime/components/basic/skeleton/skeleton.props.js +1 -1
  50. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -2
  51. app-rn-runtime/components/basic/spinner/spinner.props.js +1 -1
  52. app-rn-runtime/components/basic/tooltip/tooltip.props.js +1 -1
  53. app-rn-runtime/components/basic/video/video.component.js +101 -24
  54. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  55. app-rn-runtime/components/basic/video/video.props.js +8 -1
  56. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  57. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -2
  58. app-rn-runtime/components/chart/area-chart/area-chart.props.js +1 -1
  59. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +1 -1
  60. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -1
  61. app-rn-runtime/components/chart/basechart.component.js +1 -1
  62. app-rn-runtime/components/chart/basechart.props.js +1 -1
  63. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
  64. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +1 -1
  65. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +1 -1
  66. app-rn-runtime/components/chart/line-chart/line-chart.component.js +1 -1
  67. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -1
  68. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -2
  69. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -1
  70. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +2 -2
  71. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -1
  72. app-rn-runtime/components/container/accordion/accordion.component.js +2 -2
  73. app-rn-runtime/components/container/accordion/accordion.props.js +1 -1
  74. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
  75. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js +1 -1
  76. app-rn-runtime/components/container/container.component.js +2 -2
  77. app-rn-runtime/components/container/container.props.js +1 -1
  78. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js +1 -1
  79. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js +1 -1
  80. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js +1 -1
  81. app-rn-runtime/components/container/linearlayout/linearlayout.props.js +1 -1
  82. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -1
  83. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js +1 -1
  84. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js +1 -1
  85. app-rn-runtime/components/container/panel/panel.component.js +4 -4
  86. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  87. app-rn-runtime/components/container/panel/panel.props.js +1 -1
  88. app-rn-runtime/components/container/partial-host.component.js +1 -1
  89. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +31 -17
  90. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  91. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js +2 -1
  92. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  93. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  94. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -1
  95. app-rn-runtime/components/container/tabs/tabs.component.js +5 -4
  96. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  97. app-rn-runtime/components/container/tabs/tabs.props.js +2 -1
  98. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  99. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  100. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  101. app-rn-runtime/components/container/tile/tile.props.js +1 -1
  102. app-rn-runtime/components/container/wizard/wizard.component.js +4 -4
  103. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizard.props.js +1 -1
  105. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  106. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  107. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  108. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +1 -1
  109. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  110. app-rn-runtime/components/data/card/card-content/card-content.props.js +1 -1
  111. app-rn-runtime/components/data/card/card-footer/card-footer.props.js +1 -1
  112. app-rn-runtime/components/data/card/card.component.js +1 -1
  113. app-rn-runtime/components/data/card/card.props.js +1 -1
  114. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -1
  115. app-rn-runtime/components/data/form/form-action/form-action.props.js +1 -1
  116. app-rn-runtime/components/data/form/form-body/form-body.props.js +1 -1
  117. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -2
  118. app-rn-runtime/components/data/form/form-field/form-field.props.js +1 -1
  119. app-rn-runtime/components/data/form/form-footer/form-footer.props.js +1 -1
  120. app-rn-runtime/components/data/form/form.component.js +1 -1
  121. app-rn-runtime/components/data/form/form.props.js +1 -1
  122. app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js +1 -1
  123. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -1
  124. app-rn-runtime/components/data/list/list.component.js +13 -3
  125. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  126. app-rn-runtime/components/data/list/list.props.js +1 -1
  127. app-rn-runtime/components/data/liveform/liveform.component.js +1 -1
  128. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
  129. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +1 -1
  130. app-rn-runtime/components/device/camera/camera.component.js +1 -1
  131. app-rn-runtime/components/device/camera/camera.props.js +1 -1
  132. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +1 -1
  133. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +1 -1
  134. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +1 -1
  135. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +1 -1
  136. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -2
  137. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  138. app-rn-runtime/components/dialogs/dialog/dialog.props.js +1 -1
  139. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  140. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js +1 -1
  141. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js +1 -1
  142. app-rn-runtime/components/input/basedataset/basedataset.component.js +1 -1
  143. app-rn-runtime/components/input/basedataset/basedataset.props.js +1 -1
  144. app-rn-runtime/components/input/baseinput/baseinput.component.js +1 -1
  145. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -1
  146. app-rn-runtime/components/input/basenumber/basenumber.component.js +11 -5
  147. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  148. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -1
  149. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  150. app-rn-runtime/components/input/calendar/calendar.props.js +1 -1
  151. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  152. app-rn-runtime/components/input/calendar/views/month-view.js +2 -2
  153. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  154. app-rn-runtime/components/input/checkbox/checkbox.component.js +2 -2
  155. app-rn-runtime/components/input/checkbox/checkbox.props.js +1 -1
  156. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +2 -2
  157. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -1
  158. app-rn-runtime/components/input/chips/chips.component.js +33 -5
  159. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  160. app-rn-runtime/components/input/chips/chips.props.js +1 -1
  161. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  162. app-rn-runtime/components/input/currency/currency.component.js +2 -2
  163. app-rn-runtime/components/input/currency/currency.props.js +1 -1
  164. app-rn-runtime/components/input/epoch/base-datetime.component.js +2 -2
  165. app-rn-runtime/components/input/epoch/date-picker.component.js +2 -2
  166. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  167. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -1
  168. app-rn-runtime/components/input/epoch/time/time.props.js +1 -1
  169. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +1 -1
  170. app-rn-runtime/components/input/epoch/wheel-time-picker.component.js +1 -1
  171. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js +1 -1
  172. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js +1 -1
  173. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +1 -1
  174. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +1 -1
  175. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +1 -1
  176. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +1 -1
  177. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  178. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -1
  179. app-rn-runtime/components/input/number/number.component.js +2 -2
  180. app-rn-runtime/components/input/number/number.props.js +1 -1
  181. app-rn-runtime/components/input/radioset/radioset.component.js +2 -2
  182. app-rn-runtime/components/input/radioset/radioset.props.js +1 -1
  183. app-rn-runtime/components/input/rating/rating.component.js +1 -1
  184. app-rn-runtime/components/input/rating/rating.props.js +1 -1
  185. app-rn-runtime/components/input/select/select.component.js +3 -3
  186. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  187. app-rn-runtime/components/input/select/select.props.js +1 -1
  188. app-rn-runtime/components/input/slider/slider.component.js +4 -4
  189. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  190. app-rn-runtime/components/input/slider/slider.props.js +1 -1
  191. app-rn-runtime/components/input/switch/switch.component.js +1 -1
  192. app-rn-runtime/components/input/switch/switch.props.js +1 -1
  193. app-rn-runtime/components/input/text/text.component.js +1 -1
  194. app-rn-runtime/components/input/text/text.props.js +1 -1
  195. app-rn-runtime/components/input/textarea/textarea.component.js +1 -1
  196. app-rn-runtime/components/input/textarea/textarea.props.js +1 -1
  197. app-rn-runtime/components/input/toggle/toggle.component.js +2 -2
  198. app-rn-runtime/components/input/toggle/toggle.props.js +1 -1
  199. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  200. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -1
  201. app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -1
  202. app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -1
  203. app-rn-runtime/components/navigation/menu/menu.component.js +1 -1
  204. app-rn-runtime/components/navigation/menu/menu.props.js +1 -1
  205. app-rn-runtime/components/navigation/navbar/navbar.props.js +1 -1
  206. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -2
  207. app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -1
  208. app-rn-runtime/components/navigation/popover/popover.component.js +2 -2
  209. app-rn-runtime/components/navigation/popover/popover.props.js +1 -1
  210. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  211. app-rn-runtime/components/page/left-panel/left-panel.props.js +1 -1
  212. app-rn-runtime/components/page/page-content/page-content.props.js +1 -1
  213. app-rn-runtime/components/page/page.component.js +2 -2
  214. app-rn-runtime/components/page/partial-container/partial-container.props.js +1 -1
  215. app-rn-runtime/components/page/tabbar/tabbar.component.js +3 -3
  216. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  217. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -1
  218. app-rn-runtime/core/base.component.js +2 -2
  219. app-rn-runtime/core/components/textinput.component.js +1 -1
  220. app-rn-runtime/core/constant.service.js +1 -1
  221. app-rn-runtime/core/event-notifier.js +1 -1
  222. app-rn-runtime/core/fixed-view.component.js +1 -1
  223. app-rn-runtime/core/imageSizeEstimator.js +1 -1
  224. app-rn-runtime/core/key.extractor.js +1 -1
  225. app-rn-runtime/core/logger.js +1 -1
  226. app-rn-runtime/core/network.service.js +1 -1
  227. app-rn-runtime/core/props.provider.js +1 -1
  228. app-rn-runtime/core/scroll-view.component.js +2 -2
  229. app-rn-runtime/core/storage.service.js +1 -1
  230. app-rn-runtime/core/tappable.component.js +2 -2
  231. app-rn-runtime/core/viewport.js +1 -1
  232. app-rn-runtime/core/wm-component-tree.js +1 -1
  233. app-rn-runtime/gestures/swipe.animation.js +1 -1
  234. app-rn-runtime/package.json +44 -45
  235. app-rn-runtime/runtime/App.js +13 -5
  236. app-rn-runtime/runtime/App.js.map +1 -1
  237. app-rn-runtime/runtime/base-fragment.component.js +6 -2
  238. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  239. app-rn-runtime/runtime/base-page.component.js +2 -2
  240. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  241. app-rn-runtime/runtime/base-partial.component.js +1 -1
  242. app-rn-runtime/runtime/base-prefab.component.js +1 -1
  243. app-rn-runtime/runtime/memo.component.js +1 -1
  244. app-rn-runtime/runtime/navigator/stack.navigator.js +1 -1
  245. app-rn-runtime/runtime/services/app-display-manager.service.js +1 -1
  246. app-rn-runtime/runtime/services/app-i18n.service.js +2 -1
  247. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  248. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  249. app-rn-runtime/runtime/services/app-security.service.js +1 -1
  250. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  251. app-rn-runtime/runtime/services/app-toast.service.js +1 -1
  252. app-rn-runtime/runtime/services/device/camera-service.js +10 -10
  253. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  254. app-rn-runtime/runtime/services/device/permissions.js +2 -2
  255. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  256. app-rn-runtime/runtime/services/device/scan-service.js +35 -9
  257. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  258. app-rn-runtime/runtime/services/webprocess.service.js +1 -1
  259. app-rn-runtime/runtime/watcher.js +1 -1
  260. app-rn-runtime/styles/background.component.js +2 -2
  261. app-rn-runtime/styles/background.component.js.map +1 -1
  262. app-rn-runtime/styles/style-props.js +1 -1
  263. app-rn-runtime/styles/theme.js +1 -1
  264. app-rn-runtime/styles/theme.variables.js +2 -2
  265. app-rn-runtime/styles/theme.variables.js.map +1 -1
  266. app-rn-runtime/variables/base-variable.js +1 -1
  267. app-rn-runtime/variables/device/device/network-info.operation.js +1 -1
  268. app-rn-runtime/variables/live-variable.js +1 -1
  269. app-rn-runtime/variables/model-variable.js +1 -1
  270. app-rn-runtime/variables/service-variable.js +1 -1
  271. app-rn-runtime/variables/utils/inflight-queue.js +1 -1
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -25,8 +25,8 @@ export class WmPictureState extends BaseComponentState {
25
25
  }
26
26
  }
27
27
  export default class WmPicture extends BaseComponent {
28
- constructor(props) {
29
- super(props, DEFAULT_CLASS, new WmPictureProps());
28
+ constructor(_props) {
29
+ super(_props, DEFAULT_CLASS, new WmPictureProps());
30
30
  _defineProperty(this, "_pictureSource", null);
31
31
  _defineProperty(this, "_picturePlaceHolder", null);
32
32
  _defineProperty(this, "onViewLayoutChange", e => {
@@ -48,6 +48,12 @@ export default class WmPicture extends BaseComponent {
48
48
  imageHeight: imageHeight
49
49
  });
50
50
  });
51
+ _defineProperty(this, "showImage", (imageElement, props) => {
52
+ if (props.fastload) {
53
+ return imageElement;
54
+ }
55
+ return this.state.imageWidth ? imageElement : null;
56
+ });
51
57
  }
52
58
  loadImage(image) {
53
59
  if (!image || !this.loadAsset) {
@@ -152,7 +158,7 @@ export default class WmPicture extends BaseComponent {
152
158
  const imageHeight = this.state.imageHeight;
153
159
  const shapeStyles = this.createShape(props.shape, imageWidth);
154
160
  this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);
155
- this._picturePlaceHolder = this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);
161
+ this._picturePlaceHolder = props.fastload ? this._pictureSource || this._picturePlaceHolder || this.loadImage(props.pictureplaceholder) : this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);
156
162
  const imgSrc = this._pictureSource || this._picturePlaceHolder;
157
163
  let elementToshow;
158
164
  if (imgSrc) {
@@ -185,7 +191,7 @@ export default class WmPicture extends BaseComponent {
185
191
  width: imageWidth,
186
192
  borderRadius: (_shapeStyles$picture4 = shapeStyles.picture) === null || _shapeStyles$picture4 === void 0 ? void 0 : _shapeStyles$picture4.borderRadius
187
193
  }]
188
- }, this.state.imageWidth ? elementToshow : null)))) : null;
194
+ }, this.showImage(elementToshow, props))))) : null;
189
195
  }
190
196
  }
191
197
  //# sourceMappingURL=picture.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Image","View","isNumber","Tappable","BaseComponent","BaseComponentState","ImageSizeEstimator","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmPictureProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmPictureState","constructor","args","_defineProperty","WmPicture","props","e","imageWidth","nativeEvent","layout","width","imageHeight","height","styles","root","includes","state","naturalImageHeight","naturalImageWidth","updateState","loadImage","image","loadAsset","imageSrc","default","resolveAssetSource","cancel","getSize","cleanup","splice","indexOf","push","onPropertyChange","name","$new","$old","_pictureSource","_picturePlaceHolder","createShape","shape","picture","borderRadius","theme","getStyle","getElementToShow","imgSrc","shapeStyles","elementToshow","source","imgStyle","resizemode","createElement","uri","_extends","getTestProps","style","resizeMode","PICTURE","renderSkeleton","_this$styles$root","_shapeStyles$root","_shapeStyles$picture","_this$styles$root2","_shapeStyles$root2","_shapeStyles$picture2","_this$styles$root3","_shapeStyles$picture3","_shapeStyles$root3","_this$styles$root4","skeletonWidth","skeletonwidth","skeletonHeight","skeletonheight","skeleton","renderWidget","_shapeStyles$picture4","picturesource","pictureplaceholder","isSvg","_background","overflow","onLayout","onViewLayoutChange","getTestPropsForAction","rippleColor","target","entryanimation","animation","delay","animationdelay"],"sources":["picture.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Image, LayoutChangeEvent, View } from 'react-native';\n// import { NumberProp, SvgUri } from 'react-native-svg';\nimport { isNumber, isString } from 'lodash-es';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmPictureProps from './picture.props';\nimport { DEFAULT_CLASS, WmPictureStyles } from './picture.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmPictureState extends BaseComponentState<WmPictureProps> {\n naturalImageWidth: number = 0;\n naturalImageHeight: number = 0;\n imageWidth: number = 0;\n imageHeight: number = 0;\n}\n\nexport default class WmPicture extends BaseComponent<WmPictureProps, WmPictureState, WmPictureStyles> {\n\n private _pictureSource = null as any;\n private _picturePlaceHolder = null as any;\n\n constructor(props: WmPictureProps) {\n super(props, DEFAULT_CLASS, new WmPictureProps());\n }\n\n loadImage(image: string | undefined) {\n if (!image || !this.loadAsset) {\n return null;\n }\n const imageSrc = this.loadAsset(image) as any;\n if (imageSrc && typeof imageSrc === 'object' && typeof imageSrc.default === 'function') {\n return null;\n }\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n } else if (imageSrc !== null) {\n const cancel = ImageSizeEstimator.getSize(imageSrc, (width: number, height: number) => {\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n this.cleanup.splice(this.cleanup.indexOf(cancel), 1);\n });\n this.cleanup.push(cancel);\n }\n return imageSrc;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'picturesource':\n this._pictureSource = null;\n case 'pictureplaceholder':\n this._picturePlaceHolder = null;\n break;\n }\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let imageWidth = e.nativeEvent.layout.width;\n let imageHeight = e.nativeEvent.layout.height;\n if (!imageWidth && !imageHeight) {\n return;\n }\n if (!this.styles.root.height\n || (typeof this.styles.root.height === 'string'\n && !this.styles.root.height.includes('%'))) {\n imageHeight = 0;\n }\n if (imageWidth && !imageHeight) {\n imageHeight = imageWidth * this.state.naturalImageHeight / this.state.naturalImageWidth;\n } else if (imageHeight && !imageWidth) {\n imageWidth = imageHeight * this.state.naturalImageWidth / this.state.naturalImageHeight;\n }\n this.updateState({\n imageWidth: imageWidth,\n imageHeight: imageHeight\n } as WmPictureState);\n };\n\n createShape(shape: string | undefined, imageWidth?: number | string): WmPictureStyles {\n if (shape) {\n switch(shape) {\n case 'circle':\n return {\n picture: {\n borderRadius: isNumber(imageWidth) ? imageWidth / 2 : 4\n }\n } as WmPictureStyles;\n case 'rounded' :\n return (this.theme.getStyle('rounded-image') as WmPictureStyles);\n case 'thumbnail' :\n return (this.theme.getStyle('thumbnail-image') as WmPictureStyles);\n }\n }\n return {} as WmPictureStyles;\n }\n\n getElementToShow(props: WmPictureProps, imgSrc: any, shapeStyles: WmPictureStyles) {\n let elementToshow, source;\n if (imgSrc && typeof imgSrc === 'object' && typeof imgSrc?.default === 'function') {\n let imgStyle : any = {};\n if (props.resizemode === 'contain') {\n imgStyle['width'] = '100%';\n imgStyle['height'] = '100%';\n }\n elementToshow = React.createElement(imgSrc?.default, imgStyle);\n //} else if (!isWebPreviewMode() && props.isSvg) {\n // svg from uri\n // elementToshow = <SvgUri testID={this.getTestId('picture')} width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;\n } else if (isFullPathUrl(imgSrc)) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n if (this.state.naturalImageWidth) {\n elementToshow = (\n <Image\n {...this.getTestProps('picture')}\n style={[this.styles.picture, shapeStyles.picture]}\n resizeMode={props.resizemode}\n source={source}\n {...getAccessibilityProps(AccessibilityWidgetType.PICTURE, props)}\n />\n );\n }\n return elementToshow;\n }\n\n public renderSkeleton(props: WmPictureProps){\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(this.props.shape, imageWidth);\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width || shapeStyles.root?.width || shapeStyles.picture?.width || imageWidth;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || shapeStyles.root?.height || shapeStyles.picture?.height || imageHeight;\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n borderRadius: this.props.shape == 'circle' && this.styles.root?.width ? 25 : shapeStyles.picture?.borderRadius || shapeStyles.root?.borderRadius || this.styles.root?.borderRadius || 4,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmPictureProps) {\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(props.shape, imageWidth);\n this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);\n this._picturePlaceHolder = this._picturePlaceHolder || this.loadImage(props.pictureplaceholder);\n const imgSrc: any = this._pictureSource || this._picturePlaceHolder;\n let elementToshow;\n if (imgSrc) {\n elementToshow = this.getElementToShow(props, imgSrc, shapeStyles);\n }\n return imgSrc && (this.state.naturalImageWidth || props.isSvg) ? (\n <View style={[{\n width: imageWidth,\n height: imageHeight\n }, this.styles.root, shapeStyles.root, shapeStyles.picture]}>\n {this._background}\n <View style={[{overflow: 'hidden', width: '100%',\n height: '100%'}]} onLayout={this.onViewLayoutChange}>\n <Tappable\n {...this.getTestPropsForAction()}\n rippleColor={this.styles.root.rippleColor}\n target={this} styles={{width: imageWidth ? null : '100%', height: imageHeight ? null : '100%'}}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={[{\n height: imageHeight,\n width: imageWidth,\n borderRadius: shapeStyles.picture?.borderRadius\n }]}>\n {this.state.imageWidth ? elementToshow : null}\n </Animatedview>\n </Tappable>\n </View>\n </View>\n ): null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,KAAK,EAAqBC,IAAI,QAAQ,cAAc;AAC7E;AACA,SAASC,QAAQ,QAAkB,WAAW;AAC9C,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAE3E,OAAO,MAAMC,cAAc,SAAST,kBAAkB,CAAiB;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,4BACzC,CAAC;IAAAA,eAAA,6BACA,CAAC;IAAAA,eAAA,qBACT,CAAC;IAAAA,eAAA,sBACA,CAAC;EAAA;AACzB;AAEA,eAAe,MAAMC,SAAS,SAASd,aAAa,CAAkD;EAKpGW,WAAWA,CAACI,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;IAACO,eAAA,yBAJ3B,IAAI;IAAAA,eAAA,8BACC,IAAI;IAA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AACzB,KAAK,CAACT,UAAU,GAAGwC,aAAa,GAAG,IAC7B,CACN,CACN,CACF,CAAC,GACN,IAAI;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Image","View","isNumber","Tappable","BaseComponent","BaseComponentState","ImageSizeEstimator","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmPictureProps","DEFAULT_CLASS","Animatedview","createSkeleton","WmPictureState","constructor","args","_defineProperty","WmPicture","props","e","imageWidth","nativeEvent","layout","width","imageHeight","height","styles","root","includes","state","naturalImageHeight","naturalImageWidth","updateState","imageElement","fastload","loadImage","image","loadAsset","imageSrc","default","resolveAssetSource","cancel","getSize","cleanup","splice","indexOf","push","onPropertyChange","name","$new","$old","_pictureSource","_picturePlaceHolder","createShape","shape","picture","borderRadius","theme","getStyle","getElementToShow","imgSrc","shapeStyles","elementToshow","source","imgStyle","resizemode","createElement","uri","_extends","getTestProps","style","resizeMode","PICTURE","renderSkeleton","_this$styles$root","_shapeStyles$root","_shapeStyles$picture","_this$styles$root2","_shapeStyles$root2","_shapeStyles$picture2","_this$styles$root3","_shapeStyles$picture3","_shapeStyles$root3","_this$styles$root4","skeletonWidth","skeletonwidth","skeletonHeight","skeletonheight","skeleton","renderWidget","_shapeStyles$picture4","picturesource","pictureplaceholder","isSvg","_background","overflow","onLayout","onViewLayoutChange","getTestPropsForAction","rippleColor","target","entryanimation","animation","delay","animationdelay","showImage"],"sources":["picture.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Image, LayoutChangeEvent, View } from 'react-native';\n// import { NumberProp, SvgUri } from 'react-native-svg';\nimport { isNumber, isString } from 'lodash-es';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport ImageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmPictureProps from './picture.props';\nimport { DEFAULT_CLASS, WmPictureStyles } from './picture.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmPictureState extends BaseComponentState<WmPictureProps> {\n naturalImageWidth: number = 0;\n naturalImageHeight: number = 0;\n imageWidth: number = 0;\n imageHeight: number = 0;\n}\n\nexport default class WmPicture extends BaseComponent<WmPictureProps, WmPictureState, WmPictureStyles> {\n\n private _pictureSource = null as any;\n private _picturePlaceHolder = null as any;\n\n constructor(props: WmPictureProps) {\n super(props, DEFAULT_CLASS, new WmPictureProps());\n }\n\n loadImage(image: string | undefined) {\n if (!image || !this.loadAsset) {\n return null;\n }\n const imageSrc = this.loadAsset(image) as any;\n if (imageSrc && typeof imageSrc === 'object' && typeof imageSrc.default === 'function') {\n return null;\n }\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n } else if (imageSrc !== null) {\n const cancel = ImageSizeEstimator.getSize(imageSrc, (width: number, height: number) => {\n this.updateState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as WmPictureState);\n this.cleanup.splice(this.cleanup.indexOf(cancel), 1);\n });\n this.cleanup.push(cancel);\n }\n return imageSrc;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'picturesource':\n this._pictureSource = null;\n case 'pictureplaceholder':\n this._picturePlaceHolder = null;\n break;\n }\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let imageWidth = e.nativeEvent.layout.width;\n let imageHeight = e.nativeEvent.layout.height;\n if (!imageWidth && !imageHeight) {\n return;\n }\n if (!this.styles.root.height\n || (typeof this.styles.root.height === 'string'\n && !this.styles.root.height.includes('%'))) {\n imageHeight = 0;\n }\n if (imageWidth && !imageHeight) {\n imageHeight = imageWidth * this.state.naturalImageHeight / this.state.naturalImageWidth;\n } else if (imageHeight && !imageWidth) {\n imageWidth = imageHeight * this.state.naturalImageWidth / this.state.naturalImageHeight;\n }\n this.updateState({\n imageWidth: imageWidth,\n imageHeight: imageHeight\n } as WmPictureState);\n };\n\n createShape(shape: string | undefined, imageWidth?: number | string): WmPictureStyles {\n if (shape) {\n switch(shape) {\n case 'circle':\n return {\n picture: {\n borderRadius: isNumber(imageWidth) ? imageWidth / 2 : 4\n }\n } as WmPictureStyles;\n case 'rounded' :\n return (this.theme.getStyle('rounded-image') as WmPictureStyles);\n case 'thumbnail' :\n return (this.theme.getStyle('thumbnail-image') as WmPictureStyles);\n }\n }\n return {} as WmPictureStyles;\n }\n\n getElementToShow(props: WmPictureProps, imgSrc: any, shapeStyles: WmPictureStyles) {\n let elementToshow, source;\n if (imgSrc && typeof imgSrc === 'object' && typeof imgSrc?.default === 'function') {\n let imgStyle : any = {};\n if (props.resizemode === 'contain') {\n imgStyle['width'] = '100%';\n imgStyle['height'] = '100%';\n }\n elementToshow = React.createElement(imgSrc?.default, imgStyle);\n //} else if (!isWebPreviewMode() && props.isSvg) {\n // svg from uri\n // elementToshow = <SvgUri testID={this.getTestId('picture')} width={this.styles.root.width as NumberProp} height={this.styles.root.height as NumberProp} uri={imgSrc}/>;\n } else if (isFullPathUrl(imgSrc)) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n if (this.state.naturalImageWidth) {\n elementToshow = (\n <Image\n {...this.getTestProps('picture')}\n style={[this.styles.picture, shapeStyles.picture]}\n resizeMode={props.resizemode}\n source={source}\n {...getAccessibilityProps(AccessibilityWidgetType.PICTURE, props)}\n />\n );\n }\n return elementToshow;\n }\n\n public renderSkeleton(props: WmPictureProps){\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(this.props.shape, imageWidth);\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width || shapeStyles.root?.width || shapeStyles.picture?.width || imageWidth;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || shapeStyles.root?.height || shapeStyles.picture?.height || imageHeight;\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n borderRadius: this.props.shape == 'circle' && this.styles.root?.width ? 25 : shapeStyles.picture?.borderRadius || shapeStyles.root?.borderRadius || this.styles.root?.borderRadius || 4,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n showImage = (imageElement: any, props: WmPictureProps) => {\n if(props.fastload){\n return imageElement;\n }\n return this.state.imageWidth ? imageElement : null\n }\n\n renderWidget(props: WmPictureProps) {\n const imageWidth = this.state.imageWidth;\n const imageHeight = this.state.imageHeight;\n const shapeStyles = this.createShape(props.shape, imageWidth);\n this._pictureSource = this._pictureSource || this.loadImage(props.picturesource);\n this._picturePlaceHolder = props.fastload ? \n (this._pictureSource || this._picturePlaceHolder || this.loadImage(props.pictureplaceholder)) :\n (this._picturePlaceHolder || this.loadImage(props.pictureplaceholder));\n const imgSrc: any = this._pictureSource || this._picturePlaceHolder;\n let elementToshow;\n if (imgSrc) {\n elementToshow = this.getElementToShow(props, imgSrc, shapeStyles);\n }\n return imgSrc && (this.state.naturalImageWidth || props.isSvg) ? (\n <View style={[{\n width: imageWidth,\n height: imageHeight\n }, this.styles.root, shapeStyles.root, shapeStyles.picture]}>\n {this._background}\n <View style={[{overflow: 'hidden', width: '100%',\n height: '100%'}]} onLayout={this.onViewLayoutChange}>\n <Tappable\n {...this.getTestPropsForAction()}\n rippleColor={this.styles.root.rippleColor}\n target={this} styles={{width: imageWidth ? null : '100%', height: imageHeight ? null : '100%'}}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={[{\n height: imageHeight,\n width: imageWidth,\n borderRadius: shapeStyles.picture?.borderRadius\n }]}>\n {this.showImage(elementToshow, props)}\n </Animatedview>\n </Tappable>\n </View>\n </View>\n ): null;\n }\n}\n"],"m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,SAAS,CAAC3C,aAAa,EAAE5C,KAAK,CAC1B,CACN,CACN,CACF,CAAC,GACN,IAAI;EACT;AACF","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -17,6 +17,7 @@ export default class WmPictureProps extends BaseProps {
17
17
  _defineProperty(this, "accessibilitylabel", undefined);
18
18
  _defineProperty(this, "hint", undefined);
19
19
  _defineProperty(this, "accessibilityrole", 'image');
20
+ _defineProperty(this, "fastload", false);
20
21
  }
21
22
  }
22
23
  //# sourceMappingURL=picture.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmPictureProps","constructor","args","_defineProperty","undefined"],"sources":["picture.props.ts"],"sourcesContent":["import { AccessibilityRole, ImageResizeMode } from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPictureProps extends BaseProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n picturesource?: string = null as any;\n pictureplaceholder?: string = null as any;\n shape?: string = null as any;\n isSvg?: string = null as any;\n resizemode?: ImageResizeMode = 'stretch' as any;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'image';\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC/B,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,6BACC,IAAI;IAAAA,eAAA,gBACjB,IAAI;IAAAA,eAAA,gBACJ,IAAI;IAAAA,eAAA,qBACU,SAAS;IAAAA,eAAA,yBACd,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,6BACCC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,OAAO;EAAA;AACjD","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmPictureProps","constructor","args","_defineProperty","undefined"],"sources":["picture.props.ts"],"sourcesContent":["import { AccessibilityRole, ImageResizeMode } from 'react-native';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPictureProps extends BaseProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n picturesource?: string = null as any;\n pictureplaceholder?: string = null as any;\n shape?: string = null as any;\n isSvg?: string = null as any;\n resizemode?: ImageResizeMode = 'stretch' as any;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'image';\n fastload?: boolean = false;\n}\n"],"mappings":";;;AACA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC/B,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,6BACC,IAAI;IAAAA,eAAA,gBACjB,IAAI;IAAAA,eAAA,gBACJ,IAAI;IAAAA,eAAA,qBACU,SAAS;IAAAA,eAAA,yBACd,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,6BACCC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,OAAO;IAAAA,eAAA,mBAC1B,KAAK;EAAA;AAC5B","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
3
  import { View } from 'react-native';
4
4
  import { ProgressBar } from 'react-native-paper';
@@ -38,7 +38,7 @@ export default class WmProgressBar extends BaseComponent {
38
38
  }
39
39
  }
40
40
  }, /*#__PURE__*/React.createElement(ProgressBar, _extends({}, this.getTestPropsForAction('progressbar'), getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props), {
41
- progress: value,
41
+ animatedValue: value,
42
42
  color: styles.progressValue.color,
43
43
  style: [styles.progressBar, {
44
44
  height: styles.root.height || styles.progressBar.height
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","ProgressBar","LinearGradient","ExpoLinearGradient","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressBarProps","DEFAULT_CLASS","parseLinearGradient","WmProgressBarState","WmProgressBar","constructor","props","renderWidget","_styles$root","_styles$progressBar","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","hasLinearGradient","color1","color2","start","end","root","progressBar","backgroundColor","gradientColors","valuePercent","Math","round","createElement","style","_background","target","width","height","_extends","getTestPropsForAction","PROGRESSBAR","progress","color","progressValue","colors","position","borderRadius","Fragment"],"sources":["progress-bar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ProgressBar } from 'react-native-paper';\nimport { LinearGradient as ExpoLinearGradient } from 'expo-linear-gradient';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmProgressBarProps from './progress-bar.props';\nimport { DEFAULT_CLASS, WmProgressBarStyles } from './progress-bar.styles';\nimport { parseLinearGradient } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmProgressBarState extends BaseComponentState<WmProgressBarProps> {}\n\nexport default class WmProgressBar extends BaseComponent<WmProgressBarProps, WmProgressBarState, WmProgressBarStyles> {\n\n constructor(props: WmProgressBarProps) {\n super(props, DEFAULT_CLASS, new WmProgressBarProps());\n }\n\n renderWidget(props: WmProgressBarProps) {\n let value = (props.datavalue - props.minvalue) / (props.maxvalue - props.minvalue);\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-bar`), this.styles);\n const {hasLinearGradient, color1, color2, start, end} = parseLinearGradient(styles?.root?.progressBar?.backgroundColor as string);\n const gradientColors = [color1, color2];\n const valuePercent = `${Math.round(value * 100)}%`;\n\n return (\n <View style={styles.root}>\n {this._background}\n <Tappable target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <ProgressBar\n {...this.getTestPropsForAction('progressbar')}\n {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props)}\n progress={value}\n color={styles.progressValue.color}\n style={[styles.progressBar, {height: styles.root.height || styles.progressBar.height}]}></ProgressBar>\n {hasLinearGradient ? (\n <ExpoLinearGradient\n colors={gradientColors}\n start={start}\n end={end}\n style={[\n {\n width: valuePercent as any,\n height: styles.root.height || styles.progressBar.height,\n position: 'absolute',\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AAM;QACvDQ,QAAQ,EAAE,UAAU;QACpBC,YAAY,EAAE,CAAA/B,MAAM,aAANA,MAAM,gBAAAL,mBAAA,GAANK,MAAM,CAAEW,WAAW,cAAAhB,mBAAA,uBAAnBA,mBAAA,CAAqBoC,YAAY,KAAI;MACrD,CAAC;IACD,CACH,CAAC,gBAEFvD,KAAA,CAAAyC,aAAA,CAAAzC,KAAA,CAAAwD,QAAA,MAAI,CAEA,CACN,CAAC;EACT;AAEF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","ProgressBar","LinearGradient","ExpoLinearGradient","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressBarProps","DEFAULT_CLASS","parseLinearGradient","WmProgressBarState","WmProgressBar","constructor","props","renderWidget","_styles$root","_styles$progressBar","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","hasLinearGradient","color1","color2","start","end","root","progressBar","backgroundColor","gradientColors","valuePercent","Math","round","createElement","style","_background","target","width","height","_extends","getTestPropsForAction","PROGRESSBAR","animatedValue","color","progressValue","colors","position","borderRadius","Fragment"],"sources":["progress-bar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ProgressBar } from 'react-native-paper';\nimport { LinearGradient as ExpoLinearGradient } from 'expo-linear-gradient';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmProgressBarProps from './progress-bar.props';\nimport { DEFAULT_CLASS, WmProgressBarStyles } from './progress-bar.styles';\nimport { parseLinearGradient } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmProgressBarState extends BaseComponentState<WmProgressBarProps> {}\n\nexport default class WmProgressBar extends BaseComponent<WmProgressBarProps, WmProgressBarState, WmProgressBarStyles> {\n\n constructor(props: WmProgressBarProps) {\n super(props, DEFAULT_CLASS, new WmProgressBarProps());\n }\n\n renderWidget(props: WmProgressBarProps) {\n let value = (props.datavalue - props.minvalue) / (props.maxvalue - props.minvalue);\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-bar`), this.styles);\n const {hasLinearGradient, color1, color2, start, end} = parseLinearGradient(styles?.root?.progressBar?.backgroundColor as string);\n const gradientColors: [string, string, ...string[]] = [color1, color2];\n const valuePercent = `${Math.round(value * 100)}%`;\n\n return (\n <View style={styles.root}>\n {this._background}\n <Tappable target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <ProgressBar\n {...this.getTestPropsForAction('progressbar')}\n {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props)}\n animatedValue={value}\n color={styles.progressValue.color}\n style={[styles.progressBar, {height: styles.root.height || styles.progressBar.height}]}></ProgressBar>\n {hasLinearGradient ? (\n <ExpoLinearGradient\n colors={gradientColors}\n start={start}\n end={end}\n style={[\n {\n width: valuePercent as any,\n height: styles.root.height || styles.progressBar.height,\n position: 'absolute',\n borderRadius: styles?.progressBar?.borderRadius || 0,\n },\n ]}\n />\n ) : (\n <></>\n )}\n </Tappable>\n </View>); \n }\n\n}"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,cAAc,IAAIC,kBAAkB,QAAQ,sBAAsB;AAC3E,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,SAASC,mBAAmB,QAAQ,sCAAsC;AAE1E,OAAO,MAAMC,kBAAkB,SAASN,kBAAkB,CAAqB;AAE/E,eAAe,MAAMO,aAAa,SAASR,a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WAAW,EAAA6C,QAAA,KACN,IAAI,CAACC,qBAAqB,CAAC,aAAa,CAAC,EACzCvC,qBAAqB,CAACD,uBAAuB,CAACyC,WAAW,EAAEjC,KAAK,CAAC;MACrEkC,aAAa,EAAE9B,KAAM;MACrB+B,KAAK,EAAE3B,MAAM,CAAC4B,aAAa,CAACD,KAAM;MAClCT,KAAK,EAAE,CAAClB,MAAM,CAACW,WAAW,EAAE;QAACW,MAAM,EAAEtB,MAAM,CAACU,IAAI,CAACY,MAAM,IAAItB,MAAM,CAACW,WAAW,CAACW;MAAM,CAAC;IAAE,EAAc,CAAC,EACrGjB,iBAAiB,gBAChB7B,KAAA,CAAAyC,aAAA,CAACrC,kBAAkB;MACjBiD,MAAM,EAAEhB,cAAe;MACvBL,KAAK,EAAEA,KAAM;MACbC,GAAG,EAAEA,GAAI;MACTS,KAAK,EAAE,CACL;QACEG,KAAK,EAAEP,YAAmB;QAC1BQ,MAAM,EAAEtB,MAAM,CAACU,IAAI,CAACY,MAAM,IAAItB,MAAM,CAACW,WAAW,CAACW,MAAM;QACvDQ,QAAQ,EAAE,UAAU;QACpBC,YAAY,EAAE,CAAA/B,MAAM,aAANA,MAAM,gBAAAL,mBAAA,GAANK,MAAM,CAAEW,WAAW,cAAAhB,mBAAA,uBAAnBA,mBAAA,CAAqBoC,YAAY,KAAI;MACrD,CAAC;IACD,CACH,CAAC,gBAEFvD,KAAA,CAAAyC,aAAA,CAAAzC,KAAA,CAAAwD,QAAA,MAAI,CAEA,CACN,CAAC;EACT;AAEF","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { filter, includes, values, isNumber, split, toLower, get, toString, isArray, isObject, isString } from 'lodash';
@@ -1,5 +1,5 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -187,7 +187,7 @@ export default class WmSearch extends BaseDatasetComponent {
187
187
  }
188
188
  onFocus() {
189
189
  this.isFocused = true;
190
- if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {
190
+ if (!(this.state.props.disabled || this.state.props.readonly) && this.state.props.type === 'autocomplete') {
191
191
  var _this$state$props$que;
192
192
  this.cursor = ((_this$state$props$que = this.state.props.query) === null || _this$state$props$que === void 0 ? void 0 : _this$state$props$que.length) || 0;
193
193
  this.updateFilteredData(this.state.props.query || '');
@@ -321,7 +321,7 @@ export default class WmSearch extends BaseDatasetComponent {
321
321
  this.searchInputWidth = e.nativeEvent.layout.width;
322
322
  },
323
323
  onBlur: this.onBlur.bind(this)
324
- }, opts)), props.showclear && this.state.props.query ? /*#__PURE__*/React.createElement(WmButton, {
324
+ }, opts)), props.showclear && !(this.state.props.disabled || this.state.props.readonly) && this.state.props.query ? /*#__PURE__*/React.createElement(WmButton, {
325
325
  onTap: this.clearSearch.bind(this),
326
326
  id: this.getTestId('clear'),
327
327
  styles: this.styles.clearButton,
@@ -406,7 +406,7 @@ export default class WmSearch extends BaseDatasetComponent {
406
406
  renderWidget(props) {
407
407
  const result = this.state.data;
408
408
  return /*#__PURE__*/React.createElement(View, null, this.renderSearchBar(), this.state.isOpened ? /*#__PURE__*/React.createElement(ModalConsumer, null, modalService => {
409
- modalService.showModal(this.prepareModalOptions( /*#__PURE__*/React.createElement(ScrollView, {
409
+ modalService.showModal(this.prepareModalOptions(/*#__PURE__*/React.createElement(ScrollView, {
410
410
  style: {
411
411
  width: '100%',
412
412
  maxHeight: 200