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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +31 -5
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  9. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  11. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  12. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  13. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  14. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.component.js +20 -6
  16. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  17. app-rn-runtime/components/basic/icon/icon.component.js +14 -6
  18. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  19. app-rn-runtime/components/basic/label/label.component.js +13 -3
  20. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  21. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  22. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  23. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  24. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  25. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  26. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  27. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  28. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  29. app-rn-runtime/components/basic/search/search.component.js +9 -0
  30. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  31. app-rn-runtime/components/basic/search/search.props.js +2 -0
  32. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  33. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  34. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  35. app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
  36. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  37. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  38. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  39. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  40. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  41. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  42. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  44. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  45. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  46. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  47. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  48. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  49. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  50. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  51. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  52. app-rn-runtime/components/chart/basechart.component.js +54 -2
  53. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  54. app-rn-runtime/components/chart/basechart.props.js +3 -2
  55. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  56. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  57. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  58. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  59. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  60. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  61. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  62. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  63. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  64. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  65. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  66. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  67. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  68. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  69. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  70. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +6 -2
  71. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  72. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  73. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  74. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  75. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  76. app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
  77. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  78. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  79. app-rn-runtime/components/container/accordion/accordion.styles.js +5 -0
  80. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  81. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  82. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  83. app-rn-runtime/components/container/container.component.js +36 -2
  84. app-rn-runtime/components/container/container.component.js.map +1 -1
  85. app-rn-runtime/components/container/container.styles.js +7 -0
  86. app-rn-runtime/components/container/container.styles.js.map +1 -1
  87. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  88. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  89. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  90. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  91. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  92. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  93. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  94. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  95. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  96. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  97. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  98. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  99. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  100. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  101. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  102. app-rn-runtime/components/container/panel/panel.component.js +47 -6
  103. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  104. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  105. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  106. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  107. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  108. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +3 -4
  109. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  110. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  111. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  112. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  113. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  114. app-rn-runtime/components/container/tabs/tabs.component.js +41 -5
  115. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  116. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  117. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  118. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  119. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  120. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  121. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  122. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  123. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  124. app-rn-runtime/components/container/wizard/wizard.component.js +62 -13
  125. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  126. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  127. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  128. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  129. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
  130. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  131. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  132. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  133. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  134. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  135. app-rn-runtime/components/data/card/card.component.js +18 -0
  136. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  137. app-rn-runtime/components/data/card/card.styles.js +3 -0
  138. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  139. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  140. app-rn-runtime/components/data/form/form.component.js +1 -1
  141. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  142. app-rn-runtime/components/data/form/form.props.js +1 -0
  143. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  144. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  145. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  146. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  147. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  148. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  149. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  150. app-rn-runtime/components/data/list/list.component.js +54 -33
  151. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  152. app-rn-runtime/components/data/list/list.props.js +1 -0
  153. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  154. app-rn-runtime/components/data/list/list.styles.js +9 -0
  155. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  156. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  157. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  158. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  159. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  160. app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
  161. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  162. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  163. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  164. app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
  165. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  166. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  167. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  168. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
  169. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  170. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  171. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
  172. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  173. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  174. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  175. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  176. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  177. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  178. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  179. app-rn-runtime/components/input/currency/currency.component.js +16 -1
  180. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  181. app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
  182. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  183. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  184. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  185. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  187. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  189. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  190. app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
  191. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  192. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
  193. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  194. app-rn-runtime/components/input/number/number.component.js +6 -3
  195. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  196. app-rn-runtime/components/input/radioset/radioset.component.js +27 -7
  197. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  198. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  199. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  200. app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
  201. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  202. app-rn-runtime/components/input/select/select.component.js +23 -9
  203. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  204. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  205. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  206. app-rn-runtime/components/input/text/text.component.js +21 -0
  207. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  208. app-rn-runtime/components/input/text/text.props.js +2 -0
  209. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  210. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  211. app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
  212. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  213. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  214. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  215. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  216. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  217. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  218. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  219. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  220. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  221. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  222. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  223. app-rn-runtime/components/page/content/content.component.js +19 -4
  224. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  225. app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
  226. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  227. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  228. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  229. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  230. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  231. app-rn-runtime/components/page/page.component.js.map +1 -1
  232. app-rn-runtime/components/page/page.props.js.map +1 -1
  233. app-rn-runtime/components/page/page.styles.js +7 -1
  234. app-rn-runtime/components/page/page.styles.js.map +1 -1
  235. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  236. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  237. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  238. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  239. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  240. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  241. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  242. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  243. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  244. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  245. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  246. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  247. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  248. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  249. app-rn-runtime/core/base.component.js +5 -3
  250. app-rn-runtime/core/base.component.js.map +1 -1
  251. app-rn-runtime/core/components/textinput.component.js +4 -3
  252. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  253. app-rn-runtime/core/formatters.js.map +1 -1
  254. app-rn-runtime/core/key.extractor.js.map +1 -1
  255. app-rn-runtime/core/props.provider.js +4 -1
  256. app-rn-runtime/core/props.provider.js.map +1 -1
  257. app-rn-runtime/core/storage.service.js.map +1 -1
  258. app-rn-runtime/core/tappable.component.js +34 -27
  259. app-rn-runtime/core/tappable.component.js.map +1 -1
  260. app-rn-runtime/core/ui-preferences.context.js +7 -0
  261. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  262. app-rn-runtime/core/utils.js +87 -4
  263. app-rn-runtime/core/utils.js.map +1 -1
  264. app-rn-runtime/package.json +30 -7
  265. app-rn-runtime/runtime/App.js +4 -8
  266. app-rn-runtime/runtime/App.js.map +1 -1
  267. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  268. app-rn-runtime/runtime/base-fragment.component.js +43 -13
  269. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  270. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  271. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  272. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  273. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  274. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  275. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  276. app-rn-runtime/runtime/services/app-security.service.js +42 -2
  277. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  278. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  279. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  280. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  281. app-rn-runtime/runtime/watcher.js.map +1 -1
  282. app-rn-runtime/styles/background.component.js +1 -0
  283. app-rn-runtime/styles/background.component.js.map +1 -1
  284. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  285. app-rn-runtime/styles/theme.js +5 -0
  286. app-rn-runtime/styles/theme.js.map +1 -1
  287. app-rn-runtime/styles/theme.variables.js +1 -0
  288. app-rn-runtime/styles/theme.variables.js.map +1 -1
  289. app-rn-runtime/variables/base-variable.js.map +1 -1
  290. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  291. app-rn-runtime/variables/device-variable.js.map +1 -1
  292. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","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","testID","getTestId","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 testID={this.getTestId('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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,CAAC;MAChCC,WAAW,EAAE,IAAI,CAACxE,MAAM,CAACC,IAAI,CAACuE,WAAY;MAC1CC,MAAM,EAAE,IAAK;MAACzE,MAAM,EAAE;QAACH,KAAK,EAAEH,UAAU,GAAG,IAAI,GAAG,MAAM;QAAEK,MAAM,EAAED,WAAW,GAAG,IAAI,GAAG;MAAM;IAAE,iBAC/F1B,KAAA,CAAAkE,aAAA,CAACrD,YAAY;MAACyF,cAAc,EAAElF,KAAK,CAACmF,SAAU;MAACC,KAAK,EAAEpF,KAAK,CAACqF,cAAe;MAAClC,KAAK,EAAE,CAAC;QAC9E5C,MAAM,EAAED,WAAW;QACnBD,KAAK,EAAEH,UAAU;QACjBkC,YAAY,GAAAmC,qBAAA,GAAE9B,WAAW,CAACN,OAAO,cAAAoC,qBAAA,uBAAnBA,qBAAA,CAAqBnC;MACrC,CAAC;IAAE,GACF,IAAI,CAACzB,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","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,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BA,qBAAA,CAAqBlC;MACrC,CAAC;IAAE,GACF,IAAI,CAACzB,KAAK,CAACT,UAAU,GAAGwC,aAAa,GAAG,IAC7B,CACN,CACN,CACF,CAAC,GACN,IAAI;EACT;AACF","ignoreList":[]}
@@ -29,7 +29,7 @@ export default class WmProgressBar extends BaseComponent {
29
29
  const valuePercent = `${Math.round(value * 100)}%`;
30
30
  return /*#__PURE__*/React.createElement(View, {
31
31
  style: styles.root
32
- }, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
32
+ }, this._background, /*#__PURE__*/React.createElement(Tappable, {
33
33
  target: this,
34
34
  styles: {
35
35
  root: {
@@ -37,7 +37,7 @@ export default class WmProgressBar extends BaseComponent {
37
37
  height: '100%'
38
38
  }
39
39
  }
40
- }), /*#__PURE__*/React.createElement(ProgressBar, _extends({}, getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props), {
40
+ }, /*#__PURE__*/React.createElement(ProgressBar, _extends({}, this.getTestPropsForAction('progressbar'), getAccessibilityProps(AccessibilityWidgetType.PROGRESSBAR, props), {
41
41
  progress: value,
42
42
  color: styles.progressValue.color,
43
43
  style: [styles.progressBar, {
@@ -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","_extends","getTestPropsForAction","target","width","height","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 {...this.getTestPropsForAction()} target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <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',\n borderRadius: styles?.progressBar?.borderRadius || 0,\n },\n ]}\n />\n ) : (\n <></>\n )}\n </Tappable>\n </View>); \n }\n\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cA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qBoC,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","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',\n borderRadius: styles?.progressBar?.borderRadius || 0,\n },\n ]}\n />\n ) : (\n <></>\n )}\n </Tappable>\n </View>); \n }\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,aAAa,CAA8D;EAEpHS,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,CAAC;EACvD;EAEAO,YAAYA,CAACD,KAAyB,EAAE;IAAA,IAAAE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AE3B,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":[]}
@@ -46,7 +46,7 @@ export default class WmProgressCircle extends BaseComponent {
46
46
  return /*#__PURE__*/React.createElement(View, _extends({
47
47
  style: styles.root,
48
48
  onLayout: this.onLayout.bind(this)
49
- }, getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)), this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
49
+ }, getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props), this.getTestPropsForAction('progresscircle')), this._background, /*#__PURE__*/React.createElement(Tappable, {
50
50
  target: this,
51
51
  styles: {
52
52
  root: {
@@ -54,7 +54,7 @@ export default class WmProgressCircle extends BaseComponent {
54
54
  height: '100%'
55
55
  }
56
56
  }
57
- }), /*#__PURE__*/React.createElement(AnimatedCircularProgress, {
57
+ }, /*#__PURE__*/React.createElement(AnimatedCircularProgress, {
58
58
  fill: value,
59
59
  width: styles.progressValue.height,
60
60
  backgroundWidth: styles.progressValue.height,
@@ -67,11 +67,11 @@ export default class WmProgressCircle extends BaseComponent {
67
67
  style: {
68
68
  alignItems: 'center'
69
69
  }
70
- }, /*#__PURE__*/React.createElement(Text, {
70
+ }, /*#__PURE__*/React.createElement(Text, _extends({
71
71
  style: styles.text
72
- }, showText ? props.title || value : ''), showText && props.subtitle ? /*#__PURE__*/React.createElement(Text, {
72
+ }, this.getTestPropsForLabel('title')), showText ? props.title || value : ''), showText && props.subtitle ? /*#__PURE__*/React.createElement(Text, _extends({
73
73
  style: styles.subTitle
74
- }, props.subtitle) : null))));
74
+ }, this.getTestPropsForLabel('subtitle')), props.subtitle) : null))));
75
75
  }
76
76
  }
77
77
  //# sourceMappingURL=progress-circle.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","args","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","_extends","style","root","bind","PROGRESSCIRCLE","_background","getTestPropsForAction","target","fill","progressValue","backgroundWidth","rotation","tintColor","backgroundColor","lineCap","buttStyle","progressCircle","size","alignItems","text","title","subtitle","subTitle"],"sources":["progress-circle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { isNumber } from 'lodash';\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\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 WmProgressCircleProps from './progress-circle.props';\nimport { DEFAULT_CLASS, WmProgressCircleStyles } from './progress-circle.styles';\n\n\nexport class WmProgressCircleState extends BaseComponentState<WmProgressCircleProps> {\n radius = 10;\n}\n\nexport default class WmProgressCircle extends BaseComponent<WmProgressCircleProps, WmProgressCircleState, WmProgressCircleStyles> {\n\n constructor(props: WmProgressCircleProps) {\n super(props, DEFAULT_CLASS, new WmProgressCircleProps(), new WmProgressCircleState());\n }\n\n onLayout(e: LayoutChangeEvent) {\n const width = e.nativeEvent.layout.width;\n const height = e.nativeEvent.layout.height;\n let radius = this.state.radius;\n if (!width) {\n radius = height;\n } else if (!height) {\n radius = width;\n } else {\n radius = Math.min(width, height);\n }\n this.updateState({\n radius: radius\n } as WmProgressCircleState);\n }\n\n renderWidget(props: WmProgressCircleProps) {\n let value = 0;\n if (isNumber(props.datavalue) && isNumber(props.minvalue) && isNumber(props.maxvalue)) {\n value = (+props.datavalue - (+props.minvalue)) / (+props.maxvalue - (+props.minvalue)) * 100;\n }\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);\n const showText = props.captionplacement !== 'hidden';\n return (\n <View style={styles.root} onLayout={this.onLayout.bind(this)} {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <AnimatedCircularProgress\n fill={value}\n width={styles.progressValue.height}\n backgroundWidth={styles.progressValue.height}\n rotation={0}\n tintColor={styles.progressValue.backgroundColor}\n lineCap={styles.progressValue.buttStyle || \"butt\"}\n backgroundColor={styles.progressCircle.backgroundColor}\n size={this.state.radius}>\n {(fill) => (<View style={{alignItems: 'center'}}>\n <Text style={styles.text}>{ showText ? props.title || value : '' }</Text>\n {showText && props.subtitle ? (<Text style={styles.subTit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IAAI,EAAEpB,KAAM;MACZV,KAAK,EAAEc,MAAM,CAACiB,aAAa,CAAC5B,MAAO;MACnC6B,eAAe,EAAElB,MAAM,CAACiB,aAAa,CAAC5B,MAAO;MAC7C8B,QAAQ,EAAE,CAAE;MACZC,SAAS,EAAEpB,MAAM,CAACiB,aAAa,CAACI,eAAgB;MAChDC,OAAO,EAAEtB,MAAM,CAACiB,aAAa,CAACM,SAAS,IAAI,MAAO;MAClDF,eAAe,EAAErB,MAAM,CAACwB,cAAc,CAACH,eAAgB;MACvDI,IAAI,EAAE,IAAI,CAAClC,KAAK,CAACD;IAAO,GACpB0B,IAAI,iBAAMlD,KAAA,CAAAyC,aAAA,CAACxC,IAAI;MAAC0C,KAAK,EAAE;QAACiB,UAAU,EAAE;MAAQ;IAAE,gBAClC5D,KAAA,CAAAyC,aAAA,CAACvC,IAAI;MAACyC,KAAK,EAAET,MAAM,CAAC2B;IAAK,GAAGtB,QAAQ,GAAGtB,KAAK,CAAC6C,KAAK,IAAIhC,KAAK,GAAG,EAAU,CAAC,EACxES,QAAQ,IAAItB,KAAK,CAAC8C,QAAQ,gBAAI/D,KAAA,CAAAyC,aAAA,CAACvC,IAAI;MAACyC,KAAK,EAAET,MAAM,CAAC8B;IAAS,GAAG/C,KAAK,CAAC8C,QAAgB,CAAC,GAAI,IACtF,CACI,CAClB,CACN,CAAC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","isNumber","AnimatedCircularProgress","Tappable","BaseComponent","BaseComponentState","AccessibilityWidgetType","getAccessibilityProps","WmProgressCircleProps","DEFAULT_CLASS","WmProgressCircleState","constructor","args","_defineProperty","WmProgressCircle","props","onLayout","e","width","nativeEvent","layout","height","radius","state","Math","min","updateState","renderWidget","value","datavalue","minvalue","maxvalue","styles","theme","mergeStyle","getStyle","type","showText","captionplacement","createElement","_extends","style","root","bind","PROGRESSCIRCLE","getTestPropsForAction","_background","target","fill","progressValue","backgroundWidth","rotation","tintColor","backgroundColor","lineCap","buttStyle","progressCircle","size","alignItems","text","getTestPropsForLabel","title","subtitle","subTitle"],"sources":["progress-circle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { isNumber } from 'lodash';\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\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 WmProgressCircleProps from './progress-circle.props';\nimport { DEFAULT_CLASS, WmProgressCircleStyles } from './progress-circle.styles';\n\n\nexport class WmProgressCircleState extends BaseComponentState<WmProgressCircleProps> {\n radius = 10;\n}\n\nexport default class WmProgressCircle extends BaseComponent<WmProgressCircleProps, WmProgressCircleState, WmProgressCircleStyles> {\n\n constructor(props: WmProgressCircleProps) {\n super(props, DEFAULT_CLASS, new WmProgressCircleProps(), new WmProgressCircleState());\n }\n\n onLayout(e: LayoutChangeEvent) {\n const width = e.nativeEvent.layout.width;\n const height = e.nativeEvent.layout.height;\n let radius = this.state.radius;\n if (!width) {\n radius = height;\n } else if (!height) {\n radius = width;\n } else {\n radius = Math.min(width, height);\n }\n this.updateState({\n radius: radius\n } as WmProgressCircleState);\n }\n\n renderWidget(props: WmProgressCircleProps) {\n let value = 0;\n if (isNumber(props.datavalue) && isNumber(props.minvalue) && isNumber(props.maxvalue)) {\n value = (+props.datavalue - (+props.minvalue)) / (+props.maxvalue - (+props.minvalue)) * 100;\n }\n const styles = this.theme.mergeStyle(this.theme.getStyle(`app-${props.type}-progress-circle`), this.styles);\n const showText = props.captionplacement !== 'hidden';\n return (\n <View style={styles.root} onLayout={this.onLayout.bind(this)} {...getAccessibilityProps(AccessibilityWidgetType.PROGRESSCIRCLE, props)} {...this.getTestPropsForAction('progresscircle')}>\n {this._background}\n <Tappable target={this} styles={{root:{width: '100%', height: '100%'}}}>\n <AnimatedCircularProgress\n fill={value}\n width={styles.progressValue.height}\n backgroundWidth={styles.progressValue.height}\n rotation={0}\n tintColor={styles.progressValue.backgroundColor}\n lineCap={styles.progressValue.buttStyle || \"butt\"}\n backgroundColor={styles.progressCircle.backgroundColor}\n size={this.state.radius}>\n {(fill) => (<View style={{alignItems: 'center'}}>\n <Text style={styles.text} {...this.getTestPropsForLabel('title')}>{ showText ? props.title || value : '' }</Text>\n {showText && props.subtitle ? (<Text style={styles.subTitle} {...this.getTestPropsForLabel('subtitle')}>{ props.subtitle }</Text>) : null}\n </View>)} \n </AnimatedCircularProgress>\n </Tappable>\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,QAAQ,QAAQ,QAAQ;AACjC,SAASC,wBAAwB,QAAQ,gCAAgC;AACzE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,SAASC,aAAa,QAAgC,0BAA0B;AAGhF,OAAO,MAAMC,qBAAqB,SAASL,kBAAkB,CAAwB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,iBAC1E,EAAE;EAAA;AACb;AAEA,eAAe,MAAMC,gBAAgB,SAASV,aAAa,CAAuE;EAEhIO,WAAWA,CAACI,KAA4B,EAAE;IACxC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,qBAAqB,CAAC,CAAC,EAAE,IAAIE,qBAAqB,CAAC,CAAC,CAAC;EACvF;EAEAM,QAAQA,CAACC,CAAoB,EAAE;IAC7B,MAAMC,KAAK,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACF,KAAK;IACxC,MAAMG,MAAM,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AC+C,QAAgB,CAAC,GAAI,IACjI,CACI,CAClB,CACN,CAAC;EACT;AACF","ignoreList":[]}
@@ -18,6 +18,7 @@ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
18
18
  import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
19
19
  import { get, isArray, isEmpty, isObject } from "lodash-es";
20
20
  import { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';
21
+ import { createSkeleton } from '../skeleton/skeleton.component';
21
22
  export class WmSearchState extends BaseDatasetState {
22
23
  constructor(...args) {
23
24
  super(...args);
@@ -270,6 +271,14 @@ export default class WmSearch extends BaseDatasetComponent {
270
271
  }
271
272
  this.hide();
272
273
  }
274
+ renderSkeleton(props) {
275
+ const rootStyle = {
276
+ ...this.styles.searchInputWrapper,
277
+ ...this.styles.root,
278
+ ...this.styles.text
279
+ };
280
+ return createSkeleton(this.theme, this.styles.skeleton, rootStyle);
281
+ }
273
282
  renderSearchBar() {
274
283
  var _this$state$dataItems;
275
284
  const props = this.state.props;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","root","ref","onLayout","searchInputWrapper","_extends","text","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxE,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAE7E,OAAO,MAAMC,aAAa,SAASV,gBAAgB,CAAgB;EAAAW,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAC7C,KAAK;IAAAA,eAAA,uBACV,CAAC,CAAC;IAAAA,eAAA,mBACE,EAAE;IAAAA,eAAA,mBACV;MACTC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE;IACR,CAAC;IAAAF,eAAA,eACW,EAAE;EAAA;AAChB;AASA,eAAe,MAAMG,QAAQ,SAASjB,oBAAoB,CAA+C;EAYvGY,WAAWA,CAACM,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEvB,aAAa,EAAE,IAAID,aAAa,C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C,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","createSkeleton","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSkeleton","rootStyle","searchInputWrapper","root","text","theme","skeleton","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","ref","onLayout","_extends","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n public renderSkeleton(props: WmSearchProps): React.ReactNode {\n \n const rootStyle = {\n ...this.styles.searchInputWrapper, \n ...this.styles.root, \n ...this.styles.text\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, rootStyle)\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;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ACP,CACc,CACP,CAAC,EACZ,IAAI,CAACrG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
@@ -28,6 +28,8 @@ export default class WmSearchProps extends BaseDatasetProps {
28
28
  _defineProperty(this, "hint", undefined);
29
29
  _defineProperty(this, "accessibilityrole", 'search');
30
30
  _defineProperty(this, "renderitempartial", void 0);
31
+ _defineProperty(this, "skeletonheight", null);
32
+ _defineProperty(this, "skeletonwidth", null);
31
33
  }
32
34
  }
33
35
  //# sourceMappingURL=search.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;EAAA;AAElD","ignoreList":[]}
1
+ {"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;IAAAA,eAAA,yBAEtB,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
@@ -108,6 +108,11 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
108
108
  },
109
109
  placeholderText: {
110
110
  color: themeVariables.inputPlaceholderColor
111
+ },
112
+ skeleton: {
113
+ root: {
114
+ height: 56
115
+ }
111
116
  }
112
117
  });
113
118
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAE,MAAM;MACbC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBC,mBAAmB,EAAE,EAAE;MACvBC,sBAAsB,EAAE,EAAE;MAC1BC,WAAW,EAAEjB,cAAc,CAACkB,iBAAiB;MAC7CC,eAAe,EAAEnB,cAAc,CAACoB;IAClC,CAAC;IACHC,OAAO,EAAE;MACPC,iBAAiB,EAA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F,YAAY,EAAE;MACZrC,IAAI,EAAE;QACJsC,oBAAoB,EAAE,CAAC;QACvBC,uBAAuB,EAAE;MAC3B;IACF;EACF,CAAC,GAAC/C,QAAQ,CAACsE,EAAE,IAAE,KAAK,GAAC;IACnB3D,IAAI,EAAG;MACL4D,SAAS,EAAE,OAAO;MAClBrD,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBqD,eAAe,EAAE,CAAC;MAClBpD,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzByB,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAC;IACDF,YAAY,EAAE;MACZrC,IAAI,EAAE;QACJsC,oBAAoB,EAAE,CAAC;QACvBC,uBAAuB,EAAE,CAAC;QAC1B3B,mBAAmB,EAAE,CAAC;QACtBC,sBAAsB,EAAE;MAC1B;IACF,CAAC;IACDoB,WAAW,EAAE;MACXjC,IAAI,EAAE;QACJiE,IAAI,EAAE,CAAC;QACPvC,QAAQ,EAAE,UAAU;QACpBQ,UAAU,EAAE;MACd;IACF;EACF,CAAC,GAAC;IACA/B,IAAI,EAAG;MACL4D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFjE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB2B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","skeleton","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n height: 56\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAmBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAE,MAAM;MACbC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBC,mBAAmB,EAAE,EAAE;MACvBC,sBAAsB,EA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: this.onLayoutChange,
101
101
  style: this.styles.root
102
- }, this.state.animate ? /*#__PURE__*/React.createElement(Animated.View, {
102
+ }, props.children, this.state.animate ? /*#__PURE__*/React.createElement(Animated.View, {
103
103
  style: [StyleSheet.absoluteFill, this.styles.animatedView, {
104
104
  transform: [{
105
105
  translateX
@@ -124,7 +124,7 @@ export default class WmSkeleton extends BaseComponent {
124
124
  })) : null);
125
125
  }
126
126
  }
127
- export const createSkeleton = (theme, skeletonStyles, wrapper) => {
127
+ export const createSkeleton = (theme, skeletonStyles, wrapper, children) => {
128
128
  const style = {};
129
129
  const addStyleProp = propName => {
130
130
  if (!isUndefined(wrapper[propName])) {
@@ -142,7 +142,8 @@ export const createSkeleton = (theme, skeletonStyles, wrapper) => {
142
142
  return /*#__PURE__*/React.createElement(WmSkeleton, {
143
143
  styles: theme.mergeStyle(skeletonStyles, {
144
144
  root: style
145
- })
145
+ }),
146
+ children: children
146
147
  });
147
148
  };
148
149
  //# sourceMappingURL=skeleton.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,eAAe,SAASJ,k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ated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","children","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {props.children}\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle, children?: React.ReactNode) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})} children={children}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,iBAC9D;MACPC,IAAI,EAAE,CAAC;MACPC,GAAG,EAAE,CAAC;MACNC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACV,CAAC;IAAAJ,eAAA,kBACS,KAAK;EAAA;AACjB;AAEA,MAAMK,eAAe,CAAC;EAAAP,YAAA;IAAAE,eAAA,eACG,IAAI;IAAAA,eAAA,gBACZ,CAAC;IAAAA,eAAA,kBACE,CAAC;IAAAA,eAAA,yBACM,IAAIZ,QAAQ,CAACkB,KAAK,CAAC,GAAG,CAAC;EAAA;EAEzCC,GAAGA,CAAA,EAAG;IACX,IAAI,IAAI,CAACC,OAAO,IAAI,CAAC,EAAE;MACrB;IACF;IACApB,QAAQ,CAACqB,MAAM,CAAC,IAAI,CAACC,cAAc,EAAE;MACnCC,QAAQ,EAAE,IAAI,CAACC,IAAI,GAAG,IAAI,CAACC,KAAK;MAChCC,OAAO,EAA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GAAIC,QAAa,IAAK;IACtC,IAAI,CAAChF,WAAW,CAAE8E,OAAO,CAASE,QAAQ,CAAC,CAAC,EAAE;MAC3CpB,KAAK,CAASoB,QAAQ,CAAC,GAAIF,OAAO,CAASE,QAAQ,CAAC;IACvD;EACF,CAAC;EACDD,YAAY,CAAC,OAAO,CAAC;EACrBA,YAAY,CAAC,QAAQ,CAAC;EACtBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,WAAW,CAAC;EACzBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,YAAY,CAAC;EAC1BA,YAAY,CAAC,aAAa,CAAC;EAC3B,oBAAOzF,KAAA,CAAAkE,aAAA,CAAC1B,UAAU;IAAC+B,MAAM,EAAEe,KAAK,CAACK,UAAU,CAACJ,cAAc,EAAE;MAACf,IAAI,EAAEF;IAAK,CAAC,CAAE;IAACG,QAAQ,EAAEA;EAAS,CAAC,CAAC;AACnG,CAAC","ignoreList":[]}
@@ -1,3 +1,11 @@
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; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
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); }
1
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
2
- export default class WmSkeletonProps extends BaseProps {}
5
+ export default class WmSkeletonProps extends BaseProps {
6
+ constructor(...args) {
7
+ super(...args);
8
+ _defineProperty(this, "children", null);
9
+ }
10
+ }
3
11
  //# sourceMappingURL=skeleton.props.js.map