@wavemaker/app-rn-runtime 11.6.0-rc.5484 → 11.7.0-next.42251

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -9
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.styles.js +6 -3
  4. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  5. app-rn-runtime/components/advanced/webview/webview.component.js +33 -14
  6. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/webview/webview.props.js +3 -1
  8. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.component.js +22 -8
  10. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  11. app-rn-runtime/components/basic/anchor/anchor.props.js +7 -0
  12. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  13. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -1
  14. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/animatedview.component.js +5 -3
  16. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  17. app-rn-runtime/components/basic/button/button.component.js +41 -8
  18. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  19. app-rn-runtime/components/basic/button/button.props.js +7 -0
  20. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  21. app-rn-runtime/components/basic/button/button.styles.js +9 -10
  22. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  23. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +13 -5
  24. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  25. app-rn-runtime/components/basic/icon/icon.component.js +64 -12
  26. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  27. app-rn-runtime/components/basic/icon/icon.props.js +7 -0
  28. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  29. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  30. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/label/label.component.js +34 -25
  32. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  33. app-rn-runtime/components/basic/label/label.props.js +4 -0
  34. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  35. app-rn-runtime/components/basic/label/label.styles.js +4 -5
  36. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  37. app-rn-runtime/components/basic/message/message.component.js +3 -2
  38. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  39. app-rn-runtime/components/basic/message/message.props.js +3 -0
  40. app-rn-runtime/components/basic/message/message.props.js.map +1 -1
  41. app-rn-runtime/components/basic/message/message.styles.js +3 -1
  42. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  43. app-rn-runtime/components/basic/picture/picture.component.js +4 -2
  44. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  45. app-rn-runtime/components/basic/picture/picture.props.js +3 -0
  46. app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
  47. app-rn-runtime/components/basic/picture/picture.styles.js +3 -1
  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 +2 -0
  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 +3 -2
  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 +2 -0
  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 +2 -1
  58. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  59. app-rn-runtime/components/basic/search/search.props.js +3 -0
  60. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  61. app-rn-runtime/components/basic/search/search.styles.js +6 -5
  62. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  63. app-rn-runtime/components/basic/skeleton/skeleton.component.js +0 -1
  64. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  65. app-rn-runtime/components/basic/video/video.component.js +4 -2
  66. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  67. app-rn-runtime/components/basic/video/video.props.js +3 -0
  68. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  69. app-rn-runtime/components/chart/area-chart/area-chart.component.js +34 -24
  70. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  71. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +29 -16
  72. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  73. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +0 -2
  74. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  75. app-rn-runtime/components/chart/basechart.component.js +33 -7
  76. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  77. app-rn-runtime/components/chart/basechart.props.js +7 -2
  78. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  79. app-rn-runtime/components/chart/basechart.styles.js +9 -2
  80. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  81. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +4 -2
  82. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  83. app-rn-runtime/components/chart/line-chart/line-chart.component.js +27 -20
  84. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  85. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  86. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +7 -4
  87. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  88. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +33 -10
  89. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  90. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -0
  91. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  92. app-rn-runtime/components/chart/staticdata.js +215 -0
  93. app-rn-runtime/components/chart/staticdata.js.map +1 -0
  94. app-rn-runtime/components/container/container.component.js +11 -2
  95. app-rn-runtime/components/container/container.component.js.map +1 -1
  96. app-rn-runtime/components/container/container.props.js +1 -0
  97. app-rn-runtime/components/container/container.props.js.map +1 -1
  98. app-rn-runtime/components/container/panel/panel.component.js +6 -2
  99. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  100. app-rn-runtime/components/container/panel/panel.props.js +4 -0
  101. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  102. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
  103. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizard.component.js +17 -14
  105. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  106. app-rn-runtime/components/container/wizard/wizard.styles.js +19 -3
  107. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  108. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +27 -2
  109. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  110. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +6 -0
  111. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  112. app-rn-runtime/components/data/card/card.component.js +7 -3
  113. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  114. app-rn-runtime/components/data/card/card.props.js +4 -0
  115. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  116. app-rn-runtime/components/data/form/form-action/form-action.styles.js +2 -1
  117. app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
  118. app-rn-runtime/components/data/form/form-field/form-field.component.js +5 -1
  119. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  120. app-rn-runtime/components/data/list/list.component.js +136 -25
  121. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  122. app-rn-runtime/components/data/list/list.props.js +4 -1
  123. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  124. app-rn-runtime/components/data/list/list.styles.js +9 -0
  125. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  126. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +4 -1
  127. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  128. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +3 -0
  129. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
  130. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +13 -6
  131. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  132. app-rn-runtime/components/device/camera/camera.component.js +4 -1
  133. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  134. app-rn-runtime/components/device/camera/camera.props.js +3 -0
  135. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  136. app-rn-runtime/components/device/camera/camera.styles.js +12 -4
  137. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  138. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -0
  139. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  140. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +4 -0
  141. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  142. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +2 -1
  143. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  144. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +4 -0
  145. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  146. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +4 -0
  147. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  148. app-rn-runtime/components/dialogs/dialog/dialog.component.js +7 -3
  149. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  150. app-rn-runtime/components/dialogs/dialog/dialog.props.js +4 -0
  151. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  152. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +11 -2
  153. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  154. app-rn-runtime/components/input/basedataset/basedataset.props.js +4 -0
  155. app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
  156. app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
  157. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  158. app-rn-runtime/components/input/baseinput/baseinput.props.js +4 -0
  159. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  160. app-rn-runtime/components/input/basenumber/basenumber.component.js +16 -10
  161. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  162. app-rn-runtime/components/input/basenumber/basenumber.props.js +4 -0
  163. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  164. app-rn-runtime/components/input/checkbox/checkbox.component.js +12 -5
  165. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  166. app-rn-runtime/components/input/checkbox/checkbox.styles.js +35 -5
  167. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  168. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +13 -6
  169. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  170. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +39 -10
  171. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  172. app-rn-runtime/components/input/chips/chips.component.js +5 -1
  173. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  174. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  175. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  176. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  177. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  178. app-rn-runtime/components/input/currency/currency.component.js +18 -3
  179. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  180. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  181. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  182. app-rn-runtime/components/input/currency/currency.styles.js +19 -1
  183. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  184. app-rn-runtime/components/input/epoch/base-datetime.component.js +76 -10
  185. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  186. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  187. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  188. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  189. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  190. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  191. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  192. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +5 -0
  193. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  194. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +49 -1
  195. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  196. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  197. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  198. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  199. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  200. app-rn-runtime/components/input/fileupload/fileupload.component.js +2 -0
  201. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  202. app-rn-runtime/components/input/fileupload/fileupload.props.js +2 -0
  203. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  204. app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
  205. app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
  206. app-rn-runtime/components/input/number/number.component.js +13 -2
  207. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  208. app-rn-runtime/components/input/number/number.props.js +1 -0
  209. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  210. app-rn-runtime/components/input/number/number.styles.js +17 -0
  211. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  212. app-rn-runtime/components/input/radioset/radioset.component.js +7 -2
  213. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  214. app-rn-runtime/components/input/select/select.component.js +7 -3
  215. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  216. app-rn-runtime/components/input/select/select.styles.js +5 -1
  217. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  218. app-rn-runtime/components/input/slider/slider.styles.js +3 -3
  219. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  220. app-rn-runtime/components/input/switch/switch.component.js +8 -1
  221. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  222. app-rn-runtime/components/input/switch/switch.styles.js +10 -5
  223. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  224. app-rn-runtime/components/input/text/text.component.js +13 -1
  225. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  226. app-rn-runtime/components/input/text/text.props.js +1 -0
  227. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  228. app-rn-runtime/components/input/text/text.styles.js +17 -0
  229. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  230. app-rn-runtime/components/input/textarea/textarea.component.js +13 -1
  231. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  232. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  233. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  234. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  235. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  236. app-rn-runtime/components/input/toggle/toggle.component.js +48 -5
  237. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  238. app-rn-runtime/components/input/toggle/toggle.props.js +4 -0
  239. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  240. app-rn-runtime/components/input/toggle/toggle.styles.js +5 -12
  241. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  242. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +6 -1
  243. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  244. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -0
  245. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  246. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +11 -2
  247. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  248. app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -2
  249. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  250. app-rn-runtime/components/navigation/menu/menu.styles.js +8 -5
  251. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  252. app-rn-runtime/components/navigation/navitem/navitem.component.js +8 -5
  253. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  254. app-rn-runtime/components/navigation/navitem/navitem.props.js +3 -0
  255. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  256. app-rn-runtime/components/navigation/popover/popover.component.js +10 -3
  257. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  258. app-rn-runtime/components/navigation/popover/popover.props.js +7 -0
  259. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  260. app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
  261. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  262. app-rn-runtime/components/page/page-content/page-content.component.js +7 -1
  263. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  264. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  265. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  266. app-rn-runtime/components/page/tabbar/tabbar.component.js +44 -10
  267. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  268. app-rn-runtime/components/page/tabbar/tabbar.styles.js +82 -15
  269. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  270. app-rn-runtime/core/accessibility.js +149 -0
  271. app-rn-runtime/core/accessibility.js.map +1 -0
  272. app-rn-runtime/core/base.component.js +21 -3
  273. app-rn-runtime/core/base.component.js.map +1 -1
  274. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  275. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  276. app-rn-runtime/core/components/textinput.component.js +25 -2
  277. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  278. app-rn-runtime/core/event-notifier.js +22 -1
  279. app-rn-runtime/core/event-notifier.js.map +1 -1
  280. app-rn-runtime/core/tappable.component.js +37 -10
  281. app-rn-runtime/core/tappable.component.js.map +1 -1
  282. app-rn-runtime/core/utils.js +11 -0
  283. app-rn-runtime/core/utils.js.map +1 -1
  284. app-rn-runtime/gestures/swipe.animation.js +34 -1
  285. app-rn-runtime/gestures/swipe.animation.js.map +1 -1
  286. app-rn-runtime/package.json +8 -3
  287. app-rn-runtime/runtime/App.js +12 -7
  288. app-rn-runtime/runtime/App.js.map +1 -1
  289. app-rn-runtime/runtime/base-page.component.js +1 -1
  290. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  291. app-rn-runtime/runtime/services/app-security.service.js +2 -1
  292. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  293. app-rn-runtime/runtime/services/webprocess.service.js +0 -1
  294. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  295. app-rn-runtime/styles/background.component.js +1 -1
  296. app-rn-runtime/styles/background.component.js.map +1 -1
  297. app-rn-runtime/styles/theme.js +43 -0
  298. app-rn-runtime/styles/theme.js.map +1 -1
  299. app-rn-runtime/styles/theme.variables.js +30 -6
  300. app-rn-runtime/styles/theme.variables.js.map +1 -1
  301. app-rn-runtime/variables/model-variable.js +2 -1
  302. app-rn-runtime/variables/model-variable.js.map +1 -1
  303. app-rn-runtime/variables/service-variable.js +14 -6
  304. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
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();\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AK,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"}
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,aAAa,CAAC,CAAC;MAC/BC,MAAM,EAAEL,MAAM,CAACK,MAAM;MACrBC,aAAa,EAAEN,MAAM,CAACM;IACxB,CAAC;IACD,KAAK,CAACL,QAAQ,CAAC;IAACM,eAAA;IAAAA,eAAA;IAChB,IAAI,CAACP,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACQ,MAAM,CAAC,CAAC;EACf;EAEAA,MAAMA,CAACC,MAAY,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC7D,IAAIC,MAAM;IACV,IAA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I,CAACc,UAAU,GAAG5B,KAAK,CAAC2B,MAAM,CAAC;IACnC;IACA,OAAOE,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B;AACF"}
@@ -2,7 +2,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
2
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import { VariableEvents } from './base-variable';
5
- import { isEqual } from 'lodash';
5
+ import { isEqual, isString } from 'lodash';
6
6
  import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
7
7
  import { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';
8
8
  import httpService from '@wavemaker/app-rn-runtime/variables/http.service';
@@ -64,6 +64,7 @@ export class ServiceVariable extends _ServiceVariable {
64
64
  this.subscribe(VariableEvents.AFTER_INVOKE, () => {
65
65
  this.dataBinding = {};
66
66
  });
67
+ this.init();
67
68
  }
68
69
  invokeOnParamChange() {
69
70
  const last = this.params;
@@ -73,11 +74,18 @@ export class ServiceVariable extends _ServiceVariable {
73
74
  }
74
75
  return Promise.resolve(this);
75
76
  }
76
- doNext(currentPage) {
77
- // this.invoke({
78
- // page: currentPage
79
- // });
80
- return Promise.reject(this);
77
+ async doNext() {
78
+ let page = 0;
79
+ if (isString(this.pagination.page)) {
80
+ page = parseInt(this.pagination.page) + 1 + '';
81
+ } else {
82
+ page = this.pagination.page + 1;
83
+ }
84
+ return new Promise((resolve, reject) => {
85
+ this.invoke({
86
+ page: page
87
+ }, dataset => resolve(dataset), reject);
88
+ });
81
89
  }
82
90
  onDataUpdated() {
83
91
  this.appConfig.refresh(false);
@@ -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","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,C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,MAAM,GAAG9C,QAAQ,CAAC,CAAC,CAAC,EAAS,IAAI,CAAC8C,MAAM,EAAE,IAAI,CAAClC,WAAW,CAAC;IAChE,IAAImB,OAAO,EAAE;MACX,IAAI,CAACe,MAAM,GAAG9C,QAAQ,CAAC,CAAC,CAAC,EAAS,IAAI,CAAC8C,MAAM,EAAEf,OAAO,CAAC0B,WAAW,GAAG1B,OAAO,CAAC0B,WAAW,GAAG1B,OAAO,CAAC;IACrG;IACAA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IACvBA,OAAO,CAAC0B,WAAW,GAAG,IAAI,CAACX,MAAM;IAC/B;IACF;IACA,IAAI,CAAC1B,WAAW,GAAG,IAAI,CAACb,MAAM,CAACc,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
+ {"version":3,"names":["VariableEvents","isEqual","isString","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","page","pagination","parseInt","reject","dataset","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn, isString } 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 async doNext() {\n let page = 0 as any;\n if (isString(this.pagination.page)) {\n page = (parseInt(this.pagination.page) + 1) + '';\n } else {\n page = this.pagination.page + 1;\n }\n return new Promise((resolve, reject) => {\n this.invoke({\n page: page\n }, \n (dataset: any) => resolve(dataset), \n reject);\n });\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,EAAYC,QAAQ,QAAQ,QAAQ;AAEpD,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;MACzB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