@wavemaker/app-rn-runtime 11.5.2-next.141023 → 11.5.2-next.141026

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +9 -14
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.styles.js +3 -6
  4. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  5. app-rn-runtime/components/advanced/webview/webview.component.js +14 -33
  6. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.props.js +1 -3
  8. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.component.js +8 -22
  10. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  11. app-rn-runtime/components/basic/anchor/anchor.props.js +0 -7
  12. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  13. app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -1
  14. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/animatedview.component.js +3 -5
  16. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  17. app-rn-runtime/components/basic/button/button.component.js +7 -40
  18. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  19. app-rn-runtime/components/basic/button/button.props.js +0 -7
  20. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  21. app-rn-runtime/components/basic/button/button.styles.js +6 -6
  22. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  23. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +5 -13
  24. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  25. app-rn-runtime/components/basic/icon/icon.component.js +12 -64
  26. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  27. app-rn-runtime/components/basic/icon/icon.props.js +0 -7
  28. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  29. app-rn-runtime/components/basic/icon/icon.styles.js +1 -2
  30. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/label/label.component.js +25 -34
  32. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  33. app-rn-runtime/components/basic/label/label.props.js +0 -3
  34. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  35. app-rn-runtime/components/basic/label/label.styles.js +5 -4
  36. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  37. app-rn-runtime/components/basic/message/message.component.js +2 -3
  38. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  39. app-rn-runtime/components/basic/message/message.props.js +0 -3
  40. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  41. app-rn-runtime/components/basic/message/message.styles.js +1 -3
  42. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/picture/picture.component.js +2 -4
  44. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  45. app-rn-runtime/components/basic/picture/picture.props.js +0 -3
  46. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  47. app-rn-runtime/components/basic/picture/picture.styles.js +1 -2
  48. app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
  49. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -3
  50. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  51. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +0 -2
  52. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
  53. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +2 -3
  54. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  55. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +0 -2
  56. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
  57. app-rn-runtime/components/basic/search/search.component.js +1 -2
  58. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  59. app-rn-runtime/components/basic/search/search.props.js +0 -3
  60. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  61. app-rn-runtime/components/basic/search/search.styles.js +5 -6
  62. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  63. app-rn-runtime/components/basic/video/video.component.js +2 -4
  64. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  65. app-rn-runtime/components/basic/video/video.props.js +0 -3
  66. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  67. app-rn-runtime/components/chart/area-chart/area-chart.component.js +16 -23
  68. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  69. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +16 -29
  70. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  71. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +2 -0
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  73. app-rn-runtime/components/chart/basechart.component.js +7 -33
  74. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  75. app-rn-runtime/components/chart/basechart.props.js +2 -7
  76. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  77. app-rn-runtime/components/chart/basechart.styles.js +2 -9
  78. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  79. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +2 -4
  80. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  81. app-rn-runtime/components/chart/line-chart/line-chart.component.js +18 -23
  82. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  83. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  84. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +4 -7
  85. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  86. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +10 -33
  87. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -1
  89. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  90. app-rn-runtime/components/container/container.component.js +2 -11
  91. app-rn-runtime/components/container/container.component.js.map +1 -1
  92. app-rn-runtime/components/container/container.props.js +0 -1
  93. app-rn-runtime/components/container/container.props.js.map +1 -1
  94. app-rn-runtime/components/container/panel/panel.component.js +2 -6
  95. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  96. app-rn-runtime/components/container/panel/panel.props.js +0 -4
  97. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  98. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
  99. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  100. app-rn-runtime/components/container/wizard/wizard.component.js +14 -17
  101. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  102. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -19
  103. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +2 -27
  105. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  106. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -6
  107. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  108. app-rn-runtime/components/data/card/card.component.js +3 -7
  109. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  110. app-rn-runtime/components/data/card/card.props.js +0 -4
  111. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  112. app-rn-runtime/components/data/form/form-action/form-action.styles.js +1 -2
  113. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  114. app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -5
  115. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  116. app-rn-runtime/components/data/list/list.component.js +6 -58
  117. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  118. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -4
  119. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  120. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +0 -3
  121. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  122. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +6 -13
  123. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  124. app-rn-runtime/components/device/camera/camera.component.js +1 -4
  125. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  126. app-rn-runtime/components/device/camera/camera.props.js +0 -3
  127. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  128. app-rn-runtime/components/device/camera/camera.styles.js +4 -12
  129. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  130. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +0 -4
  131. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  132. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +0 -4
  133. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  134. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +1 -2
  135. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  136. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +0 -4
  137. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  138. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +0 -4
  139. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  140. app-rn-runtime/components/dialogs/dialog/dialog.component.js +3 -7
  141. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  142. app-rn-runtime/components/dialogs/dialog/dialog.props.js +0 -4
  143. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  144. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +2 -11
  145. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  146. app-rn-runtime/components/input/basedataset/basedataset.props.js +0 -4
  147. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  148. app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
  149. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  150. app-rn-runtime/components/input/baseinput/baseinput.props.js +0 -4
  151. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  152. app-rn-runtime/components/input/basenumber/basenumber.component.js +10 -16
  153. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  154. app-rn-runtime/components/input/basenumber/basenumber.props.js +0 -4
  155. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  156. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -12
  157. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  158. app-rn-runtime/components/input/checkbox/checkbox.styles.js +5 -35
  159. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  160. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -13
  161. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  162. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +10 -39
  163. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  164. app-rn-runtime/components/input/chips/chips.component.js +1 -5
  165. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  166. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  167. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  168. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  169. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  170. app-rn-runtime/components/input/currency/currency.component.js +2 -18
  171. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  172. app-rn-runtime/components/input/currency/currency.props.js +0 -1
  173. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  174. app-rn-runtime/components/input/currency/currency.styles.js +1 -19
  175. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  176. app-rn-runtime/components/input/epoch/base-datetime.component.js +10 -76
  177. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  178. app-rn-runtime/components/input/epoch/date/date.component.js +0 -8
  179. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  180. app-rn-runtime/components/input/epoch/date/date.styles.js +0 -16
  181. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  182. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +0 -8
  183. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  184. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +0 -5
  185. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +1 -49
  187. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/time/time.component.js +0 -8
  189. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  190. app-rn-runtime/components/input/epoch/time/time.styles.js +0 -16
  191. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  192. app-rn-runtime/components/input/fileupload/fileupload.component.js +0 -2
  193. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  194. app-rn-runtime/components/input/fileupload/fileupload.props.js +0 -2
  195. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  196. app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
  197. app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
  198. app-rn-runtime/components/input/number/number.component.js +1 -13
  199. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  200. app-rn-runtime/components/input/number/number.props.js +0 -1
  201. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  202. app-rn-runtime/components/input/number/number.styles.js +0 -17
  203. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  204. app-rn-runtime/components/input/radioset/radioset.component.js +2 -7
  205. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  206. app-rn-runtime/components/input/select/select.component.js +3 -7
  207. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  208. app-rn-runtime/components/input/select/select.styles.js +1 -5
  209. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  210. app-rn-runtime/components/input/slider/slider.styles.js +3 -3
  211. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  212. app-rn-runtime/components/input/switch/switch.component.js +1 -8
  213. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  214. app-rn-runtime/components/input/switch/switch.styles.js +5 -10
  215. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  216. app-rn-runtime/components/input/text/text.component.js +1 -13
  217. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  218. app-rn-runtime/components/input/text/text.props.js +0 -1
  219. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  220. app-rn-runtime/components/input/text/text.styles.js +0 -17
  221. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  222. app-rn-runtime/components/input/textarea/textarea.component.js +1 -13
  223. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  224. app-rn-runtime/components/input/textarea/textarea.props.js +0 -1
  225. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  226. app-rn-runtime/components/input/textarea/textarea.styles.js +0 -17
  227. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  228. app-rn-runtime/components/input/toggle/toggle.component.js +5 -48
  229. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  230. app-rn-runtime/components/input/toggle/toggle.props.js +0 -4
  231. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  232. app-rn-runtime/components/input/toggle/toggle.styles.js +12 -5
  233. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  234. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -6
  235. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  236. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +0 -1
  237. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  238. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +1 -9
  239. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  240. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -1
  241. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  242. app-rn-runtime/components/navigation/menu/menu.styles.js +5 -8
  243. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  244. app-rn-runtime/components/navigation/navitem/navitem.component.js +5 -8
  245. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  246. app-rn-runtime/components/navigation/navitem/navitem.props.js +0 -3
  247. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  248. app-rn-runtime/components/navigation/popover/popover.component.js +3 -10
  249. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  250. app-rn-runtime/components/navigation/popover/popover.props.js +0 -7
  251. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  252. app-rn-runtime/components/navigation/popover/popover.styles.js +2 -8
  253. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  254. app-rn-runtime/components/page/tabbar/tabbar.component.js +8 -42
  255. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  256. app-rn-runtime/components/page/tabbar/tabbar.styles.js +16 -82
  257. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  258. app-rn-runtime/core/base.component.js +2 -15
  259. app-rn-runtime/core/base.component.js.map +1 -1
  260. app-rn-runtime/core/components/textinput.component.js +2 -25
  261. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  262. app-rn-runtime/core/tappable.component.js +10 -37
  263. app-rn-runtime/core/tappable.component.js.map +1 -1
  264. app-rn-runtime/core/utils.js +0 -11
  265. app-rn-runtime/core/utils.js.map +1 -1
  266. app-rn-runtime/gestures/swipe.animation.js +1 -34
  267. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  268. app-rn-runtime/package.json +3 -5
  269. app-rn-runtime/runtime/App.js +0 -4
  270. app-rn-runtime/runtime/App.js.map +1 -1
  271. app-rn-runtime/runtime/base-page.component.js +1 -1
  272. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  273. app-rn-runtime/runtime/services/app-security.service.js +1 -2
  274. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  275. app-rn-runtime/runtime/services/webprocess.service.js +1 -0
  276. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  277. app-rn-runtime/styles/theme.js +0 -36
  278. app-rn-runtime/styles/theme.js.map +1 -1
  279. app-rn-runtime/styles/theme.variables.js +3 -26
  280. app-rn-runtime/styles/theme.variables.js.map +1 -1
  281. app-rn-runtime/variables/model-variable.js +1 -2
  282. app-rn-runtime/variables/model-variable.js.map +1 -1
  283. app-rn-runtime/variables/service-variable.js +0 -1
  284. app-rn-runtime/variables/service-variable.js.map +1 -1
  285. app-rn-runtime/components/chart/staticdata.js +0 -215
  286. app-rn-runtime/components/chart/staticdata.js.map +0 -1
  287. app-rn-runtime/components/page/tabbar/curve.js +0 -84
  288. app-rn-runtime/components/page/tabbar/curve.js.map +0 -1
  289. app-rn-runtime/core/accessibility.js +0 -149
  290. app-rn-runtime/core/accessibility.js.map +0 -1
  291. app-rn-runtime/core/components/floatinglabel.component.js +0 -45
  292. app-rn-runtime/core/components/floatinglabel.component.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["clone","isEqual","VariableEvents","ModelVariable","_ModelVariable","constructor","config","variable","name","dataSet","paramProvider","isList","twoWayBinding","_defineProperty","invoke","params","onSuccess","onError","result","notify","BEFORE_INVOKE","execute","SUCCESS","error","ERROR","AFTER_INVOKE","invokeOnParamChange","latest","lastParams","Promise","resolve"],"sources":["model-variable.ts"],"sourcesContent":["import { assignIn, clone, isEqual } from 'lodash-es';\nimport { BaseVariable, VariableConfig, VariableEvents } from './base-variable';\nimport { ModelVariable as _ModelVariable } from '@wavemaker/variables/src/model/variable/model-variable';\n\nexport class ModelVariable extends _ModelVariable {\n config: any;\n lastParams: any;\n\n constructor(config: VariableConfig) {\n const variable = {\n name: config.name,\n dataSet: config.paramProvider(),\n isList: config.isList,\n twoWayBinding: config.twoWayBinding\n }\n super(variable);\n this.config = config;\n this.invoke();\n }\n\n invoke(params?: any, onSuccess?: Function, onError?: Function) {\n let result;\n this.dataSet = this.config.paramProvider();\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n try{\n result = super.execute(params, ()=>{});\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n onSuccess && onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }\n catch(error){\n this.config.onError && this.config.onError(this, this.dataSet);\n onError && onError(this, this.dataSet);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }\n\n this.notify(VariableEvents.AFTER_INVOKE, [this, this.dataSet]);\n return result;\n }\n\n invokeOnParamChange() {\n const latest = this.config.paramProvider();\n if (!isEqual(this.lastParams, latest)) {\n this.invoke();\n this.lastParams = clone(latest);\n }\n return Promise.resolve(this);\n }\n}\n"],"mappings":";;;AAAA,SAAmBA,KAAK,EAAEC,OAAO,QAAQ,WAAW;AACpD,SAAuCC,cAAc,QAAQ,iBAAiB;AAC9E,SAASC,aAAa,IAAIC,cAAc,QAAQ,wDAAwD;AAExG,OAAO,MAAMD,aAAa,SAASC,cAAc,CAAC;EAIhDC,WAAWA,CAACC,MAAsB,EAAE;IAClC,MAAMC,QAAQ,GAAG;MACfC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,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,CAACjB,cAAc,CAACuB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAAChB,OAAO,CAAC,CAAC;IAC9D,OAAOS,MAAM;EACf;EAEAQ,mBAAmBA,CAAA,EAAG;IACpB,MAAMC,MAAM,GAAG,IAAI,CAACrB,MAAM,CAACI,aAAa,CAAC,CAAC;IAC1C,IAAI,CAACT,OAAO,CAAC,IAAI,CAAC2B,UAAU,EAAED,MAAM,CAAC,EAAE;MACnC,IAAI,CAACb,MAAM,CAAC,CAAC;MACb,IAAI,CAACc,UAAU,GAAG5B,KAAK,CAAC2B,MAAM,CAAC;IACnC;IACA,OAAOE,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B;AACF"}
1
+ {"version":3,"names":["clone","isEqual","VariableEvents","ModelVariable","_ModelVariable","constructor","config","variable","name","dataSet","paramProvider","isList","_defineProperty","invoke","params","onSuccess","onError","result","notify","BEFORE_INVOKE","execute","SUCCESS","error","ERROR","AFTER_INVOKE","invokeOnParamChange","latest","lastParams","Promise","resolve"],"sources":["model-variable.ts"],"sourcesContent":["import { assignIn, clone, isEqual } from 'lodash-es';\nimport { BaseVariable, VariableConfig, VariableEvents } from './base-variable';\nimport { ModelVariable as _ModelVariable } from '@wavemaker/variables/src/model/variable/model-variable';\n\nexport class ModelVariable extends _ModelVariable {\n config: any;\n lastParams: any;\n\n constructor(config: VariableConfig) {\n const variable = {\n name: config.name,\n dataSet: config.paramProvider(),\n isList: config.isList\n }\n super(variable);\n this.config = config;\n this.invoke();\n }\n\n invoke(params?: any, onSuccess?: Function, onError?: Function) {\n let result;\n this.dataSet = this.config.paramProvider(); \n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n try{\n result = super.execute(params, ()=>{});\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n onSuccess && onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }\n catch(error){\n this.config.onError && this.config.onError(this, this.dataSet);\n onError && onError(this, this.dataSet);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }\n\n this.notify(VariableEvents.AFTER_INVOKE, [this, this.dataSet]);\n return result;\n }\n\n invokeOnParamChange() {\n const latest = this.config.paramProvider();\n if (!isEqual(this.lastParams, latest)) {\n this.invoke();\n this.lastParams = clone(latest);\n }\n return Promise.resolve(this);\n }\n}\n"],"mappings":";;;AAAA,SAAmBA,KAAK,EAAEC,OAAO,QAAQ,WAAW;AACpD,SAAuCC,cAAc,QAAQ,iBAAiB;AAC9E,SAASC,aAAa,IAAIC,cAAc,QAAQ,wDAAwD;AAExG,OAAO,MAAMD,aAAa,SAASC,cAAc,CAAC;EAIhDC,WAAWA,CAACC,MAAsB,EAAE;IAClC,MAAMC,QAAQ,GAAG;MACfC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,aAAa,CAAC,CAAC;MAC/BC,MAAM,EAAEL,MAAM,CAACK;IACjB,CAAC;IACD,KAAK,CAACJ,QAAQ,CAAC;IAACK,eAAA;IAAAA,eAAA;IAChB,IAAI,CAACN,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACO,MAAM,CAAC,CAAC;EACf;EAEAA,MAAMA,CAACC,MAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC7D,IAAIC,MAAM;IACV,IAAI,CAACR,OAAO,GAAG,IAAI,CAACH,MAAM,CAACI,aAAa,CAAC,CAAC;IAC1C,IAAI,CAACQ,MAAM,CAAChB,cAAc,CAACiB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAACV,OAAO,CAAC,CAAC;IAC/D,IAAG;MACDQ,MAAM,GAAG,KAAK,CAACG,OAAO,CAACN,MAAM,EAAE,MAAI,CAAC,CAAC,CAAC;MACtC,IAAI,CAACR,MAAM,CAACS,SAAS,IAAI,IAAI,CAACT,MAAM,CAACS,SAAS,CAAC,IAAI,EAAE,IAAI,CAACN,OAAO,CAAC;MAClEM,SAAS,IAAIA,SAAS,CAAC,IAAI,EAAE,IAAI,CAACN,OAAO,CAAC;MAC1C,IAAI,CAACS,MAAM,CAAChB,cAAc,CAACmB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAACZ,OAAO,CAAC,CAAC;IAC3D,CAAC,CACD,OAAMa,KAAK,EAAC;MACV,IAAI,CAAChB,MAAM,CAACU,OAAO,IAAI,IAAI,CAACV,MAAM,CAACU,OAAO,CAAC,IAAI,EAAE,IAAI,CAACP,OAAO,CAAC;MAC9DO,OAAO,IAAIA,OAAO,CAAC,IAAI,EAAE,IAAI,CAACP,OAAO,CAAC;MACtC,IAAI,CAACS,MAAM,CAAChB,cAAc,CAACqB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAACd,OAAO,CAAC,CAAC;IACzD;IAEA,IAAI,CAACS,MAAM,CAAChB,cAAc,CAACsB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACf,OAAO,CAAC,CAAC;IAC9D,OAAOQ,MAAM;EACf;EAEAQ,mBAAmBA,CAAA,EAAG;IACpB,MAAMC,MAAM,GAAG,IAAI,CAACpB,MAAM,CAACI,aAAa,CAAC,CAAC;IAC1C,IAAI,CAACT,OAAO,CAAC,IAAI,CAAC0B,UAAU,EAAED,MAAM,CAAC,EAAE;MACnC,IAAI,CAACb,MAAM,CAAC,CAAC;MACb,IAAI,CAACc,UAAU,GAAG3B,KAAK,CAAC0B,MAAM,CAAC;IACnC;IACA,OAAOE,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B;AACF"}
@@ -64,7 +64,6 @@ export class ServiceVariable extends _ServiceVariable {
64
64
  this.subscribe(VariableEvents.AFTER_INVOKE, () => {
65
65
  this.dataBinding = {};
66
66
  });
67
- this.init();
68
67
  }
69
68
  invokeOnParamChange() {
70
69
  const last = this.params;
@@ -1 +1 @@
1
- {"version":3,"names":["VariableEvents","isEqual","deepCopy","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","inFlightBehavior","onSuccess","context","args","notify","AFTER_INVOKE","variable","data","options","SUCCESS","onError","ERROR","onCanUpdate","onBeforeUpdate","BEFORE_INVOKE","inputData","onResult","onBeforeDatasetReady","_defineProperty","get","subscribe","init","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n let variableConfig: any = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: {},\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n inFlightBehavior: config.inFlightBehavior,\n onSuccess: (context: any, args: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);\n this.notify(VariableEvents.SUCCESS, [args.variable, args.data, args.options]);\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);\n this.notify(VariableEvents.ERROR, [args.variable, args.data, args.options]);\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n this.notify(VariableEvents.BEFORE_INVOKE, [args.variable, args.inputData, args.options]);\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n if (config.onError) {\n variableConfig.onError = (context: any, args: any) => {\n return config.onError && config.onError(args.variable, args.data, args.options);\n };\n }\n super(variableConfig);\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.dataBinding = {};\n });\n this.init();\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.params = this.config.paramProvider();\n this.params = deepCopy({} as any, this.params, this.dataBinding);\n if (options) {\n this.params = deepCopy({} as any, this.params, options.inputFields ? options.inputFields : options);\n }\n options = options || {};\n options.inputFields = this.params;\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n // setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n // }\n}\n"],"mappings":";;;AAAA,SAAyBA,cAAc,QAAQ,iBAAiB;AAChE,SAASC,OAAO,QAAkB,QAAQ;AAE1C,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA,EAAtBA,sBAAsB;AAK3B,OAAO,MAAMJ,eAAe,SAASC,gBAAgB,CAAC;EAKpDI,WAAWA,CAAQC,MAA6B,EAAE;IAChD,IAAIC,cAAmB,GAAG;MACxBC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,aAAa,CAAC,CAAC;MAC/BC,WAAW,EAAE,CAAC,CAAC;MACfC,MAAM,EAAEN,MAAM,CAACM,MAAM;M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AAI,CAAC+C,MAAM,EAAE,IAAI,CAACnC,WAAW,CAAC;IAChE,IAAImB,OAAO,EAAE;MACX,IAAI,CAACgB,MAAM,GAAG/C,QAAQ,CAAC,CAAC,CAAC,EAAS,IAAI,CAAC+C,MAAM,EAAEhB,OAAO,CAAC2B,WAAW,GAAG3B,OAAO,CAAC2B,WAAW,GAAG3B,OAAO,CAAC;IACrG;IACAA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IACvBA,OAAO,CAAC2B,WAAW,GAAG,IAAI,CAACX,MAAM;IAC/B;IACF;IACA,IAAI,CAAC3B,WAAW,GAAG,IAAI,CAACb,MAAM,CAACc,cAAc,CAAC,CAAC;IAC/C,IAAI,CAAC,IAAI,CAACD,WAAW,EAAE;MACrBuC,OAAO,CAACC,KAAK,CAAE,gCAA+B,IAAI,CAACnD,IAAK,aAAY,CAAC;IACvE;IACA,OAAO,KAAK,CAACwC,MAAM,CAAClB,OAAO,EAAEP,SAAS,EAAES,OAAO,CAAC;EAClD;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;AACF"}
1
+ {"version":3,"names":["VariableEvents","isEqual","deepCopy","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","inFlightBehavior","onSuccess","context","args","notify","AFTER_INVOKE","variable","data","options","SUCCESS","onError","ERROR","onCanUpdate","onBeforeUpdate","BEFORE_INVOKE","inputData","onResult","onBeforeDatasetReady","_defineProperty","get","subscribe","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n let variableConfig: any = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: {},\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n inFlightBehavior: config.inFlightBehavior,\n onSuccess: (context: any, args: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);\n this.notify(VariableEvents.SUCCESS, [args.variable, args.data, args.options]);\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);\n this.notify(VariableEvents.ERROR, [args.variable, args.data, args.options]);\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n this.notify(VariableEvents.BEFORE_INVOKE, [args.variable, args.inputData, args.options]);\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n if (config.onError) {\n variableConfig.onError = (context: any, args: any) => {\n return config.onError && config.onError(args.variable, args.data, args.options);\n };\n }\n super(variableConfig);\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.dataBinding = {};\n });\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.params = this.config.paramProvider();\n this.params = deepCopy({} as any, this.params, this.dataBinding);\n if (options) {\n this.params = deepCopy({} as any, this.params, options.inputFields ? options.inputFields : options);\n }\n options = options || {};\n options.inputFields = this.params;\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n // setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n // }\n}\n"],"mappings":";;;AAAA,SAAyBA,cAAc,QAAQ,iBAAiB;AAChE,SAASC,OAAO,QAAkB,QAAQ;AAE1C,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA,EAAtBA,sBAAsB;AAK3B,OAAO,MAAMJ,eAAe,SAASC,gBAAgB,CAAC;EAKpDI,WAAWA,CAAQC,MAA6B,EAAE;IAChD,IAAIC,cAAmB,GAAG;MACxBC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,aAAa,CAAC,CAAC;MAC/BC,WAAW,EAAE,CAAC,CAAC;MACfC,MAAM,EAAEN,MAAM,CAACM,MAAM;MACrBC,OAAO,EAAEP,MAAM,CAACO,OAAO;MACvBC,WAAW,EAAER,MAAM,CAACQ,WAAW;MAC/BC,UAAU,EAAET,MAAM,CAACS,UAAU;MAC7BC,QAAQ,EAAEV,MAAM,CAACU,QAAQ;MACzBC,SAAS,EAAEX,MAAM,CAACW,SAAS;MAC3BC,WAAW,EAAEZ,MAAM,CAACY,WAAW;MAC/BC,WAAW,EAAEb,MAAM,CAACc,cAAc,CAAC,CAAC;MACpCC,iBAAiB,EAAEnB,WAAW;MAC9BoB,gBAAgB,EAAEhB,MAAM,CAACgB,gBAAgB;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AACc,cAAc,CAAC,CAAC;IAC/C,IAAI,CAAC,IAAI,CAACD,WAAW,EAAE;MACrBsC,OAAO,CAACC,KAAK,CAAE,gCAA+B,IAAI,CAAClD,IAAK,aAAY,CAAC;IACvE;IACA,OAAO,KAAK,CAACuC,MAAM,CAACjB,OAAO,EAAEP,SAAS,EAAES,OAAO,CAAC;EAClD;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;AACF"}
@@ -1,215 +0,0 @@
1
- import _ from "lodash";
2
- const dataTypeJSON = ['Column', 'Line', 'Pie', 'Bar', 'Donut', 'Bubble'];
3
- const SAMPLE_DATA1 = {
4
- 'group1': 'Europe',
5
- 'group2': 'Asia',
6
- 'group3': 'America',
7
- 'group4': 'Australia'
8
- };
9
- const SAMPLE_DATA = {
10
- 'group1': '01/01/2001',
11
- 'group2': '01/01/2002',
12
- 'group3': '01/01/2003'
13
- };
14
- const SAMPLE_DATA2 = {
15
- 'group1': '78.6',
16
- 'group2': '79',
17
- 'group3': '80',
18
- 'group4': '80.66'
19
- };
20
- export const chartTypes = ['Column', 'Line', 'Area', 'Cumulative Line', 'Bar', 'Pie', 'Donut', 'Bubble'];
21
- export const isPieChart = type => type === 'Pie';
22
-
23
- // returns true if chart type is line
24
- export const isLineChart = type => type === 'Line';
25
-
26
- // returns true if chart type is bar
27
- export const isBarChart = type => type === 'Bar';
28
-
29
- // returns true if chart type is donut
30
- export const isDonutChart = type => type === 'Donut';
31
-
32
- // returns true if chart type is bubble
33
- export const isBubbleChart = type => type === 'Bubble';
34
- export const isAreaChart = type => type === 'Area';
35
-
36
- // returns true if chart type is column
37
- export const isColumnChart = type => type === 'Column';
38
- export const isPieType = type => isPieChart(type) || isDonutChart(type);
39
-
40
- // The format of chart data is array of json objects in case of the following types of chart
41
- export const isChartDataJSON = type => _.includes(dataTypeJSON, type) || !_.includes(chartTypes, type);
42
- export const constructSampleData = (dataType, yaxisLength, shape) => {
43
- let first_series = [],
44
- second_series = [],
45
- third_series = [],
46
- first_series_array = [],
47
- second_series_array = [],
48
- third_series_array = [],
49
- data = [];
50
- switch (dataType) {
51
- case 'jsonFormat':
52
- first_series = [{
53
- 'x': '01/01/2001',
54
- 'y': 4000000
55
- }, {
56
- 'x': '01/01/2002',
57
- 'y': 1000000
58
- }, {
59
- 'x': '01/01/2003',
60
- 'y': 5000000
61
- }];
62
- second_series = [{
63
- 'x': '01/01/2001',
64
- 'y': 3000000
65
- }, {
66
- 'x': '01/01/2002',
67
- 'y': 4000000
68
- }, {
69
- 'x': '01/01/2003',
70
- 'y': 7000000
71
- }];
72
- third_series = [{
73
- 'x': '01/01/2001',
74
- 'y': 2000000
75
- }, {
76
- 'x': '01/01/2002',
77
- 'y': 8000000
78
- }, {
79
- 'x': '01/01/2003',
80
- 'y': 6000000
81
- }];
82
- data[0] = {
83
- values: first_series,
84
- key: SAMPLE_DATA.group1
85
- };
86
- if (yaxisLength >= 2) {
87
- data[1] = {
88
- values: second_series,
89
- key: SAMPLE_DATA.group2
90
- };
91
- }
92
- if (yaxisLength >= 3) {
93
- data[2] = {
94
- values: third_series,
95
- key: SAMPLE_DATA.group3
96
- };
97
- }
98
- break;
99
- case 'arrayFormat':
100
- first_series_array = [[1, 4000000], [2, 1000000], [3, 5000000]];
101
- second_series_array = [[1, 3000000], [2, 4000000], [3, 7000000]];
102
- third_series_array = [[1, 2000000], [2, 8000000], [3, 6000000]];
103
- data[0] = {
104
- values: first_series_array,
105
- key: SAMPLE_DATA.group1
106
- };
107
- if (yaxisLength >= 2) {
108
- data[1] = {
109
- values: second_series_array,
110
- key: SAMPLE_DATA.group2
111
- };
112
- }
113
- if (yaxisLength >= 3) {
114
- data[2] = {
115
- values: third_series_array,
116
- key: SAMPLE_DATA.group3
117
- };
118
- }
119
- break;
120
- case 'columnChartFormat':
121
- data = [{
122
- 'x': SAMPLE_DATA.group1,
123
- 'y': 3
124
- }];
125
- break;
126
- case 'barChartFormat':
127
- data = [{
128
- 'x': SAMPLE_DATA.group1,
129
- 'y': 2000000
130
- }, {
131
- 'x': SAMPLE_DATA.group2,
132
- 'y': 1000000
133
- }, {
134
- 'x': SAMPLE_DATA.group3,
135
- 'y': 3000000
136
- }];
137
- break;
138
- case 'lineChartFormat':
139
- data = [{
140
- 'x': SAMPLE_DATA1.group1,
141
- 'y': 2
142
- }, {
143
- 'x': SAMPLE_DATA1.group2,
144
- 'y': 0
145
- }, {
146
- 'x': SAMPLE_DATA1.group3,
147
- 'y': 3
148
- }];
149
- break;
150
- case 'bubbleFormat':
151
- // shape = shape === 'random' ? shapes[Math.floor(Math.random() * shapes.length)] : shape;
152
- data = [{
153
- 'x': SAMPLE_DATA2.group1,
154
- 'y': 1000000
155
- }, {
156
- 'x': SAMPLE_DATA2.group2,
157
- 'y': 2000000
158
- }, {
159
- 'x': SAMPLE_DATA2.group3,
160
- 'y': 3000000
161
- }, {
162
- 'x': SAMPLE_DATA2.group4,
163
- 'y': 4000000
164
- }];
165
- break;
166
- case 'pieChartFormat':
167
- data = [{
168
- 'x': SAMPLE_DATA1.group1,
169
- 'y': 1000000
170
- }, {
171
- 'x': SAMPLE_DATA1.group2,
172
- 'y': 2000000
173
- }, {
174
- 'x': SAMPLE_DATA1.group3,
175
- 'y': 3000000
176
- }, {
177
- 'x': SAMPLE_DATA1.group4,
178
- 'y': 4000000
179
- }];
180
- break;
181
- }
182
- return data;
183
- };
184
- export const getChartType = widgetContext => {
185
- const type = widgetContext.type;
186
- if (isLineChart(type)) {
187
- return 'lineChartFormat';
188
- }
189
- if (isAreaChart(type)) {
190
- return 'lineChartFormat';
191
- }
192
- if (isBarChart(type)) {
193
- return 'barChartFormat';
194
- }
195
- if (isColumnChart(type)) {
196
- return 'columnChartFormat';
197
- }
198
- if (isPieChart(type)) {
199
- return 'pieChartFormat';
200
- }
201
- if (isBubbleChart(type)) {
202
- return 'bubbleFormat';
203
- }
204
- if (isDonutChart(type)) {
205
- return 'pieChartFormat';
206
- }
207
- return isChartDataJSON(type) ? 'jsonFormat' : 'arrayFormat';
208
- };
209
-
210
- // Sample data to populate when no data is bound
211
- export const getSampleData = widgetContext => constructSampleData(getDataType(widgetContext), _.split(widgetContext.yaxisdatakey, ',').length, widgetContext.shape);
212
- function getDataType(widgetContext) {
213
- throw new Error("Function not implemented.");
214
- }
215
- //# sourceMappingURL=staticdata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_","dataTypeJSON","SAMPLE_DATA1","SAMPLE_DATA","SAMPLE_DATA2","chartTypes","isPieChart","type","isLineChart","isBarChart","isDonutChart","isBubbleChart","isAreaChart","isColumnChart","isPieType","isChartDataJSON","includes","constructSampleData","dataType","yaxisLength","shape","first_series","second_series","third_series","first_series_array","second_series_array","third_series_array","data","values","key","group1","group2","group3","group4","getChartType","widgetContext","getSampleData","getDataType","split","yaxisdatakey","length","Error"],"sources":["staticdata.tsx"],"sourcesContent":["import _ from \"lodash\";\n\nconst dataTypeJSON = ['Column', 'Line', 'Pie', 'Bar', 'Donut', 'Bubble']\n\nconst SAMPLE_DATA1 = {\n 'group1' : 'Europe',\n 'group2' : 'Asia',\n 'group3' : 'America',\n 'group4' : 'Australia'\n}\n\nconst SAMPLE_DATA = {\n 'group1' : '01/01/2001',\n 'group2' : '01/01/2002',\n 'group3' : '01/01/2003',\n};\nconst SAMPLE_DATA2 = {\n 'group1' : '78.6',\n 'group2' : '79',\n 'group3' : '80',\n 'group4' : '80.66'\n};\nexport const chartTypes = ['Column', 'Line', 'Area', 'Cumulative Line', 'Bar', 'Pie', 'Donut', 'Bubble']\n\nexport const isPieChart = (type: string) => type === 'Pie';\n\n// returns true if chart type is line\nexport const isLineChart = (type: string) => type === 'Line';\n\n// returns true if chart type is bar\nexport const isBarChart = (type: string) => type === 'Bar';\n\n// returns true if chart type is donut\nexport const isDonutChart = (type: string) => type === 'Donut';\n\n// returns true if chart type is bubble\nexport const isBubbleChart = (type: string) => type === 'Bubble';\n\nexport const isAreaChart = (type: string) => type === 'Area';\n\n// returns true if chart type is column\nexport const isColumnChart = (type: string) => type === 'Column';\n\nexport const isPieType = (type: string) => isPieChart(type) || isDonutChart(type);\n\n// The format of chart data is array of json objects in case of the following types of chart\nexport const isChartDataJSON = (type: any) => _.includes(dataTypeJSON, type) || !_.includes(chartTypes, type);\n\n\nexport const constructSampleData = (dataType: any, yaxisLength: any, shape: string) => {\n let first_series = [],\n second_series = [],\n third_series = [],\n first_series_array = [],\n second_series_array = [],\n third_series_array = [],\n data: { values?: { x: string | number; y?: string | number; size?: number; shape?: any; }[] | number[][]; key: any; }[] | { x: any; y?: number; }[] = [];\n switch (dataType) {\n case 'jsonFormat':\n first_series = [\n {'x': '01/01/2001', 'y': 4000000},\n {'x': '01/01/2002', 'y': 1000000},\n {'x': '01/01/2003', 'y': 5000000}\n ];\n second_series = [\n {'x': '01/01/2001', 'y': 3000000},\n {'x': '01/01/2002', 'y': 4000000},\n {'x': '01/01/2003', 'y': 7000000}\n ];\n third_series = [\n {'x': '01/01/2001', 'y': 2000000},\n {'x': '01/01/2002', 'y': 8000000},\n {'x': '01/01/2003', 'y': 6000000}\n ];\n data[0] = {\n values: first_series,\n key: SAMPLE_DATA.group1\n };\n if (yaxisLength >= 2) {\n data[1] = {\n values: second_series,\n key: SAMPLE_DATA.group2\n };\n }\n if (yaxisLength >= 3) {\n data[2] = {\n values: third_series,\n key: SAMPLE_DATA.group3\n };\n }\n break;\n case 'arrayFormat':\n first_series_array = [\n [1, 4000000],\n [2, 1000000],\n [3, 5000000]\n ];\n second_series_array = [\n [1, 3000000],\n [2, 4000000],\n [3, 7000000]\n ];\n third_series_array = [\n [1, 2000000],\n [2, 8000000],\n [3, 6000000]\n ];\n data[0] = {\n values: first_series_array,\n key: SAMPLE_DATA.group1\n };\n if (yaxisLength >= 2) {\n data[1] = {\n values: second_series_array,\n key: SAMPLE_DATA.group2\n };\n }\n if (yaxisLength >= 3) {\n data[2] = {\n values: third_series_array,\n key: SAMPLE_DATA.group3\n };\n }\n break;\n case 'columnChartFormat':\n data = [\n {'x': SAMPLE_DATA.group1, 'y': 3}\n ];\n break;\n case 'barChartFormat':\n data = [\n {'x': SAMPLE_DATA.group1, 'y': 2000000},\n {'x': SAMPLE_DATA.group2, 'y': 1000000},\n {'x': SAMPLE_DATA.group3, 'y': 3000000}\n ];\n break;\n case 'lineChartFormat':\n data = [\n {'x': SAMPLE_DATA1.group1, 'y': 2},\n {'x': SAMPLE_DATA1.group2, 'y': 0},\n {'x': SAMPLE_DATA1.group3, 'y': 3}\n ];\n break;\n case 'bubbleFormat':\n // shape = shape === 'random' ? shapes[Math.floor(Math.random() * shapes.length)] : shape;\n data = [\n {'x': SAMPLE_DATA2.group1, 'y': 1000000},\n {'x': SAMPLE_DATA2.group2, 'y': 2000000},\n {'x': SAMPLE_DATA2.group3, 'y': 3000000},\n {'x': SAMPLE_DATA2.group4, 'y': 4000000}\n ];\n break;\n case 'pieChartFormat':\n data = [\n {'x': SAMPLE_DATA1.group1, 'y': 1000000},\n {'x': SAMPLE_DATA1.group2, 'y': 2000000},\n {'x': SAMPLE_DATA1.group3, 'y': 3000000},\n {'x': SAMPLE_DATA1.group4, 'y': 4000000}\n ];\n break;\n \n }\n return data;\n\n};\n\nexport const getChartType = (widgetContext: { type: any; }) => {\n const type = widgetContext.type;\n if (isLineChart(type)) {\n return 'lineChartFormat';\n }\n if (isAreaChart(type)) {\n return 'lineChartFormat'; \n }\n if (isBarChart(type)) {\n return 'barChartFormat'; \n }\n if (isColumnChart(type)) {\n return 'columnChartFormat'; \n }\n if (isPieChart(type)) {\n return 'pieChartFormat';\n }\n if (isBubbleChart(type)) {\n return 'bubbleFormat';\n }\n if (isDonutChart(type)) {\n return 'pieChartFormat';\n}\n return isChartDataJSON(type) ? 'jsonFormat' : 'arrayFormat';\n};\n\n// Sample data to populate when no data is bound\nexport const getSampleData = (widgetContext: { yaxisdatakey: any; shape: any; }) => constructSampleData(getDataType(widgetContext), _.split(widgetContext.yaxisdatakey, ',').length, widgetContext.shape);\n\nfunction getDataType(widgetContext: { yaxisdatakey: any; shape: any; }): any {\n throw new Error(\"Function not implemented.\");\n}\n"],"mappings":"AAAA,OAAOA,CAAC,MAAM,QAAQ;AAEtB,MAAMC,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;AAExE,MAAMC,YAAY,GAAG;EACnB,QAAQ,EAAG,QAAQ;EACnB,QAAQ,EAAG,MAAM;EACjB,QAAQ,EAAG,SAAS;EACpB,QAAQ,EAAG;AACb,CAAC;AAED,MAAMC,WAAW,GAAG;EAChB,QAAQ,EAAG,YAAY;EACvB,QAAQ,EAAG,YAAY;EACvB,QAAQ,EAAG;AACf,CAAC;AACD,MAAMC,YAAY,GAAG;EACnB,QAAQ,EAAG,MAAM;EACjB,QAAQ,EAAG,IAAI;EACf,QAAQ,EAAG,IAAI;EACf,QAAQ,EAAG;AACb,CAAC;AACD,OAAO,MAAMC,UAAU,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;AAExG,OAAO,MAAMC,UAAU,GAAIC,IAAY,IAAKA,IAAI,KAAK,KAAK;;AAE1D;AACA,OAAO,MAAMC,WAAW,GAAID,IAAY,IAAKA,IAAI,KAAK,MAAM;;AAE5D;AACA,OAAO,MAAME,UAAU,GAAIF,IAAY,IAAKA,IAAI,KAAK,KAAK;;AAE1D;AACA,OAAO,MAAMG,YAAY,GAAIH,IAAY,IAAKA,IAAI,KAAK,OAAO;;AAE9D;AACA,OAAO,MAAMI,aAAa,GAAIJ,IAAY,IAAKA,IAAI,KAAK,QAAQ;AAEhE,OAAO,MAAMK,WAAW,GAAIL,IAAY,IAAKA,IAAI,KAAK,MAAM;;AAE5D;AACA,OAAO,MAAMM,aA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- import * as d3Shape from "d3-shape";
2
- // import { scale } from "react-native-size-scaling";
3
- const scale = n => n;
4
- //** Path Line */
5
- const line = (width, height) => {
6
- const path = d3Shape.line().x(d => d.x).y(d => d.y)([{
7
- x: width / 2,
8
- y: 0
9
- }, {
10
- x: width,
11
- y: 0
12
- }, {
13
- x: width,
14
- y: height
15
- }, {
16
- x: 0,
17
- y: height
18
- }, {
19
- x: 0,
20
- y: 0
21
- }, {
22
- x: width / 2,
23
- y: 0
24
- }]);
25
- return path;
26
- };
27
-
28
- //** Path Curved*/
29
- const lineCurvedDown = (iPosition, height, circle) => {
30
- const position = iPosition;
31
- const circleWidth = circle + position;
32
- const trim = (position + circleWidth) / 2;
33
- const curved = d3Shape.line().x(d => d.x).y(d => d.y).curve(d3Shape.curveBasis)([{
34
- x: position - scale(20),
35
- y: 0
36
- },
37
- // border center left
38
- {
39
- x: position - scale(10),
40
- y: scale(2)
41
- }, {
42
- x: position - scale(2),
43
- y: scale(10)
44
- }, {
45
- x: position,
46
- y: scale(17)
47
- }, {
48
- x: trim - scale(25),
49
- y: height / 2 + scale(2)
50
- }, {
51
- x: trim - scale(10),
52
- y: height / 2 + scale(10)
53
- }, {
54
- x: trim,
55
- y: height / 2 + scale(10)
56
- }, {
57
- x: trim + scale(10),
58
- y: height / 2 + scale(10)
59
- }, {
60
- x: trim + scale(25),
61
- y: height / 2 + scale(2)
62
- }, {
63
- x: circleWidth,
64
- y: scale(17)
65
- },
66
- // border center right
67
- {
68
- x: circleWidth + scale(2),
69
- y: scale(10)
70
- }, {
71
- x: circleWidth + scale(10),
72
- y: 0
73
- }, {
74
- x: circleWidth + scale(20),
75
- y: 0
76
- }]);
77
- return curved;
78
- };
79
- export const getPathDown = (width, iHeight, centerWidth, clippedTabbarHeight) => {
80
- const height = scale(iHeight);
81
- const circleWidth = scale(centerWidth) + scale(16);
82
- return `${line(width, clippedTabbarHeight)} ${lineCurvedDown(width / 2 - circleWidth / 2, height, circleWidth)}`;
83
- };
84
- //# sourceMappingURL=curve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["d3Shape","scale","n","line","width","height","path","x","d","y","lineCurvedDown","iPosition","circle","position","circleWidth","trim","curved","curve","curveBasis","getPathDown","iHeight","centerWidth","clippedTabbarHeight"],"sources":["curve.tsx"],"sourcesContent":["import * as d3Shape from \"d3-shape\";\n// import { scale } from \"react-native-size-scaling\";\nconst scale = (n: number) => n;\n\ninterface LineDatum {\n x: number;\n y: number;\n missing?: boolean;\n}\n\n//** Path Line */\nconst line = (width : number, height: number) => {\n const path: any = d3Shape\n .line<LineDatum>()\n .x((d) => d.x)\n .y((d) => d.y)([\n { x: width / 2, y: 0 },\n { x: width, y: 0 },\n { x: width, y: height },\n { x: 0, y: height},\n { x: 0, y: 0 },\n { x: width / 2, y: 0 },\n ]);\n \nreturn path;\n};\n\n//** Path Curved*/\nconst lineCurvedDown = (iPosition: number, height: number, circle: number) => {\n const position = iPosition;\n const circleWidth = circle + position;\n const trim = (position + circleWidth) / 2;\n \n const curved: any = d3Shape\n .line<LineDatum>()\n .x((d) => d.x)\n .y((d) => d.y)\n .curve(d3Shape.curveBasis)([\n { x: position - scale(20), y: 0 }, // border center left\n { x: position - scale(10), y: scale(2) },\n { x: position - scale(2), y: scale(10) },\n { x: position, y: scale(17) },\n \n { x: trim - scale(25), y: height / 2 + scale(2) },\n { x: trim - scale(10), y: height / 2 + scale(10) },\n { x: trim, y: height / 2 + scale(10) },\n { x: trim + scale(10), y: height / 2 + scale(10) },\n { x: trim + scale(25), y: height / 2 + scale(2) },\n \n { x: circleWidth, y: scale(17) }, // border center right\n { x: circleWidth + scale(2), y: scale(10) },\n { x: circleWidth + scale(10), y: 0 },\n { x: circleWidth + scale(20), y: 0 },\n ]);\n return curved;\n};\n\nexport const getPathDown = (width: number, iHeight: number, centerWidth: number, clippedTabbarHeight: number) => {\n const height = scale(iHeight);\n const circleWidth = scale(centerWidth) + scale(16);\n return `${line(width, clippedTabbarHeight)} ${lineCurvedDown(\n width /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AAE,CAAC;EAAE;EAClC;IAAEM,CAAC,EAAEO,WAAW,GAAGb,KAAK,CAAC,CAAC,CAAC;IAAEQ,CAAC,EAAER,KAAK,CAAC,EAAE;EAAE,CAAC,EAC3C;IAAEM,CAAC,EAAEO,WAAW,GAAGb,KAAK,CAAC,EAAE,CAAC;IAAEQ,CAAC,EAAE;EAAE,CAAC,EACpC;IAAEF,CAAC,EAAEO,WAAW,GAAGb,KAAK,CAAC,EAAE,CAAC;IAAEQ,CAAC,EAAE;EAAE,CAAC,CACrC,CAAC;EACJ,OAAOO,MAAM;AACf,CAAC;AAED,OAAO,MAAMG,WAAW,GAAGA,CAACf,KAAa,EAAEgB,OAAe,EAAEC,WAAmB,EAAEC,mBAA2B,KAAK;EAC/G,MAAMjB,MAAM,GAAGJ,KAAK,CAACmB,OAAO,CAAC;EAC7B,MAAMN,WAAW,GAAGb,KAAK,CAACoB,WAAW,CAAC,GAAGpB,KAAK,CAAC,EAAE,CAAC;EAClD,OAAQ,GAAEE,IAAI,CAACC,KAAK,EAAEkB,mBAAmB,CAAE,IAAGZ,cAAc,CAC1DN,KAAK,GAAG,CAAC,GAAGU,WAAW,GAAG,CAAC,EAC3BT,MAAM,EACNS,WACF,CAAE,EAAC;AACL,CAAC"}
@@ -1,149 +0,0 @@
1
- import { AccessibilityInfo } from 'react-native';
2
- import { isAndroid, removeUndefinedKeys } from './utils';
3
- let _isScreenReaderEnabled = false;
4
- AccessibilityInfo.addEventListener('screenReaderChanged', flag => {
5
- _isScreenReaderEnabled = flag;
6
- });
7
- export const isScreenReaderEnabled = () => _isScreenReaderEnabled;
8
- async function getScreenReaderStatus() {
9
- _isScreenReaderEnabled = await AccessibilityInfo.isScreenReaderEnabled();
10
- }
11
- getScreenReaderStatus();
12
- export let AccessibilityWidgetType = /*#__PURE__*/function (AccessibilityWidgetType) {
13
- AccessibilityWidgetType["BUTTON"] = "button";
14
- AccessibilityWidgetType["PICTURE"] = "picture";
15
- AccessibilityWidgetType["TEXT"] = "text";
16
- AccessibilityWidgetType["NUMBER"] = "number";
17
- AccessibilityWidgetType["TEXTAREA"] = "textarea";
18
- AccessibilityWidgetType["SELECT"] = "select";
19
- AccessibilityWidgetType["CHIPS"] = "chips";
20
- AccessibilityWidgetType["CURRENCY"] = "currency";
21
- AccessibilityWidgetType["RADIOSET"] = "radioset";
22
- AccessibilityWidgetType["CHECKBOX"] = "checkbox";
23
- AccessibilityWidgetType["TOGGLE"] = "toggle";
24
- AccessibilityWidgetType["SWITCH"] = "switch";
25
- AccessibilityWidgetType["DATE"] = "date";
26
- AccessibilityWidgetType["VIDEO"] = "video";
27
- AccessibilityWidgetType["PROGRESSBAR"] = "progressbar";
28
- AccessibilityWidgetType["PROGRESSCIRCLE"] = "progresscircle";
29
- AccessibilityWidgetType["LABEL"] = "label";
30
- AccessibilityWidgetType["ANCHOR"] = "anchor";
31
- AccessibilityWidgetType["MESSAGE"] = "message";
32
- AccessibilityWidgetType["SEARCH"] = "search";
33
- AccessibilityWidgetType["ICON"] = "icon";
34
- AccessibilityWidgetType["NAV"] = "nav";
35
- AccessibilityWidgetType["POVOVER"] = "popover";
36
- AccessibilityWidgetType["WEBVIEW"] = "webview";
37
- AccessibilityWidgetType["LINECHART"] = "linechart";
38
- return AccessibilityWidgetType;
39
- }({});
40
- ;
41
- export const getAccessibilityProps = (widgetType, accessibilityProps) => {
42
- let props = {
43
- accessible: true
44
- };
45
- if (!_isScreenReaderEnabled) {
46
- return {};
47
- }
48
- switch (widgetType) {
49
- case AccessibilityWidgetType.BUTTON:
50
- case AccessibilityWidgetType.TEXT:
51
- case AccessibilityWidgetType.NUMBER:
52
- case AccessibilityWidgetType.TEXTAREA:
53
- case AccessibilityWidgetType.SELECT:
54
- case AccessibilityWidgetType.CURRENCY:
55
- case AccessibilityWidgetType.TOGGLE:
56
- case AccessibilityWidgetType.DATE:
57
- case AccessibilityWidgetType.LABEL:
58
- case AccessibilityWidgetType.ANCHOR:
59
- case AccessibilityWidgetType.MESSAGE:
60
- case AccessibilityWidgetType.SEARCH:
61
- case AccessibilityWidgetType.PICTURE:
62
- case AccessibilityWidgetType.ICON:
63
- case AccessibilityWidgetType.NAV:
64
- case AccessibilityWidgetType.POVOVER:
65
- case AccessibilityWidgetType.WEBVIEW:
66
- case AccessibilityWidgetType.LINECHART:
67
- case AccessibilityWidgetType.VIDEO:
68
- {
69
- props.accessibilityLabel = accessibilityProps.accessibilitylabel || accessibilityProps.caption;
70
- props.accessibilityHint = accessibilityProps.hint;
71
- props.accessibilityRole = accessibilityProps.accessibilityrole;
72
- if (widgetType === AccessibilityWidgetType.BUTTON || widgetType === AccessibilityWidgetType.TEXT || widgetType === AccessibilityWidgetType.NUMBER || widgetType === AccessibilityWidgetType.TEXTAREA || widgetType === AccessibilityWidgetType.SELECT || widgetType === AccessibilityWidgetType.TOGGLE || widgetType === AccessibilityWidgetType.DATE) {
73
- props.accessibilityState = {
74
- disabled: accessibilityProps.disabled
75
- };
76
- }
77
- if ((widgetType === AccessibilityWidgetType.TEXT || widgetType === AccessibilityWidgetType.NUMBER || widgetType === AccessibilityWidgetType.TEXTAREA || widgetType === AccessibilityWidgetType.SELECT || widgetType === AccessibilityWidgetType.CURRENCY || widgetType === AccessibilityWidgetType.TOGGLE) && isAndroid()) {
78
- props.accessibilityLabelledBy = accessibilityProps.accessibilitylabelledby;
79
- }
80
- if (widgetType === AccessibilityWidgetType.NUMBER || widgetType === AccessibilityWidgetType.CURRENCY) {
81
- props.accessibilityValue = {
82
- min: accessibilityProps.minvalue,
83
- max: accessibilityProps.maxvalue
84
- };
85
- }
86
- if (widgetType === AccessibilityWidgetType.SELECT) {
87
- props.accessibilityState = {
88
- ...props.accessibilityState,
89
- expanded: accessibilityProps.expanded
90
- };
91
- }
92
- if (widgetType === AccessibilityWidgetType.TOGGLE) {
93
- props.accessibilityState = {
94
- ...props.accessibilityState,
95
- selected: accessibilityProps.selected
96
- };
97
- }
98
- break;
99
- }
100
- case AccessibilityWidgetType.CHIPS:
101
- {
102
- props.accessibilityLabel = accessibilityProps.accessibilitylabel || accessibilityProps.caption;
103
- props.accessibilityHint = accessibilityProps.hint;
104
- props.accessibilityState = {
105
- disabled: accessibilityProps.disabled,
106
- selected: accessibilityProps.selected
107
- };
108
- break;
109
- }
110
- case AccessibilityWidgetType.RADIOSET:
111
- {
112
- props.accessibilityState = {
113
- disabled: accessibilityProps.readonly || accessibilityProps.disabled,
114
- selected: accessibilityProps.selected
115
- };
116
- break;
117
- }
118
- case AccessibilityWidgetType.CHECKBOX:
119
- {
120
- props.accessibilityState = {
121
- disabled: accessibilityProps.readonly || accessibilityProps.disabled,
122
- checked: accessibilityProps.checked
123
- };
124
- break;
125
- }
126
- case AccessibilityWidgetType.SWITCH:
127
- {
128
- props.accessibilityState = {
129
- disabled: accessibilityProps.disabled,
130
- selected: accessibilityProps.selected
131
- };
132
- break;
133
- }
134
- case AccessibilityWidgetType.PROGRESSBAR:
135
- case AccessibilityWidgetType.PROGRESSCIRCLE:
136
- {
137
- props.accessibilityLabel = accessibilityProps.accessibilitylabel || accessibilityProps.caption;
138
- props.accessibilityRole = accessibilityProps.accessibilityrole;
139
- break;
140
- }
141
- default:
142
- break;
143
- }
144
- const finalProps = removeUndefinedKeys(props);
145
- // console.log('finalProps', finalProps)
146
-
147
- return finalProps;
148
- };
149
- //# sourceMappingURL=accessibility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["AccessibilityInfo","isAndroid","removeUndefinedKeys","_isScreenReaderEnabled","addEventListener","flag","isScreenReaderEnabled","getScreenReaderStatus","AccessibilityWidgetType","getAccessibilityProps","widgetType","accessibilityProps","props","accessible","BUTTON","TEXT","NUMBER","TEXTAREA","SELECT","CURRENCY","TOGGLE","DATE","LABEL","ANCHOR","MESSAGE","SEARCH","PICTURE","ICON","NAV","POVOVER","WEBVIEW","LINECHART","VIDEO","accessibilityLabel","accessibilitylabel","caption","accessibilityHint","hint","accessibilityRole","accessibilityrole","accessibilityState","disabled","accessibilityLabelledBy","accessibilitylabelledby","accessibilityValue","min","minvalue","max","maxvalue","expanded","selected","CHIPS","RADIOSET","readonly","CHECKBOX","checked","SWITCH","PROGRESSBAR","PROGRESSCIRCLE","finalProps"],"sources":["accessibility.ts"],"sourcesContent":["import { AccessibilityInfo } from 'react-native';\nimport { isAndroid, removeUndefinedKeys } from './utils';\n\nlet _isScreenReaderEnabled = false;\n\nAccessibilityInfo.addEventListener(\n 'screenReaderChanged',\n flag => {\n _isScreenReaderEnabled = flag;\n },\n);\n\nexport const isScreenReaderEnabled = () => _isScreenReaderEnabled;\n\nasync function getScreenReaderStatus() {\n _isScreenReaderEnabled = await AccessibilityInfo.isScreenReaderEnabled();\n}\n\ngetScreenReaderStatus();\n\nexport enum AccessibilityWidgetType {\n BUTTON = 'button',\n PICTURE = 'picture',\n TEXT = 'text',\n NUMBER = 'number',\n TEXTAREA = 'textarea',\n SELECT = 'select',\n CHIPS = 'chips',\n CURRENCY = 'currency',\n RADIOSET = 'radioset',\n CHECKBOX = 'checkbox',\n TOGGLE = 'toggle',\n SWITCH = 'switch',\n DATE = 'date',\n VIDEO = 'video',\n PROGRESSBAR = 'progressbar',\n PROGRESSCIRCLE = 'progresscircle',\n LABEL = 'label',\n ANCHOR = 'anchor',\n MESSAGE = 'message',\n SEARCH = 'search',\n ICON = 'icon',\n NAV = 'nav',\n POVOVER = 'popover',\n WEBVIEW = 'webview',\n LINECHART = 'linechart',\n};\n\n \nexport type AccessibilityPropsType = {\n accessible?: boolean;\n accessibilityLabel?: string;\n accessibilityLabelledBy?: string;\n accessibilityHint?: string;\n accessibilityRole?: 'button' | 'link' | 'header' | 'search' | 'image' | 'imagebutton' | 'none' | 'summary' | 'text' | 'progressbar' | 'grid' | 'alert';\n accessibilityState?: {\n disabled?: boolean;\n selected?: boolean;\n checked?: boolean;\n expanded?: boolean;\n };\n accessibilityValue?: {\n min?: number;\n max?: number;\n now?: number;\n text?: string;\n };\n accessibilityActions?: Array<{\n name: string;\n label?: string;\n }>;\n accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';\n accessibilityLanguage?: any;\n accessibilityElementsHidden?: boolean;\n accessibilityViewIsModal?: boolean;\n};\n \n\nexport const getAccessibilityProps = (widgetType: AccessibilityWidgetType, accessibilityProps: AccessibilityPropsType | any) => {\n let props: AccessibilityPropsType = {accessible: true};\n if (!_isScreenReaderEnabled) {\n return {};\n }\n switch (widgetType) {\n case AccessibilityWidgetType.BUTTON:\n case AccessibilityWidgetType.TEXT:\n case AccessibilityWidgetType.NUMBER:\n case AccessibilityWidgetType.TEXTAREA:\n case AccessibilityWidgetType.SELECT:\n case AccessibilityWidgetType.CURRENCY:\n case AccessibilityWidgetType.TOGGLE:\n case AccessibilityWidgetType.DATE:\n case AccessibilityWidgetType.LABEL:\n case AccessibilityWidgetType.ANCHOR:\n case AccessibilityWidgetType.MESSAGE: \n case AccessibilityWidgetType.SEARCH: \n case AccessibilityWidgetType.PICTURE: \n case AccessibilityWidgetType.ICON:\n case AccessibilityWidgetType.NAV:\n case AccessibilityWidgetType.POVOVER:\n case AccessibilityWidgetType.WEBVIEW:\n case AccessibilityWidgetType.LINECHART: \n case AccessibilityWidgetType.VIDEO: {\n props.accessibilityLabel = accessibilityProps.accessibilitylabel || accessibilityProps.caption;\n props.accessibilityHint = accessibilityProps.hint;\n props.accessibilityRole = accessibilityProps.accessibilityrole;\n\n if (\n widgetType === AccessibilityWidgetType.BUTTON ||\n widgetType === AccessibilityWidgetType.TEXT ||\n widgetType === AccessibilityWidgetType.NUMBER ||\n widgetType === AccessibilityWidgetType.TEXTAREA ||\n widgetType === AccessibilityWidgetType.SELECT ||\n widgetType === AccessibilityWidgetType.TOGGLE ||\n widgetType === AccessibilityWidgetType.DATE\n ) {\n props.accessibilityState = { disabled: accessibilityProps.disabled };\n }\n if (\n (widgetType === AccessibilityWidgetType.TEXT ||\n widgetType === AccessibilityWidgetType.NUMBER ||\n widgetType === AccessibilityWidgetType.TEXTAREA ||\n widgetType === AccessibilityWidgetType.SELECT ||\n widgetType === AccessibilityWidgetType.CURRENCY ||\n widgetType === AccessibilityWidgetType.TOGGLE) &&\n isAndroid()\n ) {\n props.accessibilityLabelledBy =\n accessibilityProps.accessibilitylabelledby;\n }\n if (\n widgetType === AccessibilityWidgetType.NUMBER ||\n widgetType === AccessibilityWidgetType.CURRENCY\n ) {\n props.accessibilityValue = {\n min: accessibilityProps.minvalue,\n max: accessibilityProps.maxvalue,\n };\n }\n if (widgetType === AccessibilityWidgetType.SELECT) {\n props.accessibilityState = {\n ...props.accessibilityState,\n expanded: accessibilityProps.expanded,\n };\n }\n if (widgetType === AccessibilityWidgetType.TOGGLE) {\n props.accessibilityState = {\n ...props.accessibilityState,\n selected: accessibilityProps.selected,\n };\n }\n break;\n }\n\n case AccessibilityWidgetType.CHIPS: {\n props.accessibilityLabel = accessibilityProps.accessibilitylabel || accessibilityProps.caption;\n props.accessibilityHint = accessibilityProps.hint;\n props.accessibilityState = {\n disabled: accessibilityProps.disabled,\n selected: accessibilityProps.selected,\n };\n break;\n }\n\n case AccessibilityWidgetType.RADIOSET: {\n props.accessibilityState = {\n disabled: accessibilityProps.readonly || accessibilityProps.disabled,\n selected: accessibilityProps.selected,\n };\n break;\n }\n\n case AccessibilityWidgetType.CHECKBOX: {\n props.accessibilityState = {\n disabled: accessibilityProps.readonly || accessibilityProps.disabled,\n checked: accessibilityProps.checked,\n };\n break;\n }\n\n case AccessibilityWidgetType.SWITCH: {\n props.accessibilityState = {\n disabled: accessibilityProps.disabled,\n selected: accessibilityProps.selected,\n };\n break;\n }\n case AccessibilityWidgetType.PROGRESSBAR:\n case AccessibilityWidgetType.PROGRESSCIRCLE: {\n props.accessibilityLabel = accessibilityProps.accessibilitylabel || accessibilityProps.caption;\n props.accessibilityRole = accessibilityProps.accessibilityrole;\n break;\n }\n default:\n break;\n }\n\n const finalProps = removeUndefinedKeys(props);\n // console.log('finalProps', finalProps)\n\n return finalProps;\n}\n "],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,cAAc;AAChD,SA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IAEA,KAAK1C,uBAAuB,CAAC4C,QAAQ;MAAE;QACrCxC,KAAK,CAAC4B,kBAAkB,GAAG;UACzBC,QAAQ,EAAE9B,kBAAkB,CAAC0C,QAAQ,IAAI1C,kBAAkB,CAAC8B,QAAQ;UACpES,QAAQ,EAAEvC,kBAAkB,CAACuC;QAC/B,CAAC;QACD;MACF;IAEA,KAAK1C,uBAAuB,CAAC8C,QAAQ;MAAE;QACrC1C,KAAK,CAAC4B,kBAAkB,GAAG;UACzBC,QAAQ,EAAE9B,kBAAkB,CAAC0C,QAAQ,IAAK1C,kBAAkB,CAAC8B,QAAQ;UACrEc,OAAO,EAAE5C,kBAAkB,CAAC4C;QAC9B,CAAC;QACD;MACF;IAEA,KAAK/C,uBAAuB,CAACgD,MAAM;MAAE;QACnC5C,KAAK,CAAC4B,kBAAkB,GAAG;UACzBC,QAAQ,EAAE9B,kBAAkB,CAAC8B,QAAQ;UACrCS,QAAQ,EAAEvC,kBAAkB,CAACuC;QAC/B,CAAC;QACD;MACF;IACA,KAAK1C,uBAAuB,CAACiD,WAAW;IACxC,KAAKjD,uBAAuB,CAACkD,cAAc;MAAE;QAC3C9C,KAAK,CAACqB,kBAAkB,GAAGtB,kBAAkB,CAACuB,kBAAkB,IAAIvB,kBAAkB,CAACwB,OAAO;QAC9FvB,KAAK,CAAC0B,iBAAiB,GAAG3B,kBAAkB,CAAC4B,iBAAiB;QAC9D;MACF;IACA;MACE;EACJ;EAEA,MAAMoB,UAAU,GAAGzD,mBAAmB,CAACU,KAAK,CAAC;EAC7C;;EAEA,OAAO+C,UAAU;AACnB,CAAC"}
@@ -1,45 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { Animated, Text } from 'react-native';
3
- import { Theme } from '@wavemaker/app-rn-runtime/styles/theme';
4
- export const FloatingLabel = props => {
5
- var _props$style, _props$style2;
6
- const width = ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.width) || 160;
7
- const [labelPositionX] = useState(new Animated.Value(0));
8
- const [labelPositionY] = useState(new Animated.Value(0));
9
- const [labelScale] = useState(new Animated.Value(1));
10
- const fontSize = ((_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.fontSize) || 16;
11
- useEffect(() => {
12
- Animated.parallel([Animated.timing(labelPositionX, {
13
- toValue: props.moveUp ? -1 * 0.1 * width : 0,
14
- duration: 200,
15
- useNativeDriver: true
16
- }), Animated.timing(labelPositionY, {
17
- toValue: props.moveUp ? -1 * fontSize : 0,
18
- duration: 200,
19
- useNativeDriver: true
20
- }), Animated.timing(labelScale, {
21
- toValue: props.moveUp ? 0.8 : 1,
22
- duration: 200,
23
- useNativeDriver: true
24
- })]).start();
25
- }, [props.moveUp]);
26
- return /*#__PURE__*/React.createElement(Animated.View, {
27
- style: [{
28
- position: 'absolute',
29
- zIndex: 1,
30
- width: width,
31
- transform: [{
32
- translateY: labelPositionY
33
- }, {
34
- translateX: labelPositionX
35
- }, {
36
- scale: labelScale
37
- }]
38
- }, props.style],
39
- pointerEvents: "none"
40
- }, /*#__PURE__*/React.createElement(Text, {
41
- style: Theme.BASE.getTextStyle(props.style),
42
- ellipsizeMode: "tail"
43
- }, props.label));
44
- };
45
- //# sourceMappingURL=floatinglabel.component.js.map