@wavemaker/app-ng-runtime 12.0.0-next.45752 → 12.0.0-next.46502

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +53 -45
  2. app-ng-runtime/build-task/esm2022/basic/default/anchor/anchor.build.mjs +2 -2
  3. app-ng-runtime/build-task/esm2022/basic/default/html/html.build.mjs +2 -2
  4. app-ng-runtime/build-task/esm2022/basic/default/icon/icon.build.mjs +2 -2
  5. app-ng-runtime/build-task/esm2022/basic/default/label/label.build.mjs +2 -2
  6. app-ng-runtime/build-task/esm2022/basic/default/picture/picture.build.mjs +2 -2
  7. app-ng-runtime/build-task/esm2022/basic/default/spinner/spinner.build.mjs +2 -2
  8. app-ng-runtime/build-task/esm2022/basic/progress/progress-circle/progress-circle.build.mjs +7 -2
  9. app-ng-runtime/build-task/esm2022/basic/rich-text-editor/rich-text-editor.build.mjs +2 -2
  10. app-ng-runtime/build-task/esm2022/containers/accordion/accordion-pane/accordion-pane.build.mjs +2 -2
  11. app-ng-runtime/build-task/esm2022/containers/accordion/accordion.build.mjs +3 -3
  12. app-ng-runtime/build-task/esm2022/containers/tile/tile.build.mjs +2 -2
  13. app-ng-runtime/build-task/esm2022/containers/wizard/wizard.build.mjs +2 -2
  14. app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +4 -4
  15. app-ng-runtime/build-task/esm2022/device/barcode-scanner/barcode-scanner.build.mjs +2 -2
  16. app-ng-runtime/build-task/esm2022/device/camera/camera.build.mjs +2 -2
  17. app-ng-runtime/build-task/esm2022/dialogs/alert-dialog/alert-dialog.build.mjs +2 -2
  18. app-ng-runtime/build-task/esm2022/input/calendar/calendar.build.mjs +2 -2
  19. app-ng-runtime/build-task/esm2022/input/chips/chips.build.mjs +2 -2
  20. app-ng-runtime/build-task/esm2022/input/color-picker/color-picker.build.mjs +3 -3
  21. app-ng-runtime/build-task/esm2022/input/currency/currency.build.mjs +3 -3
  22. app-ng-runtime/build-task/esm2022/input/default/button/button.build.mjs +2 -2
  23. app-ng-runtime/build-task/esm2022/input/default/button-group/button-group.build.mjs +2 -2
  24. app-ng-runtime/build-task/esm2022/input/default/switch/switch.build.mjs +2 -2
  25. app-ng-runtime/build-task/esm2022/input/file-upload/file-upload.build.mjs +6 -2
  26. app-ng-runtime/build-task/esm2022/page/footer/footer.build.mjs +2 -2
  27. app-ng-runtime/build-task/esm2022/page/header/header.build.mjs +2 -2
  28. app-ng-runtime/build-task/esm2022/page/layout.build.mjs +2 -2
  29. app-ng-runtime/build-task/esm2022/page/left-panel/left-panel.build.mjs +2 -2
  30. app-ng-runtime/build-task/esm2022/page/page.build.mjs +2 -2
  31. app-ng-runtime/build-task/esm2022/page/right-panel/right-panel.build.mjs +2 -2
  32. app-ng-runtime/build-task/esm2022/page/top-nav/top-nav.build.mjs +2 -2
  33. app-ng-runtime/build-task/fesm2022/index.mjs +53 -45
  34. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  35. app-ng-runtime/components/advanced/carousel/bundles/index.umd.js +1 -1
  36. app-ng-runtime/components/advanced/carousel/esm2022/carousel.animator.mjs +2 -2
  37. app-ng-runtime/components/advanced/carousel/fesm2022/index.mjs +1 -1
  38. app-ng-runtime/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
  39. app-ng-runtime/components/base/bundles/index.umd.js +1 -6
  40. app-ng-runtime/components/base/esm2022/pipes/custom-pipes.mjs +3 -3
  41. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +1 -6
  42. app-ng-runtime/components/base/fesm2022/index.mjs +1 -6
  43. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  44. app-ng-runtime/components/base/pipes/custom-pipes.d.ts +1 -1
  45. app-ng-runtime/components/basic/default/anchor/anchor.component.d.ts +1 -0
  46. app-ng-runtime/components/basic/default/audio/audio.component.d.ts +3 -0
  47. app-ng-runtime/components/basic/default/bundles/index.umd.js +39 -19
  48. app-ng-runtime/components/basic/default/esm2022/anchor/anchor.component.mjs +4 -4
  49. app-ng-runtime/components/basic/default/esm2022/anchor/anchor.props.mjs +2 -1
  50. app-ng-runtime/components/basic/default/esm2022/audio/audio.component.mjs +14 -6
  51. app-ng-runtime/components/basic/default/esm2022/audio/audio.props.mjs +2 -1
  52. app-ng-runtime/components/basic/default/esm2022/html/html.props.mjs +2 -1
  53. app-ng-runtime/components/basic/default/esm2022/icon/icon.component.mjs +6 -7
  54. app-ng-runtime/components/basic/default/esm2022/icon/icon.props.mjs +2 -1
  55. app-ng-runtime/components/basic/default/esm2022/iframe/iframe.component.mjs +3 -3
  56. app-ng-runtime/components/basic/default/esm2022/iframe/iframe.props.mjs +3 -2
  57. app-ng-runtime/components/basic/default/esm2022/label/label.props.mjs +1 -1
  58. app-ng-runtime/components/basic/default/esm2022/picture/picture.directive.mjs +2 -2
  59. app-ng-runtime/components/basic/default/esm2022/picture/picture.props.mjs +3 -1
  60. app-ng-runtime/components/basic/default/esm2022/spinner/spinner.props.mjs +3 -2
  61. app-ng-runtime/components/basic/default/esm2022/video/video.component.mjs +8 -4
  62. app-ng-runtime/components/basic/default/esm2022/video/video.props.mjs +2 -1
  63. app-ng-runtime/components/basic/default/fesm2022/index.mjs +39 -19
  64. app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
  65. app-ng-runtime/components/basic/default/icon/icon.component.d.ts +1 -0
  66. app-ng-runtime/components/basic/default/iframe/iframe.component.d.ts +1 -0
  67. app-ng-runtime/components/basic/default/picture/picture.directive.d.ts +2 -1
  68. app-ng-runtime/components/basic/default/video/video.component.d.ts +2 -0
  69. app-ng-runtime/components/basic/progress/bundles/index.umd.js +17 -9
  70. app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +9 -5
  71. app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.props.mjs +2 -1
  72. app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +8 -6
  73. app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.props.mjs +2 -1
  74. app-ng-runtime/components/basic/progress/fesm2022/index.mjs +17 -9
  75. app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
  76. app-ng-runtime/components/basic/progress/progress-bar/progress-bar.component.d.ts +2 -0
  77. app-ng-runtime/components/basic/progress/progress-circle/progress-circle.component.d.ts +3 -1
  78. app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +2 -0
  79. app-ng-runtime/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +2 -1
  80. app-ng-runtime/components/basic/rich-text-editor/esm2022/rich-text-editor.props.mjs +2 -1
  81. app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs +2 -0
  82. app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  83. app-ng-runtime/components/basic/search/bundles/index.umd.js +16 -9
  84. app-ng-runtime/components/basic/search/esm2022/search.component.mjs +19 -13
  85. app-ng-runtime/components/basic/search/esm2022/search.props.mjs +2 -1
  86. app-ng-runtime/components/basic/search/fesm2022/index.mjs +16 -9
  87. app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
  88. app-ng-runtime/components/basic/search/search.component.d.ts +4 -2
  89. app-ng-runtime/components/chart/bundles/index.umd.js +1 -0
  90. app-ng-runtime/components/chart/esm2022/chart.utils.mjs +2 -1
  91. app-ng-runtime/components/chart/fesm2022/index.mjs +1 -0
  92. app-ng-runtime/components/chart/fesm2022/index.mjs.map +1 -1
  93. app-ng-runtime/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +1 -0
  94. app-ng-runtime/components/containers/accordion/bundles/index.umd.js +15 -9
  95. app-ng-runtime/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +13 -10
  96. app-ng-runtime/components/containers/accordion/esm2022/accordion.directive.mjs +4 -1
  97. app-ng-runtime/components/containers/accordion/fesm2022/index.mjs +15 -9
  98. app-ng-runtime/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  99. app-ng-runtime/components/containers/panel/bundles/index.umd.js +14 -14
  100. app-ng-runtime/components/containers/panel/esm2022/panel.component.mjs +15 -15
  101. app-ng-runtime/components/containers/panel/fesm2022/index.mjs +14 -14
  102. app-ng-runtime/components/containers/panel/fesm2022/index.mjs.map +1 -1
  103. app-ng-runtime/components/containers/tabs/bundles/index.umd.js +2 -2
  104. app-ng-runtime/components/containers/tabs/esm2022/tabs.component.mjs +3 -3
  105. app-ng-runtime/components/containers/tabs/fesm2022/index.mjs +2 -2
  106. app-ng-runtime/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  107. app-ng-runtime/components/containers/wizard/bundles/index.umd.js +6 -6
  108. app-ng-runtime/components/containers/wizard/esm2022/wizard.component.mjs +7 -7
  109. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs +6 -6
  110. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  111. app-ng-runtime/components/data/list/bundles/index.umd.js +19 -11
  112. app-ng-runtime/components/data/list/esm2022/list-item.directive.mjs +10 -1
  113. app-ng-runtime/components/data/list/esm2022/list.component.mjs +12 -12
  114. app-ng-runtime/components/data/list/fesm2022/index.mjs +20 -12
  115. app-ng-runtime/components/data/list/fesm2022/index.mjs.map +1 -1
  116. app-ng-runtime/components/data/live-table/bundles/index.umd.js +2 -2
  117. app-ng-runtime/components/data/live-table/esm2022/live-table.component.mjs +3 -3
  118. app-ng-runtime/components/data/live-table/fesm2022/index.mjs +2 -2
  119. app-ng-runtime/components/data/live-table/fesm2022/index.mjs.map +1 -1
  120. app-ng-runtime/components/data/pagination/bundles/index.umd.js +2 -0
  121. app-ng-runtime/components/data/pagination/esm2022/pagination.component.mjs +3 -1
  122. app-ng-runtime/components/data/pagination/fesm2022/index.mjs +2 -0
  123. app-ng-runtime/components/data/pagination/fesm2022/index.mjs.map +1 -1
  124. app-ng-runtime/components/data/table/bundles/index.umd.js +42 -8
  125. app-ng-runtime/components/data/table/esm2022/table-column/table-column.directive.mjs +14 -5
  126. app-ng-runtime/components/data/table/esm2022/table.component.mjs +28 -5
  127. app-ng-runtime/components/data/table/esm2022/table.props.mjs +3 -1
  128. app-ng-runtime/components/data/table/fesm2022/index.mjs +43 -9
  129. app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
  130. app-ng-runtime/components/data/table/table.component.d.ts +7 -0
  131. app-ng-runtime/components/dialogs/alert-dialog/bundles/index.umd.js +6 -4
  132. app-ng-runtime/components/dialogs/alert-dialog/esm2022/alert-dialog.component.mjs +7 -5
  133. app-ng-runtime/components/dialogs/alert-dialog/fesm2022/index.mjs +6 -4
  134. app-ng-runtime/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
  135. app-ng-runtime/components/dialogs/confirm-dialog/bundles/index.umd.js +8 -5
  136. app-ng-runtime/components/dialogs/confirm-dialog/esm2022/confirm-dialog.component.mjs +9 -6
  137. app-ng-runtime/components/dialogs/confirm-dialog/fesm2022/index.mjs +8 -5
  138. app-ng-runtime/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
  139. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +9 -3
  140. app-ng-runtime/components/dialogs/default/dialog-header/dialog-header.component.d.ts +2 -1
  141. app-ng-runtime/components/dialogs/default/esm2022/base-dialog.mjs +2 -1
  142. app-ng-runtime/components/dialogs/default/esm2022/dialog-header/dialog-header.component.mjs +9 -4
  143. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +9 -3
  144. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  145. app-ng-runtime/components/dialogs/design-dialog/bundles/index.umd.js +4 -4
  146. app-ng-runtime/components/dialogs/design-dialog/esm2022/dialog.component.mjs +5 -5
  147. app-ng-runtime/components/dialogs/design-dialog/fesm2022/index.mjs +4 -4
  148. app-ng-runtime/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
  149. app-ng-runtime/components/dialogs/iframe-dialog/bundles/index.umd.js +9 -5
  150. app-ng-runtime/components/dialogs/iframe-dialog/esm2022/iframe-dialog.component.mjs +10 -6
  151. app-ng-runtime/components/dialogs/iframe-dialog/fesm2022/index.mjs +9 -5
  152. app-ng-runtime/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
  153. app-ng-runtime/components/dialogs/partial-dialog/bundles/index.umd.js +9 -5
  154. app-ng-runtime/components/dialogs/partial-dialog/esm2022/partial-dialog.component.mjs +10 -6
  155. app-ng-runtime/components/dialogs/partial-dialog/fesm2022/index.mjs +9 -5
  156. app-ng-runtime/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
  157. app-ng-runtime/components/input/calendar/bundles/index.umd.js +2 -4
  158. app-ng-runtime/components/input/calendar/esm2022/calendar.component.mjs +3 -5
  159. app-ng-runtime/components/input/calendar/fesm2022/index.mjs +2 -4
  160. app-ng-runtime/components/input/calendar/fesm2022/index.mjs.map +1 -1
  161. app-ng-runtime/components/input/chips/bundles/index.umd.js +25 -7
  162. app-ng-runtime/components/input/chips/esm2022/chips.component.mjs +25 -8
  163. app-ng-runtime/components/input/chips/esm2022/chips.props.mjs +2 -1
  164. app-ng-runtime/components/input/chips/fesm2022/index.mjs +25 -7
  165. app-ng-runtime/components/input/chips/fesm2022/index.mjs.map +1 -1
  166. app-ng-runtime/components/input/color-picker/bundles/index.umd.js +5 -3
  167. app-ng-runtime/components/input/color-picker/color-picker.component.d.ts +1 -0
  168. app-ng-runtime/components/input/color-picker/esm2022/color-picker.component.mjs +6 -5
  169. app-ng-runtime/components/input/color-picker/esm2022/color-picker.props.mjs +2 -1
  170. app-ng-runtime/components/input/color-picker/fesm2022/index.mjs +5 -3
  171. app-ng-runtime/components/input/color-picker/fesm2022/index.mjs.map +1 -1
  172. app-ng-runtime/components/input/currency/bundles/index.umd.js +4 -3
  173. app-ng-runtime/components/input/currency/currency.component.d.ts +1 -0
  174. app-ng-runtime/components/input/currency/esm2022/currency.component.mjs +6 -6
  175. app-ng-runtime/components/input/currency/esm2022/currency.props.mjs +2 -1
  176. app-ng-runtime/components/input/currency/fesm2022/index.mjs +4 -3
  177. app-ng-runtime/components/input/currency/fesm2022/index.mjs.map +1 -1
  178. app-ng-runtime/components/input/default/bundles/index.umd.js +171 -94
  179. app-ng-runtime/components/input/default/button/button.component.d.ts +1 -0
  180. app-ng-runtime/components/input/default/checkbox/checkbox.component.d.ts +1 -0
  181. app-ng-runtime/components/input/default/esm2022/base-form.component.mjs +3 -3
  182. app-ng-runtime/components/input/default/esm2022/button/button.component.mjs +1 -1
  183. app-ng-runtime/components/input/default/esm2022/button/button.props.mjs +2 -1
  184. app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +8 -7
  185. app-ng-runtime/components/input/default/esm2022/checkbox/checkbox.component.mjs +7 -7
  186. app-ng-runtime/components/input/default/esm2022/checkbox/checkbox.props.mjs +2 -1
  187. app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +21 -16
  188. app-ng-runtime/components/input/default/esm2022/number/number.component.mjs +5 -5
  189. app-ng-runtime/components/input/default/esm2022/number/number.props.mjs +3 -1
  190. app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +28 -23
  191. app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +7 -7
  192. app-ng-runtime/components/input/default/esm2022/select/select.props.mjs +2 -1
  193. app-ng-runtime/components/input/default/esm2022/switch/switch.component.mjs +6 -5
  194. app-ng-runtime/components/input/default/esm2022/switch/switch.props.mjs +2 -1
  195. app-ng-runtime/components/input/default/esm2022/text/calendar/input-calendar.component.mjs +5 -5
  196. app-ng-runtime/components/input/default/esm2022/text/calendar/input-calendar.props.mjs +2 -1
  197. app-ng-runtime/components/input/default/esm2022/text/color/input-color.component.mjs +5 -5
  198. app-ng-runtime/components/input/default/esm2022/text/color/input-color.props.mjs +2 -1
  199. app-ng-runtime/components/input/default/esm2022/text/email/input-email.component.mjs +5 -5
  200. app-ng-runtime/components/input/default/esm2022/text/email/input-email.props.mjs +2 -1
  201. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +66 -13
  202. app-ng-runtime/components/input/default/esm2022/text/number/input-number.component.mjs +5 -5
  203. app-ng-runtime/components/input/default/esm2022/text/number/input-number.props.mjs +2 -1
  204. app-ng-runtime/components/input/default/esm2022/text/text/input-text.component.mjs +5 -5
  205. app-ng-runtime/components/input/default/esm2022/text/text/input-text.props.mjs +2 -1
  206. app-ng-runtime/components/input/default/esm2022/textarea/textarea.component.mjs +6 -6
  207. app-ng-runtime/components/input/default/esm2022/textarea/textarea.props.mjs +2 -1
  208. app-ng-runtime/components/input/default/fesm2022/index.mjs +171 -94
  209. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  210. app-ng-runtime/components/input/default/number/number.component.d.ts +1 -0
  211. app-ng-runtime/components/input/default/select/select.component.d.ts +2 -0
  212. app-ng-runtime/components/input/default/text/calendar/input-calendar.component.d.ts +1 -0
  213. app-ng-runtime/components/input/default/text/color/input-color.component.d.ts +1 -0
  214. app-ng-runtime/components/input/default/text/email/input-email.component.d.ts +1 -0
  215. app-ng-runtime/components/input/default/text/locale/number-locale.d.ts +1 -0
  216. app-ng-runtime/components/input/default/text/number/input-number.component.d.ts +1 -0
  217. app-ng-runtime/components/input/default/text/text/input-text.component.d.ts +1 -0
  218. app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +1 -0
  219. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +2 -1
  220. app-ng-runtime/components/input/epoch/bundles/index.umd.js +28 -21
  221. app-ng-runtime/components/input/epoch/date/date.component.d.ts +1 -0
  222. app-ng-runtime/components/input/epoch/date-time/date-time.component.d.ts +2 -1
  223. app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +10 -6
  224. app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +8 -8
  225. app-ng-runtime/components/input/epoch/esm2022/date/date.props.mjs +2 -1
  226. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +9 -9
  227. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.props.mjs +2 -1
  228. app-ng-runtime/components/input/epoch/esm2022/time/time.component.mjs +7 -7
  229. app-ng-runtime/components/input/epoch/esm2022/time/time.props.mjs +2 -1
  230. app-ng-runtime/components/input/epoch/fesm2022/index.mjs +25 -18
  231. app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
  232. app-ng-runtime/components/input/epoch/time/time.component.d.ts +1 -0
  233. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +224 -121
  234. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +220 -123
  235. app-ng-runtime/components/input/file-upload/esm2022/file-upload.props.mjs +7 -1
  236. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +225 -122
  237. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  238. app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +18 -11
  239. app-ng-runtime/components/input/rating/bundles/index.umd.js +2 -2
  240. app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +3 -3
  241. app-ng-runtime/components/input/rating/fesm2022/index.mjs +2 -2
  242. app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
  243. app-ng-runtime/components/input/slider/bundles/index.umd.js +5 -6
  244. app-ng-runtime/components/input/slider/esm2022/slider.component.mjs +6 -8
  245. app-ng-runtime/components/input/slider/esm2022/slider.props.mjs +2 -1
  246. app-ng-runtime/components/input/slider/fesm2022/index.mjs +5 -6
  247. app-ng-runtime/components/input/slider/fesm2022/index.mjs.map +1 -1
  248. app-ng-runtime/components/input/slider/slider.component.d.ts +1 -0
  249. app-ng-runtime/components/navigation/breadcrumb/bundles/index.umd.js +6 -6
  250. app-ng-runtime/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +7 -7
  251. app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs +6 -6
  252. app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  253. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +8 -6
  254. app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +8 -7
  255. app-ng-runtime/components/navigation/menu/esm2022/menu.props.mjs +2 -1
  256. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +8 -6
  257. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  258. app-ng-runtime/components/navigation/menu/menu.component.d.ts +1 -0
  259. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +121 -13
  260. app-ng-runtime/components/navigation/popover/esm2022/popover.component.mjs +122 -15
  261. app-ng-runtime/components/navigation/popover/esm2022/popover.props.mjs +2 -1
  262. app-ng-runtime/components/navigation/popover/fesm2022/index.mjs +121 -13
  263. app-ng-runtime/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  264. app-ng-runtime/components/navigation/popover/popover.component.d.ts +15 -3
  265. app-ng-runtime/components/page/default/bundles/index.umd.js +2 -1
  266. app-ng-runtime/components/page/default/esm2022/page.props.mjs +4 -3
  267. app-ng-runtime/components/page/default/fesm2022/index.mjs +2 -1
  268. app-ng-runtime/components/page/default/fesm2022/index.mjs.map +1 -1
  269. app-ng-runtime/components/page/footer/bundles/index.umd.js +2 -1
  270. app-ng-runtime/components/page/footer/esm2022/footer.props.mjs +3 -2
  271. app-ng-runtime/components/page/footer/fesm2022/index.mjs +2 -1
  272. app-ng-runtime/components/page/footer/fesm2022/index.mjs.map +1 -1
  273. app-ng-runtime/components/page/header/bundles/index.umd.js +2 -1
  274. app-ng-runtime/components/page/header/esm2022/header.props.mjs +3 -2
  275. app-ng-runtime/components/page/header/fesm2022/index.mjs +2 -1
  276. app-ng-runtime/components/page/header/fesm2022/index.mjs.map +1 -1
  277. app-ng-runtime/components/page/left-panel/bundles/index.umd.js +2 -1
  278. app-ng-runtime/components/page/left-panel/esm2022/left-panel.props.mjs +3 -2
  279. app-ng-runtime/components/page/left-panel/fesm2022/index.mjs +2 -1
  280. app-ng-runtime/components/page/left-panel/fesm2022/index.mjs.map +1 -1
  281. app-ng-runtime/components/page/right-panel/bundles/index.umd.js +2 -1
  282. app-ng-runtime/components/page/right-panel/esm2022/right-panel.props.mjs +3 -2
  283. app-ng-runtime/components/page/right-panel/fesm2022/index.mjs +2 -1
  284. app-ng-runtime/components/page/right-panel/fesm2022/index.mjs.map +1 -1
  285. app-ng-runtime/components/page/top-nav/bundles/index.umd.js +2 -1
  286. app-ng-runtime/components/page/top-nav/esm2022/top-nav.props.mjs +3 -2
  287. app-ng-runtime/components/page/top-nav/fesm2022/index.mjs +2 -1
  288. app-ng-runtime/components/page/top-nav/fesm2022/index.mjs.map +1 -1
  289. app-ng-runtime/core/bundles/index.umd.js +15 -13
  290. app-ng-runtime/core/esm2022/public_api.mjs +2 -2
  291. app-ng-runtime/core/esm2022/utils/build-utils.mjs +7 -7
  292. app-ng-runtime/core/esm2022/utils/utils.mjs +4 -5
  293. app-ng-runtime/core/fesm2022/index.mjs +11 -11
  294. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  295. app-ng-runtime/core/public_api.d.ts +1 -1
  296. app-ng-runtime/core/utils/utils.d.ts +1 -1
  297. app-ng-runtime/mobile/components/device/barcode-scanner/bundles/index.umd.js +2 -1
  298. app-ng-runtime/mobile/components/device/barcode-scanner/esm2022/barcode-scanner.props.mjs +3 -2
  299. app-ng-runtime/mobile/components/device/barcode-scanner/fesm2022/index.mjs +2 -1
  300. app-ng-runtime/mobile/components/device/barcode-scanner/fesm2022/index.mjs.map +1 -1
  301. app-ng-runtime/mobile/components/device/camera/bundles/index.umd.js +2 -1
  302. app-ng-runtime/mobile/components/device/camera/esm2022/camera.props.mjs +3 -2
  303. app-ng-runtime/mobile/components/device/camera/fesm2022/index.mjs +2 -1
  304. app-ng-runtime/mobile/components/device/camera/fesm2022/index.mjs.map +1 -1
  305. app-ng-runtime/package.json +1 -1
  306. app-ng-runtime/runtime/base/bundles/index.umd.js +6 -4
  307. app-ng-runtime/runtime/base/components/app-component/app.component.d.ts +2 -3
  308. app-ng-runtime/runtime/base/esm2022/components/app-component/app.component.mjs +5 -5
  309. app-ng-runtime/runtime/base/esm2022/guards/can-deactivate-page.guard.mjs +5 -4
  310. app-ng-runtime/runtime/base/fesm2022/index.mjs +6 -4
  311. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
  312. app-ng-runtime/runtime/base/guards/can-deactivate-page.guard.d.ts +2 -1
  313. app-ng-runtime/scripts/datatable/datatable.js +32 -31
  314. app-ng-runtime/variables/bundles/index.umd.js +34 -16
  315. app-ng-runtime/variables/esm2022/manager/variable/web-socket-variable.manager.mjs +35 -17
  316. app-ng-runtime/variables/fesm2022/index.mjs +34 -16
  317. app-ng-runtime/variables/fesm2022/index.mjs.map +1 -1
  318. app-ng-runtime/variables/manager/variable/web-socket-variable.manager.d.ts +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../projects/variables/src/constants/variables.constants.ts","../../../projects/variables/src/util/variable/variables.utils.ts","../../../projects/variables/src/util/action/navigation-action.utils.ts","../../../projects/variables/src/manager/action/base-action.manager.ts","../../../projects/variables/src/manager/action/navigation-action.manager.ts","../../../projects/variables/src/manager/action/notification-action.manager.ts","../../../projects/variables/src/manager/variable/base-variable.manager.ts","../../../projects/variables/src/manager/action/login-action.manager.ts","../../../projects/variables/src/manager/action/logout-action.manager.ts","../../../projects/variables/src/manager/variable/device-variable-manager.ts","../../../projects/variables/src/util/oAuth.utils.ts","../../../projects/variables/src/util/variable/pagination.utils.ts","../../../projects/variables/src/util/variable/service-variable.utils.ts","../../../projects/variables/src/manager/variable/web-socket-variable.manager.ts","../../../projects/variables/src/factory/variable-manager.factory.ts","../../../projects/variables/src/manager/variable/device-variable-service.ts","../../../projects/variables/src/model/variable/device-variable.ts","../../../projects/variables/src/model/action/navigation-action.ts","../../../projects/variables/src/model/action/notification-action.ts","../../../projects/variables/src/model/action/login-action.ts","../../../projects/variables/src/model/action/logout-action.ts","../../../projects/variables/src/model/variable/web-socket-variable.ts","../../../projects/variables/src/factory/variable.factory.ts","../../../projects/variables/src/service/metadata-service/metadata.service.ts","../../../projects/variables/src/service/variables.service.ts","../../../projects/variables/src/variables.module.ts","../../../projects/variables/src/index.ts"],"sourcesContent":["import {$rootScope as rootScope} from '@wavemaker/variables';\nexport const CONSTANTS = {\n hasCordova: window['cordova'] !== undefined,\n isStudioMode: false,\n isRunMode: true,\n XSRF_COOKIE_NAME: 'wm_xsrf_token',\n DEFAULT_TIMER_DELAY: 500,\n WIDGET_DOESNT_EXIST : 'The widget you\\'re trying to navigate to doesn\\'t exist on this page'\n};\nexport const VARIABLE_CONSTANTS = {\n CATEGORY: {\n MODEL: 'wm.Variable',\n LIVE: 'wm.LiveVariable',\n CRUD: 'wm.CrudVariable',\n SERVICE: 'wm.ServiceVariable',\n WEBSOCKET: 'wm.WebSocketVariable',\n NAVIGATION: 'wm.NavigationVariable',\n NOTIFICATION: 'wm.NotificationVariable',\n TIMER: 'wm.TimerVariable',\n LOGIN: 'wm.LoginVariable',\n LOGOUT: 'wm.LogoutVariable',\n DEVICE: 'wm.DeviceVariable'\n },\n EVENTS: ['onBefore',\n 'onBeforeUpdate',\n 'onResult',\n 'onBeforeOpen',\n 'onOpen',\n 'onBeforeMessageSend',\n 'onMessageReceive',\n 'onProgress',\n 'onError',\n 'onBeforeDatasetReady',\n 'onCanUpdate',\n 'onClick',\n 'onHide',\n 'onOk',\n 'onCancel',\n 'onBeforeClose',\n 'onClose',\n 'onTimerFire',\n 'onSuccess',\n 'onOnline',\n 'onOffline'],\n EVENT: {\n 'CAN_UPDATE': 'onCanUpdate',\n 'BEFORE': 'onBefore',\n 'BEFORE_UPDATE': 'onBeforeUpdate',\n 'PREPARE_SETDATA': 'onBeforeDatasetReady',\n 'RESULT': 'onResult',\n 'ERROR': 'onError',\n 'ABORT': 'onAbort',\n 'PROGRESS': 'onProgress',\n 'CLICK': 'onClick',\n 'HIDE': 'onHide',\n 'OK': 'onOk',\n 'CANCEL': 'onCancel',\n 'CLOSE': 'onClose',\n 'TIMER_FIRE': 'onTimerFire',\n 'SUCCESS': 'onSuccess',\n 'BEFORE_OPEN': 'onBeforeOpen',\n 'OPEN': 'onOpen',\n 'BEFORE_SEND': 'onBeforeMessageSend',\n 'MESSAGE_RECEIVE': 'onMessageReceive',\n 'BEFORE_CLOSE': 'onBeforeClose'\n },\n OWNER: {\n 'APP': 'App',\n 'PAGE': 'Page'\n },\n REST_SUPPORTED_SERVICES: ['JavaService', 'SoapService', 'FeedService', 'RestService', 'SecurityServiceType', 'DataService', 'WebSocketService', 'OpenAPIService'],\n PAGINATION_PARAMS: ['page', 'size', 'sort'],\n REST_SERVICE: {\n 'BASE_PATH_KEY': 'x-WM-BASE_PATH',\n 'RELATIVE_PATH_KEY': 'x-WM-RELATIVE_PATH',\n 'OAUTH_PROVIDER_KEY': 'x-WM-PROVIDER_ID',\n 'AUTH_HDR_KEY': 'Authorization',\n 'SECURITY_DEFN': {\n 'BASIC': 'basic',\n 'OAUTH2': 'oauth2',\n },\n 'AUTH_TYPE': {\n 'BASIC': 'BASIC',\n 'OAUTH': 'OAUTH2',\n 'NONE': 'NONE',\n },\n 'CONTENT_TYPE_KEY': 'x-WM-CONTENT_TYPE',\n 'ACCESSTOKEN_PLACEHOLDER': {\n 'LEFT': '',\n 'RIGHT': '.access_token'\n },\n ERR_TYPE: {\n NO_ACCESSTOKEN: 'missing_accesstoken',\n NO_CREDENTIALS: 'no_credentials',\n METADATA_MISSING: 'metadata_missing',\n CRUD_OPERATION_MISSING: 'crud_operation_missing',\n USER_UNAUTHORISED: 'user_unauthorised',\n REQUIRED_FIELD_MISSING: 'required_field_missing',\n },\n ERR_MSG: {\n NO_ACCESSTOKEN: 'Access token missing',\n NO_CREDENTIALS: 'No credentials present',\n METADATA_MISSING: 'Metadata missing for \"$variable\"',\n USER_UNAUTHORISED: 'Unauthorized User',\n CRUD_OPERATION_MISSING: 'Operation \"$operation\" not allowed for \"$variable\"',\n REQUIRED_FIELD_MISSING: 'Required field(s) missing: \"${0}\"'\n },\n UNCLOAKED_HEADERS: ['CONTENT-TYPE', 'ACCEPT', 'CONTENT-LENGTH', 'ACCEPT-ENCODING', 'ACCEPT-LANGUAGE'],\n PREFIX: {\n AUTH_HDR_VAL: {\n BASIC: 'Basic',\n OAUTH: 'Bearer'\n },\n CLOAK_HEADER_KEY: 'X-WM-'\n }\n },\n SERVICE_TYPE: {\n JAVA: 'JavaService',\n REST: 'RestService',\n SOAP: 'SoapService',\n FEED: 'FeedService',\n DATA: 'DataService',\n SECURITY: 'SecurityServiceType',\n WEBSOCKET: 'WebSocketService',\n OPENAPI: 'OpenAPIService'\n },\n CONTROLLER_TYPE: {\n QUERY: 'QueryExecution',\n PROCEDURE: 'ProcedureExecution'\n },\n HTTP_STATUS_CODE: {\n CORS_FAILURE: -1,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403\n },\n EXPORT_TYPES_MAP: {\n 'EXCEL' : '.xlsx',\n 'CSV' : '.csv'},\n DEFAULT_VAR : {\n 'NOTIFICATION' : 'appNotification'\n }\n};\n\nexport const WS_CONSTANTS = {\n NON_BODY_HTTP_METHODS: ['GET', 'HEAD'],\n CONTENT_TYPES: {\n FORM_URL_ENCODED: 'application/x-www-form-urlencoded',\n MULTIPART_FORMDATA: 'multipart/form-data',\n OCTET_STREAM: 'application/octet-stream'\n }\n};\n\nexport const DB_CONSTANTS = {\n 'DATABASE_MATCH_MODES': {\n 'like' : 'LIKE',\n 'start' : 'STARTING_WITH',\n 'startignorecase' : 'STARTING_WITH_IGNORECASE',\n 'end' : 'ENDING_WITH',\n 'endignorecase' : 'ENDING_WITH_IGNORECASE',\n 'anywhere' : 'CONTAINING',\n 'anywhereignorecase': 'CONTAINING_IGNORECASE',\n 'nowhere' : 'DOES_NOT_CONTAIN',\n 'nowhereignorecase': 'DOES_NOT_CONTAIN_IGNORECASE',\n 'exact' : 'EQUALS',\n 'exactignorecase' : 'EQUALS_IGNORECASE',\n 'notequals' : 'NOT_EQUALS',\n \"notequalsignorecase\": \"NOT_EQUALS_IGNORECASE\",\n 'between' : 'BETWEEN',\n 'in' : 'IN',\n \"notin\" : \"NOTIN\",\n 'lessthan' : 'LESS_THAN',\n 'lessthanequal' : 'LESS_THAN_OR_EQUALS',\n 'greaterthan' : 'GREATER_THAN',\n 'greaterthanequal' : 'GREATER_THAN_OR_EQUALS',\n 'null' : 'NULL',\n 'isnotnull' : 'IS_NOT_NULL',\n 'empty' : 'EMPTY',\n 'isnotempty' : 'IS_NOT_EMPTY',\n 'nullorempty' : 'NULL_OR_EMPTY'\n },\n 'DATABASE_EMPTY_MATCH_MODES': ['NULL', 'IS_NOT_NULL', 'EMPTY', 'IS_NOT_EMPTY', 'NULL_OR_EMPTY'],\n 'DATABASE_RANGE_MATCH_MODES': ['IN', 'NOTIN', 'BETWEEN', 'LESS_THAN', 'LESS_THAN_OR_EQUALS', 'GREATER_THAN', 'GREATER_THAN_OR_EQUALS', 'NOT_EQUALS'],\n 'DATABASE_NULL_EMPTY_MATCH': {\n 'NULL' : 'NULL',\n 'IS_NOT_NULL' : 'IS_NOT_NULL',\n 'EMPTY' : 'NULL',\n 'IS_NOT_EMPTY' : 'IS_NOT_NULL',\n 'NULL_OR_EMPTY' : 'NULL'\n },\n 'DATABASE_MATCH_MODES_WITH_QUERY': {\n 'LIKE' : '${0} like ${1}',\n 'STARTING_WITH' : '${0} like ${1}',\n 'STARTING_WITH_IGNORECASE': '${0} like ${1}',\n 'ENDING_WITH' : '${0} like ${1}',\n 'ENDING_WITH_IGNORECASE' : '${0} like ${1}',\n 'CONTAINING' : '${0} like ${1}',\n 'CONTAINING_IGNORECASE' : '${0} like ${1}',\n 'DOES_NOT_CONTAIN' : '${0} not like ${1}',\n 'DOES_NOT_CONTAIN_IGNORECASE': '${0} not like ${1}',\n 'EQUALS' : '${0}=${1}',\n 'EQUALS_IGNORECASE' : '${0}=${1}',\n 'NOT_EQUALS' : '${0}!=${1}',\n \"NOT_EQUALS_IGNORECASE\" : \"${0}!=${1}\",\n 'BETWEEN' : '${0} between ${1}',\n 'IN' : '${0} in ${1}',\n 'NOTIN' : \"${0} not in ${1}\",\n 'LESS_THAN' : '${0}<${1}',\n 'LESS_THAN_OR_EQUALS' : '${0}<=${1}',\n 'GREATER_THAN' : '${0}>${1}',\n 'GREATER_THAN_OR_EQUALS' : '${0}>=${1}',\n 'NULL' : '${0} is null',\n 'IS_NOT_NULL' : '${0} is not null',\n 'EMPTY' : '${0}=\\'\\'',\n 'IS_NOT_EMPTY' : '${0}<>\\'\\'',\n 'NULL_OR_EMPTY' : '${0} is null or ${0}=\\'\\''\n },\n 'DATABASE_STRING_MODES': ['LIKE', 'STARTING_WITH', 'STARTING_WITH_IGNORECASE', 'ENDING_WITH', 'ENDING_WITH_IGNORECASE', 'CONTAINING', 'CONTAINING_IGNORECASE', 'DOES_NOT_CONTAIN', 'DOES_NOT_CONTAIN_IGNORECASE', 'EQUALS', 'EQUALS_IGNORECASE', 'NOT_EQUALS', \"NOT_EQUALS_IGNORECASE\"]\n};\n\nexport const SWAGGER_CONSTANTS = {\n WM_DATA_JSON: 'wm_data_json',\n WM_HTTP_JSON: 'wm_httpRequestDetails'\n};\n\nexport const VARIABLE_URLS = {\n DATABASE: {\n searchTableData: {\n url: '/:service/:dataModelName/:entityName/search?page=:page&size=:size&:sort',\n method: 'POST'\n },\n searchTableDataWithQuery: {\n url: '/:service/:dataModelName/:entityName/filter?page=:page&size=:size&:sort',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }\n },\n readTableData: {\n url: '/:service/:dataModelName/:entityName?page=:page&size=:size&:sort',\n method: 'GET'\n },\n insertTableData: {\n url: '/:service/:dataModelName/:entityName',\n method: 'POST'\n },\n insertMultiPartTableData: {\n url: '/:service/:dataModelName/:entityName',\n method: 'POST',\n headers: {}\n // ,transformRequest: WM.identity\n },\n updateTableData: {\n url: '/:service/:dataModelName/:entityName/:id',\n method: 'PUT'\n },\n updateMultiPartTableData: {\n url: '/:service/:dataModelName/:entityName/:id',\n method: 'POST',\n headers: {}\n // ,transformRequest: WM.identity\n },\n deleteTableData: {\n url: '/:service/:dataModelName/:entityName/:id',\n method: 'DELETE'\n },\n updateCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id?:id',\n method: 'PUT'\n },\n periodUpdateCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id/periods?:id',\n method: 'PUT'\n },\n updateMultiPartCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id?:id',\n method: 'POST',\n headers: {}\n // , transformRequest: WM.identity\n },\n deleteCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id?:id',\n method: 'DELETE'\n },\n periodDeleteCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id/periods?:id',\n method: 'DELETE'\n },\n getDistinctDataByFields: {\n url: '/:service/:dataModelName/:entityName/aggregations?page=:page&size=:size&:sort',\n method: 'POST'\n },\n exportTableData: {\n url: '/services/:dataModelName/:entityName/export?:sort',\n method: 'POST'\n },\n readTableRelatedData: {\n url: '/:service/:dataModelName/:entityName/:id/:relatedFieldName?page=:page&size=:size&:sort',\n method: 'GET'\n },\n executeNamedQuery: {\n url: '/:service/:dataModelName/queryExecutor/queries/:queryName?page=:page&size=:size&:queryParams',\n method: 'GET'\n },\n executeCustomQuery: {\n url: '/:service/:dataModelName/queries/execute?page=:page&size=:size',\n method: 'POST'\n },\n executeAggregateQuery: {\n url: '/services/:dataModelName/:entityName/aggregations?page=:page&size=:size&sort=:sort',\n method: 'POST'\n },\n executeNamedProcedure: {\n url: '/:service/:dataModelName/procedureExecutor/procedure/execute/:procedureName?page=:page&size=:size&:procedureParams',\n method: 'GET'\n },\n countTableDataWithQuery: {\n url: '/:service/:dataModelName/:entityName/count?:queryParams',\n method: 'GET'\n }\n},\n oauthConfiguration : {\n getAuthorizationUrl: {\n url: 'services/oauth2/:providerId/authorizationUrl',\n method: 'GET'\n }\n }\n};\n\nexport const $rootScope = rootScope;\n","import {\n $parseEvent,\n $watch,\n DataType,\n DEFAULT_FORMATS,\n extractType,\n findValueOf,\n getBlob,\n getClonedObject,\n stringStartsWith,\n triggerFn\n} from '@wm/core';\n\nimport {CONSTANTS, VARIABLE_CONSTANTS, WS_CONSTANTS} from '../../constants/variables.constants';\nimport {\n debounce, filter,\n forEach,\n get, includes, isArray, isDate,\n isEmpty,\n isFunction, isNumber, isObject,\n isString,\n isUndefined,\n join, keys, last, map,\n noop,\n pickBy, remove, replace, set,\n slice,\n split, toLower, toUpper, trim\n} from \"lodash-es\";\n\ndeclare const $;\ndeclare const he;\ndeclare const moment;\ndeclare const window;\n\nconst exportTypesMap = { 'EXCEL' : '.xlsx', 'CSV' : '.csv'};\n\nexport let appManager;\nexport let httpService;\nexport let metadataService;\nexport let navigationService;\nexport let routerService;\nexport let toasterService;\nexport let oauthService;\nexport let securityService;\nexport let dialogService;\n\nconst DOT_EXPR_REX = /^\\[(\"|')[\\w\\W]*(\\1)\\]$/,\n internalBoundNodeMap = new Map(),\n timers = new Map();\n\nconst _invoke = (variable, op) => {\n let debouncedFn,\n cancelFn = noop,\n retVal;\n if (timers.has(variable)) {\n cancelFn = timers.get(variable).cancel;\n }\n cancelFn();\n debouncedFn = debounce(function () {\n retVal = variable[op]();\n // handle promises to avoid uncaught promise errors in console\n if (retVal instanceof Promise) {\n retVal.catch(noop);\n }\n }, 100);\n timers.set(variable, debouncedFn);\n debouncedFn();\n};\n\nconst processVariablePostBindUpdate = (nodeName, nodeVal, nodeType, variable, noUpdate) => {\n switch (variable.category) {\n case VARIABLE_CONSTANTS.CATEGORY.LIVE:\n if (variable.operation === 'read') {\n if (nodeName === 'dataBinding') {\n forEach(nodeVal, function (val, key) {\n variable.filterFields[key] = {\n 'value': val\n };\n });\n } else {\n variable.filterFields[nodeName] = {\n 'value': nodeVal,\n 'type' : nodeType\n };\n }\n /* if auto-update set for the variable with read operation only, get its data */\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.listRecords) && !noUpdate) {\n _invoke(variable, 'listRecords');\n }\n } else {\n if (nodeName === 'dataBinding') {\n variable.inputFields = nodeVal;\n } else {\n variable.inputFields[nodeName] = nodeVal;\n }\n /* if auto-update set for the variable with read operation only, get its data */\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable[variable.operation + 'Record']) && !noUpdate) {\n _invoke(variable, variable.operation + 'Record');\n }\n }\n break;\n case VARIABLE_CONSTANTS.CATEGORY.CRUD:\n if (variable.operationType === 'list' && variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.invoke) && !noUpdate) {\n _invoke(variable, 'invoke');\n }\n break;\n case VARIABLE_CONSTANTS.CATEGORY.SERVICE:\n case VARIABLE_CONSTANTS.CATEGORY.LOGIN:\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.invoke) && !noUpdate) {\n _invoke(variable, 'invoke');\n }\n break;\n case VARIABLE_CONSTANTS.CATEGORY.DEVICE:\n variable[nodeName] = nodeVal;\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.invoke) && !noUpdate) {\n _invoke(variable, 'invoke');\n }\n break;\n }\n};\n\nexport const setDependency = (type: string, ref: any) => {\n switch (type) {\n case 'appManager':\n appManager = ref;\n break;\n case 'http':\n httpService = ref;\n break;\n case 'metadata':\n metadataService = ref;\n break;\n case 'navigationService':\n navigationService = ref;\n break;\n case 'router':\n routerService = ref;\n break;\n case 'toaster':\n toasterService = ref;\n break;\n case 'oAuth':\n oauthService = ref;\n break;\n case 'security':\n securityService = ref;\n break;\n case 'dialog':\n dialogService = ref;\n break;\n }\n};\n\nexport const initiateCallback = (type: string, variable: any, data: any, options?: any, skipDefaultNotification?: boolean) => {\n\n /*checking if event is available and variable has event property and variable event property bound to function*/\n const eventValues = variable[type],\n callBackScope = variable._context;\n let errorVariable;\n /**\n * For error event:\n * trigger app level error handler.\n * if no event is assigned, trigger default appNotification variable.\n */\n if (type === VARIABLE_CONSTANTS.EVENT.ERROR && !skipDefaultNotification) {\n if (!eventValues) {\n /* in case of error, if no event assigned, handle through default notification variable */\n errorVariable = callBackScope.Actions[VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION];\n if (errorVariable) {\n data = errorVariable.getMessage() || data;\n data = isString(data) ? data : 'An error has occured. Please check the app logs.';\n errorVariable.invoke({ 'message' : data}, undefined, undefined);\n // $rootScope.$evalAsync(function () {\n // $rootScope.$emit(\"invoke-service\", VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION, {scope: callBackScope, message: response});\n // });\n }\n }\n }\n // TODO: [Vibhu], check whether to support legacy event calling mechanism (ideally, it should have been migrated)\n const fn = $parseEvent(variable[type]);\n if (type === VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE) {\n if (variable.category === 'wm.LiveVariable' && variable.operation === 'read') {\n return fn(variable._context, {variable: variable, dataFilter: data, options: options});\n } else {\n return fn(variable._context, {variable: variable, inputData: data, options: options});\n }\n } else {\n return fn(variable._context, {variable: variable, data: data, options: options});\n }\n};\n\nconst triggerOnTimeout = (success) => {\n setTimeout(() => { triggerFn(success); }, 500);\n};\n\nconst downloadFilefromResponse = (response, headers, success, error) => {\n // check for a filename\n let filename = '',\n filenameRegex,\n matches,\n type,\n blob,\n URL,\n downloadUrl,\n popup;\n const disposition = headers.get('Content-Disposition');\n if (disposition && disposition.indexOf('attachment') !== -1) {\n filenameRegex = /filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/;\n matches = filenameRegex.exec(disposition);\n if (matches !== null && matches[1]) {\n filename = matches[1].replace(/['\"]/g, '');\n }\n }\n\n type = headers.get('Content-Type');\n blob = new Blob([response], { type: type });\n\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed.\"\n if (window.navigator.msSaveBlob(blob, filename)) {\n triggerOnTimeout(success);\n } else {\n triggerFn(error);\n }\n } else {\n URL = window.URL || window.webkitURL;\n downloadUrl = URL.createObjectURL(blob);\n\n if (filename) {\n // use HTML5 a[download] attribute to specify filename\n const a = document.createElement('a');\n let reader;\n // safari doesn't support this yet\n if (typeof a.download === 'undefined') {\n reader = new FileReader();\n reader.onloadend = function () {\n const url = reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n popup = window.open(url, '_blank');\n if (!popup) {\n window.location.href = url;\n }\n };\n reader.onload = triggerOnTimeout.bind(undefined, success);\n reader.onerror = error;\n reader.readAsDataURL(blob);\n } else {\n a.href = downloadUrl;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n triggerOnTimeout(success);\n }\n } else {\n popup = window.open(downloadUrl, '_blank');\n if (!popup) {\n window.location.href = downloadUrl;\n }\n triggerOnTimeout(success);\n }\n\n setTimeout(() => { URL.revokeObjectURL(downloadUrl); }, 100); // cleanup\n }\n};\n\nconst getService = (serviceName) => {\n if (!serviceName) {\n return;\n }\n return serviceName;\n // Todo: Shubham, uncomment below code\n /* /!* get a reference to the element where ng-app is defined *!/\n let appEl = WM.element('[id=ng-app]'), injector;\n if (appEl) {\n try {\n injector = appEl.injector(); // get the angular injector\n if (injector) {\n return injector.get(serviceName); // return the service\n }\n } catch (e) {\n return undefined;\n }\n }*/\n};\n\n/**\n * Construct the form data params from the URL\n * @param queryParams\n * @param params\n */\nconst setParamsFromURL = (queryParams, params) => {\n queryParams = split(queryParams, '&');\n forEach(queryParams, function (param) {\n param = split(param, '=');\n params[param[0]] = decodeURIComponent(join(slice(param, 1), '='));\n });\n};\n\n/**\n * [Todo: Shubham], Implement Download through I frame\n * Simulates file download in an app through creating and submitting a hidden form in DOM.\n * The action will be initiated through a Service Variable\n *\n * Query Params\n * The request params like query params are added as hidden input elements\n *\n * Header Params\n * The header params for a request are also added along with hidden input elements.\n * This is done as headers can not be set for a form POST call from JavaScript\n *\n * Finally, request parameters are sent as follows:\n * For a GET request, the request data is sent along with the query params.\n * For POST, it is sent as request body.\n *\n * @param variable: the variable that is called from user action\n * @param requestParams object consisting the info to construct the XHR request for the service\n */\nconst downloadThroughIframe = (requestParams, success, dataBinding) => {\n // Todo: SHubham: URL contains '//' in between which should be handled at the URL formation only\n if (requestParams.url[1] === '/' && requestParams.url[2] === '/') {\n requestParams.url = requestParams.url.slice(0, 1) + requestParams.url.slice(2);\n }\n let iFrameElement,\n formEl,\n paramElement,\n queryParams = '',\n data;\n const IFRAME_NAME = 'fileDownloadIFrame',\n FORM_NAME = 'fileDownloadForm',\n CONTENT_TYPE = 'Content-Type',\n url = requestParams.url,\n encType = get(requestParams.headers, CONTENT_TYPE),\n params = pickBy(requestParams.headers, function (val, key) {\n return key !== CONTENT_TYPE;\n });\n /* Todo: shubham : define getService method\n WS_CONSTANTS = getService('WS_CONSTANTS');*/\n\n /* look for existing iframe. If exists, remove it first */\n iFrameElement = $('#' + IFRAME_NAME);\n if (iFrameElement.length) {\n iFrameElement.first().remove();\n }\n iFrameElement = $('<iframe id=\"' + IFRAME_NAME + '\" name=\"' + IFRAME_NAME + '\" class=\"ng-hide\"></iframe>');\n formEl = $('<form id=\"' + FORM_NAME + '\" name=\"' + FORM_NAME + '\"></form>');\n\n /* process query params, append a hidden input element in the form against each param */\n queryParams += url.indexOf('?') !== -1 ? url.substring(url.indexOf('?') + 1) : '';\n queryParams += encType === WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED ? ((queryParams ? '&' : '') + requestParams.dataParams) : '';\n\n formEl.attr({\n 'target' : iFrameElement.attr('name'),\n 'action' : url,\n 'method' : requestParams.method,\n 'enctype': !(isEmpty(requestParams.data) && isEmpty(queryParams)) ? encType : WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA\n });\n\n // For Non body methods only, set the input fields from query parameters\n if (includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, toUpper(requestParams.method))) {\n setParamsFromURL(queryParams, params); // Set params for URL query params\n }\n if (!isEmpty(requestParams.data)) {\n setParamsFromURL(requestParams.data, params);// Set params for request data\n data = params;\n } else {\n data = isEmpty(dataBinding) ? params : dataBinding;\n }\n forEach(data, function (val, key) {\n paramElement = $('<input type=\"hidden\">');\n paramElement.attr({\n 'name' : key,\n 'value' : val\n });\n formEl.append(paramElement);\n });\n\n /* append form to iFrame and iFrame to the document and submit the form */\n $('body').append(iFrameElement);\n\n // timeout for IE 10, iframeElement.contents() is empty in IE 10 without timeout\n setTimeout(function () {\n iFrameElement.contents().find('body').append(formEl);\n formEl.submit();\n triggerFn(success);\n }, 100);\n};\n\n/**\n * Makes an XHR call against the config\n * the response is converted into a blob url, which is assigned to the src attribute of an anchor element with download=true\n * a click is simulated on the anchor to download the file\n * @param config\n * @param success\n * @param error\n */\nconst downloadThroughAnchor = (config, success, error) => {\n const url = config.url,\n method = config.method,\n data = config.dataParams || config.data,\n headers = config.headers;\n\n headers['Content-Type'] = headers['Content-Type'] || 'application/x-www-form-urlencoded';\n\n // Todo: Replace http with getService\n httpService.send({\n 'target' : 'WebService',\n 'action' : 'invokeRuntimeRestCall',\n 'method' : method,\n 'url' : url,\n 'headers': headers,\n 'data' : data,\n 'responseType': 'arraybuffer'\n }).then(function (response) {\n setTimeout(() => {\n downloadFilefromResponse(response.body, response.headers, success, error);\n }, 900);\n }, function (err) {\n triggerFn(error, err);\n });\n};\n\n/**\n * appends a timestamp on the passed filename to prevent caching\n * returns the modified file name\n * @param fileName\n * @param exportFormat\n * @returns {string}\n */\nconst getModifiedFileName = (fileName, exportFormat) => {\n let fileExtension;\n const currentTimestamp = Date.now();\n\n if (exportFormat) {\n fileExtension = exportTypesMap[exportFormat];\n } else {\n fileExtension = '.' + last(split(fileName, '.'));\n fileName = replace(fileName, fileExtension, '');\n }\n return fileName + '_' + currentTimestamp + fileExtension;\n};\n\nconst getCookieByName = (name) => {\n // Todo: Shubham Implement cookie native js\n return 'cookie';\n};\n\n/**\n * This function returns the cookieValue if xsrf is enabled.\n * In device, xsrf cookie is stored in localStorage.\n * @returns xsrf cookie value\n */\nconst isXsrfEnabled = () => {\n if (CONSTANTS.hasCordova) {\n return localStorage.getItem(CONSTANTS.XSRF_COOKIE_NAME);\n }\n return false;\n};\n\n/**\n * Returns the object node for a bind object, where the value has to be updated\n * obj.target = \"a\"\n * @param obj\n * @param root\n * @param variable\n * @returns {*}\n */\nconst getTargetObj = (obj, root, variable) => {\n /*\n * if the target key is in the form as \"['my.param']\"\n * keep the target key as \"my.param\" and do not split further\n * this is done, so that, the computed value against this binding is assigned as\n * {\"my.param\": \"value\"}\n * and not as\n * {\n * \"my\": {\n * \"param\": \"value\"\n * }\n * }\n */\n let target = obj.target,\n targetObj;\n const rootNode = variable[root];\n if (DOT_EXPR_REX.test(target)) {\n targetObj = rootNode;\n } else {\n target = target.substr(0, target.lastIndexOf('.'));\n if (obj.target === root) {\n targetObj = variable;\n } else if (target) {\n targetObj = findValueOf(rootNode, target, true);\n } else {\n targetObj = rootNode;\n }\n }\n return targetObj;\n};\n\n/**\n * Gets the key for the target object\n * the computed value will be updated against this key in the targetObject(computed by getTargetObj())\n * @param target\n * @param regex\n * @returns {*}\n */\nconst getTargetNodeKey = (target) => {\n /*\n * if the target key is in the form as \"['my.param']\"\n * keep the target key as \"my.param\" and do not split further\n * this is done, so that, the computed value against this binding is assigned as\n * {\"my.param\": \"value\"}\n * and not as\n * {\n * \"my\": {\n * \"param\": \"value\"\n * }\n * }\n */\n let targetNodeKey;\n if (DOT_EXPR_REX.test(target)) {\n targetNodeKey = target.replace(/^(\\[[\"'])|([\"']\\])$/g, '');\n } else {\n targetNodeKey = target.split('.').pop();\n }\n return targetNodeKey;\n};\n\nconst setValueToNode = (target, obj, root, variable, value, noUpdate?) => {\n const targetNodeKey = getTargetNodeKey(target),\n targetObj = getTargetObj(obj, root, variable);\n value = !isUndefined(value) ? value : obj.value;\n /* sanity check, user can bind parent nodes to non-object values, so child node bindings may fail */\n if (targetObj) {\n targetObj[targetNodeKey] = value;\n }\n processVariablePostBindUpdate(targetNodeKey, value, obj.type, variable, noUpdate);\n};\n\n/**\n * The model internalBoundNodeMap stores the reference to latest computed values against internal(nested) bound nodes\n * This is done so that the internal node's computed value is not lost, once its parent node's value is computed at a later point\n * E.g.\n * Variable.employeeVar has following bindings\n * \"dataBinding\": [\n {\n \"target\": \"department.budget\",\n \"value\": \"bind:Variables.budgetVar.dataSet\"\n },\n {\n \"target\": \"department\",\n \"value\": \"bind:Variables.departmentVar.dataSet\"\n }\n ]\n * When department.budget is computed, employeeVar.dataSet = {\n * \"department\": {\n * \"budget\": {\"q1\": 1111}\n * }\n * }\n *\n * When department is computed\n * \"department\": {\n * \"name\": \"HR\",\n * \"location\": \"Hyderabad\"\n * }\n * The budget field (computed earlier) is LOST.\n *\n * To avoid this, the latest values against internal nodes (in this case department.budget) are stored in a map\n * These values are assigned back to internal fields if the parent is computed (in this case department)\n * @param target\n * @param root\n * @param variable\n */\nconst updateInternalNodes = (target, root, variable) => {\n const boundInternalNodes = keys(get(internalBoundNodeMap.get(variable), [variable.name, root])),\n targetNodeKey = getTargetNodeKey(target);\n let internalNodes;\n function findInternalNodeBound() {\n return filter(boundInternalNodes, function (node) {\n // the later condition in check (targetNodeKey === root || targetNodeKey === 'dataBinding') is specifically for live variable of insert/update types\n return (node !== targetNodeKey && includes(node, targetNodeKey)) || ((targetNodeKey === root || targetNodeKey === 'dataBinding') && node !== targetNodeKey);\n });\n }\n internalNodes = findInternalNodeBound();\n if ((internalNodes.length)) {\n forEach(internalNodes, function (node) {\n setValueToNode(node, {target: node}, root, variable, get(internalBoundNodeMap.get(variable), [variable.name, root, node]));\n });\n }\n};\n\n/**\n * New Implementation (DataBinding Flat Structure with x-path targets)\n * processes a dataBinding object, if bound to expression, watches over it, else assigns value to the expression\n * @param obj dataBinding object\n * @param scope scope of the variable\n * @param root root node string (dataBinding for all variables, dataSet for static variable)\n * @param variable variable object\n */\nconst processBindObject = (obj, scope, root, variable) => {\n const target = obj.target,\n targetObj = getTargetObj(obj, root, variable),\n targetNodeKey = getTargetNodeKey(target),\n runMode = true;\n const destroyFn = scope.registerDestroyListener ? scope.registerDestroyListener.bind(scope) : noop;\n\n if (stringStartsWith(obj.value, 'bind:')) {\n const listener = (newVal, oldVal) => {\n if ((newVal === oldVal && isUndefined(newVal)) || (isUndefined(newVal) && (!isUndefined(oldVal) || !isUndefined(targetObj[targetNodeKey])))) {\n return;\n }\n // Skip cloning for blob column\n if (!includes(['blob', 'file'], obj.type)) {\n newVal = getClonedObject(newVal);\n }\n setValueToNode(target, obj, root, variable, newVal); // cloning newVal to keep the source clean\n\n if (runMode) {\n /*set the internal bound node map with the latest updated value*/\n if (!internalBoundNodeMap.has(variable)) {\n internalBoundNodeMap.set(variable, {});\n }\n set(internalBoundNodeMap.get(variable), [variable.name, root, target], newVal);\n /*update the internal nodes after internal node map is set*/\n if (isObject(newVal)) {\n updateInternalNodes(target, root, variable);\n }\n }\n };\n destroyFn($watch(obj.value.replace('bind:', ''), scope, {}, listener, undefined, undefined, undefined, () => variable.isMuted));\n } else if (!isUndefined(obj.value)) {\n setValueToNode(target, obj, root, variable, obj.value, true);\n if (runMode && root !== targetNodeKey) {\n if (!internalBoundNodeMap.has(variable)) {\n internalBoundNodeMap.set(variable, {});\n }\n set(internalBoundNodeMap.get(variable), [variable.name, root, target], obj.value);\n }\n }\n};\n\n// *********************************************************** PUBLIC *********************************************************** //\n\n/**\n * Initializes watchers for binding expressions configured in the variable\n * @param variable\n * @param context, scope context in which the variable exists\n * @param {string} bindSource, the field in variable where the databindings are configured\n * for most variables, it will be 'dataBinding', hence default fallback is to 'dataBinding'\n * for some it can be 'dataSet' and hence will be passed as param\n * @param {string} bindTarget, the object field in variable where the computed bindings will be set\n */\nexport const processBinding = (variable: any, context: any, bindSource?: string, bindTarget?: string) => {\n bindSource = bindSource || 'dataBinding';\n bindTarget = bindTarget || 'dataBinding';\n\n const bindMap = variable[bindSource];\n variable[bindSource] = {};\n variable['_bind' + bindSource] = bindMap;\n if (!bindMap || !isArray(bindMap)) {\n return;\n }\n bindMap.forEach(function (node) {\n /* for static variable change the binding with target 'dataBinding' to 'dataSet', as the results have to reflect directly in the dataSet */\n if (variable.category === 'wm.Variable' && node.target === 'dataBinding') {\n node.target = 'dataSet';\n }\n processBindObject(node, context, bindTarget, variable);\n });\n};\n\n/**\n * Downloads a file in the browser.\n * Two methods to do so, namely:\n * 1. downloadThroughAnchor, called if\n * - if a header is to be passed\n * OR\n * - if security is ON and XSRF token is to be sent as well\n * NOTE: This method does not work with Safari version 10.0 and below\n *\n * 2. downloadThroughIframe\n * - this method works across browsers and uses an iframe to downlad the file.\n * @param requestParams request params object\n * @param fileName represents the file name\n * @param exportFormat downloaded file format\n * @param success success callback\n * @param error error callback\n */\nexport const simulateFileDownload = (requestParams, fileName, exportFormat, success, error, dataBinding) => {\n /*success and error callbacks are executed incase of downloadThroughAnchor\n Due to technical limitation cannot be executed incase of iframe*/\n if (CONSTANTS.hasCordova) {\n let fileExtension;\n if (exportFormat) {\n fileExtension = exportTypesMap[exportFormat];\n }\n appManager.notify('device-file-download', { url: requestParams.url, name: fileName, extension: fileExtension, headers: requestParams.headers, successCb: success, errorCb: error});\n } else if (!isEmpty(requestParams.headers) || isXsrfEnabled()) {\n downloadThroughAnchor(requestParams, success, error);\n } else {\n downloadThroughIframe(requestParams, success, dataBinding);\n }\n};\n\n/**\n * sets the value against passed key on the \"inputFields\" object in the variable\n * @param targetObj: the object in which the key, value is to be set\n * @param variable\n * @param key: can be:\n * - a string e.g. \"username\"\n * - an object, e.g. {\"username\": \"john\", \"ssn\": \"11111\"}\n * @param val\n * - if key is string, the value against it (for that data type)\n * - if key is object, not required\n * @param options\n * @returns {any}\n */\nexport const setInput = (targetObj: any, key: any, val: any, options: any) => {\n targetObj = targetObj || {};\n let keys,\n lastKey,\n paramObj = {};\n\n // content type check\n if (isObject(options)) {\n // @ts-ignore\n switch (options.type) {\n case 'file':\n // @ts-ignore\n val = getBlob(val, options.contentType);\n break;\n case 'number':\n val = isNumber(val) ? val : parseInt(val, 10);\n break;\n }\n }\n\n if (isObject(key)) {\n // check if the passed parameter is an object itself\n paramObj = key;\n } else if (key.indexOf('.') > -1) {\n // check for '.' in key e.g. 'employee.department'\n keys = key.split('.');\n lastKey = keys.pop();\n // Finding the object based on the key\n targetObj = findValueOf(targetObj, keys.join('.'), true);\n key = lastKey;\n paramObj[key] = val;\n } else {\n paramObj[key] = val;\n }\n\n forEach(paramObj, function (paramVal, paramKey) {\n targetObj[paramKey] = paramVal;\n });\n return targetObj;\n};\n\n/**\n * returns true if HTML5 File API is available else false\n * @returns {{prototype: Blob; new(blobParts?: any[], options?: BlobPropertyBag): Blob}}\n */\nexport const isFileUploadSupported = () => {\n return (window.File && window.FileReader && window.FileList && window.Blob);\n};\n\n/**\n *\n * @param varOrder\n * @param optionsOrder\n * @returns {any}\n */\nexport const getEvaluatedOrderBy = (varOrder, optionsOrder) => {\n let optionFields,\n varOrderBy;\n // If options order by is not defined, return variable order\n if (!optionsOrder || isEmpty(optionsOrder)) {\n return varOrder;\n }\n // If variable order by is not defined, return options order\n if (!varOrder) {\n return optionsOrder;\n }\n // If both are present, combine the options order and variable order, with options order as precedence\n varOrder = split(varOrder, ',');\n optionsOrder = split(optionsOrder, ',');\n optionFields = map(optionsOrder, function (order) {\n return split(trim(order), ' ')[0];\n });\n // If a field is present in both options and variable, remove the variable orderby\n remove(varOrder, function (orderBy: string) {\n return includes(optionFields, split(trim(orderBy), ' ')[0]);\n });\n varOrderBy = varOrder.length ? ',' + join(varOrder, ',') : '';\n return join(optionsOrder, ',') + varOrderBy;\n};\n\n/**\n * formatting the expression as required by backend which was enclosed by ${<expression>}.\n * @param fieldDefs\n * returns fieldDefs\n */\nexport const formatExportExpression = fieldDefs => {\n forEach(fieldDefs, function (fieldDef) {\n if (fieldDef.expression) {\n fieldDef.expression = '${' + fieldDef.expression + '}';\n }\n });\n return fieldDefs;\n};\n\nexport const debounceVariableCall = _invoke;\n\nconst getDateTimeFormatForType = (type) => {\n return DEFAULT_FORMATS[toUpper(type)];\n};\n\n// Format value for datetime types\nconst _formatDate = (dateValue, type) => {\n let epoch;\n if (isDate(dateValue)) {\n epoch = dateValue.getTime();\n } else {\n if (!isNaN(dateValue)) {\n dateValue = parseInt(dateValue, 10);\n }\n epoch = dateValue && moment(dateValue).valueOf();\n }\n if (isNaN(epoch) && type !== DataType.TIME) {\n return epoch;\n }\n if (type === DataType.TIMESTAMP) {\n return epoch;\n }\n if (type === DataType.TIME && !epoch) {\n epoch = moment(new Date().toDateString() + ' ' + dateValue).valueOf();\n }\n return dateValue && appManager.getPipe('date').transform(epoch, getDateTimeFormatForType(type));\n};\n\n// Function to convert values of date time types into default formats\nexport const formatDate = (value, type) => {\n if (includes(type, '.')) {\n type = toLower(extractType(type));\n }\n if (isArray(value)) {\n return map(value, function (val) {\n return _formatDate(val, type);\n });\n }\n return _formatDate(value, type);\n};\n\n/**\n * This method decodes the variable data which is encoded from backend before showing in the widgets.\n * It takes variable response content as input and iterates recursively,\n * if the value is string type then it will decode the data.\n * @param responseContent (Array of objects)\n */\nexport const decodeData = (responseContent) => {\n if (!responseContent) {\n return responseContent;\n }\n if (isArray(responseContent)) {\n forEach(responseContent, data => {\n if (isString(data)) {\n data = htmlDecode(data);\n } else if (isObject(data)) {\n forEach(data, (value, key) => {\n if (value && isString(value)) {\n data[key] = htmlDecode(value);\n } else if (isObject(value)) {\n decodeData(value);\n }\n });\n }\n });\n } else if (isObject(responseContent)) {\n forEach(responseContent, (value, key) => {\n if (value && isString(value)) {\n responseContent[key] = htmlDecode(value);\n } else if (isObject(value)) {\n decodeData(value);\n }\n });\n } else if (isString(responseContent)) {\n responseContent = htmlDecode(responseContent);\n return responseContent;\n }\n};\n\nfunction htmlDecode(input) {\n return he.unescape(input);\n}\n","import { navigationService } from '../variable/variables.utils';\nimport {clone, isNil, isString} from \"lodash-es\";\n\n/**\n * Handles variable navigation operations\n * @param variable\n * @param options\n */\nexport const navigate = (variable, options) => {\n variable.dataSet = (options && options.data) || variable.dataSet;\n let viewName;\n const pageName = variable.dataBinding.pageName || variable.pageName,\n operation = variable.operation,\n urlParams = clone(variable.dataSet),\n cacheable = isNil(options?.cacheable) ? variable.cacheable : options.cacheable;\n options = options || {};\n\n if (!isNil(cacheable) && (!isString(cacheable) || cacheable.trim() !== '')) {\n urlParams['_cache_page'] = cacheable;\n }\n\n /* if operation is goToPage, navigate to the pageName */\n switch (operation) {\n case 'goToPreviousPage':\n navigationService.goToPrevious();\n break;\n case 'gotoPage':\n navigationService.goToPage(pageName, {\n transition: variable.pageTransitions,\n $event: options.$event,\n urlParams: urlParams,\n cacheable: variable.cacheable\n });\n break;\n case 'gotoView':\n viewName = (variable.dataBinding && variable.dataBinding.viewName) || variable.viewName;\n break;\n case 'gotoTab':\n viewName = (variable.dataBinding && variable.dataBinding.tabName) || variable.tabName;\n break;\n case 'gotoAccordion':\n viewName = (variable.dataBinding && variable.dataBinding.accordionName) || variable.accordionName;\n break;\n case 'gotoSegment':\n viewName = (variable.dataBinding && variable.dataBinding.segmentName) || variable.segmentName;\n break;\n }\n\n /* if view name found, call routine to navigate to it */\n if (viewName) {\n navigationService.goToView(viewName, {\n pageName: pageName,\n transition: variable.pageTransitions,\n $event: options.$event,\n urlParams: urlParams\n }, variable);\n }\n};\n","import { appManager, processBinding } from '../../util/variable/variables.utils';\n\nexport abstract class BaseActionManager {\n initBinding(variable, bindSource?, bindTarget?) {\n processBinding(variable, variable._context, bindSource, bindTarget);\n }\n\n notifyInflight(variable, status: boolean, data?: any) {\n appManager.notify('toggle-variable-state', {\n variable: variable,\n active: status,\n data: data\n });\n }\n}\n","import * as NVUtils from '../../util/action/navigation-action.utils';\nimport { BaseActionManager } from './base-action.manager';\n\nexport class NavigationActionManager extends BaseActionManager {\n\n invoke(variable, options) {\n NVUtils.navigate(variable, options);\n }\n}\n","import { BaseActionManager } from './base-action.manager';\nimport { initiateCallback, toasterService, dialogService } from '../../util/variable/variables.utils';\nimport { getWmProjectProperties } from '@wm/core';\nimport {capitalize, isString} from \"lodash-es\";\n\nexport class NotificationActionManager extends BaseActionManager {\n\n private onToasterClick(variable) {\n initiateCallback('onClick', variable, '');\n }\n\n private onToasterHide(variable) {\n initiateCallback('onHide', variable, '');\n }\n\n private notifyViaToaster(variable, options) {\n const type = (options.class || variable.dataBinding.class || 'info').toLowerCase(),\n body = options.message || variable.dataBinding.text,\n title = options.title,\n positionClass = 'toast-' + (options.position || variable.dataBinding.toasterPosition || 'bottom right').replace(' ', '-'),\n partialPage = variable.dataBinding.page,\n DEFAULT_DURATION = 3000;\n let duration = parseInt(options.duration || variable.dataBinding.duration, null),\n toaster;\n\n // duration\n if (!duration) {\n duration = (duration !== 0 && type === 'success') ? DEFAULT_DURATION : 0;\n }\n if (variable.dataBinding.content && variable.dataBinding.content === 'page' && partialPage) {\n toaster = toasterService.showCustom(partialPage, {positionClass: positionClass, timeOut: duration,\n partialParams: variable._binddataSet, context: variable._context});\n } else {\n toaster = toasterService.show(type, title, body || null, {positionClass: positionClass, timeOut: duration, enableHtml: true});\n }\n\n // callbacks\n if (variable.onClick) {\n toaster.onTap.subscribe( this.onToasterClick.bind(this, variable) );\n }\n if (variable.onHide) {\n toaster.onHidden.subscribe( this.onToasterHide.bind(this, variable) );\n }\n }\n\n private getDialogConfig(variable, options, dialogId, closeCallBackFn) {\n return {\n 'title' : options.title || variable.dataBinding.title,\n 'text' : options.message || variable.dataBinding.text,\n 'okButtonText' : options.okButtonText || variable.dataBinding.okButtonText || 'OK',\n 'cancelButtonText' : options.cancelButtonText || variable.dataBinding.cancelButtonText || 'CANCEL',\n 'alerttype' : options.alerttype || variable.dataBinding.alerttype || 'information',\n onOk: () => {\n // Close the action dialog after triggering onOk callback event\n dialogService.close(dialogId, undefined, closeCallBackFn);\n },\n onCancel: () => {\n initiateCallback('onCancel', variable, options.data);\n // Close the action dialog after triggering onCancel callback event\n dialogService.close(dialogId, undefined);\n },\n onClose: () => {\n initiateCallback('onClose', variable, options.data);\n }\n };\n }\n\n private notifyViaDialog(variable, options) {\n const isPrefabType = getWmProjectProperties().type === 'PREFAB';\n const dialogPrefix = isPrefabType ? 'Prefab' : 'Common';\n const dialogId = dialogPrefix + capitalize(variable.operation) + 'Dialog';\n const closeCallBackFn = () => initiateCallback('onOk', variable, options.data);\n\n\n let dialogConfig: any = this.getDialogConfig(variable, options, dialogId, closeCallBackFn);\n dialogConfig = isPrefabType ? dialogConfig : { notification: dialogConfig };\n dialogService.open(dialogId, undefined, dialogConfig);\n }\n\n// *********************************************************** PUBLIC ***********************************************************//\n\n notify(variable, options, success, error) {\n const operation = variable.operation;\n options = options || {};\n\n if (operation === 'toast') {\n this.notifyViaToaster(variable, options);\n } else {\n this.notifyViaDialog(variable, options);\n }\n }\n\n getMessage(variable) {\n return variable.dataBinding.text;\n }\n\n setMessage(variable, text) {\n if (isString(text)) {\n variable.dataBinding.text = text;\n }\n return variable.dataBinding.text;\n }\n\n getOkButtonText(variable) {\n return variable.dataBinding.okButtonText;\n }\n setOkButtonText(variable, text) {\n if (isString(text)) {\n variable.dataBinding.okButtonText = text;\n }\n return variable.dataBinding.okButtonText;\n }\n\n getToasterDuration(variable) {\n return variable.dataBinding.duration;\n }\n\n setToasterDuration(variable, duration) {\n variable.dataBinding.duration = duration;\n return variable.dataBinding.duration;\n }\n\n getToasterClass(variable) {\n return variable.dataBinding.class;\n }\n\n setToasterClass(variable, type) {\n if (isString(type)) {\n variable.dataBinding.class = type;\n }\n return variable.dataBinding.class;\n }\n\n getToasterPosition(variable) {\n return variable.dataBinding.class;\n }\n\n setToasterPosition(variable, position) {\n if (isString(position)) {\n variable.dataBinding.position = position;\n }\n return variable.dataBinding.position;\n }\n\n getAlertType(variable) {\n return variable.dataBinding.alerttype;\n }\n\n setAlertType(variable, alerttype) {\n if (isString(alerttype)) {\n variable.dataBinding.alerttype = alerttype;\n }\n return variable.dataBinding.alerttype;\n }\n\n getCancelButtonText(variable) {\n return variable.dataBinding.cancelButtonText;\n }\n\n setCancelButtonText(variable, text) {\n if (isString(text)) {\n variable.dataBinding.cancelButtonText = text;\n }\n return variable.dataBinding.cancelButtonText;\n }\n}\n","import { httpService, processBinding } from '../../util/variable/variables.utils';\nimport { appManager} from './../../util/variable/variables.utils';\nimport { AdvancedOptions } from '../../advanced-options';\nimport {extend} from \"lodash-es\";\n\nexport abstract class BaseVariableManager {\n\n initBinding(variable, bindSource?, bindTarget?) {\n processBinding(variable, variable._context, bindSource, bindTarget);\n }\n\n notifyInflight(variable, status: boolean, data?: any, options?: any) {\n appManager.notify('toggle-variable-state', {\n variable: variable,\n active: status,\n data: data,\n options: options\n });\n }\n\n /**\n * This method sets the variable parameter requestTrackId to X-WM-Request-Track-Id which is received in the response headers.\n * @param response\n */\n setRequestTrackId(response, variable) {\n const requestTrackId = response?.headers?.get('x-wm-request-track-id');\n if (requestTrackId) {\n variable._requestTrackId = requestTrackId;\n }\n }\n\n /**\n * This method makes the final angular http call that returns an observable.\n * We attach this observable to variable to cancel a network call\n * @param requestParams\n * @param variable\n * @param dbOperation\n */\n httpCall(requestParams, variable, params?: any) {\n return new Promise((resolve, reject) => {\n variable._observable = httpService.sendCallAsObservable(requestParams, params).subscribe((response: any) => {\n if (response && response.type) {\n this.setRequestTrackId(response, variable);\n resolve(response);\n }\n }, (err: any) => {\n this.setRequestTrackId(err, variable);\n if (httpService.isPlatformSessionTimeout(err)) {\n // send the notification manually to hide any context spinners on page.\n // [TODO]: any spinners on widget listening on this variable will also go off. Need to see an approach to sovle that.\n this.notifyInflight(variable, false, err);\n err._401Subscriber.asObservable().subscribe(\n response => resolve(response),\n e => reject(e));\n } else {\n reject(err);\n }\n });\n });\n }\n\n /**\n * This method prepares the options parameter for variable callbacks.\n * @param xhrObj, The xhrObj to be passed\n * @param moreOptions, any other info to be passed in the options param\n */\n prepareCallbackOptions(xhrObj: any, moreOptions? : any): AdvancedOptions {\n let options: AdvancedOptions = {};\n options['xhrObj'] = xhrObj;\n if (moreOptions) {\n extend(options, moreOptions);\n }\n return options;\n }\n}\n","import { getClonedObject, triggerFn } from '@wm/core';\n\nimport { BaseActionManager } from './base-action.manager';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { appManager, dialogService, initiateCallback, routerService, securityService } from '../../util/variable/variables.utils';\nimport {each, get, isBoolean, isEmpty, isObject, set} from \"lodash-es\";\n\nexport class LoginActionManager extends BaseActionManager {\n\n private validate(params: any) {\n let err, paramKey, remembermeKey;\n const LOGIN_PARAM_REMEMBER_ME = 'j_rememberme';\n const LOGIN_PARAM_REMEMBER_ME_OLD = ['rememberme', 'remembermecheck'];\n\n // for older projects\n LOGIN_PARAM_REMEMBER_ME_OLD.forEach((old_key) => {\n if (isBoolean(params[old_key])) {\n remembermeKey = old_key;\n }\n });\n\n remembermeKey = remembermeKey || LOGIN_PARAM_REMEMBER_ME;\n\n // check remember me\n params[remembermeKey] = isBoolean(params[remembermeKey]) ? params[remembermeKey] : false;\n\n for (paramKey in params) {\n if (params.hasOwnProperty(paramKey) &&\n (params[paramKey] === '' || params[paramKey] === undefined)) {\n err = 'Please provide required credentials';\n break;\n }\n }\n\n return err;\n }\n\n private migrateOldParams(params) {\n const loginParams = {},\n paramMigrationMap = {\n 'usernametext': 'j_username',\n 'username': 'j_username',\n 'passwordtext': 'j_password',\n 'password': 'j_password',\n 'remembermecheck': 'j_rememberme',\n 'rememberme': 'j_rememberme'\n };\n\n each(params, function (value, key) {\n if (paramMigrationMap[key]) {\n loginParams[paramMigrationMap[key]] = value;\n } else {\n loginParams[key] = value;\n }\n });\n return loginParams;\n }\n\n /*\n * This method is used to redirect the user to app base path\n * After successful navigation to the base path, will reload the app\n */\n private redirectToAppBasePath() {\n routerService.navigate(['/']).then(nav => {\n if (nav) {\n window.location.reload();\n }\n });\n }\n\n login(variable, options, success, error) {\n let newDataSet;\n options = options || {};\n\n // If login info provided along explicitly with options, don't look into the variable bindings for the same\n const loginInfo: any = options.loginInfo || options.input || variable.dataBinding;\n\n // client side validation\n const errMsg = this.validate(loginInfo);\n\n /* if error message initialized, return error */\n if (errMsg) {\n triggerFn(error, errMsg);\n initiateCallback('onError', variable, errMsg);\n return;\n }\n\n // Triggering 'onBeforeUpdate' and considering\n let params: any = getClonedObject(loginInfo);\n const output: any = initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE, variable, params);\n if (isObject(output)) {\n params = output;\n } else if (output === false) {\n triggerFn(error);\n return;\n }\n\n // migrate old params to new\n params = this.migrateOldParams(params);\n\n // get previously loggedInUser name (if any)\n const lastLoggedInUsername = get(securityService.get(), 'userInfo.userName');\n\n this.notifyInflight(variable, true);\n variable.promise = securityService.appLogin(params, (response) => {\n // Closing login dialog after successful login\n dialogService.close('CommonLoginDialog');\n\n /*\n * Get fresh security config\n * Get App variables. if not loaded\n * Update loggedInUser variable with new user details\n */\n appManager.reloadAppData().\n then((config) => {\n // EVENT: ON_RESULT\n initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, get(config, 'userInfo'));\n // EVENT: ON_PREPARESETDATA\n newDataSet = initiateCallback(VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA, variable, get(config, 'userInfo'));\n if (newDataSet) {\n // setting newDataSet as the response to service variable onPrepareSetData\n set(config, 'userInfo', newDataSet);\n }\n // hide the spinner after all the n/w calls are completed\n this.notifyInflight(variable, false, response);\n triggerFn(success);\n setTimeout(() => {\n // EVENT: ON_SUCCESS\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, get(config, 'userInfo'));\n\n /* handle navigation if defaultSuccessHandler on variable is true */\n if (variable.useDefaultSuccessHandler) {\n const isSameUserReloggedIn = lastLoggedInUsername === params['j_username'];\n // if first time user logging in or same user re-logging in, execute n/w calls failed before logging in\n if (!lastLoggedInUsername || isSameUserReloggedIn) {\n appManager.executeSessionFailureRequests();\n }\n // get redirectTo page from URL and remove it from URL\n const redirectPage = securityService.getCurrentRouteQueryParam('redirectTo'),\n noRedirect = appManager.noRedirect();\n // Get query params(page params of page being redirected to) and append to the URL after login.\n const queryParamsObj = securityService.getRedirectedRouteQueryParams();\n // The redirectTo param isn't required after login\n if (queryParamsObj.redirectTo) {\n delete queryParamsObj.redirectTo;\n }\n appManager.noRedirect(false);\n // first time login\n if (!lastLoggedInUsername) {\n // if redirect page found, navigate to it.\n if (!isEmpty(redirectPage)) {\n routerService.navigate([`/${redirectPage}`], { queryParams : queryParamsObj});\n } else if (!noRedirect) {\n // simply reset the URL, route handling will take care of page redirection\n routerService.navigate([`/`]);\n }\n } else {\n // login after a session timeout\n // if redirect page found and same user logs in again, just navigate to redirect page\n if (!isEmpty(redirectPage)) {\n // same user logs in again, just redirect to the redirectPage\n if (lastLoggedInUsername === params['j_username']) {\n routerService.navigate([`/${redirectPage}`], { queryParams : queryParamsObj});\n } else {\n // different user logs in, reload the app and discard the redirectPage\n this.redirectToAppBasePath();\n }\n } else {\n const securityConfig = securityService.get(),\n sessionTimeoutLoginMode = get(securityConfig, 'loginConfig.sessionTimeout.type') || 'PAGE';\n // if in dialog mode and a new user logs in OR login happening through page, reload the app\n if (!isSameUserReloggedIn || sessionTimeoutLoginMode !== 'DIALOG') {\n this.redirectToAppBasePath();\n }\n }\n\n }\n }\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, get(config, 'userInfo'));\n });\n\n });\n }, (e) => {\n // EVENT: ON_RESULT\n initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, e);\n this.notifyInflight(variable, false, e);\n const errorMsg = e.error || 'Invalid credentials.';\n const xhrObj = e.details;\n /* if in RUN mode, trigger error events associated with the variable */\n if (CONSTANTS.isRunMode) {\n initiateCallback('onError', variable, errorMsg, xhrObj, true);\n }\n triggerFn(error, errorMsg, xhrObj);\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, e);\n });\n }\n}\n","import { getValidJSON, triggerFn } from '@wm/core';\n\nimport { BaseActionManager } from './base-action.manager';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { appManager, initiateCallback, securityService } from './../../util/variable/variables.utils';\nimport { routerService } from '../../util/variable/variables.utils';\n\nexport class LogoutActionManager extends BaseActionManager {\n logout(variable, options, success, error) {\n let handleError,\n redirectPage,\n output,\n newDataSet;\n\n handleError = function (msg, details, xhrObj) {\n /* if in RUN mode, trigger error events associated with the variable */\n if (!CONSTANTS.isStudioMode) {\n initiateCallback('onError', variable, msg, xhrObj);\n }\n triggerFn(error, msg, xhrObj);\n };\n\n // EVENT: ON_BEFORE_UPDATE\n output = initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE, variable, null);\n if (output === false) {\n triggerFn(error);\n return;\n }\n securityService.isAuthenticated(isAuthenticated => {\n if (isAuthenticated) {\n this.notifyInflight(variable, true);\n variable.promise = securityService.appLogout(response => {\n let redirectUrl = response.body;\n redirectUrl = getValidJSON(redirectUrl);\n // Reset Security Config.\n // $rootScope.isUserAuthenticated = false;\n appManager.reloadAppData().\n then(() => {\n this.notifyInflight(variable, false, redirectUrl);\n // EVENT: ON_RESULT\n initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, redirectUrl);\n // EVENT: ON_PREPARESETDATA\n newDataSet = initiateCallback(VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA, variable, redirectUrl);\n if (newDataSet) {\n // setting newDataSet as the response to service variable onPrepareSetData\n redirectUrl = newDataSet;\n }\n setTimeout(()=>{\n // EVENT: ON_SUCCESS\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, redirectUrl);\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, redirectUrl);\n })\n });\n\n // In case of CAS response will be the redirectUrl\n if (redirectUrl && redirectUrl.result) {\n window.location.href = redirectUrl.result;\n } else if (variable.useDefaultSuccessHandler) {\n redirectPage = variable.redirectTo;\n /* backward compatibility (index.html/login.html may be present in older projects) */\n if (!redirectPage || redirectPage === 'login.html' || redirectPage === 'index.html') {\n redirectPage = '';\n }\n routerService.navigate([`/${redirectPage}`]);\n // do not reload the mobile app.\n if (!window['cordova']) {\n setTimeout(() => {\n // reloading in timeout as, firefox and safari are not updating the url before reload(WMS-7887)\n window.location.reload();\n });\n }\n }\n triggerFn(success);\n }, handleError);\n } else {\n handleError('No authenticated user to logout.');\n }\n }, (err) => {\n this.notifyInflight(variable, false, err);\n handleError(err);\n });\n }\n}\n","import { BaseVariableManager } from './base-variable.manager';\nimport { initiateCallback } from '../../util/variable/variables.utils';\nimport { DeviceVariableService } from './device-variable-service';\n\n/**\n * Device operation registered in this class will be invoked when a device variable requests the operation.\n */\nexport class DeviceVariableManager extends BaseVariableManager {\n\n /**\n * A map that contains services and their operations.\n *\n * @type {Map<string, Map<string, DeviceVariableService>>}\n */\n private serviceRegistry: Map<string, DeviceVariableService> = new Map<string, DeviceVariableService>();\n\n /**\n * Invokes the given device variable and returns a promise that is resolved or rejected\n * by the device operation's outcome.\n * @param variable\n * @param options\n * @returns {Promise<any>}\n */\n public invoke(variable: any, options: any): Promise<any> {\n const service = this.serviceRegistry.get(variable.service);\n if (service == null) {\n initiateCallback('onError', variable, null);\n return Promise.reject(`Could not find service '${service}'`);\n } else {\n this.notifyInflight(variable, true);\n return service.invoke(variable, options).then( response => {\n this.notifyInflight(variable, false, response);\n return response;\n }, err => {\n this.notifyInflight(variable, false, err);\n return Promise.reject(err);\n });\n }\n }\n\n /**\n * Adds an operation under the given service category\n * @param {string} service\n */\n public registerService(service: DeviceVariableService) {\n this.serviceRegistry.set(service.name, service);\n }\n}\n","import { oauthService, appManager } from './variable/variables.utils';\n\nexport const performAuthorization = (url: any, providerId: any, onSuccess: any, onError: any, securityObj?: any) => {\n oauthService.perfromOAuthorization(url, providerId, onSuccess, onError, securityObj, appManager.getCustomUrlScheme(), appManager.getDeployedURL());\n};\n\nexport const getAccessToken = (provider: any, checkLoaclStorage: any) => {\n return oauthService.getAccessToken(provider, checkLoaclStorage);\n};\n\nexport const removeAccessToken = (provider: any) => {\n oauthService.removeAccessToken(provider);\n}\n","import { jmespath } from '@metrichor/jmespath';\nimport {find, isEmpty, result, set, startsWith} from \"lodash-es\";\n\nexport class PaginationUtils {\n /**\n * Modifies the query values with the pagination info which is retrieved from the previous API response.\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param paginationInfo has metadata of the variable pagination data\n * @returns {void} This method does not return anything\n */\n static setPaginationQueryParams(variable, operationInfo, paginationInfo) {\n operationInfo.parameters.forEach(element => {\n // pagination input information varies based on the type\n let inputParam;\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n inputParam = 'offset';\n } else {\n inputParam = 'page';\n }\n // modifies query values based on the pagination of variable\n // compare parameter name with the input parameter's starting naming key (ex: channelcontext in channelcontext.pagination)\n if (element.name === paginationInfo.input[inputParam].split('.')[0]) {\n element.sampleValue = variable.pagination['page'];\n } else if (element.name === paginationInfo.input.size.split('.')[0]) {\n element.sampleValue = variable.pagination['size'];\n }\n });\n }\n\n /**\n * Sets pagination on the variable based on the response of the triggered api call.\n * @param variable withholds variable information\n * @param response has data of the api call's response\n * @param options has info of the api's query params\n * @returns {void} This method does not return anything\n */\n static setVariablePagination(variable, response, options) {\n if (!variable.pagination) {\n variable.pagination = {\n empty: false\n };\n }\n variable.pagination['size'] = response.size;\n variable.pagination['page'] = response.page || 0;\n variable.pagination['totalElements'] = response.totalElements;\n variable.pagination['numberOfElements'] = variable.pagination['size'];\n variable.pagination['number'] = options['page'] ? options['page'] - 1 : 0;\n\n /**\n * Deduce totalPages from totalElements by size.\n * If the total elements are evenly split among the pages, assign the same to totalPages\n * Else assign totalPages + 1\n */\n variable.pagination['totalPages'] = variable.pagination['totalElements'] / variable.pagination['size'];\n if (variable.pagination['totalElements'] % variable.pagination['size'] === 0) {\n variable.pagination['totalPages'] = parseInt(variable.pagination['totalPages']);\n } else {\n variable.pagination['totalPages'] = parseInt(variable.pagination['totalPages']) + 1;\n }\n\n // If pagination type is cursor, fill next & prev\n if (response.next) {\n variable.pagination['next'] = response.next;\n variable.pagination['prev'] = response.prev;\n variable.pagination['last'] = response.next ? false : true;\n variable.pagination['first'] = response.prev ? false : true;\n } else {\n variable.pagination['first'] = variable.pagination['page'] <= 1 ? true : false;\n // calculate last based on current page index against total pages\n variable.pagination['last'] = response.hasMoreItems === '' ? !(variable.pagination['page'] < variable.pagination['totalPages']) : !response.hasMoreItems;\n }\n }\n\n /**\n * Resolves the expression given in pagination metadata's output\n * @param item has value of each key which is inside output pagination metadata\n * @param response has data of the api call's response\n * @param resHeaders has data of the api call's response headers\n * @param res holds the information of pagination which has to be stored on the variable\n * @param key has key name against which data has to be stored in pagination\n * @returns {void} This method does not return anything\n */\n static setPaginationItems(item, response, res, key, resHeaders) {\n // if the item has body, resolve the expression against the response\n if (startsWith(item, '$body')) {\n const bodyKey = item.replace('$body.', '');\n try {\n res[key] = jmespath.search(response, bodyKey);\n } catch {\n console.warn(`${item} expression needs to be corrected as per JMES guidelines`);\n }\n } else if (startsWith(item, '$header')) { // if the item has header, resolve the expression against the response headers\n const headerKey = item.replace('$header.', '');\n const headers = (<any>Object).fromEntries(resHeaders.headers);\n const headerParams = headerKey.split('.');\n try {\n res[key] = jmespath.search(headers, headerParams[0].toLowerCase());\n } catch {\n console.warn(`${item} expression needs to be corrected as per JMES guidelines`);\n }\n if (res[key]?.length) {\n let headerVal = res[key].join();\n if (headerParams.length === 1) {\n /**\n * If the headerParams has only 1 key (which is not an object) name assing headerVal to the res[key]\n */\n res[key] = headerVal;\n } else {\n /**\n * If the headerParams has more than 1 key (an object), parse the stringified headerVal which is an object\n * Resolve the expression against headerVal object amd assign it to res[key]\n */\n let keyName = headerParams.slice(1).join('.');\n const headerResp = JSON.parse(headerVal);\n const specialChar = /[!@#$%^&*()+\\=\\[\\]{};':\"\\\\|,<>\\/?]+/;\n if (specialChar.test(keyName)) {\n // If key name has expression (ex: comparission expression)\n // add root key name to keyName for JMES to resolve the expression\n keyName = 'headerResp.' + keyName;\n }\n try {\n res[key] = jmespath.search(headerResp, keyName);\n } catch {\n console.warn(`${item} expression needs to be corrected as per JMES guidelines`);\n }\n }\n }\n }\n }\n\n /**\n * Return the pagination information of the service based on its existence on swagger or on the variable\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @returns {object} This method return pagination metadata\n */\n static getPaginationInfo(operationInfo, variable) {\n if (operationInfo?.paginationInfo) {\n return operationInfo.paginationInfo;\n } else {\n return variable._paginationConfig;\n }\n }\n\n /**\n * Set query params with the pagination info, if pagination metadata is present in query params\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param options has info of the api's query params\n * @returns {void} This method does not return anything\n */\n static checkPaginationAtQuery(operationInfo, variable, options) {\n const paginationInfo = this.getPaginationInfo(operationInfo, variable);\n // If page is not first, pagination is present on the variable and paginationInfo's input meta has size set pagination in query params\n const hasPagination = options && options['page'] && paginationInfo?.input.size && variable.pagination;\n if (!hasPagination) {\n return;\n }\n\n let inputParam;\n // if pagination type is offset, asssign inputParam to offset else page\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n inputParam = 'offset';\n } else {\n inputParam = 'page';\n }\n const paramName = paginationInfo.input[inputParam].split('.')[0];\n const paramObj = find(operationInfo.parameters, function (obj) {\n return obj.name === paramName\n });\n // check if the variable has query params and they are not empty\n if (!isEmpty(variable.dataBinding) && paramObj && paramObj.parameterType === 'query') {\n /**\n * For pagination type other than offset, assign page which is recieved from options\n * For offset type, calculate page from size and options[page]\n */\n if (!paginationInfo.output?.page && paginationInfo.type !== 'offset') {\n variable.pagination['page'] = options['page'];\n } else {\n variable.pagination['page'] = this.getOffsetInfo(variable, options);\n }\n this.setPaginationQueryParams(variable, operationInfo, paginationInfo);\n }\n }\n\n /**\n * Deduces the offset information from the size and page params\n * @param variable withholds variable information\n * @param options has info of the api's query params\n * @returns {object} Returns the next offset number\n */\n static getOffsetInfo(variable, options) {\n return variable.pagination['size'] * (options['page'] ? (options['page'] - 1) : 1);\n }\n\n /**\n * Sets Pagination data on the request information\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param options has info of the api's query params\n * @param paginationInfo has pagination information of the variable\n * @param headers has request headers\n * @param requestBody has request body\n * @param url has request url\n * @returns {object} Returns the request object which has pagination info\n */\n static setPaginationAtReq(paginationInfo, operationInfo, variable, headers, requestBody, url, options) {\n let reqObj = {};\n let inputParam;\n let resObj = {};\n // pagination input information varies based on the type\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n inputParam = 'offset';\n } else {\n inputParam = 'page';\n }\n const paramName = paginationInfo.input[inputParam].split('.')[0];\n // check if paramName is present in parameters of operation info\n const paramObj = find(operationInfo.parameters, function (obj) {\n return obj.name === paramName\n });\n // set page/offset and size from pagination if matched parameter's type is header\n if (paramObj?.parameterType === 'header') {\n set(reqObj, paginationInfo.input[inputParam], variable.pagination['page']);\n set(reqObj, paginationInfo.input.size, variable.pagination['size']);\n headers[paramName] = JSON.stringify(reqObj[paramName]);\n resObj['headers'] = headers;\n } else if (paramObj?.parameterType === 'body') {\n // set page/offset and size from pagination if matched parameter's type is body\n // assign bodyVal to updated pagination info object\n const bodyVal = JSON.parse(paramObj.sampleValue);\n const bodyParam = paginationInfo.input[inputParam].split('.')[1]\n if (bodyVal && bodyVal[bodyParam]) {\n const inputBodyParam = paginationInfo.input[inputParam].split('.').splice(1).join('.');\n if (inputParam !== 'offset') {\n set(reqObj, inputBodyParam, variable.pagination['page']);\n } else {\n set(reqObj, inputBodyParam, this.getOffsetInfo(variable, options));\n }\n set(reqObj, paginationInfo.input.size.split('.').splice(1).join('.'), variable.pagination['size']);\n bodyVal[bodyParam] = reqObj[bodyParam];\n requestBody = JSON.stringify(bodyVal);\n resObj['requestBody'] = requestBody;\n }\n } else if (variable.pagination.next && paramObj) {\n /**\n * For cursor type pagination, if pagination info is present in the path\n * Based on whether user clicks on the next or prev button modify the url\n */\n\n if (paramObj.parameterType === 'path') {\n const urlParams = operationInfo.relativePath.split('/'),\n paramConfig = '{' + paramObj.name + '}',\n paramIndex = urlParams.indexOf(paramConfig);\n let invokeUrl;\n if (variable.pagination.isNext) {\n invokeUrl = variable.pagination.next.split('/');\n } else {\n invokeUrl = variable.pagination.prev.split('/');\n }\n\n let urlPathParmas;\n let urlPath;\n if (operationInfo.directPath) { // For direct path, as url has hostname, derivate pathname using URL object\n urlPath = new URL(url);\n urlPathParmas = urlPath.pathname.split('/');\n urlPathParmas[paramIndex] = invokeUrl[paramIndex];\n urlPath.pathname = urlPathParmas.join('/');\n url = urlPath.href;\n resObj['url'] = url;\n } else { // Else modify the url with index as +1 (following proxy pattern)\n urlPathParmas = url.split('/');\n urlPathParmas[paramIndex + 1] = invokeUrl[paramIndex];\n url = urlPathParmas.join('/');\n resObj['url'] = url;\n }\n\n } else if (paramObj.parameterType === 'query') {\n /**\n * For cursor type pagination, if pagination info is present in the query\n * Based on whether user clicks on the next or prev button modify the url's query params\n */\n const urlParams = url.split('?');\n let invokeUrl;\n if (variable.pagination.isNext) {\n invokeUrl = variable.pagination.next.split('?');\n } else {\n invokeUrl = variable.pagination.prev.split('?');\n }\n urlParams[1] = invokeUrl[1];\n url = urlParams.join('?');\n resObj['url'] = url;\n }\n }\n return resObj;\n }\n\n /**\n * Sets the pagination info recieved from api's response in the res object\n * @param operationInfo has metadata of the variable\n * @param res holds the information of pagination which has to be stored on the variable\n * @param paramName has key name against which data has to be stored in pagination\n * @param variable withholds variable information\n * @returns {void} This method does not return anything\n */\n static setParameterVal(paramName, res, operationInfo, variable) {\n const paginationInfo = this.getPaginationInfo(operationInfo, variable);\n const param = paginationInfo.input[paramName].split('.')[0];\n const sizeObj = find(operationInfo.parameters, function (obj) {\n return obj.name === param\n });\n res[paramName] = result(sizeObj, 'sampleValue');\n }\n\n /**\n * Creates res object from the response recieved from the api triggered\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param paginationInfo has metadata of the variable's pagination\n * @param response has data of the api call's response\n * @param options has info of the api's query params\n * @param resHeaders has data of the api call's response headers\n * @returns {object} An object which holds the information of pagination which has to be stored on the variable\n */\n static generatePaginationRes(operationInfo, paginationInfo, response, resHeaders, options, variable) {\n let res = {};\n const resOutput = paginationInfo.output;\n // If pagination type is not cursor, create the following metadata\n if (!resOutput?.next) {\n /**\n * If size is present in the pagination's output metadata deduce size from api's response\n * Else deduce size from the pagination's input metadata size key\n */\n if (resOutput?.size) {\n this.setPaginationItems(resOutput.size, response, res, 'size', resHeaders);\n } else {\n this.setParameterVal('size', res, operationInfo, variable);\n }\n /**\n * If page is present in the pagination's output metadata deduce page from api's response\n * Else deduce page from the pagination's input metadata page key\n */\n if (resOutput?.page) {\n this.setPaginationItems(resOutput.page, response, res, 'page', resHeaders);\n } else if (paginationInfo.type !== 'offset') {\n this.setParameterVal('page', res, operationInfo, variable);\n }\n /**\n * If totalElements has $minValue in it, set totalElements as $minValue\n * If the rendered elements are greater than $minValue, set totalElements as Number of elements rendered + 1\n\n * If totalElements is present in the pagination's output metadata deduce totalElements from api's response\n\n * If Pagination type is offset, deduce totalElements from size and options[page] else deduce from size and res[page]\n */\n if (startsWith(resOutput?.totalElements, '$minValue')) {\n const totalEl = resOutput.totalElements.replace('$minValue=', '');\n const pageParam = res['page'] ? res['page'] : options['page']\n const elRendered = res['size'] * pageParam;\n if (!variable.pagination || variable.pagination['totalElements'] > elRendered) {\n res['totalElements'] = parseInt(totalEl);\n } else {\n res['totalElements'] = elRendered + 1;\n }\n } else if (resOutput?.totalElements) {\n this.setPaginationItems(resOutput.totalElements, response, res, 'totalElements', resHeaders);\n } else {\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n res['totalElements'] = (res['size'] * (options['page'] ? options['page'] : 1)) + 1;\n } else {\n res['totalElements'] = (res['size'] * res['page']) + 1;\n }\n }\n /**\n * If hasMoreItems is present in the pagination's output metadata deduce hasMoreItems from api's response\n * Else assign it as empty which will be calculated at pagination object generation\n */\n if (resOutput?.hasMoreItems) {\n this.setPaginationItems(resOutput.hasMoreItems, response, res, 'hasMoreItems', resHeaders);\n } else {\n res['hasMoreItems'] = '';\n }\n } else if (resOutput) { // For cursor type pagination set next and prev keys in res object\n this.setPaginationItems(resOutput.next, response, res, 'next', resHeaders);\n this.setPaginationItems(resOutput.prev, response, res, 'prev', resHeaders);\n }\n return res;\n }\n}\n","import { extractType, getBlob, isDateTimeType, isDefined, replace } from '@wm/core';\n\nimport { $rootScope, CONSTANTS, SWAGGER_CONSTANTS, VARIABLE_CONSTANTS, WS_CONSTANTS } from '../../constants/variables.constants';\nimport { isFileUploadSupported } from './variables.utils';\nimport { getAccessToken } from './../oAuth.utils';\nimport { formatDate } from '../../util/variable/variables.utils';\nimport { PaginationUtils } from '../../util/variable/pagination.utils';\nimport {\n concat,\n forEach,\n get,\n includes,\n isArray,\n isEmpty,\n isNull,\n isObject,\n isUndefined,\n join, map, reject,\n toLower, toUpper\n} from \"lodash-es\";\n\n/**\n * returns true if a Service variable is:\n * - for a query/procedure\n * - performs a PUT/POST operation, i.e, takes a Request Body as input\n * @param variable\n * @returns {any}\n */\nconst isBodyTypeQueryOrProcedure = (variable) => {\n return (includes(['QueryExecution', 'ProcedureExecution'], variable.controller)) && (includes(['put', 'post'], variable.operationType));\n};\n\n/**\n * returns true if the variable is a Query service variable\n * @param {string} controller\n * @param {string} serviceType\n * @returns {boolean}\n */\nconst isQueryServiceVar = (controller: string, serviceType: string) => {\n return controller === VARIABLE_CONSTANTS.CONTROLLER_TYPE.QUERY && serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA;\n};\n\n/**\n * Append given value to the formdata\n * @param formData\n * @param param - Param from which value has to be taken\n * @param paramValue - Value which is to be appended to formdata\n */\nconst getFormData = (formData, param, paramValue) => {\n const paramType = toLower(extractType(get(param, 'items.type') || param.type)),\n paramContentType = CONSTANTS.isStudioMode ? param['x-WM-CONTENT_TYPE'] : param.contentType;\n if (isFileUploadSupported()) {\n if ((paramType !== 'file') && (paramContentType === 'string' || !paramContentType)) {\n if (isObject(paramValue)) {\n paramValue = JSON.stringify(paramValue);\n }\n formData.append(param.name, paramValue);\n } else {\n if (isArray(paramValue) && paramType === 'file') {\n forEach(paramValue, function (fileObject) {\n formData.append(param.name, (fileObject && fileObject.content) || getBlob(fileObject), fileObject.name);\n });\n } else {\n formData.append(param.name, getBlob(paramValue, paramContentType), paramValue && paramValue.name);\n }\n }\n return formData;\n }\n};\n\n/**\n * Check for missing required params and format the date/time param values\n * @param inputData\n * @param params\n * @returns {{requestBody: {}; missingParams: any[]}}\n */\nconst processRequestBody = (inputData, params) => {\n const requestBody = {},\n missingParams = [];\n let paramValue;\n forEach(params, function (param) {\n paramValue = get(inputData, param.name);\n if (!isUndefined(paramValue) && paramValue !== '' && paramValue !== null && !param.readOnly) {\n paramValue = isDateTimeType(param.type) ? formatDate(paramValue, param.type) : paramValue;\n // Construct ',' separated string if param is not array type but value is an array\n if (isArray(paramValue) && toLower(extractType(param.type)) === 'string') {\n paramValue = join(paramValue, ',');\n }\n requestBody[param.name] = paramValue;\n } else if (param.required) {\n missingParams.push(param.name || param.id);\n }\n });\n return {\n 'requestBody': requestBody,\n 'missingParams': missingParams\n };\n};\n\n/**\n * Done only for HTTP calls made via the proxy server\n * Goes though request headers, appends 'X-' to certain headers\n * these headers need not be processed at proxy server and should directly be passed to the server\n * e.g. Authorization, Cookie, etc.\n * @param headers\n * @returns {{}}\n */\nconst cloakHeadersForProxy = (headers) => {\n const _headers = {},\n UNCLOAKED_HEADERS = VARIABLE_CONSTANTS.REST_SERVICE.UNCLOAKED_HEADERS,\n CLOAK_PREFIX = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;\n forEach(headers, function (val, key) {\n if (includes(UNCLOAKED_HEADERS, key.toUpperCase())) {\n _headers[key] = val;\n } else {\n _headers[CLOAK_PREFIX + key] = val;\n }\n });\n\n return _headers;\n};\n\nexport class ServiceVariableUtils {\n /**\n * prepares the HTTP request info for a Service Variable\n * @param variable\n * @param operationInfo\n * @param inputFields\n * @returns {any}\n */\n static constructRequestParams(variable, operationInfo, inputFields, options?) {\n variable = variable || {};\n\n // operationInfo is specifically null for un_authorized access\n if (operationInfo === null) {\n return {\n 'error' : {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.USER_UNAUTHORISED,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.USER_UNAUTHORISED,\n 'field': '_wmServiceOperationInfo'\n }\n };\n } else if (isEmpty(operationInfo)) {\n return {\n 'error' : {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.METADATA_MISSING,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.METADATA_MISSING,\n 'field': '_wmServiceOperationInfo'\n }\n };\n } else if (operationInfo && operationInfo.invalid) {\n return {\n 'error' : {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.CRUD_OPERATION_MISSING,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.CRUD_OPERATION_MISSING,\n 'field': '_wmServiceOperationInfo'\n }\n };\n }\n\n const directPath = operationInfo.directPath || '',\n relativePath = operationInfo.basePath ? operationInfo.basePath + operationInfo.relativePath : operationInfo.relativePath,\n isBodyTypeQueryProcedure = isBodyTypeQueryOrProcedure(variable);\n let queryParams = '',\n bodyInfo,\n headers = {},\n requestBody,\n url,\n requiredParamMissing = [],\n target,\n pathParamRex,\n invokeParams,\n authDetails = null,\n uname,\n pswd,\n method,\n formData,\n isProxyCall,\n paramValueInfo,\n params,\n securityDefnObj,\n accessToken,\n withCredentials;\n\n function getFormDataObj() {\n if (formData) {\n return formData;\n }\n formData = new FormData();\n return formData;\n }\n\n securityDefnObj = get(operationInfo.securityDefinitions, '0');\n\n if (securityDefnObj) {\n switch (securityDefnObj.type) {\n case VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.OAUTH2:\n accessToken = getAccessToken(securityDefnObj[VARIABLE_CONSTANTS.REST_SERVICE.OAUTH_PROVIDER_KEY], null);\n if (accessToken) {\n headers[VARIABLE_CONSTANTS.REST_SERVICE.AUTH_HDR_KEY] = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.AUTH_HDR_VAL.OAUTH + ' ' + accessToken;\n } else {\n return {\n 'error': {\n 'type' : VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.NO_ACCESSTOKEN,\n 'message' : VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.NO_ACCESSTOKEN\n },\n 'securityDefnObj': securityDefnObj\n };\n }\n break;\n case VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.BASIC:\n uname = inputFields['wm_auth_username'];\n pswd = inputFields['wm_auth_password'];\n if (uname && pswd) {\n // TODO[VIBHU]: bas64 encoding alternative.\n headers[VARIABLE_CONSTANTS.REST_SERVICE.AUTH_HDR_KEY] = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.AUTH_HDR_VAL.BASIC + ' ' + btoa(uname + ':' + pswd);\n authDetails = {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.AUTH_TYPE.BASIC\n };\n } else {\n return {\n 'error': {\n 'type' : VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.NO_CREDENTIALS,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.NO_CREDENTIALS\n },\n 'securityDefnObj': securityDefnObj\n };\n }\n break;\n }\n }\n // set query params, if pagination info is present and the info should be present in query\n PaginationUtils.checkPaginationAtQuery(operationInfo, variable, options);\n\n operationInfo.proxySettings = operationInfo.proxySettings || {web: true, mobile: false};\n method = operationInfo.httpMethod || operationInfo.methodType;\n isProxyCall = (function () {\n if (CONSTANTS.hasCordova) {\n return operationInfo.proxySettings.mobile;\n }\n return operationInfo.proxySettings.web;\n }());\n withCredentials = operationInfo.proxySettings.withCredentials;\n url = isProxyCall ? relativePath : directPath;\n\n /* loop through all the parameters */\n forEach(operationInfo.parameters, function (param) {\n // Set params based on current workspace\n function setParamsOfChildNode() {\n if (inputFields) {\n // specific case for body type query/procedure variable with query params\n if (inputFields[param.name] && isObject(inputFields[param.name])) {\n paramValueInfo = inputFields[param.name];\n } else {\n paramValueInfo = inputFields;\n }\n params = get(operationInfo, ['definitions', param.type]);\n } else {\n // For Api Designer\n paramValueInfo = paramValue || {};\n params = param.children;\n }\n }\n\n let paramValue = param.sampleValue;\n\n if ((isDefined(paramValue) && paramValue !== null && paramValue !== '') || (isBodyTypeQueryProcedure && param.type !== 'file')) {\n // Format dateTime params for dataService variables\n if (variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA && isDateTimeType(param.type)) {\n paramValue = formatDate(paramValue, param.type);\n }\n // Construct ',' separated string if param is not array type but value is an array\n if (isArray(paramValue) && toLower(extractType(param.type)) === 'string' && variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA) {\n paramValue = join(paramValue, ',');\n }\n switch (param.parameterType.toUpperCase()) {\n case 'QUERY':\n // Ignore null valued query params for queryService variable\n if (isNull(paramValue) && isQueryServiceVar(variable.controller, variable.serviceType)) {\n break;\n }\n if (!queryParams) {\n queryParams = '?' + param.name + '=' + encodeURIComponent(paramValue);\n } else {\n queryParams += '&' + param.name + '=' + encodeURIComponent(paramValue);\n }\n break;\n case 'PATH':\n /* replacing the path param based on the regular expression in the relative path */\n pathParamRex = new RegExp('\\\\s*\\\\{\\\\s*' + param.name + '(:\\\\.\\\\+)?\\\\s*\\\\}\\\\s*');\n url = url.replace(pathParamRex, paramValue);\n break;\n case 'HEADER':\n headers[param.name] = paramValue;\n break;\n case 'BODY':\n // For post/put query methods wrap the input\n if (isBodyTypeQueryProcedure) {\n setParamsOfChildNode();\n bodyInfo = processRequestBody(paramValueInfo, params);\n requestBody = bodyInfo.requestBody;\n requiredParamMissing = concat(requiredParamMissing, bodyInfo.missingParams);\n } else {\n requestBody = paramValue;\n }\n break;\n case 'FORMDATA':\n if (isBodyTypeQueryProcedure && param.name === SWAGGER_CONSTANTS.WM_DATA_JSON) {\n setParamsOfChildNode();\n // Process query/procedure formData non-file params params\n bodyInfo = processRequestBody(paramValueInfo, params);\n requestBody = getFormData(getFormDataObj(), param, bodyInfo.requestBody);\n requiredParamMissing = concat(requiredParamMissing, bodyInfo.missingParams);\n } else {\n requestBody = getFormData(getFormDataObj(), param, paramValue);\n }\n break;\n }\n } else if (param.required) {\n requiredParamMissing.push(param.name || param.id);\n }\n });\n\n // if required param not found, return error\n if (requiredParamMissing.length) {\n return {\n 'error': {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.REQUIRED_FIELD_MISSING,\n 'field': requiredParamMissing.join(','),\n 'message': replace(VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.REQUIRED_FIELD_MISSING, [requiredParamMissing.join(',')]),\n 'skipDefaultNotification': true\n }\n };\n }\n\n // Setting appropriate content-Type for request accepting request body like POST, PUT, etc\n if (!includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, toUpper(method))) {\n /*Based on the formData browser will automatically set the content type to 'multipart/form-data' and webkit boundary*/\n if (!(operationInfo.consumes && (operationInfo.consumes[0] === WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA))) {\n headers['Content-Type'] = (operationInfo.consumes && operationInfo.consumes[0]) || 'application/json';\n }\n }\n\n // if the consumes has application/x-www-form-urlencoded and\n // if the http request of given method type can have body send the queryParams as Form Data\n if (includes(operationInfo.consumes, WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED)\n && !includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, (method || '').toUpperCase())) {\n // remove the '?' at the start of the queryParams\n if (queryParams) {\n requestBody = (requestBody ? requestBody + '&' : '') + queryParams.substring(1);\n }\n headers['Content-Type'] = WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED;\n } else {\n url += queryParams;\n }\n\n /*\n * for proxy calls:\n * - cloak the proper headers (required only for REST services)\n * - prepare complete url from relativeUrl\n */\n if (isProxyCall) {\n // avoiding cloakHeadersForProxy when the method is invoked from apidesigner.\n headers = (variable.serviceType !== VARIABLE_CONSTANTS.SERVICE_TYPE.REST && variable.serviceType !== VARIABLE_CONSTANTS.SERVICE_TYPE.OPENAPI) || operationInfo.skipCloakHeaders ? headers : cloakHeadersForProxy(headers);\n if (variable.getPrefabName() && VARIABLE_CONSTANTS.REST_SUPPORTED_SERVICES.indexOf(variable.serviceType) !== -1) {\n /* if it is a prefab variable (used in a normal project), modify the url */\n url = 'prefabs/' + variable.getPrefabName() + url;\n target = 'invokePrefabRestService';\n } else if (!variable.getPrefabName()) {\n url = 'services' + url;\n }\n url = $rootScope.project.deployedUrl + url;\n }\n\n // If pagination info exists, process info in request headers or body based on the metadata\n const paginationInfo = PaginationUtils.getPaginationInfo(operationInfo, variable);\n if (paginationInfo && variable.pagination) {\n const resp = PaginationUtils.setPaginationAtReq(paginationInfo, operationInfo, variable, headers, requestBody, url, options);\n if (resp) {\n if (resp['headers']) {\n headers = resp['headers'];\n } else if (resp['requestBody']) {\n requestBody = resp['requestBody']\n } else if (resp['url']) {\n url = resp['url']\n }\n }\n }\n\n /*creating the params needed to invoke the service. url is generated from the relative path for the operation*/\n invokeParams = {\n 'projectID': $rootScope.project.id,\n 'url': url,\n 'target': target,\n 'method': method,\n 'headers': headers,\n 'data': requestBody,\n 'authDetails': authDetails,\n 'isDirectCall': !isProxyCall,\n 'isExtURL': variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.REST,\n 'withCredentials': withCredentials\n };\n\n return invokeParams;\n }\n\n static isFileUploadRequest(variable) {\n // temporary fix, have to find proper solution for deciding weather to upload file through variable\n return variable.service === 'FileService' && variable.operation === 'uploadFile';\n }\n\n /**\n * This method returns array of query param names for variable other then page,size,sort\n * @params {params} params of the variable\n */\n static excludePaginationParams(params) {\n return map(reject(params, (param) => {\n return includes(VARIABLE_CONSTANTS.PAGINATION_PARAMS, param.name);\n }), function (param) {\n return param.name;\n });\n }\n}\n","import { $WebSocket } from 'angular2-websocket/angular2-websocket';\n\nimport { getValidJSON, isDefined, isInsecureContentRequest, isObject, triggerFn, xmlToJson } from '@wm/core';\n\nimport { BaseVariableManager } from './base-variable.manager';\nimport { WebSocketVariable } from '../../model/variable/web-socket-variable';\nimport { initiateCallback, metadataService } from '../../util/variable/variables.utils';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { ServiceVariableUtils } from '../../util/variable/service-variable.utils';\nimport {forEach, get} from \"lodash-es\";\n\nexport class WebSocketVariableManager extends BaseVariableManager {\n\n scope_var_socket_map = new Map();\n PROPERTY = {\n 'SERVICE': 'service',\n 'DATA_UPDATE_STRATEGY': 'dataUpdateStrategy',\n 'DATA_LIMIT': 'dataLimit'\n };\n DATA_UPDATE_STRATEGY = {\n 'REFRESH': 'refresh',\n 'PREPEND': 'prepend',\n 'APPEND': 'append'\n };\n\n /**\n * returns the state of property to decide weather to append new messages to dataSet or not\n * @param variable\n * @returns boolean\n */\n private shouldAppendData(variable) {\n variable = variable || this;\n return variable[this.PROPERTY.DATA_UPDATE_STRATEGY] !== this.DATA_UPDATE_STRATEGY.REFRESH;\n }\n\n /**\n * returns the state of property to decide weather to APPEND or PREPEND new messages to dataSet\n * @param variable\n * @returns boolean\n */\n private shouldAppendLast(variable) {\n return variable[this.PROPERTY.DATA_UPDATE_STRATEGY] === this.DATA_UPDATE_STRATEGY.APPEND;\n }\n\n /**\n * returns upper limit on number of records to be in dataSet\n * this is applicable only when appendData is true\n * @param variable\n * @returns {dataLimit}\n */\n private getDataLimit(variable) {\n return variable.dataLimit;\n }\n\n /**\n * get url from wmServiceOperationInfo\n * @param variable\n * @returns {*}\n */\n private getURL(variable) {\n const prefabName = variable.getPrefabName();\n const opInfo = prefabName ? get(metadataService.getByOperationId(variable.operationId, prefabName), 'wmServiceOperationInfo') : get(metadataService.getByOperationId(variable.operationId), 'wmServiceOperationInfo');\n const inputFields = variable.dataBinding;\n let config;\n\n // add sample values to the params (url and path)\n forEach(opInfo.parameters, function (param) {\n param.sampleValue = inputFields[param.name];\n });\n // although, no header params will be present, keeping 'skipCloakHeaders' flag if support provided later\n $.extend(opInfo, {\n skipCloakHeaders: true\n });\n\n // call common method to prepare config for the service operation info.\n config = ServiceVariableUtils.constructRequestParams(variable, opInfo, inputFields);\n /* if error found, return */\n if (config.error && config.error.message) {\n this._onSocketError(variable, {data: config.error.message});\n return;\n }\n return config.url;\n }\n\n /**\n * handler for onMessage event on a socket connection for a variable\n * the data returned is converted to JSON from string/xml and assigned to dataSet of variable\n * If not able to do so, message is simply assigned to the dataSet of variable\n * If appendData property is set, the message is appended to the dataSet, else it replaces the existing value of dataSet\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketMessage(variable, evt) {\n let data = get(evt, 'data'), value, dataLength, dataLimit, shouldAddToLast, insertIdx;\n data = getValidJSON(data) || xmlToJson(data) || data;\n // EVENT: ON_MESSAGE\n value = initiateCallback(VARIABLE_CONSTANTS.EVENT.MESSAGE_RECEIVE, variable, data, evt);\n data = isDefined(value) ? value : data;\n if (this.shouldAppendData(variable)) {\n variable.dataSet = variable.dataSet || [];\n dataLength = variable.dataSet.length;\n dataLimit = this.getDataLimit(variable);\n shouldAddToLast = this.shouldAppendLast(variable);\n if (dataLimit && (dataLength >= dataLimit)) {\n if (shouldAddToLast) {\n variable.dataSet.shift();\n } else {\n variable.dataSet.pop();\n }\n }\n insertIdx = shouldAddToLast ? dataLength : 0;\n variable.dataSet.splice(insertIdx, 0, data);\n } else {\n variable.dataSet = isDefined(value) ? value : data;\n }\n }\n\n /**\n * calls the ON_BEFORE_SEND callback on the variable\n * @param variable\n * @param message\n * @returns {*}\n * @private\n */\n private _onBeforeSend(variable, message) {\n // EVENT: ON_BEFORE_SEND\n return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_SEND, variable, message);\n }\n\n /**\n * calls the ON_BEFORE_CLOSE callback assigned to the variable\n * @param variable\n * @param evt\n * @returns {*}\n * @private\n */\n private _onBeforeSocketClose(variable, evt?) {\n // EVENT: ON_BEFORE_CLOSE\n return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_CLOSE, variable, get(evt, 'data'), evt);\n }\n\n /**\n * calls the ON_BEFORE_OPEN callback assigned\n * called just before the connection is open\n * @param variable\n * @param evt\n * @returns {*}\n * @private\n */\n private _onBeforeSocketOpen(variable, evt?) {\n // EVENT: ON_BEFORE_OPEN\n return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_OPEN, variable, get(evt, 'data'), evt);\n }\n\n /**\n * calls the ON_OPEN event on the variable\n * this is called once the connection is established by the variable with the target WebSocket service\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketOpen(variable, evt) {\n variable._socketConnected = true;\n // EVENT: ON_OPEN\n initiateCallback(VARIABLE_CONSTANTS.EVENT.OPEN, variable, get(evt, 'data'), evt);\n }\n\n /**\n * clears the socket variable against the variable in a scope\n * @param variable\n */\n private freeSocket(variable) {\n this.scope_var_socket_map.set(variable, undefined);\n }\n\n /**\n * calls the ON_CLOSE event on the variable\n * this is called on close of an existing connection on a variable\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketClose(variable, evt) {\n variable._socketConnected = false;\n this.freeSocket(variable);\n // EVENT: ON_CLOSE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CLOSE, variable, get(evt, 'data'), evt);\n }\n\n /**\n * calls the ON_ERROR event on the variable\n * this is called if an error occurs while connecting to the socket service\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketError(variable, evt) {\n variable._socketConnected = false;\n this.freeSocket(variable);\n // EVENT: ON_ERROR\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, get(evt, 'data') || 'Error while connecting with ' + variable.service, evt);\n }\n\n /**\n * returns an existing socket connection on the variable\n * if not present, make the connection and return it\n * @param variable\n * @returns {*}\n */\n private getSocket(variable) {\n const url = this.getURL(variable);\n let _socket = this.scope_var_socket_map.get(variable);\n if (_socket) {\n return _socket;\n }\n\n // Trigger error if unsecured webSocket is used in secured domain, ignore in mobile device\n if (!CONSTANTS.hasCordova && isInsecureContentRequest(url)) {\n triggerFn(this._onSocketError.bind(this, variable));\n return;\n }\n _socket = new $WebSocket(url);\n _socket.onOpen(this._onSocketOpen.bind(this, variable));\n _socket.onError(this._onSocketError.bind(this, variable));\n _socket.onMessage(this._onSocketMessage.bind(this, variable));\n _socket.onClose(this._onSocketClose.bind(this, variable));\n\n this.scope_var_socket_map.set(variable, _socket);\n variable._socket = _socket;\n return _socket;\n}\n\n /**\n * opens a socket connection on the variable.\n * URL & other meta data is fetched from wmServiceOperationInfo\n * @returns {*}\n */\n public open(variable: WebSocketVariable, success?, error?) {\n const shouldOpen = this._onBeforeSocketOpen(variable);\n let socket;\n if (shouldOpen === false) {\n triggerFn(error);\n return;\n }\n socket = this.getSocket(variable);\n triggerFn(success);\n return socket;\n }\n\n /**\n * closes an existing socket connection on variable\n */\n public close(variable: WebSocketVariable) {\n const shouldClose = this._onBeforeSocketClose(variable),\n socket = this.getSocket(variable);\n if (shouldClose === false) {\n return;\n }\n socket.close();\n }\n\n /**\n * sends a message to the existing socket connection on the variable\n * If socket connection not open yet, open a connections and then send\n * if message provide, it is sent, else the one present in RequestBody param is sent\n * @param message\n */\n public send(variable: WebSocketVariable, message?: string) {\n const socket = this.getSocket(variable);\n let response;\n\n message = message || get(variable, 'dataBinding.RequestBody');\n response = this._onBeforeSend(variable, message);\n if (response === false) {\n return;\n }\n message = isDefined(response) ? response : message;\n message = isObject(message) ? JSON.stringify(message) : message;\n socket.send(message, 0);\n }\n}\n","import { NavigationActionManager } from '../manager/action/navigation-action.manager';\nimport { NotificationActionManager } from '../manager/action/notification-action.manager';\nimport { BaseVariableManager } from '../manager/variable/base-variable.manager';\nimport { BaseActionManager } from '../manager/action/base-action.manager';\nimport { LoginActionManager } from '../manager/action/login-action.manager';\nimport { LogoutActionManager } from '../manager/action/logout-action.manager';\nimport { DeviceVariableManager } from '../manager/variable/device-variable-manager';\nimport { WebSocketVariableManager } from '../manager/variable/web-socket-variable.manager';\n\nconst managerMap = new Map(),\n typeToManagerMap = {\n 'Variable': BaseVariableManager,\n 'Action': BaseActionManager,\n 'wm.NavigationVariable': NavigationActionManager,\n 'wm.NotificationVariable': NotificationActionManager,\n 'wm.LoginVariable': LoginActionManager,\n 'wm.LogoutVariable': LogoutActionManager,\n 'wm.DeviceVariable': DeviceVariableManager,\n 'wm.WebSocketVariable': WebSocketVariableManager\n };\n\nexport class VariableManagerFactory {\n\n static get(type) {\n return managerMap.has(type) ?\n managerMap.get(type) :\n managerMap.set(type, new typeToManagerMap[type]()).get(type);\n }\n}\n","import {$invokeWatchers, hasCordova} from '@wm/core';\n\nimport { initiateCallback } from '../../util/variable/variables.utils';\nimport { IDeviceVariableOperation } from './device-variable-operation';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\n\nexport class DeviceVariableService {\n\n name: string;\n\n protected operations: IDeviceVariableOperation[];\n\n invoke(variable: any, options: any): Promise<any> {\n const operation = this.operations.find(o => {\n return o.name === variable.operation;\n });\n if (operation == null) {\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, null);\n return Promise.reject(`Could not find operation '${variable.operation}' in service '${this.name}'`);\n } else if (hasCordova()) {\n const dataBindings = new Map<string, any>();\n if (variable.dataBinding !== undefined) {\n Object.entries(variable).forEach(o => {\n dataBindings.set(o[0], o[1]);\n });\n Object.entries(variable.dataBinding).forEach(o => {\n dataBindings.set(o[0], o[1]);\n });\n }\n return operation.invoke(variable, options, dataBindings)\n .then(function (data) {\n variable.dataSet = data;\n $invokeWatchers(true);\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, data);\n return data;\n }, function (reason) {\n variable.dataSet = {};\n $invokeWatchers(true);\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, null);\n return reason;\n });\n } else {\n return Promise.resolve()\n .then(() => {\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, operation.model);\n return operation.model;\n });\n }\n }\n}\n","import { VariableManagerFactory } from '../../factory/variable-manager.factory';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { DeviceVariableManager } from '../../manager/variable/device-variable-manager';\nimport { ApiAwareVariable } from '@wavemaker/variables';\n\nconst getManager = () => {\n return <DeviceVariableManager> VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.DEVICE);\n};\n\nexport class DeviceVariable extends ApiAwareVariable {\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n init() {\n getManager().initBinding(this);\n }\n\n invoke(options?, onSuccess?, onError?) {\n getManager().invoke(this, options).then(onSuccess, onError);\n }\n}\n","import { VariableManagerFactory } from '../../factory/variable-manager.factory';\nimport { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.NAVIGATION);\n};\n\nexport class NavigationAction extends BaseAction {\n operation: string;\n pageName: string;\n\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n invoke(options?) {\n getManager().invoke(this, options);\n }\n\n // legacy method.\n navigate(options?) {\n this.invoke(options);\n }\n\n init() {\n // static property bindings\n getManager().initBinding(this, 'dataBinding', 'dataBinding');\n\n // dynamic property bindings (e.g. page params)\n getManager().initBinding(this, 'dataSet', 'dataSet');\n }\n}\n","import { DataSource, IDataSource, isDefined } from '@wm/core';\n\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\nimport { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION);\n};\n\nexport class NotificationAction extends BaseAction implements IDataSource {\n\n message: string;\n\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n execute(operation, options) {\n const returnVal = super.execute(operation, options);\n if (isDefined(returnVal)) {\n return returnVal;\n }\n\n return new Promise((resolve, reject) => {\n switch (operation) {\n case DataSource.Operation.INVOKE :\n this.invoke(options, resolve, reject);\n break;\n case DataSource.Operation.NOTIFY :\n this.notify(options, resolve, reject);\n break;\n default :\n reject(`${operation} operation is not supported on this data source`);\n break;\n }\n });\n }\n\n // Backward compatible method\n notify(options, success, error) {\n getManager().notify(this, options, success, error);\n }\n\n invoke(options, success, error) {\n this.notify(options, success, error);\n }\n\n getMessage() {\n return getManager().getMessage(this);\n }\n\n setMessage(text) {\n return getManager().setMessage(this, text);\n }\n\n clearMessage() {\n return getManager().setMessage(this, '');\n }\n\n getOkButtonText() {\n return getManager().getOkButtonText(this);\n }\n\n setOkButtonText(text) {\n return getManager().setOkButtonText(this, text);\n }\n\n getToasterDuration() {\n return getManager().getToasterDuration(this);\n }\n\n setToasterDuration(duration) {\n return getManager().setToasterDuration(this, duration);\n }\n\n getToasterClass() {\n return getManager().getToasterClass(this);\n }\n\n setToasterClass(classText) {\n return getManager().setToasterClass(this, classText);\n }\n\n getToasterPosition() {\n return getManager().getToasterPosition(this);\n }\n\n setToasterPosition(position) {\n return getManager().setToasterPosition(this, position);\n }\n\n getAlertType() {\n return getManager().getAlertType(this);\n }\n\n setAlertType(type) {\n return getManager().setAlertType(this, type);\n }\n\n getCancelButtonText() {\n return getManager().getCancelButtonText(this);\n }\n\n setCancelButtonText(text) {\n return getManager().setCancelButtonText(this, text);\n }\n\n init() {\n // static property bindings\n getManager().initBinding(this, 'dataBinding', 'dataBinding');\n\n // dynamic property bindings\n getManager().initBinding(this, 'dataSet', 'dataSet');\n }\n}\n","import { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.LOGIN);\n};\n\nexport class LoginAction extends BaseAction {\n\n startUpdate: boolean;\n autoUpdate: boolean;\n useDefaultSuccessHandler: boolean;\n\n constructor(variable: any) {\n super();\n Object.assign(this, variable);\n }\n\n login(options, success, error) {\n return getManager().login(this, options, success, error);\n }\n\n invoke(options, success, error) {\n return this.login(options, success, error);\n }\n\n cancel() {\n // TODO[VIBHU]: implement http abort logic\n }\n\n init() {\n getManager().initBinding(this, 'dataBinding', 'dataBinding');\n }\n}\n","import { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.LOGOUT);\n};\n\nexport class LogoutAction extends BaseAction {\n\n startUpdate: boolean;\n autoUpdate: boolean;\n useDefaultSuccessHandler: boolean;\n\n constructor(variable: any) {\n super();\n Object.assign(this, variable);\n }\n\n logout(options, success, error) {\n getManager().logout(this, options, success, error);\n }\n\n invoke(options, success, error) {\n this.logout(options, success, error);\n }\n\n cancel() {\n // TODO[VIBHU]: implement http abort logic\n }\n}\n","import { ApiAwareVariable } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET);\n};\n\nexport class WebSocketVariable extends ApiAwareVariable {\n\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n open(success?, error?) {\n return getManager().open(this, success, error);\n }\n\n close () {\n return getManager().close(this);\n }\n\n update() {\n return getManager().update(this);\n }\n\n send(message?: string) {\n return getManager().send(this, message);\n }\n\n cancel() {\n return this.close();\n }\n\n invoke(options?, success?, error?) {\n this.open(success, error);\n }\n\n init () {\n getManager().initBinding(this);\n }\n}\n","import { DeviceVariable } from '../model/variable/device-variable';\nimport { NavigationAction } from '../model/action/navigation-action';\nimport { NotificationAction } from '../model/action/notification-action';\nimport { ModelVariable, ServiceVariable, LiveVariable, CrudVariable, TimerAction, VARIABLE_CONSTANTS } from '@wavemaker/variables';\nimport { LoginAction } from '../model/action/login-action';\nimport { LogoutAction } from '../model/action/logout-action';\nimport { WebSocketVariable } from '../model/variable/web-socket-variable';\n\nexport class VariableFactory {\n\n static create(variable, context) {\n let variableInstance;\n switch (variable.category) {\n case VARIABLE_CONSTANTS.CATEGORY.MODEL:\n variableInstance = new ModelVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.SERVICE:\n variableInstance = new ServiceVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.LIVE:\n variableInstance = new LiveVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.CRUD:\n variableInstance = new CrudVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.DEVICE:\n variableInstance = new DeviceVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.NAVIGATION:\n variableInstance = new NavigationAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION:\n variableInstance = new NotificationAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.LOGIN:\n variableInstance = new LoginAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.LOGOUT:\n variableInstance = new LogoutAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.TIMER:\n variableInstance = new TimerAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET:\n variableInstance = new WebSocketVariable(variable);\n }\n\n variableInstance._context = context;\n variableInstance.__cloneable__ = false;\n return variableInstance;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { AbstractHttpService, hasCordova } from '@wm/core';\n\n@Injectable()\nexport class MetadataService {\n metadataMap: Map<string, any>;\n providerMap: Map<string, any>;\n CONTEXT_APP = 'app';\n\n constructor(private $http: AbstractHttpService) {}\n\n isLoaded() {\n return this.metadataMap ? this.metadataMap.has(this.CONTEXT_APP) : false;\n }\n\n load(prefabName?: string): Promise<any> {\n let url;\n if (hasCordova()) {\n url = 'metadata/' + (prefabName ? `prefabs/${prefabName}/` : 'app/') + 'service-definitions.json';\n } else {\n url = './services/' + (prefabName ? `prefabs/${prefabName}/` : '') + 'servicedefs';\n }\n return new Promise((resolve, reject) => {\n this.$http.send({'url' : url, 'method': 'GET'}).then((response) => {\n this.metadataMap = this.metadataMap || new Map();\n this.providerMap = this.providerMap || new Map();\n response.body = response.body || {};\n this.metadataMap.set(prefabName || this.CONTEXT_APP, response.body.serviceDefs);\n if (response.body.securityDefinitions) {\n this.providerMap.set(prefabName || this.CONTEXT_APP, response.body.securityDefinitions.oauthProvider);\n }\n resolve(response.body.serviceDefs);\n }, reject);\n });\n }\n\n getByOperationId(operationId, context) {\n context = context || this.CONTEXT_APP;\n const map = this.metadataMap.get(context);\n return map && map[operationId];\n }\n\n // function to get Provider details from providerMap for the passed providerId\n getByProviderId(providerId, context) {\n context = context || this.CONTEXT_APP;\n const map = this.providerMap.get(context);\n return map && map[providerId];\n }\n\n getByCrudId(crudId, context) {\n context = context || this.CONTEXT_APP;\n const map = this.metadataMap.get(context);\n let ops = [];\n for (let k in map) {\n if (map[k] && map[k].crudOperationId === crudId) {\n ops.push(map[k]);\n }\n }\n return ops;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport {\n $watch,\n $parseEvent,\n AbstractDialogService,\n AbstractHttpService,\n AbstractNavigationService,\n AbstractToasterService, processFilterExpBindNode, $invokeWatchers, getClonedObject\n} from '@wm/core';\nimport { OAuthService } from '@wm/oAuth';\nimport { SecurityService } from '@wm/security';\n\nimport { VariableFactory } from '../factory/variable.factory';\nimport { wmSetDependency, BaseAction, getTarget, setValueToNode, getTargetNodeKey, internalBoundNodeMap } from '@wavemaker/variables';\nimport {setDependency, simulateFileDownload} from '../util/variable/variables.utils';\nimport { MetadataService } from './metadata-service/metadata.service';\nimport { VARIABLE_CONSTANTS } from '../constants/variables.constants';\nimport {appManager} from '../util/variable/variables.utils';\nimport { DateFormatter } from '@wavemaker/variables';\nimport {isArray, isFunction, isUndefined, set} from \"lodash-es\";\n\nexport class Formatter implements DateFormatter {\n format(value, format) {\n return appManager.getPipe('date').transform(value, format);\n }\n}\n\n\n@Injectable()\nexport class VariablesService {\n\n constructor(\n private httpService: AbstractHttpService,\n private metadataService: MetadataService,\n private navigationService: AbstractNavigationService,\n private routerService: Router,\n private toasterService: AbstractToasterService,\n private oAuthService: OAuthService,\n private securityService: SecurityService,\n private dialogService: AbstractDialogService\n ) {\n // set external dependencies, to be used across variable classes, managers and utils\n setDependency('http', this.httpService);\n setDependency('metadata', this.metadataService);\n setDependency('navigationService', this.navigationService);\n setDependency('router', this.routerService);\n setDependency('toaster', this.toasterService);\n setDependency('oAuth', this.oAuthService);\n setDependency('security', this.securityService);\n setDependency('dialog', this.dialogService);\n wmSetDependency('oAuth', this.oAuthService);\n wmSetDependency('security', this.securityService);\n wmSetDependency('metadata', this.metadataService);\n wmSetDependency('http', this.httpService);\n }\n\n /**\n * loop through a collection of variables/actions\n * trigger cancel on each (of exists)\n * @param collection\n */\n bulkCancel(collection) {\n Object.keys(collection).forEach(name => {\n const variable = collection[name];\n if (isFunction(variable.cancel)) {\n variable.cancel();\n }\n });\n }\n\n /**\n * loops over the variable/actions collection and trigger invoke on it if startUpdate on it is true\n * @param collection\n */\n triggerStartUpdate(collection) {\n return Promise.all(\n Object.keys(collection)\n .map(name => collection[name])\n .filter( variable => variable?.startUpdate && variable.invoke)\n .map(variable => variable.invoke())\n );\n }\n\n processBindExp(d: any, scope: any, variable) {\n const root = getTarget(variable),\n targetNodeKey = getTargetNodeKey(d.target),\n runMode = true;\n let v = isArray(d.value) ? d.value[0] : d.value;\n if (v) {\n if (v.startsWith && v.startsWith('bind:')) {\n const watchExpression = $watch(v.replace('bind:', ''), scope, {}, variable.invokeOnParamChange.bind(variable, d), undefined, undefined, d, () => variable.isMuted);\n v = scope.registerDestroyListener ? scope.registerDestroyListener(watchExpression) : watchExpression;\n } else if (!isUndefined(d.value)) {\n setValueToNode(d.target, d, root, variable, d.value, true);\n if (runMode && root !== targetNodeKey) {\n if (!internalBoundNodeMap.has(variable)) {\n internalBoundNodeMap.set(variable, {});\n }\n set(internalBoundNodeMap.get(variable), [variable.name, root, d.target], d.value);\n }\n }\n }\n return {\n name: d.target,\n value: v\n };\n }\n\n processBinding(variable: any, context: any, bindSource?: string, bindTarget?: string) {\n bindSource = bindSource || 'dataBinding';\n bindTarget = bindTarget || 'dataBinding';\n\n const bindMap = variable[bindSource];\n variable[bindSource] = {};\n variable['_bind' + bindSource] = bindMap;\n if (!bindMap || !isArray(bindMap)) {\n return;\n }\n bindMap.forEach( (node) => {\n /* for static variable change the binding with target 'dataBinding' to 'dataSet', as the results have to reflect directly in the dataSet */\n if (variable.category === 'wm.Variable' && node.target === 'dataBinding') {\n node.target = 'dataSet';\n }\n this.processBindExp(node, context, variable);\n });\n }\n\n isVariableSeperated(variablesJson, variableName) {\n return variablesJson[variableName].category === 'wm.Variable' || variablesJson[variableName].category === 'wm.ServiceVariable' ||\n variablesJson[variableName].category === 'wm.LiveVariable' || variablesJson[variableName].category === 'wm.CrudVariable'\n }\n\n getBindSourceTarget(variable) {\n if (variable.category === 'wm.LiveVariable') {\n return variable.operation === 'read' ? 'filterFields' : 'inputFields';\n } else if (variable.category === 'wm.ModelVariable') {\n return 'dataSet';\n } else {\n return 'dataBinding';\n }\n }\n\n /**\n * Takes the raw variables and actions json as input\n * Initialize the variable and action instances through the factory\n * collect the variables and actions in separate maps and return the collection\n * @param {string} page\n * @param variablesJson\n * @param scope\n * @returns {Variables , Actions}\n */\n register(page: string, variablesJson: any, scope: any) {\n const variableInstances = {\n Variables: {},\n Actions: {},\n callback: this.triggerStartUpdate\n };\n let varInstance;\n\n for (const variableName in variablesJson) {\n const params: any = {};\n varInstance = VariableFactory.create(variablesJson[variableName], scope);\n varInstance.init();\n if (this.isVariableSeperated(variablesJson, variableName)) {\n this.processBinding(varInstance, scope, 'dataBinding', this.getBindSourceTarget(varInstance));\n varInstance.httpService = this.httpService;\n varInstance.dateFormatter = new Formatter();\n varInstance.subscribe('afterInvoke', () => $invokeWatchers(true));\n if (varInstance.category === 'wm.LiveVariable' && varInstance.operation === 'read') {\n processFilterExpBindNode(varInstance._context, varInstance.filterExpressions, varInstance);\n }\n if (varInstance.category === 'wm.CrudVariable' || varInstance.category === 'wm.ServiceVariable') {\n varInstance.simulateFileDownload = simulateFileDownload;\n }\n\n }\n\n if (this.isVariableSeperated(variablesJson, variableName) || variablesJson[variableName].category === 'wm.TimerVariable') {\n for (const e in VARIABLE_CONSTANTS.EVENT) {\n if (varInstance[VARIABLE_CONSTANTS.EVENT[e]]) {\n varInstance[VARIABLE_CONSTANTS.EVENT[e]] = $parseEvent(varInstance[VARIABLE_CONSTANTS.EVENT[e]]);\n }\n }\n }\n\n\n // if action type, put it in Actions namespace\n if (varInstance instanceof BaseAction) {\n variableInstances.Actions[variableName] = varInstance;\n } else {\n variableInstances.Variables[variableName] = varInstance;\n }\n }\n\n // if the context has onDestroy listener, subscribe the event and trigger cancel on all varibales\n if (scope.registerDestroyListener) {\n scope.registerDestroyListener(() => {\n this.bulkCancel(variableInstances.Variables);\n this.bulkCancel(variableInstances.Actions);\n });\n }\n\n return variableInstances;\n }\n\n destroy() {\n }\n\n registerDependency(name, ref) {\n setDependency(name, ref);\n wmSetDependency(name, ref);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport {CommonModule, HashLocationStrategy, Location, LocationStrategy} from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { ToastrModule } from 'ngx-toastr';\n\nimport { HttpServiceModule } from '@wm/http';\nimport { SecurityModule } from '@wm/security';\nimport { OAuthModule } from '@wm/oAuth';\n\nimport { VariablesService } from './service/variables.service';\nimport { MetadataService } from './service/metadata-service/metadata.service';\n\nexport const toastrModule: ModuleWithProviders<ToastrModule> = ToastrModule.forRoot({maxOpened: 1, autoDismiss: true});\n\n@NgModule({\n imports: [\n CommonModule,\n toastrModule,\n HttpClientModule,\n HttpServiceModule,\n OAuthModule,\n SecurityModule\n ],\n declarations: []\n})\nexport class VariablesModule {\n\n static forRoot(): ModuleWithProviders<VariablesModule> {\n return {\n ngModule: VariablesModule,\n providers: [\n VariablesService,\n MetadataService,\n Location,\n {provide: LocationStrategy, useClass: HashLocationStrategy}\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["rootScope","NVUtils.navigate","replace","isObject","getManager","VARIABLE_CONSTANTS","getTargetNodeKey","setValueToNode","internalBoundNodeMap","i2.MetadataService","i1"],"mappings":";;;;;;;;;;;;;;;;;;;AACa,MAAA,SAAS,GAAG;AACrB,IAAA,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,SAAS;AAC3C,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,gBAAgB,EAAE,eAAe;AACjC,IAAA,mBAAmB,EAAE,GAAG;AACxB,IAAA,mBAAmB,EAAG,sEAAsE;EAC9F;AACW,MAAA,kBAAkB,GAAG;AAC9B,IAAA,QAAQ,EAAE;AACN,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,OAAO,EAAE,oBAAoB;AAC7B,QAAA,SAAS,EAAE,sBAAsB;AACjC,QAAA,UAAU,EAAE,uBAAuB;AACnC,QAAA,YAAY,EAAE,yBAAyB;AACvC,QAAA,KAAK,EAAE,kBAAkB;AACzB,QAAA,KAAK,EAAE,kBAAkB;AACzB,QAAA,MAAM,EAAE,mBAAmB;AAC3B,QAAA,MAAM,EAAE,mBAAmB;AAC9B,KAAA;IACD,MAAM,EAAE,CAAC,UAAU;QACf,gBAAgB;QAChB,UAAU;QACV,cAAc;QACd,QAAQ;QACR,qBAAqB;QACrB,kBAAkB;QAClB,YAAY;QACZ,SAAS;QACT,sBAAsB;QACtB,aAAa;QACb,SAAS;QACT,QAAQ;QACR,MAAM;QACN,UAAU;QACV,eAAe;QACf,SAAS;QACT,aAAa;QACb,WAAW;QACX,UAA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AAA,IAAA,EAAA,CAAA,CAAA,EAAA;;iFAAhB,gBAAgB,EAAA,CAAA;cAD5B,UAAU;;;ACjBE,MAAA,YAAY,GAAsC,YAAY,CAAC,OAAO,CAAC,EAAC,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAC,EAAE;MAa1G,eAAe,CAAA;AAExB,IAAA,OAAO,OAAO,GAAA;QACV,OAAO;AACH,YAAA,QAAQ,EAAE,eAAe;AACzB,YAAA,SAAS,EAAE;gBACP,gBAAgB;gBAChB,eAAe;gBACf,QAAQ;AACR,gBAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;AAC9D,aAAA;SACJ,CAAC;KACL;gFAZQ,eAAe,GAAA,CAAA,EAAA,CAAA,EAAA;mEAAf,eAAe,EAAA,CAAA,CAAA,EAAA;uEATpB,YAAY;YACZ,YAAY;YACZ,gBAAgB;YAChB,iBAAiB;YACjB,WAAW;YACX,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;iFAIT,eAAe,EAAA,CAAA;cAX3B,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE;oBACL,YAAY;oBACZ,YAAY;oBACZ,gBAAgB;oBAChB,iBAAiB;oBACjB,WAAW;oBACX,cAAc;AACjB,iBAAA;AACD,gBAAA,YAAY,EAAE,EAAE;AACnB,aAAA,CAAA;;wFACY,eAAe,EAAA,EAAA,OAAA,EAAA,CATpB,YAAY,EAAAC,IAAA,CAAA,YAAA,EAEZ,gBAAgB;QAChB,iBAAiB;QACjB,WAAW;QACX,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACtBtB;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../projects/variables/src/constants/variables.constants.ts","../../../projects/variables/src/util/variable/variables.utils.ts","../../../projects/variables/src/util/action/navigation-action.utils.ts","../../../projects/variables/src/manager/action/base-action.manager.ts","../../../projects/variables/src/manager/action/navigation-action.manager.ts","../../../projects/variables/src/manager/action/notification-action.manager.ts","../../../projects/variables/src/manager/variable/base-variable.manager.ts","../../../projects/variables/src/manager/action/login-action.manager.ts","../../../projects/variables/src/manager/action/logout-action.manager.ts","../../../projects/variables/src/manager/variable/device-variable-manager.ts","../../../projects/variables/src/util/oAuth.utils.ts","../../../projects/variables/src/util/variable/pagination.utils.ts","../../../projects/variables/src/util/variable/service-variable.utils.ts","../../../projects/variables/src/manager/variable/web-socket-variable.manager.ts","../../../projects/variables/src/factory/variable-manager.factory.ts","../../../projects/variables/src/manager/variable/device-variable-service.ts","../../../projects/variables/src/model/variable/device-variable.ts","../../../projects/variables/src/model/action/navigation-action.ts","../../../projects/variables/src/model/action/notification-action.ts","../../../projects/variables/src/model/action/login-action.ts","../../../projects/variables/src/model/action/logout-action.ts","../../../projects/variables/src/model/variable/web-socket-variable.ts","../../../projects/variables/src/factory/variable.factory.ts","../../../projects/variables/src/service/metadata-service/metadata.service.ts","../../../projects/variables/src/service/variables.service.ts","../../../projects/variables/src/variables.module.ts","../../../projects/variables/src/index.ts"],"sourcesContent":["import {$rootScope as rootScope} from '@wavemaker/variables';\nexport const CONSTANTS = {\n hasCordova: window['cordova'] !== undefined,\n isStudioMode: false,\n isRunMode: true,\n XSRF_COOKIE_NAME: 'wm_xsrf_token',\n DEFAULT_TIMER_DELAY: 500,\n WIDGET_DOESNT_EXIST : 'The widget you\\'re trying to navigate to doesn\\'t exist on this page'\n};\nexport const VARIABLE_CONSTANTS = {\n CATEGORY: {\n MODEL: 'wm.Variable',\n LIVE: 'wm.LiveVariable',\n CRUD: 'wm.CrudVariable',\n SERVICE: 'wm.ServiceVariable',\n WEBSOCKET: 'wm.WebSocketVariable',\n NAVIGATION: 'wm.NavigationVariable',\n NOTIFICATION: 'wm.NotificationVariable',\n TIMER: 'wm.TimerVariable',\n LOGIN: 'wm.LoginVariable',\n LOGOUT: 'wm.LogoutVariable',\n DEVICE: 'wm.DeviceVariable'\n },\n EVENTS: ['onBefore',\n 'onBeforeUpdate',\n 'onResult',\n 'onBeforeOpen',\n 'onOpen',\n 'onBeforeMessageSend',\n 'onMessageReceive',\n 'onProgress',\n 'onError',\n 'onBeforeDatasetReady',\n 'onCanUpdate',\n 'onClick',\n 'onHide',\n 'onOk',\n 'onCancel',\n 'onBeforeClose',\n 'onClose',\n 'onTimerFire',\n 'onSuccess',\n 'onOnline',\n 'onOffline'],\n EVENT: {\n 'CAN_UPDATE': 'onCanUpdate',\n 'BEFORE': 'onBefore',\n 'BEFORE_UPDATE': 'onBeforeUpdate',\n 'PREPARE_SETDATA': 'onBeforeDatasetReady',\n 'RESULT': 'onResult',\n 'ERROR': 'onError',\n 'ABORT': 'onAbort',\n 'PROGRESS': 'onProgress',\n 'CLICK': 'onClick',\n 'HIDE': 'onHide',\n 'OK': 'onOk',\n 'CANCEL': 'onCancel',\n 'CLOSE': 'onClose',\n 'TIMER_FIRE': 'onTimerFire',\n 'SUCCESS': 'onSuccess',\n 'BEFORE_OPEN': 'onBeforeOpen',\n 'OPEN': 'onOpen',\n 'BEFORE_SEND': 'onBeforeMessageSend',\n 'MESSAGE_RECEIVE': 'onMessageReceive',\n 'BEFORE_CLOSE': 'onBeforeClose'\n },\n OWNER: {\n 'APP': 'App',\n 'PAGE': 'Page'\n },\n REST_SUPPORTED_SERVICES: ['JavaService', 'SoapService', 'FeedService', 'RestService', 'SecurityServiceType', 'DataService', 'WebSocketService', 'OpenAPIService'],\n PAGINATION_PARAMS: ['page', 'size', 'sort'],\n REST_SERVICE: {\n 'BASE_PATH_KEY': 'x-WM-BASE_PATH',\n 'RELATIVE_PATH_KEY': 'x-WM-RELATIVE_PATH',\n 'OAUTH_PROVIDER_KEY': 'x-WM-PROVIDER_ID',\n 'AUTH_HDR_KEY': 'Authorization',\n 'SECURITY_DEFN': {\n 'BASIC': 'basic',\n 'OAUTH2': 'oauth2',\n },\n 'AUTH_TYPE': {\n 'BASIC': 'BASIC',\n 'OAUTH': 'OAUTH2',\n 'NONE': 'NONE',\n },\n 'CONTENT_TYPE_KEY': 'x-WM-CONTENT_TYPE',\n 'ACCESSTOKEN_PLACEHOLDER': {\n 'LEFT': '',\n 'RIGHT': '.access_token'\n },\n ERR_TYPE: {\n NO_ACCESSTOKEN: 'missing_accesstoken',\n NO_CREDENTIALS: 'no_credentials',\n METADATA_MISSING: 'metadata_missing',\n CRUD_OPERATION_MISSING: 'crud_operation_missing',\n USER_UNAUTHORISED: 'user_unauthorised',\n REQUIRED_FIELD_MISSING: 'required_field_missing',\n },\n ERR_MSG: {\n NO_ACCESSTOKEN: 'Access token missing',\n NO_CREDENTIALS: 'No credentials present',\n METADATA_MISSING: 'Metadata missing for \"$variable\"',\n USER_UNAUTHORISED: 'Unauthorized User',\n CRUD_OPERATION_MISSING: 'Operation \"$operation\" not allowed for \"$variable\"',\n REQUIRED_FIELD_MISSING: 'Required field(s) missing: \"${0}\"'\n },\n UNCLOAKED_HEADERS: ['CONTENT-TYPE', 'ACCEPT', 'CONTENT-LENGTH', 'ACCEPT-ENCODING', 'ACCEPT-LANGUAGE'],\n PREFIX: {\n AUTH_HDR_VAL: {\n BASIC: 'Basic',\n OAUTH: 'Bearer'\n },\n CLOAK_HEADER_KEY: 'X-WM-'\n }\n },\n SERVICE_TYPE: {\n JAVA: 'JavaService',\n REST: 'RestService',\n SOAP: 'SoapService',\n FEED: 'FeedService',\n DATA: 'DataService',\n SECURITY: 'SecurityServiceType',\n WEBSOCKET: 'WebSocketService',\n OPENAPI: 'OpenAPIService'\n },\n CONTROLLER_TYPE: {\n QUERY: 'QueryExecution',\n PROCEDURE: 'ProcedureExecution'\n },\n HTTP_STATUS_CODE: {\n CORS_FAILURE: -1,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403\n },\n EXPORT_TYPES_MAP: {\n 'EXCEL' : '.xlsx',\n 'CSV' : '.csv'},\n DEFAULT_VAR : {\n 'NOTIFICATION' : 'appNotification'\n }\n};\n\nexport const WS_CONSTANTS = {\n NON_BODY_HTTP_METHODS: ['GET', 'HEAD'],\n CONTENT_TYPES: {\n FORM_URL_ENCODED: 'application/x-www-form-urlencoded',\n MULTIPART_FORMDATA: 'multipart/form-data',\n OCTET_STREAM: 'application/octet-stream'\n }\n};\n\nexport const DB_CONSTANTS = {\n 'DATABASE_MATCH_MODES': {\n 'like' : 'LIKE',\n 'start' : 'STARTING_WITH',\n 'startignorecase' : 'STARTING_WITH_IGNORECASE',\n 'end' : 'ENDING_WITH',\n 'endignorecase' : 'ENDING_WITH_IGNORECASE',\n 'anywhere' : 'CONTAINING',\n 'anywhereignorecase': 'CONTAINING_IGNORECASE',\n 'nowhere' : 'DOES_NOT_CONTAIN',\n 'nowhereignorecase': 'DOES_NOT_CONTAIN_IGNORECASE',\n 'exact' : 'EQUALS',\n 'exactignorecase' : 'EQUALS_IGNORECASE',\n 'notequals' : 'NOT_EQUALS',\n \"notequalsignorecase\": \"NOT_EQUALS_IGNORECASE\",\n 'between' : 'BETWEEN',\n 'in' : 'IN',\n \"notin\" : \"NOTIN\",\n 'lessthan' : 'LESS_THAN',\n 'lessthanequal' : 'LESS_THAN_OR_EQUALS',\n 'greaterthan' : 'GREATER_THAN',\n 'greaterthanequal' : 'GREATER_THAN_OR_EQUALS',\n 'null' : 'NULL',\n 'isnotnull' : 'IS_NOT_NULL',\n 'empty' : 'EMPTY',\n 'isnotempty' : 'IS_NOT_EMPTY',\n 'nullorempty' : 'NULL_OR_EMPTY'\n },\n 'DATABASE_EMPTY_MATCH_MODES': ['NULL', 'IS_NOT_NULL', 'EMPTY', 'IS_NOT_EMPTY', 'NULL_OR_EMPTY'],\n 'DATABASE_RANGE_MATCH_MODES': ['IN', 'NOTIN', 'BETWEEN', 'LESS_THAN', 'LESS_THAN_OR_EQUALS', 'GREATER_THAN', 'GREATER_THAN_OR_EQUALS', 'NOT_EQUALS'],\n 'DATABASE_NULL_EMPTY_MATCH': {\n 'NULL' : 'NULL',\n 'IS_NOT_NULL' : 'IS_NOT_NULL',\n 'EMPTY' : 'NULL',\n 'IS_NOT_EMPTY' : 'IS_NOT_NULL',\n 'NULL_OR_EMPTY' : 'NULL'\n },\n 'DATABASE_MATCH_MODES_WITH_QUERY': {\n 'LIKE' : '${0} like ${1}',\n 'STARTING_WITH' : '${0} like ${1}',\n 'STARTING_WITH_IGNORECASE': '${0} like ${1}',\n 'ENDING_WITH' : '${0} like ${1}',\n 'ENDING_WITH_IGNORECASE' : '${0} like ${1}',\n 'CONTAINING' : '${0} like ${1}',\n 'CONTAINING_IGNORECASE' : '${0} like ${1}',\n 'DOES_NOT_CONTAIN' : '${0} not like ${1}',\n 'DOES_NOT_CONTAIN_IGNORECASE': '${0} not like ${1}',\n 'EQUALS' : '${0}=${1}',\n 'EQUALS_IGNORECASE' : '${0}=${1}',\n 'NOT_EQUALS' : '${0}!=${1}',\n \"NOT_EQUALS_IGNORECASE\" : \"${0}!=${1}\",\n 'BETWEEN' : '${0} between ${1}',\n 'IN' : '${0} in ${1}',\n 'NOTIN' : \"${0} not in ${1}\",\n 'LESS_THAN' : '${0}<${1}',\n 'LESS_THAN_OR_EQUALS' : '${0}<=${1}',\n 'GREATER_THAN' : '${0}>${1}',\n 'GREATER_THAN_OR_EQUALS' : '${0}>=${1}',\n 'NULL' : '${0} is null',\n 'IS_NOT_NULL' : '${0} is not null',\n 'EMPTY' : '${0}=\\'\\'',\n 'IS_NOT_EMPTY' : '${0}<>\\'\\'',\n 'NULL_OR_EMPTY' : '${0} is null or ${0}=\\'\\''\n },\n 'DATABASE_STRING_MODES': ['LIKE', 'STARTING_WITH', 'STARTING_WITH_IGNORECASE', 'ENDING_WITH', 'ENDING_WITH_IGNORECASE', 'CONTAINING', 'CONTAINING_IGNORECASE', 'DOES_NOT_CONTAIN', 'DOES_NOT_CONTAIN_IGNORECASE', 'EQUALS', 'EQUALS_IGNORECASE', 'NOT_EQUALS', \"NOT_EQUALS_IGNORECASE\"]\n};\n\nexport const SWAGGER_CONSTANTS = {\n WM_DATA_JSON: 'wm_data_json',\n WM_HTTP_JSON: 'wm_httpRequestDetails'\n};\n\nexport const VARIABLE_URLS = {\n DATABASE: {\n searchTableData: {\n url: '/:service/:dataModelName/:entityName/search?page=:page&size=:size&:sort',\n method: 'POST'\n },\n searchTableDataWithQuery: {\n url: '/:service/:dataModelName/:entityName/filter?page=:page&size=:size&:sort',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }\n },\n readTableData: {\n url: '/:service/:dataModelName/:entityName?page=:page&size=:size&:sort',\n method: 'GET'\n },\n insertTableData: {\n url: '/:service/:dataModelName/:entityName',\n method: 'POST'\n },\n insertMultiPartTableData: {\n url: '/:service/:dataModelName/:entityName',\n method: 'POST',\n headers: {}\n // ,transformRequest: WM.identity\n },\n updateTableData: {\n url: '/:service/:dataModelName/:entityName/:id',\n method: 'PUT'\n },\n updateMultiPartTableData: {\n url: '/:service/:dataModelName/:entityName/:id',\n method: 'POST',\n headers: {}\n // ,transformRequest: WM.identity\n },\n deleteTableData: {\n url: '/:service/:dataModelName/:entityName/:id',\n method: 'DELETE'\n },\n updateCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id?:id',\n method: 'PUT'\n },\n periodUpdateCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id/periods?:id',\n method: 'PUT'\n },\n updateMultiPartCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id?:id',\n method: 'POST',\n headers: {}\n // , transformRequest: WM.identity\n },\n deleteCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id?:id',\n method: 'DELETE'\n },\n periodDeleteCompositeTableData: {\n url: '/:service/:dataModelName/:entityName/composite-id/periods?:id',\n method: 'DELETE'\n },\n getDistinctDataByFields: {\n url: '/:service/:dataModelName/:entityName/aggregations?page=:page&size=:size&:sort',\n method: 'POST'\n },\n exportTableData: {\n url: '/services/:dataModelName/:entityName/export?:sort',\n method: 'POST'\n },\n readTableRelatedData: {\n url: '/:service/:dataModelName/:entityName/:id/:relatedFieldName?page=:page&size=:size&:sort',\n method: 'GET'\n },\n executeNamedQuery: {\n url: '/:service/:dataModelName/queryExecutor/queries/:queryName?page=:page&size=:size&:queryParams',\n method: 'GET'\n },\n executeCustomQuery: {\n url: '/:service/:dataModelName/queries/execute?page=:page&size=:size',\n method: 'POST'\n },\n executeAggregateQuery: {\n url: '/services/:dataModelName/:entityName/aggregations?page=:page&size=:size&sort=:sort',\n method: 'POST'\n },\n executeNamedProcedure: {\n url: '/:service/:dataModelName/procedureExecutor/procedure/execute/:procedureName?page=:page&size=:size&:procedureParams',\n method: 'GET'\n },\n countTableDataWithQuery: {\n url: '/:service/:dataModelName/:entityName/count?:queryParams',\n method: 'GET'\n }\n},\n oauthConfiguration : {\n getAuthorizationUrl: {\n url: 'services/oauth2/:providerId/authorizationUrl',\n method: 'GET'\n }\n }\n};\n\nexport const $rootScope = rootScope;\n","import {\n $parseEvent,\n $watch,\n DataType,\n DEFAULT_FORMATS,\n extractType,\n findValueOf,\n getBlob,\n getClonedObject,\n stringStartsWith,\n triggerFn\n} from '@wm/core';\n\nimport {CONSTANTS, VARIABLE_CONSTANTS, WS_CONSTANTS} from '../../constants/variables.constants';\nimport {\n debounce, filter,\n forEach,\n get, includes, isArray, isDate,\n isEmpty,\n isFunction, isNumber, isObject,\n isString,\n isUndefined,\n join, keys, last, map,\n noop,\n pickBy, remove, replace, set,\n slice,\n split, toLower, toUpper, trim\n} from \"lodash-es\";\n\ndeclare const $;\ndeclare const he;\ndeclare const moment;\ndeclare const window;\n\nconst exportTypesMap = { 'EXCEL' : '.xlsx', 'CSV' : '.csv'};\n\nexport let appManager;\nexport let httpService;\nexport let metadataService;\nexport let navigationService;\nexport let routerService;\nexport let toasterService;\nexport let oauthService;\nexport let securityService;\nexport let dialogService;\n\nconst DOT_EXPR_REX = /^\\[(\"|')[\\w\\W]*(\\1)\\]$/,\n internalBoundNodeMap = new Map(),\n timers = new Map();\n\nconst _invoke = (variable, op) => {\n let debouncedFn,\n cancelFn = noop,\n retVal;\n if (timers.has(variable)) {\n cancelFn = timers.get(variable).cancel;\n }\n cancelFn();\n debouncedFn = debounce(function () {\n retVal = variable[op]();\n // handle promises to avoid uncaught promise errors in console\n if (retVal instanceof Promise) {\n retVal.catch(noop);\n }\n }, 100);\n timers.set(variable, debouncedFn);\n debouncedFn();\n};\n\nconst processVariablePostBindUpdate = (nodeName, nodeVal, nodeType, variable, noUpdate) => {\n switch (variable.category) {\n case VARIABLE_CONSTANTS.CATEGORY.LIVE:\n if (variable.operation === 'read') {\n if (nodeName === 'dataBinding') {\n forEach(nodeVal, function (val, key) {\n variable.filterFields[key] = {\n 'value': val\n };\n });\n } else {\n variable.filterFields[nodeName] = {\n 'value': nodeVal,\n 'type' : nodeType\n };\n }\n /* if auto-update set for the variable with read operation only, get its data */\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.listRecords) && !noUpdate) {\n _invoke(variable, 'listRecords');\n }\n } else {\n if (nodeName === 'dataBinding') {\n variable.inputFields = nodeVal;\n } else {\n variable.inputFields[nodeName] = nodeVal;\n }\n /* if auto-update set for the variable with read operation only, get its data */\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable[variable.operation + 'Record']) && !noUpdate) {\n _invoke(variable, variable.operation + 'Record');\n }\n }\n break;\n case VARIABLE_CONSTANTS.CATEGORY.CRUD:\n if (variable.operationType === 'list' && variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.invoke) && !noUpdate) {\n _invoke(variable, 'invoke');\n }\n break;\n case VARIABLE_CONSTANTS.CATEGORY.SERVICE:\n case VARIABLE_CONSTANTS.CATEGORY.LOGIN:\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.invoke) && !noUpdate) {\n _invoke(variable, 'invoke');\n }\n break;\n case VARIABLE_CONSTANTS.CATEGORY.DEVICE:\n variable[nodeName] = nodeVal;\n if (variable.autoUpdate && !isUndefined(nodeVal) && isFunction(variable.invoke) && !noUpdate) {\n _invoke(variable, 'invoke');\n }\n break;\n }\n};\n\nexport const setDependency = (type: string, ref: any) => {\n switch (type) {\n case 'appManager':\n appManager = ref;\n break;\n case 'http':\n httpService = ref;\n break;\n case 'metadata':\n metadataService = ref;\n break;\n case 'navigationService':\n navigationService = ref;\n break;\n case 'router':\n routerService = ref;\n break;\n case 'toaster':\n toasterService = ref;\n break;\n case 'oAuth':\n oauthService = ref;\n break;\n case 'security':\n securityService = ref;\n break;\n case 'dialog':\n dialogService = ref;\n break;\n }\n};\n\nexport const initiateCallback = (type: string, variable: any, data: any, options?: any, skipDefaultNotification?: boolean) => {\n\n /*checking if event is available and variable has event property and variable event property bound to function*/\n const eventValues = variable[type],\n callBackScope = variable._context;\n let errorVariable;\n /**\n * For error event:\n * trigger app level error handler.\n * if no event is assigned, trigger default appNotification variable.\n */\n if (type === VARIABLE_CONSTANTS.EVENT.ERROR && !skipDefaultNotification) {\n if (!eventValues) {\n /* in case of error, if no event assigned, handle through default notification variable */\n errorVariable = callBackScope.Actions[VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION];\n if (errorVariable) {\n data = errorVariable.getMessage() || data;\n data = isString(data) ? data : 'An error has occured. Please check the app logs.';\n errorVariable.invoke({ 'message' : data}, undefined, undefined);\n // $rootScope.$evalAsync(function () {\n // $rootScope.$emit(\"invoke-service\", VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION, {scope: callBackScope, message: response});\n // });\n }\n }\n }\n // TODO: [Vibhu], check whether to support legacy event calling mechanism (ideally, it should have been migrated)\n const fn = $parseEvent(variable[type]);\n if (type === VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE) {\n if (variable.category === 'wm.LiveVariable' && variable.operation === 'read') {\n return fn(variable._context, {variable: variable, dataFilter: data, options: options});\n } else {\n return fn(variable._context, {variable: variable, inputData: data, options: options});\n }\n } else {\n return fn(variable._context, {variable: variable, data: data, options: options});\n }\n};\n\nconst triggerOnTimeout = (success) => {\n setTimeout(() => { triggerFn(success); }, 500);\n};\n\nconst downloadFilefromResponse = (response, headers, success, error) => {\n // check for a filename\n let filename = '',\n filenameRegex,\n matches,\n type,\n blob,\n URL,\n downloadUrl,\n popup;\n const disposition = headers.get('Content-Disposition');\n if (disposition && disposition.indexOf('attachment') !== -1) {\n filenameRegex = /filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/;\n matches = filenameRegex.exec(disposition);\n if (matches !== null && matches[1]) {\n filename = matches[1].replace(/['\"]/g, '');\n }\n }\n\n type = headers.get('Content-Type');\n blob = new Blob([response], { type: type });\n\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed.\"\n if (window.navigator.msSaveBlob(blob, filename)) {\n triggerOnTimeout(success);\n } else {\n triggerFn(error);\n }\n } else {\n URL = window.URL || window.webkitURL;\n downloadUrl = URL.createObjectURL(blob);\n\n if (filename) {\n // use HTML5 a[download] attribute to specify filename\n const a = document.createElement('a');\n let reader;\n // safari doesn't support this yet\n if (typeof a.download === 'undefined') {\n reader = new FileReader();\n reader.onloadend = function () {\n const url = reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n popup = window.open(url, '_blank');\n if (!popup) {\n window.location.href = url;\n }\n };\n reader.onload = triggerOnTimeout.bind(undefined, success);\n reader.onerror = error;\n reader.readAsDataURL(blob);\n } else {\n a.href = downloadUrl;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n triggerOnTimeout(success);\n }\n } else {\n popup = window.open(downloadUrl, '_blank');\n if (!popup) {\n window.location.href = downloadUrl;\n }\n triggerOnTimeout(success);\n }\n\n setTimeout(() => { URL.revokeObjectURL(downloadUrl); }, 100); // cleanup\n }\n};\n\nconst getService = (serviceName) => {\n if (!serviceName) {\n return;\n }\n return serviceName;\n // Todo: Shubham, uncomment below code\n /* /!* get a reference to the element where ng-app is defined *!/\n let appEl = WM.element('[id=ng-app]'), injector;\n if (appEl) {\n try {\n injector = appEl.injector(); // get the angular injector\n if (injector) {\n return injector.get(serviceName); // return the service\n }\n } catch (e) {\n return undefined;\n }\n }*/\n};\n\n/**\n * Construct the form data params from the URL\n * @param queryParams\n * @param params\n */\nconst setParamsFromURL = (queryParams, params) => {\n queryParams = split(queryParams, '&');\n forEach(queryParams, function (param) {\n param = split(param, '=');\n params[param[0]] = decodeURIComponent(join(slice(param, 1), '='));\n });\n};\n\n/**\n * [Todo: Shubham], Implement Download through I frame\n * Simulates file download in an app through creating and submitting a hidden form in DOM.\n * The action will be initiated through a Service Variable\n *\n * Query Params\n * The request params like query params are added as hidden input elements\n *\n * Header Params\n * The header params for a request are also added along with hidden input elements.\n * This is done as headers can not be set for a form POST call from JavaScript\n *\n * Finally, request parameters are sent as follows:\n * For a GET request, the request data is sent along with the query params.\n * For POST, it is sent as request body.\n *\n * @param variable: the variable that is called from user action\n * @param requestParams object consisting the info to construct the XHR request for the service\n */\nconst downloadThroughIframe = (requestParams, success, dataBinding) => {\n // Todo: SHubham: URL contains '//' in between which should be handled at the URL formation only\n if (requestParams.url[1] === '/' && requestParams.url[2] === '/') {\n requestParams.url = requestParams.url.slice(0, 1) + requestParams.url.slice(2);\n }\n let iFrameElement,\n formEl,\n paramElement,\n queryParams = '',\n data;\n const IFRAME_NAME = 'fileDownloadIFrame',\n FORM_NAME = 'fileDownloadForm',\n CONTENT_TYPE = 'Content-Type',\n url = requestParams.url,\n encType = get(requestParams.headers, CONTENT_TYPE),\n params = pickBy(requestParams.headers, function (val, key) {\n return key !== CONTENT_TYPE;\n });\n /* Todo: shubham : define getService method\n WS_CONSTANTS = getService('WS_CONSTANTS');*/\n\n /* look for existing iframe. If exists, remove it first */\n iFrameElement = $('#' + IFRAME_NAME);\n if (iFrameElement.length) {\n iFrameElement.first().remove();\n }\n iFrameElement = $('<iframe id=\"' + IFRAME_NAME + '\" name=\"' + IFRAME_NAME + '\" class=\"ng-hide\"></iframe>');\n formEl = $('<form id=\"' + FORM_NAME + '\" name=\"' + FORM_NAME + '\"></form>');\n\n /* process query params, append a hidden input element in the form against each param */\n queryParams += url.indexOf('?') !== -1 ? url.substring(url.indexOf('?') + 1) : '';\n queryParams += encType === WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED ? ((queryParams ? '&' : '') + requestParams.dataParams) : '';\n\n formEl.attr({\n 'target' : iFrameElement.attr('name'),\n 'action' : url,\n 'method' : requestParams.method,\n 'enctype': !(isEmpty(requestParams.data) && isEmpty(queryParams)) ? encType : WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA\n });\n\n // For Non body methods only, set the input fields from query parameters\n if (includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, toUpper(requestParams.method))) {\n setParamsFromURL(queryParams, params); // Set params for URL query params\n }\n if (!isEmpty(requestParams.data)) {\n setParamsFromURL(requestParams.data, params);// Set params for request data\n data = params;\n } else {\n data = isEmpty(dataBinding) ? params : dataBinding;\n }\n forEach(data, function (val, key) {\n paramElement = $('<input type=\"hidden\">');\n paramElement.attr({\n 'name' : key,\n 'value' : val\n });\n formEl.append(paramElement);\n });\n\n /* append form to iFrame and iFrame to the document and submit the form */\n $('body').append(iFrameElement);\n\n // timeout for IE 10, iframeElement.contents() is empty in IE 10 without timeout\n setTimeout(function () {\n iFrameElement.contents().find('body').append(formEl);\n formEl.submit();\n triggerFn(success);\n }, 100);\n};\n\n/**\n * Makes an XHR call against the config\n * the response is converted into a blob url, which is assigned to the src attribute of an anchor element with download=true\n * a click is simulated on the anchor to download the file\n * @param config\n * @param success\n * @param error\n */\nconst downloadThroughAnchor = (config, success, error) => {\n const url = config.url,\n method = config.method,\n data = config.dataParams || config.data,\n headers = config.headers;\n\n headers['Content-Type'] = headers['Content-Type'] || 'application/x-www-form-urlencoded';\n\n // Todo: Replace http with getService\n httpService.send({\n 'target' : 'WebService',\n 'action' : 'invokeRuntimeRestCall',\n 'method' : method,\n 'url' : url,\n 'headers': headers,\n 'data' : data,\n 'responseType': 'arraybuffer'\n }).then(function (response) {\n setTimeout(() => {\n downloadFilefromResponse(response.body, response.headers, success, error);\n }, 900);\n }, function (err) {\n triggerFn(error, err);\n });\n};\n\n/**\n * appends a timestamp on the passed filename to prevent caching\n * returns the modified file name\n * @param fileName\n * @param exportFormat\n * @returns {string}\n */\nconst getModifiedFileName = (fileName, exportFormat) => {\n let fileExtension;\n const currentTimestamp = Date.now();\n\n if (exportFormat) {\n fileExtension = exportTypesMap[exportFormat];\n } else {\n fileExtension = '.' + last(split(fileName, '.'));\n fileName = replace(fileName, fileExtension, '');\n }\n return fileName + '_' + currentTimestamp + fileExtension;\n};\n\nconst getCookieByName = (name) => {\n // Todo: Shubham Implement cookie native js\n return 'cookie';\n};\n\n/**\n * This function returns the cookieValue if xsrf is enabled.\n * In device, xsrf cookie is stored in localStorage.\n * @returns xsrf cookie value\n */\nconst isXsrfEnabled = () => {\n if (CONSTANTS.hasCordova) {\n return localStorage.getItem(CONSTANTS.XSRF_COOKIE_NAME);\n }\n return false;\n};\n\n/**\n * Returns the object node for a bind object, where the value has to be updated\n * obj.target = \"a\"\n * @param obj\n * @param root\n * @param variable\n * @returns {*}\n */\nconst getTargetObj = (obj, root, variable) => {\n /*\n * if the target key is in the form as \"['my.param']\"\n * keep the target key as \"my.param\" and do not split further\n * this is done, so that, the computed value against this binding is assigned as\n * {\"my.param\": \"value\"}\n * and not as\n * {\n * \"my\": {\n * \"param\": \"value\"\n * }\n * }\n */\n let target = obj.target,\n targetObj;\n const rootNode = variable[root];\n if (DOT_EXPR_REX.test(target)) {\n targetObj = rootNode;\n } else {\n target = target.substr(0, target.lastIndexOf('.'));\n if (obj.target === root) {\n targetObj = variable;\n } else if (target) {\n targetObj = findValueOf(rootNode, target, true);\n } else {\n targetObj = rootNode;\n }\n }\n return targetObj;\n};\n\n/**\n * Gets the key for the target object\n * the computed value will be updated against this key in the targetObject(computed by getTargetObj())\n * @param target\n * @param regex\n * @returns {*}\n */\nconst getTargetNodeKey = (target) => {\n /*\n * if the target key is in the form as \"['my.param']\"\n * keep the target key as \"my.param\" and do not split further\n * this is done, so that, the computed value against this binding is assigned as\n * {\"my.param\": \"value\"}\n * and not as\n * {\n * \"my\": {\n * \"param\": \"value\"\n * }\n * }\n */\n let targetNodeKey;\n if (DOT_EXPR_REX.test(target)) {\n targetNodeKey = target.replace(/^(\\[[\"'])|([\"']\\])$/g, '');\n } else {\n targetNodeKey = target.split('.').pop();\n }\n return targetNodeKey;\n};\n\nconst setValueToNode = (target, obj, root, variable, value, noUpdate?) => {\n const targetNodeKey = getTargetNodeKey(target),\n targetObj = getTargetObj(obj, root, variable);\n value = !isUndefined(value) ? value : obj.value;\n /* sanity check, user can bind parent nodes to non-object values, so child node bindings may fail */\n if (targetObj) {\n targetObj[targetNodeKey] = value;\n }\n processVariablePostBindUpdate(targetNodeKey, value, obj.type, variable, noUpdate);\n};\n\n/**\n * The model internalBoundNodeMap stores the reference to latest computed values against internal(nested) bound nodes\n * This is done so that the internal node's computed value is not lost, once its parent node's value is computed at a later point\n * E.g.\n * Variable.employeeVar has following bindings\n * \"dataBinding\": [\n {\n \"target\": \"department.budget\",\n \"value\": \"bind:Variables.budgetVar.dataSet\"\n },\n {\n \"target\": \"department\",\n \"value\": \"bind:Variables.departmentVar.dataSet\"\n }\n ]\n * When department.budget is computed, employeeVar.dataSet = {\n * \"department\": {\n * \"budget\": {\"q1\": 1111}\n * }\n * }\n *\n * When department is computed\n * \"department\": {\n * \"name\": \"HR\",\n * \"location\": \"Hyderabad\"\n * }\n * The budget field (computed earlier) is LOST.\n *\n * To avoid this, the latest values against internal nodes (in this case department.budget) are stored in a map\n * These values are assigned back to internal fields if the parent is computed (in this case department)\n * @param target\n * @param root\n * @param variable\n */\nconst updateInternalNodes = (target, root, variable) => {\n const boundInternalNodes = keys(get(internalBoundNodeMap.get(variable), [variable.name, root])),\n targetNodeKey = getTargetNodeKey(target);\n let internalNodes;\n function findInternalNodeBound() {\n return filter(boundInternalNodes, function (node) {\n // the later condition in check (targetNodeKey === root || targetNodeKey === 'dataBinding') is specifically for live variable of insert/update types\n return (node !== targetNodeKey && includes(node, targetNodeKey)) || ((targetNodeKey === root || targetNodeKey === 'dataBinding') && node !== targetNodeKey);\n });\n }\n internalNodes = findInternalNodeBound();\n if ((internalNodes.length)) {\n forEach(internalNodes, function (node) {\n setValueToNode(node, {target: node}, root, variable, get(internalBoundNodeMap.get(variable), [variable.name, root, node]));\n });\n }\n};\n\n/**\n * New Implementation (DataBinding Flat Structure with x-path targets)\n * processes a dataBinding object, if bound to expression, watches over it, else assigns value to the expression\n * @param obj dataBinding object\n * @param scope scope of the variable\n * @param root root node string (dataBinding for all variables, dataSet for static variable)\n * @param variable variable object\n */\nconst processBindObject = (obj, scope, root, variable) => {\n const target = obj.target,\n targetObj = getTargetObj(obj, root, variable),\n targetNodeKey = getTargetNodeKey(target),\n runMode = true;\n const destroyFn = scope.registerDestroyListener ? scope.registerDestroyListener.bind(scope) : noop;\n\n if (stringStartsWith(obj.value, 'bind:')) {\n const listener = (newVal, oldVal) => {\n if ((newVal === oldVal && isUndefined(newVal)) || (isUndefined(newVal) && (!isUndefined(oldVal) || !isUndefined(targetObj[targetNodeKey])))) {\n return;\n }\n // Skip cloning for blob column\n if (!includes(['blob', 'file'], obj.type)) {\n newVal = getClonedObject(newVal);\n }\n setValueToNode(target, obj, root, variable, newVal); // cloning newVal to keep the source clean\n\n if (runMode) {\n /*set the internal bound node map with the latest updated value*/\n if (!internalBoundNodeMap.has(variable)) {\n internalBoundNodeMap.set(variable, {});\n }\n set(internalBoundNodeMap.get(variable), [variable.name, root, target], newVal);\n /*update the internal nodes after internal node map is set*/\n if (isObject(newVal)) {\n updateInternalNodes(target, root, variable);\n }\n }\n };\n destroyFn($watch(obj.value.replace('bind:', ''), scope, {}, listener, undefined, undefined, undefined, () => variable.isMuted));\n } else if (!isUndefined(obj.value)) {\n setValueToNode(target, obj, root, variable, obj.value, true);\n if (runMode && root !== targetNodeKey) {\n if (!internalBoundNodeMap.has(variable)) {\n internalBoundNodeMap.set(variable, {});\n }\n set(internalBoundNodeMap.get(variable), [variable.name, root, target], obj.value);\n }\n }\n};\n\n// *********************************************************** PUBLIC *********************************************************** //\n\n/**\n * Initializes watchers for binding expressions configured in the variable\n * @param variable\n * @param context, scope context in which the variable exists\n * @param {string} bindSource, the field in variable where the databindings are configured\n * for most variables, it will be 'dataBinding', hence default fallback is to 'dataBinding'\n * for some it can be 'dataSet' and hence will be passed as param\n * @param {string} bindTarget, the object field in variable where the computed bindings will be set\n */\nexport const processBinding = (variable: any, context: any, bindSource?: string, bindTarget?: string) => {\n bindSource = bindSource || 'dataBinding';\n bindTarget = bindTarget || 'dataBinding';\n\n const bindMap = variable[bindSource];\n variable[bindSource] = {};\n variable['_bind' + bindSource] = bindMap;\n if (!bindMap || !isArray(bindMap)) {\n return;\n }\n bindMap.forEach(function (node) {\n /* for static variable change the binding with target 'dataBinding' to 'dataSet', as the results have to reflect directly in the dataSet */\n if (variable.category === 'wm.Variable' && node.target === 'dataBinding') {\n node.target = 'dataSet';\n }\n processBindObject(node, context, bindTarget, variable);\n });\n};\n\n/**\n * Downloads a file in the browser.\n * Two methods to do so, namely:\n * 1. downloadThroughAnchor, called if\n * - if a header is to be passed\n * OR\n * - if security is ON and XSRF token is to be sent as well\n * NOTE: This method does not work with Safari version 10.0 and below\n *\n * 2. downloadThroughIframe\n * - this method works across browsers and uses an iframe to downlad the file.\n * @param requestParams request params object\n * @param fileName represents the file name\n * @param exportFormat downloaded file format\n * @param success success callback\n * @param error error callback\n */\nexport const simulateFileDownload = (requestParams, fileName, exportFormat, success, error, dataBinding) => {\n /*success and error callbacks are executed incase of downloadThroughAnchor\n Due to technical limitation cannot be executed incase of iframe*/\n if (CONSTANTS.hasCordova) {\n let fileExtension;\n if (exportFormat) {\n fileExtension = exportTypesMap[exportFormat];\n }\n appManager.notify('device-file-download', { url: requestParams.url, name: fileName, extension: fileExtension, headers: requestParams.headers, successCb: success, errorCb: error});\n } else if (!isEmpty(requestParams.headers) || isXsrfEnabled()) {\n downloadThroughAnchor(requestParams, success, error);\n } else {\n downloadThroughIframe(requestParams, success, dataBinding);\n }\n};\n\n/**\n * sets the value against passed key on the \"inputFields\" object in the variable\n * @param targetObj: the object in which the key, value is to be set\n * @param variable\n * @param key: can be:\n * - a string e.g. \"username\"\n * - an object, e.g. {\"username\": \"john\", \"ssn\": \"11111\"}\n * @param val\n * - if key is string, the value against it (for that data type)\n * - if key is object, not required\n * @param options\n * @returns {any}\n */\nexport const setInput = (targetObj: any, key: any, val: any, options: any) => {\n targetObj = targetObj || {};\n let keys,\n lastKey,\n paramObj = {};\n\n // content type check\n if (isObject(options)) {\n // @ts-ignore\n switch (options.type) {\n case 'file':\n // @ts-ignore\n val = getBlob(val, options.contentType);\n break;\n case 'number':\n val = isNumber(val) ? val : parseInt(val, 10);\n break;\n }\n }\n\n if (isObject(key)) {\n // check if the passed parameter is an object itself\n paramObj = key;\n } else if (key.indexOf('.') > -1) {\n // check for '.' in key e.g. 'employee.department'\n keys = key.split('.');\n lastKey = keys.pop();\n // Finding the object based on the key\n targetObj = findValueOf(targetObj, keys.join('.'), true);\n key = lastKey;\n paramObj[key] = val;\n } else {\n paramObj[key] = val;\n }\n\n forEach(paramObj, function (paramVal, paramKey) {\n targetObj[paramKey] = paramVal;\n });\n return targetObj;\n};\n\n/**\n * returns true if HTML5 File API is available else false\n * @returns {{prototype: Blob; new(blobParts?: any[], options?: BlobPropertyBag): Blob}}\n */\nexport const isFileUploadSupported = () => {\n return (window.File && window.FileReader && window.FileList && window.Blob);\n};\n\n/**\n *\n * @param varOrder\n * @param optionsOrder\n * @returns {any}\n */\nexport const getEvaluatedOrderBy = (varOrder, optionsOrder) => {\n let optionFields,\n varOrderBy;\n // If options order by is not defined, return variable order\n if (!optionsOrder || isEmpty(optionsOrder)) {\n return varOrder;\n }\n // If variable order by is not defined, return options order\n if (!varOrder) {\n return optionsOrder;\n }\n // If both are present, combine the options order and variable order, with options order as precedence\n varOrder = split(varOrder, ',');\n optionsOrder = split(optionsOrder, ',');\n optionFields = map(optionsOrder, function (order) {\n return split(trim(order), ' ')[0];\n });\n // If a field is present in both options and variable, remove the variable orderby\n remove(varOrder, function (orderBy: string) {\n return includes(optionFields, split(trim(orderBy), ' ')[0]);\n });\n varOrderBy = varOrder.length ? ',' + join(varOrder, ',') : '';\n return join(optionsOrder, ',') + varOrderBy;\n};\n\n/**\n * formatting the expression as required by backend which was enclosed by ${<expression>}.\n * @param fieldDefs\n * returns fieldDefs\n */\nexport const formatExportExpression = fieldDefs => {\n forEach(fieldDefs, function (fieldDef) {\n if (fieldDef.expression) {\n fieldDef.expression = '${' + fieldDef.expression + '}';\n }\n });\n return fieldDefs;\n};\n\nexport const debounceVariableCall = _invoke;\n\nconst getDateTimeFormatForType = (type) => {\n return DEFAULT_FORMATS[toUpper(type)];\n};\n\n// Format value for datetime types\nconst _formatDate = (dateValue, type) => {\n let epoch;\n if (isDate(dateValue)) {\n epoch = dateValue.getTime();\n } else {\n if (!isNaN(dateValue)) {\n dateValue = parseInt(dateValue, 10);\n }\n epoch = dateValue && moment(dateValue).valueOf();\n }\n if (isNaN(epoch) && type !== DataType.TIME) {\n return epoch;\n }\n if (type === DataType.TIMESTAMP) {\n return epoch;\n }\n if (type === DataType.TIME && !epoch) {\n epoch = moment(new Date().toDateString() + ' ' + dateValue).valueOf();\n }\n return dateValue && appManager.getPipe('date').transform(epoch, getDateTimeFormatForType(type));\n};\n\n// Function to convert values of date time types into default formats\nexport const formatDate = (value, type) => {\n if (includes(type, '.')) {\n type = toLower(extractType(type));\n }\n if (isArray(value)) {\n return map(value, function (val) {\n return _formatDate(val, type);\n });\n }\n return _formatDate(value, type);\n};\n\n/**\n * This method decodes the variable data which is encoded from backend before showing in the widgets.\n * It takes variable response content as input and iterates recursively,\n * if the value is string type then it will decode the data.\n * @param responseContent (Array of objects)\n */\nexport const decodeData = (responseContent) => {\n if (!responseContent) {\n return responseContent;\n }\n if (isArray(responseContent)) {\n forEach(responseContent, data => {\n if (isString(data)) {\n data = htmlDecode(data);\n } else if (isObject(data)) {\n forEach(data, (value, key) => {\n if (value && isString(value)) {\n data[key] = htmlDecode(value);\n } else if (isObject(value)) {\n decodeData(value);\n }\n });\n }\n });\n } else if (isObject(responseContent)) {\n forEach(responseContent, (value, key) => {\n if (value && isString(value)) {\n responseContent[key] = htmlDecode(value);\n } else if (isObject(value)) {\n decodeData(value);\n }\n });\n } else if (isString(responseContent)) {\n responseContent = htmlDecode(responseContent);\n return responseContent;\n }\n};\n\nfunction htmlDecode(input) {\n return he.unescape(input);\n}\n","import { navigationService } from '../variable/variables.utils';\nimport {clone, isNil, isString} from \"lodash-es\";\n\n/**\n * Handles variable navigation operations\n * @param variable\n * @param options\n */\nexport const navigate = (variable, options) => {\n variable.dataSet = (options && options.data) || variable.dataSet;\n let viewName;\n const pageName = variable.dataBinding.pageName || variable.pageName,\n operation = variable.operation,\n urlParams = clone(variable.dataSet),\n cacheable = isNil(options?.cacheable) ? variable.cacheable : options.cacheable;\n options = options || {};\n\n if (!isNil(cacheable) && (!isString(cacheable) || cacheable.trim() !== '')) {\n urlParams['_cache_page'] = cacheable;\n }\n\n /* if operation is goToPage, navigate to the pageName */\n switch (operation) {\n case 'goToPreviousPage':\n navigationService.goToPrevious();\n break;\n case 'gotoPage':\n navigationService.goToPage(pageName, {\n transition: variable.pageTransitions,\n $event: options.$event,\n urlParams: urlParams,\n cacheable: variable.cacheable\n });\n break;\n case 'gotoView':\n viewName = (variable.dataBinding && variable.dataBinding.viewName) || variable.viewName;\n break;\n case 'gotoTab':\n viewName = (variable.dataBinding && variable.dataBinding.tabName) || variable.tabName;\n break;\n case 'gotoAccordion':\n viewName = (variable.dataBinding && variable.dataBinding.accordionName) || variable.accordionName;\n break;\n case 'gotoSegment':\n viewName = (variable.dataBinding && variable.dataBinding.segmentName) || variable.segmentName;\n break;\n }\n\n /* if view name found, call routine to navigate to it */\n if (viewName) {\n navigationService.goToView(viewName, {\n pageName: pageName,\n transition: variable.pageTransitions,\n $event: options.$event,\n urlParams: urlParams\n }, variable);\n }\n};\n","import { appManager, processBinding } from '../../util/variable/variables.utils';\n\nexport abstract class BaseActionManager {\n initBinding(variable, bindSource?, bindTarget?) {\n processBinding(variable, variable._context, bindSource, bindTarget);\n }\n\n notifyInflight(variable, status: boolean, data?: any) {\n appManager.notify('toggle-variable-state', {\n variable: variable,\n active: status,\n data: data\n });\n }\n}\n","import * as NVUtils from '../../util/action/navigation-action.utils';\nimport { BaseActionManager } from './base-action.manager';\n\nexport class NavigationActionManager extends BaseActionManager {\n\n invoke(variable, options) {\n NVUtils.navigate(variable, options);\n }\n}\n","import { BaseActionManager } from './base-action.manager';\nimport { initiateCallback, toasterService, dialogService } from '../../util/variable/variables.utils';\nimport { getWmProjectProperties } from '@wm/core';\nimport {capitalize, isString} from \"lodash-es\";\n\nexport class NotificationActionManager extends BaseActionManager {\n\n private onToasterClick(variable) {\n initiateCallback('onClick', variable, '');\n }\n\n private onToasterHide(variable) {\n initiateCallback('onHide', variable, '');\n }\n\n private notifyViaToaster(variable, options) {\n const type = (options.class || variable.dataBinding.class || 'info').toLowerCase(),\n body = options.message || variable.dataBinding.text,\n title = options.title,\n positionClass = 'toast-' + (options.position || variable.dataBinding.toasterPosition || 'bottom right').replace(' ', '-'),\n partialPage = variable.dataBinding.page,\n DEFAULT_DURATION = 3000;\n let duration = parseInt(options.duration || variable.dataBinding.duration, null),\n toaster;\n\n // duration\n if (!duration) {\n duration = (duration !== 0 && type === 'success') ? DEFAULT_DURATION : 0;\n }\n if (variable.dataBinding.content && variable.dataBinding.content === 'page' && partialPage) {\n toaster = toasterService.showCustom(partialPage, {positionClass: positionClass, timeOut: duration,\n partialParams: variable._binddataSet, context: variable._context});\n } else {\n toaster = toasterService.show(type, title, body || null, {positionClass: positionClass, timeOut: duration, enableHtml: true});\n }\n\n // callbacks\n if (variable.onClick) {\n toaster.onTap.subscribe( this.onToasterClick.bind(this, variable) );\n }\n if (variable.onHide) {\n toaster.onHidden.subscribe( this.onToasterHide.bind(this, variable) );\n }\n }\n\n private getDialogConfig(variable, options, dialogId, closeCallBackFn) {\n return {\n 'title' : options.title || variable.dataBinding.title,\n 'text' : options.message || variable.dataBinding.text,\n 'okButtonText' : options.okButtonText || variable.dataBinding.okButtonText || 'OK',\n 'cancelButtonText' : options.cancelButtonText || variable.dataBinding.cancelButtonText || 'CANCEL',\n 'alerttype' : options.alerttype || variable.dataBinding.alerttype || 'information',\n onOk: () => {\n // Close the action dialog after triggering onOk callback event\n dialogService.close(dialogId, undefined, closeCallBackFn);\n },\n onCancel: () => {\n initiateCallback('onCancel', variable, options.data);\n // Close the action dialog after triggering onCancel callback event\n dialogService.close(dialogId, undefined);\n },\n onClose: () => {\n initiateCallback('onClose', variable, options.data);\n }\n };\n }\n\n private notifyViaDialog(variable, options) {\n const isPrefabType = getWmProjectProperties().type === 'PREFAB';\n const dialogPrefix = isPrefabType ? 'Prefab' : 'Common';\n const dialogId = dialogPrefix + capitalize(variable.operation) + 'Dialog';\n const closeCallBackFn = () => initiateCallback('onOk', variable, options.data);\n\n\n let dialogConfig: any = this.getDialogConfig(variable, options, dialogId, closeCallBackFn);\n dialogConfig = isPrefabType ? dialogConfig : { notification: dialogConfig };\n dialogService.open(dialogId, undefined, dialogConfig);\n }\n\n// *********************************************************** PUBLIC ***********************************************************//\n\n notify(variable, options, success, error) {\n const operation = variable.operation;\n options = options || {};\n\n if (operation === 'toast') {\n this.notifyViaToaster(variable, options);\n } else {\n this.notifyViaDialog(variable, options);\n }\n }\n\n getMessage(variable) {\n return variable.dataBinding.text;\n }\n\n setMessage(variable, text) {\n if (isString(text)) {\n variable.dataBinding.text = text;\n }\n return variable.dataBinding.text;\n }\n\n getOkButtonText(variable) {\n return variable.dataBinding.okButtonText;\n }\n setOkButtonText(variable, text) {\n if (isString(text)) {\n variable.dataBinding.okButtonText = text;\n }\n return variable.dataBinding.okButtonText;\n }\n\n getToasterDuration(variable) {\n return variable.dataBinding.duration;\n }\n\n setToasterDuration(variable, duration) {\n variable.dataBinding.duration = duration;\n return variable.dataBinding.duration;\n }\n\n getToasterClass(variable) {\n return variable.dataBinding.class;\n }\n\n setToasterClass(variable, type) {\n if (isString(type)) {\n variable.dataBinding.class = type;\n }\n return variable.dataBinding.class;\n }\n\n getToasterPosition(variable) {\n return variable.dataBinding.class;\n }\n\n setToasterPosition(variable, position) {\n if (isString(position)) {\n variable.dataBinding.position = position;\n }\n return variable.dataBinding.position;\n }\n\n getAlertType(variable) {\n return variable.dataBinding.alerttype;\n }\n\n setAlertType(variable, alerttype) {\n if (isString(alerttype)) {\n variable.dataBinding.alerttype = alerttype;\n }\n return variable.dataBinding.alerttype;\n }\n\n getCancelButtonText(variable) {\n return variable.dataBinding.cancelButtonText;\n }\n\n setCancelButtonText(variable, text) {\n if (isString(text)) {\n variable.dataBinding.cancelButtonText = text;\n }\n return variable.dataBinding.cancelButtonText;\n }\n}\n","import { httpService, processBinding } from '../../util/variable/variables.utils';\nimport { appManager} from './../../util/variable/variables.utils';\nimport { AdvancedOptions } from '../../advanced-options';\nimport {extend} from \"lodash-es\";\n\nexport abstract class BaseVariableManager {\n\n initBinding(variable, bindSource?, bindTarget?) {\n processBinding(variable, variable._context, bindSource, bindTarget);\n }\n\n notifyInflight(variable, status: boolean, data?: any, options?: any) {\n appManager.notify('toggle-variable-state', {\n variable: variable,\n active: status,\n data: data,\n options: options\n });\n }\n\n /**\n * This method sets the variable parameter requestTrackId to X-WM-Request-Track-Id which is received in the response headers.\n * @param response\n */\n setRequestTrackId(response, variable) {\n const requestTrackId = response?.headers?.get('x-wm-request-track-id');\n if (requestTrackId) {\n variable._requestTrackId = requestTrackId;\n }\n }\n\n /**\n * This method makes the final angular http call that returns an observable.\n * We attach this observable to variable to cancel a network call\n * @param requestParams\n * @param variable\n * @param dbOperation\n */\n httpCall(requestParams, variable, params?: any) {\n return new Promise((resolve, reject) => {\n variable._observable = httpService.sendCallAsObservable(requestParams, params).subscribe((response: any) => {\n if (response && response.type) {\n this.setRequestTrackId(response, variable);\n resolve(response);\n }\n }, (err: any) => {\n this.setRequestTrackId(err, variable);\n if (httpService.isPlatformSessionTimeout(err)) {\n // send the notification manually to hide any context spinners on page.\n // [TODO]: any spinners on widget listening on this variable will also go off. Need to see an approach to sovle that.\n this.notifyInflight(variable, false, err);\n err._401Subscriber.asObservable().subscribe(\n response => resolve(response),\n e => reject(e));\n } else {\n reject(err);\n }\n });\n });\n }\n\n /**\n * This method prepares the options parameter for variable callbacks.\n * @param xhrObj, The xhrObj to be passed\n * @param moreOptions, any other info to be passed in the options param\n */\n prepareCallbackOptions(xhrObj: any, moreOptions? : any): AdvancedOptions {\n let options: AdvancedOptions = {};\n options['xhrObj'] = xhrObj;\n if (moreOptions) {\n extend(options, moreOptions);\n }\n return options;\n }\n}\n","import { getClonedObject, triggerFn } from '@wm/core';\n\nimport { BaseActionManager } from './base-action.manager';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { appManager, dialogService, initiateCallback, routerService, securityService } from '../../util/variable/variables.utils';\nimport {each, get, isBoolean, isEmpty, isObject, set} from \"lodash-es\";\n\nexport class LoginActionManager extends BaseActionManager {\n\n private validate(params: any) {\n let err, paramKey, remembermeKey;\n const LOGIN_PARAM_REMEMBER_ME = 'j_rememberme';\n const LOGIN_PARAM_REMEMBER_ME_OLD = ['rememberme', 'remembermecheck'];\n\n // for older projects\n LOGIN_PARAM_REMEMBER_ME_OLD.forEach((old_key) => {\n if (isBoolean(params[old_key])) {\n remembermeKey = old_key;\n }\n });\n\n remembermeKey = remembermeKey || LOGIN_PARAM_REMEMBER_ME;\n\n // check remember me\n params[remembermeKey] = isBoolean(params[remembermeKey]) ? params[remembermeKey] : false;\n\n for (paramKey in params) {\n if (params.hasOwnProperty(paramKey) &&\n (params[paramKey] === '' || params[paramKey] === undefined)) {\n err = 'Please provide required credentials';\n break;\n }\n }\n\n return err;\n }\n\n private migrateOldParams(params) {\n const loginParams = {},\n paramMigrationMap = {\n 'usernametext': 'j_username',\n 'username': 'j_username',\n 'passwordtext': 'j_password',\n 'password': 'j_password',\n 'remembermecheck': 'j_rememberme',\n 'rememberme': 'j_rememberme'\n };\n\n each(params, function (value, key) {\n if (paramMigrationMap[key]) {\n loginParams[paramMigrationMap[key]] = value;\n } else {\n loginParams[key] = value;\n }\n });\n return loginParams;\n }\n\n /*\n * This method is used to redirect the user to app base path\n * After successful navigation to the base path, will reload the app\n */\n private redirectToAppBasePath() {\n routerService.navigate(['/']).then(nav => {\n if (nav) {\n window.location.reload();\n }\n });\n }\n\n login(variable, options, success, error) {\n let newDataSet;\n options = options || {};\n\n // If login info provided along explicitly with options, don't look into the variable bindings for the same\n const loginInfo: any = options.loginInfo || options.input || variable.dataBinding;\n\n // client side validation\n const errMsg = this.validate(loginInfo);\n\n /* if error message initialized, return error */\n if (errMsg) {\n triggerFn(error, errMsg);\n initiateCallback('onError', variable, errMsg);\n return;\n }\n\n // Triggering 'onBeforeUpdate' and considering\n let params: any = getClonedObject(loginInfo);\n const output: any = initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE, variable, params);\n if (isObject(output)) {\n params = output;\n } else if (output === false) {\n triggerFn(error);\n return;\n }\n\n // migrate old params to new\n params = this.migrateOldParams(params);\n\n // get previously loggedInUser name (if any)\n const lastLoggedInUsername = get(securityService.get(), 'userInfo.userName');\n\n this.notifyInflight(variable, true);\n variable.promise = securityService.appLogin(params, (response) => {\n // Closing login dialog after successful login\n dialogService.close('CommonLoginDialog');\n\n /*\n * Get fresh security config\n * Get App variables. if not loaded\n * Update loggedInUser variable with new user details\n */\n appManager.reloadAppData().\n then((config) => {\n // EVENT: ON_RESULT\n initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, get(config, 'userInfo'));\n // EVENT: ON_PREPARESETDATA\n newDataSet = initiateCallback(VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA, variable, get(config, 'userInfo'));\n if (newDataSet) {\n // setting newDataSet as the response to service variable onPrepareSetData\n set(config, 'userInfo', newDataSet);\n }\n // hide the spinner after all the n/w calls are completed\n this.notifyInflight(variable, false, response);\n triggerFn(success);\n setTimeout(() => {\n // EVENT: ON_SUCCESS\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, get(config, 'userInfo'));\n\n /* handle navigation if defaultSuccessHandler on variable is true */\n if (variable.useDefaultSuccessHandler) {\n const isSameUserReloggedIn = lastLoggedInUsername === params['j_username'];\n // if first time user logging in or same user re-logging in, execute n/w calls failed before logging in\n if (!lastLoggedInUsername || isSameUserReloggedIn) {\n appManager.executeSessionFailureRequests();\n }\n // get redirectTo page from URL and remove it from URL\n const redirectPage = securityService.getCurrentRouteQueryParam('redirectTo'),\n noRedirect = appManager.noRedirect();\n // Get query params(page params of page being redirected to) and append to the URL after login.\n const queryParamsObj = securityService.getRedirectedRouteQueryParams();\n // The redirectTo param isn't required after login\n if (queryParamsObj.redirectTo) {\n delete queryParamsObj.redirectTo;\n }\n appManager.noRedirect(false);\n // first time login\n if (!lastLoggedInUsername) {\n // if redirect page found, navigate to it.\n if (!isEmpty(redirectPage)) {\n routerService.navigate([`/${redirectPage}`], { queryParams : queryParamsObj});\n } else if (!noRedirect) {\n // simply reset the URL, route handling will take care of page redirection\n routerService.navigate([`/`]);\n }\n } else {\n // login after a session timeout\n // if redirect page found and same user logs in again, just navigate to redirect page\n if (!isEmpty(redirectPage)) {\n // same user logs in again, just redirect to the redirectPage\n if (lastLoggedInUsername === params['j_username']) {\n routerService.navigate([`/${redirectPage}`], { queryParams : queryParamsObj});\n } else {\n // different user logs in, reload the app and discard the redirectPage\n this.redirectToAppBasePath();\n }\n } else {\n const securityConfig = securityService.get(),\n sessionTimeoutLoginMode = get(securityConfig, 'loginConfig.sessionTimeout.type') || 'PAGE';\n // if in dialog mode and a new user logs in OR login happening through page, reload the app\n if (!isSameUserReloggedIn || sessionTimeoutLoginMode !== 'DIALOG') {\n this.redirectToAppBasePath();\n }\n }\n\n }\n }\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, get(config, 'userInfo'));\n });\n\n });\n }, (e) => {\n // EVENT: ON_RESULT\n initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, e);\n this.notifyInflight(variable, false, e);\n const errorMsg = e.error || 'Invalid credentials.';\n const xhrObj = e.details;\n /* if in RUN mode, trigger error events associated with the variable */\n if (CONSTANTS.isRunMode) {\n initiateCallback('onError', variable, errorMsg, xhrObj, true);\n }\n triggerFn(error, errorMsg, xhrObj);\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, e);\n });\n }\n}\n","import { getValidJSON, triggerFn } from '@wm/core';\n\nimport { BaseActionManager } from './base-action.manager';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { appManager, initiateCallback, securityService } from './../../util/variable/variables.utils';\nimport { routerService } from '../../util/variable/variables.utils';\n\nexport class LogoutActionManager extends BaseActionManager {\n logout(variable, options, success, error) {\n let handleError,\n redirectPage,\n output,\n newDataSet;\n\n handleError = function (msg, details, xhrObj) {\n /* if in RUN mode, trigger error events associated with the variable */\n if (!CONSTANTS.isStudioMode) {\n initiateCallback('onError', variable, msg, xhrObj);\n }\n triggerFn(error, msg, xhrObj);\n };\n\n // EVENT: ON_BEFORE_UPDATE\n output = initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE, variable, null);\n if (output === false) {\n triggerFn(error);\n return;\n }\n securityService.isAuthenticated(isAuthenticated => {\n if (isAuthenticated) {\n this.notifyInflight(variable, true);\n variable.promise = securityService.appLogout(response => {\n let redirectUrl = response.body;\n redirectUrl = getValidJSON(redirectUrl);\n // Reset Security Config.\n // $rootScope.isUserAuthenticated = false;\n appManager.reloadAppData().\n then(() => {\n this.notifyInflight(variable, false, redirectUrl);\n // EVENT: ON_RESULT\n initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, redirectUrl);\n // EVENT: ON_PREPARESETDATA\n newDataSet = initiateCallback(VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA, variable, redirectUrl);\n if (newDataSet) {\n // setting newDataSet as the response to service variable onPrepareSetData\n redirectUrl = newDataSet;\n }\n setTimeout(()=>{\n // EVENT: ON_SUCCESS\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, redirectUrl);\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, redirectUrl);\n })\n });\n\n // In case of CAS response will be the redirectUrl\n if (redirectUrl && redirectUrl.result) {\n window.location.href = redirectUrl.result;\n } else if (variable.useDefaultSuccessHandler) {\n redirectPage = variable.redirectTo;\n /* backward compatibility (index.html/login.html may be present in older projects) */\n if (!redirectPage || redirectPage === 'login.html' || redirectPage === 'index.html') {\n redirectPage = '';\n }\n routerService.navigate([`/${redirectPage}`]);\n // do not reload the mobile app.\n if (!window['cordova']) {\n setTimeout(() => {\n // reloading in timeout as, firefox and safari are not updating the url before reload(WMS-7887)\n window.location.reload();\n });\n }\n }\n triggerFn(success);\n }, handleError);\n } else {\n handleError('No authenticated user to logout.');\n }\n }, (err) => {\n this.notifyInflight(variable, false, err);\n handleError(err);\n });\n }\n}\n","import { BaseVariableManager } from './base-variable.manager';\nimport { initiateCallback } from '../../util/variable/variables.utils';\nimport { DeviceVariableService } from './device-variable-service';\n\n/**\n * Device operation registered in this class will be invoked when a device variable requests the operation.\n */\nexport class DeviceVariableManager extends BaseVariableManager {\n\n /**\n * A map that contains services and their operations.\n *\n * @type {Map<string, Map<string, DeviceVariableService>>}\n */\n private serviceRegistry: Map<string, DeviceVariableService> = new Map<string, DeviceVariableService>();\n\n /**\n * Invokes the given device variable and returns a promise that is resolved or rejected\n * by the device operation's outcome.\n * @param variable\n * @param options\n * @returns {Promise<any>}\n */\n public invoke(variable: any, options: any): Promise<any> {\n const service = this.serviceRegistry.get(variable.service);\n if (service == null) {\n initiateCallback('onError', variable, null);\n return Promise.reject(`Could not find service '${service}'`);\n } else {\n this.notifyInflight(variable, true);\n return service.invoke(variable, options).then( response => {\n this.notifyInflight(variable, false, response);\n return response;\n }, err => {\n this.notifyInflight(variable, false, err);\n return Promise.reject(err);\n });\n }\n }\n\n /**\n * Adds an operation under the given service category\n * @param {string} service\n */\n public registerService(service: DeviceVariableService) {\n this.serviceRegistry.set(service.name, service);\n }\n}\n","import { oauthService, appManager } from './variable/variables.utils';\n\nexport const performAuthorization = (url: any, providerId: any, onSuccess: any, onError: any, securityObj?: any) => {\n oauthService.perfromOAuthorization(url, providerId, onSuccess, onError, securityObj, appManager.getCustomUrlScheme(), appManager.getDeployedURL());\n};\n\nexport const getAccessToken = (provider: any, checkLoaclStorage: any) => {\n return oauthService.getAccessToken(provider, checkLoaclStorage);\n};\n\nexport const removeAccessToken = (provider: any) => {\n oauthService.removeAccessToken(provider);\n}\n","import { jmespath } from '@metrichor/jmespath';\nimport {find, isEmpty, result, set, startsWith} from \"lodash-es\";\n\nexport class PaginationUtils {\n /**\n * Modifies the query values with the pagination info which is retrieved from the previous API response.\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param paginationInfo has metadata of the variable pagination data\n * @returns {void} This method does not return anything\n */\n static setPaginationQueryParams(variable, operationInfo, paginationInfo) {\n operationInfo.parameters.forEach(element => {\n // pagination input information varies based on the type\n let inputParam;\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n inputParam = 'offset';\n } else {\n inputParam = 'page';\n }\n // modifies query values based on the pagination of variable\n // compare parameter name with the input parameter's starting naming key (ex: channelcontext in channelcontext.pagination)\n if (element.name === paginationInfo.input[inputParam].split('.')[0]) {\n element.sampleValue = variable.pagination['page'];\n } else if (element.name === paginationInfo.input.size.split('.')[0]) {\n element.sampleValue = variable.pagination['size'];\n }\n });\n }\n\n /**\n * Sets pagination on the variable based on the response of the triggered api call.\n * @param variable withholds variable information\n * @param response has data of the api call's response\n * @param options has info of the api's query params\n * @returns {void} This method does not return anything\n */\n static setVariablePagination(variable, response, options) {\n if (!variable.pagination) {\n variable.pagination = {\n empty: false\n };\n }\n variable.pagination['size'] = response.size;\n variable.pagination['page'] = response.page || 0;\n variable.pagination['totalElements'] = response.totalElements;\n variable.pagination['numberOfElements'] = variable.pagination['size'];\n variable.pagination['number'] = options['page'] ? options['page'] - 1 : 0;\n\n /**\n * Deduce totalPages from totalElements by size.\n * If the total elements are evenly split among the pages, assign the same to totalPages\n * Else assign totalPages + 1\n */\n variable.pagination['totalPages'] = variable.pagination['totalElements'] / variable.pagination['size'];\n if (variable.pagination['totalElements'] % variable.pagination['size'] === 0) {\n variable.pagination['totalPages'] = parseInt(variable.pagination['totalPages']);\n } else {\n variable.pagination['totalPages'] = parseInt(variable.pagination['totalPages']) + 1;\n }\n\n // If pagination type is cursor, fill next & prev\n if (response.next) {\n variable.pagination['next'] = response.next;\n variable.pagination['prev'] = response.prev;\n variable.pagination['last'] = response.next ? false : true;\n variable.pagination['first'] = response.prev ? false : true;\n } else {\n variable.pagination['first'] = variable.pagination['page'] <= 1 ? true : false;\n // calculate last based on current page index against total pages\n variable.pagination['last'] = response.hasMoreItems === '' ? !(variable.pagination['page'] < variable.pagination['totalPages']) : !response.hasMoreItems;\n }\n }\n\n /**\n * Resolves the expression given in pagination metadata's output\n * @param item has value of each key which is inside output pagination metadata\n * @param response has data of the api call's response\n * @param resHeaders has data of the api call's response headers\n * @param res holds the information of pagination which has to be stored on the variable\n * @param key has key name against which data has to be stored in pagination\n * @returns {void} This method does not return anything\n */\n static setPaginationItems(item, response, res, key, resHeaders) {\n // if the item has body, resolve the expression against the response\n if (startsWith(item, '$body')) {\n const bodyKey = item.replace('$body.', '');\n try {\n res[key] = jmespath.search(response, bodyKey);\n } catch {\n console.warn(`${item} expression needs to be corrected as per JMES guidelines`);\n }\n } else if (startsWith(item, '$header')) { // if the item has header, resolve the expression against the response headers\n const headerKey = item.replace('$header.', '');\n const headers = (<any>Object).fromEntries(resHeaders.headers);\n const headerParams = headerKey.split('.');\n try {\n res[key] = jmespath.search(headers, headerParams[0].toLowerCase());\n } catch {\n console.warn(`${item} expression needs to be corrected as per JMES guidelines`);\n }\n if (res[key]?.length) {\n let headerVal = res[key].join();\n if (headerParams.length === 1) {\n /**\n * If the headerParams has only 1 key (which is not an object) name assing headerVal to the res[key]\n */\n res[key] = headerVal;\n } else {\n /**\n * If the headerParams has more than 1 key (an object), parse the stringified headerVal which is an object\n * Resolve the expression against headerVal object amd assign it to res[key]\n */\n let keyName = headerParams.slice(1).join('.');\n const headerResp = JSON.parse(headerVal);\n const specialChar = /[!@#$%^&*()+\\=\\[\\]{};':\"\\\\|,<>\\/?]+/;\n if (specialChar.test(keyName)) {\n // If key name has expression (ex: comparission expression)\n // add root key name to keyName for JMES to resolve the expression\n keyName = 'headerResp.' + keyName;\n }\n try {\n res[key] = jmespath.search(headerResp, keyName);\n } catch {\n console.warn(`${item} expression needs to be corrected as per JMES guidelines`);\n }\n }\n }\n }\n }\n\n /**\n * Return the pagination information of the service based on its existence on swagger or on the variable\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @returns {object} This method return pagination metadata\n */\n static getPaginationInfo(operationInfo, variable) {\n if (operationInfo?.paginationInfo) {\n return operationInfo.paginationInfo;\n } else {\n return variable._paginationConfig;\n }\n }\n\n /**\n * Set query params with the pagination info, if pagination metadata is present in query params\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param options has info of the api's query params\n * @returns {void} This method does not return anything\n */\n static checkPaginationAtQuery(operationInfo, variable, options) {\n const paginationInfo = this.getPaginationInfo(operationInfo, variable);\n // If page is not first, pagination is present on the variable and paginationInfo's input meta has size set pagination in query params\n const hasPagination = options && options['page'] && paginationInfo?.input.size && variable.pagination;\n if (!hasPagination) {\n return;\n }\n\n let inputParam;\n // if pagination type is offset, asssign inputParam to offset else page\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n inputParam = 'offset';\n } else {\n inputParam = 'page';\n }\n const paramName = paginationInfo.input[inputParam].split('.')[0];\n const paramObj = find(operationInfo.parameters, function (obj) {\n return obj.name === paramName\n });\n // check if the variable has query params and they are not empty\n if (!isEmpty(variable.dataBinding) && paramObj && paramObj.parameterType === 'query') {\n /**\n * For pagination type other than offset, assign page which is recieved from options\n * For offset type, calculate page from size and options[page]\n */\n if (!paginationInfo.output?.page && paginationInfo.type !== 'offset') {\n variable.pagination['page'] = options['page'];\n } else {\n variable.pagination['page'] = this.getOffsetInfo(variable, options);\n }\n this.setPaginationQueryParams(variable, operationInfo, paginationInfo);\n }\n }\n\n /**\n * Deduces the offset information from the size and page params\n * @param variable withholds variable information\n * @param options has info of the api's query params\n * @returns {object} Returns the next offset number\n */\n static getOffsetInfo(variable, options) {\n return variable.pagination['size'] * (options['page'] ? (options['page'] - 1) : 1);\n }\n\n /**\n * Sets Pagination data on the request information\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param options has info of the api's query params\n * @param paginationInfo has pagination information of the variable\n * @param headers has request headers\n * @param requestBody has request body\n * @param url has request url\n * @returns {object} Returns the request object which has pagination info\n */\n static setPaginationAtReq(paginationInfo, operationInfo, variable, headers, requestBody, url, options) {\n let reqObj = {};\n let inputParam;\n let resObj = {};\n // pagination input information varies based on the type\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n inputParam = 'offset';\n } else {\n inputParam = 'page';\n }\n const paramName = paginationInfo.input[inputParam].split('.')[0];\n // check if paramName is present in parameters of operation info\n const paramObj = find(operationInfo.parameters, function (obj) {\n return obj.name === paramName\n });\n // set page/offset and size from pagination if matched parameter's type is header\n if (paramObj?.parameterType === 'header') {\n set(reqObj, paginationInfo.input[inputParam], variable.pagination['page']);\n set(reqObj, paginationInfo.input.size, variable.pagination['size']);\n headers[paramName] = JSON.stringify(reqObj[paramName]);\n resObj['headers'] = headers;\n } else if (paramObj?.parameterType === 'body') {\n // set page/offset and size from pagination if matched parameter's type is body\n // assign bodyVal to updated pagination info object\n const bodyVal = JSON.parse(paramObj.sampleValue);\n const bodyParam = paginationInfo.input[inputParam].split('.')[1]\n if (bodyVal && bodyVal[bodyParam]) {\n const inputBodyParam = paginationInfo.input[inputParam].split('.').splice(1).join('.');\n if (inputParam !== 'offset') {\n set(reqObj, inputBodyParam, variable.pagination['page']);\n } else {\n set(reqObj, inputBodyParam, this.getOffsetInfo(variable, options));\n }\n set(reqObj, paginationInfo.input.size.split('.').splice(1).join('.'), variable.pagination['size']);\n bodyVal[bodyParam] = reqObj[bodyParam];\n requestBody = JSON.stringify(bodyVal);\n resObj['requestBody'] = requestBody;\n }\n } else if (variable.pagination.next && paramObj) {\n /**\n * For cursor type pagination, if pagination info is present in the path\n * Based on whether user clicks on the next or prev button modify the url\n */\n\n if (paramObj.parameterType === 'path') {\n const urlParams = operationInfo.relativePath.split('/'),\n paramConfig = '{' + paramObj.name + '}',\n paramIndex = urlParams.indexOf(paramConfig);\n let invokeUrl;\n if (variable.pagination.isNext) {\n invokeUrl = variable.pagination.next.split('/');\n } else {\n invokeUrl = variable.pagination.prev.split('/');\n }\n\n let urlPathParmas;\n let urlPath;\n if (operationInfo.directPath) { // For direct path, as url has hostname, derivate pathname using URL object\n urlPath = new URL(url);\n urlPathParmas = urlPath.pathname.split('/');\n urlPathParmas[paramIndex] = invokeUrl[paramIndex];\n urlPath.pathname = urlPathParmas.join('/');\n url = urlPath.href;\n resObj['url'] = url;\n } else { // Else modify the url with index as +1 (following proxy pattern)\n urlPathParmas = url.split('/');\n urlPathParmas[paramIndex + 1] = invokeUrl[paramIndex];\n url = urlPathParmas.join('/');\n resObj['url'] = url;\n }\n\n } else if (paramObj.parameterType === 'query') {\n /**\n * For cursor type pagination, if pagination info is present in the query\n * Based on whether user clicks on the next or prev button modify the url's query params\n */\n const urlParams = url.split('?');\n let invokeUrl;\n if (variable.pagination.isNext) {\n invokeUrl = variable.pagination.next.split('?');\n } else {\n invokeUrl = variable.pagination.prev.split('?');\n }\n urlParams[1] = invokeUrl[1];\n url = urlParams.join('?');\n resObj['url'] = url;\n }\n }\n return resObj;\n }\n\n /**\n * Sets the pagination info recieved from api's response in the res object\n * @param operationInfo has metadata of the variable\n * @param res holds the information of pagination which has to be stored on the variable\n * @param paramName has key name against which data has to be stored in pagination\n * @param variable withholds variable information\n * @returns {void} This method does not return anything\n */\n static setParameterVal(paramName, res, operationInfo, variable) {\n const paginationInfo = this.getPaginationInfo(operationInfo, variable);\n const param = paginationInfo.input[paramName].split('.')[0];\n const sizeObj = find(operationInfo.parameters, function (obj) {\n return obj.name === param\n });\n res[paramName] = result(sizeObj, 'sampleValue');\n }\n\n /**\n * Creates res object from the response recieved from the api triggered\n * @param variable withholds variable information\n * @param operationInfo has metadata of the variable\n * @param paginationInfo has metadata of the variable's pagination\n * @param response has data of the api call's response\n * @param options has info of the api's query params\n * @param resHeaders has data of the api call's response headers\n * @returns {object} An object which holds the information of pagination which has to be stored on the variable\n */\n static generatePaginationRes(operationInfo, paginationInfo, response, resHeaders, options, variable) {\n let res = {};\n const resOutput = paginationInfo.output;\n // If pagination type is not cursor, create the following metadata\n if (!resOutput?.next) {\n /**\n * If size is present in the pagination's output metadata deduce size from api's response\n * Else deduce size from the pagination's input metadata size key\n */\n if (resOutput?.size) {\n this.setPaginationItems(resOutput.size, response, res, 'size', resHeaders);\n } else {\n this.setParameterVal('size', res, operationInfo, variable);\n }\n /**\n * If page is present in the pagination's output metadata deduce page from api's response\n * Else deduce page from the pagination's input metadata page key\n */\n if (resOutput?.page) {\n this.setPaginationItems(resOutput.page, response, res, 'page', resHeaders);\n } else if (paginationInfo.type !== 'offset') {\n this.setParameterVal('page', res, operationInfo, variable);\n }\n /**\n * If totalElements has $minValue in it, set totalElements as $minValue\n * If the rendered elements are greater than $minValue, set totalElements as Number of elements rendered + 1\n\n * If totalElements is present in the pagination's output metadata deduce totalElements from api's response\n\n * If Pagination type is offset, deduce totalElements from size and options[page] else deduce from size and res[page]\n */\n if (startsWith(resOutput?.totalElements, '$minValue')) {\n const totalEl = resOutput.totalElements.replace('$minValue=', '');\n const pageParam = res['page'] ? res['page'] : options['page']\n const elRendered = res['size'] * pageParam;\n if (!variable.pagination || variable.pagination['totalElements'] > elRendered) {\n res['totalElements'] = parseInt(totalEl);\n } else {\n res['totalElements'] = elRendered + 1;\n }\n } else if (resOutput?.totalElements) {\n this.setPaginationItems(resOutput.totalElements, response, res, 'totalElements', resHeaders);\n } else {\n if (paginationInfo.type === 'offset' || paginationInfo.input.offset) {\n res['totalElements'] = (res['size'] * (options['page'] ? options['page'] : 1)) + 1;\n } else {\n res['totalElements'] = (res['size'] * res['page']) + 1;\n }\n }\n /**\n * If hasMoreItems is present in the pagination's output metadata deduce hasMoreItems from api's response\n * Else assign it as empty which will be calculated at pagination object generation\n */\n if (resOutput?.hasMoreItems) {\n this.setPaginationItems(resOutput.hasMoreItems, response, res, 'hasMoreItems', resHeaders);\n } else {\n res['hasMoreItems'] = '';\n }\n } else if (resOutput) { // For cursor type pagination set next and prev keys in res object\n this.setPaginationItems(resOutput.next, response, res, 'next', resHeaders);\n this.setPaginationItems(resOutput.prev, response, res, 'prev', resHeaders);\n }\n return res;\n }\n}\n","import { extractType, getBlob, isDateTimeType, isDefined, replace } from '@wm/core';\n\nimport { $rootScope, CONSTANTS, SWAGGER_CONSTANTS, VARIABLE_CONSTANTS, WS_CONSTANTS } from '../../constants/variables.constants';\nimport { isFileUploadSupported } from './variables.utils';\nimport { getAccessToken } from './../oAuth.utils';\nimport { formatDate } from '../../util/variable/variables.utils';\nimport { PaginationUtils } from '../../util/variable/pagination.utils';\nimport {\n concat,\n forEach,\n get,\n includes,\n isArray,\n isEmpty,\n isNull,\n isObject,\n isUndefined,\n join, map, reject,\n toLower, toUpper\n} from \"lodash-es\";\n\n/**\n * returns true if a Service variable is:\n * - for a query/procedure\n * - performs a PUT/POST operation, i.e, takes a Request Body as input\n * @param variable\n * @returns {any}\n */\nconst isBodyTypeQueryOrProcedure = (variable) => {\n return (includes(['QueryExecution', 'ProcedureExecution'], variable.controller)) && (includes(['put', 'post'], variable.operationType));\n};\n\n/**\n * returns true if the variable is a Query service variable\n * @param {string} controller\n * @param {string} serviceType\n * @returns {boolean}\n */\nconst isQueryServiceVar = (controller: string, serviceType: string) => {\n return controller === VARIABLE_CONSTANTS.CONTROLLER_TYPE.QUERY && serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA;\n};\n\n/**\n * Append given value to the formdata\n * @param formData\n * @param param - Param from which value has to be taken\n * @param paramValue - Value which is to be appended to formdata\n */\nconst getFormData = (formData, param, paramValue) => {\n const paramType = toLower(extractType(get(param, 'items.type') || param.type)),\n paramContentType = CONSTANTS.isStudioMode ? param['x-WM-CONTENT_TYPE'] : param.contentType;\n if (isFileUploadSupported()) {\n if ((paramType !== 'file') && (paramContentType === 'string' || !paramContentType)) {\n if (isObject(paramValue)) {\n paramValue = JSON.stringify(paramValue);\n }\n formData.append(param.name, paramValue);\n } else {\n if (isArray(paramValue) && paramType === 'file') {\n forEach(paramValue, function (fileObject) {\n formData.append(param.name, (fileObject && fileObject.content) || getBlob(fileObject), fileObject.name);\n });\n } else {\n formData.append(param.name, getBlob(paramValue, paramContentType), paramValue && paramValue.name);\n }\n }\n return formData;\n }\n};\n\n/**\n * Check for missing required params and format the date/time param values\n * @param inputData\n * @param params\n * @returns {{requestBody: {}; missingParams: any[]}}\n */\nconst processRequestBody = (inputData, params) => {\n const requestBody = {},\n missingParams = [];\n let paramValue;\n forEach(params, function (param) {\n paramValue = get(inputData, param.name);\n if (!isUndefined(paramValue) && paramValue !== '' && paramValue !== null && !param.readOnly) {\n paramValue = isDateTimeType(param.type) ? formatDate(paramValue, param.type) : paramValue;\n // Construct ',' separated string if param is not array type but value is an array\n if (isArray(paramValue) && toLower(extractType(param.type)) === 'string') {\n paramValue = join(paramValue, ',');\n }\n requestBody[param.name] = paramValue;\n } else if (param.required) {\n missingParams.push(param.name || param.id);\n }\n });\n return {\n 'requestBody': requestBody,\n 'missingParams': missingParams\n };\n};\n\n/**\n * Done only for HTTP calls made via the proxy server\n * Goes though request headers, appends 'X-' to certain headers\n * these headers need not be processed at proxy server and should directly be passed to the server\n * e.g. Authorization, Cookie, etc.\n * @param headers\n * @returns {{}}\n */\nconst cloakHeadersForProxy = (headers) => {\n const _headers = {},\n UNCLOAKED_HEADERS = VARIABLE_CONSTANTS.REST_SERVICE.UNCLOAKED_HEADERS,\n CLOAK_PREFIX = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;\n forEach(headers, function (val, key) {\n if (includes(UNCLOAKED_HEADERS, key.toUpperCase())) {\n _headers[key] = val;\n } else {\n _headers[CLOAK_PREFIX + key] = val;\n }\n });\n\n return _headers;\n};\n\nexport class ServiceVariableUtils {\n /**\n * prepares the HTTP request info for a Service Variable\n * @param variable\n * @param operationInfo\n * @param inputFields\n * @returns {any}\n */\n static constructRequestParams(variable, operationInfo, inputFields, options?) {\n variable = variable || {};\n\n // operationInfo is specifically null for un_authorized access\n if (operationInfo === null) {\n return {\n 'error' : {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.USER_UNAUTHORISED,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.USER_UNAUTHORISED,\n 'field': '_wmServiceOperationInfo'\n }\n };\n } else if (isEmpty(operationInfo)) {\n return {\n 'error' : {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.METADATA_MISSING,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.METADATA_MISSING,\n 'field': '_wmServiceOperationInfo'\n }\n };\n } else if (operationInfo && operationInfo.invalid) {\n return {\n 'error' : {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.CRUD_OPERATION_MISSING,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.CRUD_OPERATION_MISSING,\n 'field': '_wmServiceOperationInfo'\n }\n };\n }\n\n const directPath = operationInfo.directPath || '',\n relativePath = operationInfo.basePath ? operationInfo.basePath + operationInfo.relativePath : operationInfo.relativePath,\n isBodyTypeQueryProcedure = isBodyTypeQueryOrProcedure(variable);\n let queryParams = '',\n bodyInfo,\n headers = {},\n requestBody,\n url,\n requiredParamMissing = [],\n target,\n pathParamRex,\n invokeParams,\n authDetails = null,\n uname,\n pswd,\n method,\n formData,\n isProxyCall,\n paramValueInfo,\n params,\n securityDefnObj,\n accessToken,\n withCredentials;\n\n function getFormDataObj() {\n if (formData) {\n return formData;\n }\n formData = new FormData();\n return formData;\n }\n\n securityDefnObj = get(operationInfo.securityDefinitions, '0');\n\n if (securityDefnObj) {\n switch (securityDefnObj.type) {\n case VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.OAUTH2:\n accessToken = getAccessToken(securityDefnObj[VARIABLE_CONSTANTS.REST_SERVICE.OAUTH_PROVIDER_KEY], null);\n if (accessToken) {\n headers[VARIABLE_CONSTANTS.REST_SERVICE.AUTH_HDR_KEY] = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.AUTH_HDR_VAL.OAUTH + ' ' + accessToken;\n } else {\n return {\n 'error': {\n 'type' : VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.NO_ACCESSTOKEN,\n 'message' : VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.NO_ACCESSTOKEN\n },\n 'securityDefnObj': securityDefnObj\n };\n }\n break;\n case VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.BASIC:\n uname = inputFields['wm_auth_username'];\n pswd = inputFields['wm_auth_password'];\n if (uname && pswd) {\n // TODO[VIBHU]: bas64 encoding alternative.\n headers[VARIABLE_CONSTANTS.REST_SERVICE.AUTH_HDR_KEY] = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.AUTH_HDR_VAL.BASIC + ' ' + btoa(uname + ':' + pswd);\n authDetails = {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.AUTH_TYPE.BASIC\n };\n } else {\n return {\n 'error': {\n 'type' : VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.NO_CREDENTIALS,\n 'message': VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.NO_CREDENTIALS\n },\n 'securityDefnObj': securityDefnObj\n };\n }\n break;\n }\n }\n // set query params, if pagination info is present and the info should be present in query\n PaginationUtils.checkPaginationAtQuery(operationInfo, variable, options);\n\n operationInfo.proxySettings = operationInfo.proxySettings || {web: true, mobile: false};\n method = operationInfo.httpMethod || operationInfo.methodType;\n isProxyCall = (function () {\n if (CONSTANTS.hasCordova) {\n return operationInfo.proxySettings.mobile;\n }\n return operationInfo.proxySettings.web;\n }());\n withCredentials = operationInfo.proxySettings.withCredentials;\n url = isProxyCall ? relativePath : directPath;\n\n /* loop through all the parameters */\n forEach(operationInfo.parameters, function (param) {\n // Set params based on current workspace\n function setParamsOfChildNode() {\n if (inputFields) {\n // specific case for body type query/procedure variable with query params\n if (inputFields[param.name] && isObject(inputFields[param.name])) {\n paramValueInfo = inputFields[param.name];\n } else {\n paramValueInfo = inputFields;\n }\n params = get(operationInfo, ['definitions', param.type]);\n } else {\n // For Api Designer\n paramValueInfo = paramValue || {};\n params = param.children;\n }\n }\n\n let paramValue = param.sampleValue;\n\n if ((isDefined(paramValue) && paramValue !== null && paramValue !== '') || (isBodyTypeQueryProcedure && param.type !== 'file')) {\n // Format dateTime params for dataService variables\n if (variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA && isDateTimeType(param.type)) {\n paramValue = formatDate(paramValue, param.type);\n }\n // Construct ',' separated string if param is not array type but value is an array\n if (isArray(paramValue) && toLower(extractType(param.type)) === 'string' && variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA) {\n paramValue = join(paramValue, ',');\n }\n switch (param.parameterType.toUpperCase()) {\n case 'QUERY':\n // Ignore null valued query params for queryService variable\n if (isNull(paramValue) && isQueryServiceVar(variable.controller, variable.serviceType)) {\n break;\n }\n if (!queryParams) {\n queryParams = '?' + param.name + '=' + encodeURIComponent(paramValue);\n } else {\n queryParams += '&' + param.name + '=' + encodeURIComponent(paramValue);\n }\n break;\n case 'PATH':\n /* replacing the path param based on the regular expression in the relative path */\n pathParamRex = new RegExp('\\\\s*\\\\{\\\\s*' + param.name + '(:\\\\.\\\\+)?\\\\s*\\\\}\\\\s*');\n url = url.replace(pathParamRex, paramValue);\n break;\n case 'HEADER':\n headers[param.name] = paramValue;\n break;\n case 'BODY':\n // For post/put query methods wrap the input\n if (isBodyTypeQueryProcedure) {\n setParamsOfChildNode();\n bodyInfo = processRequestBody(paramValueInfo, params);\n requestBody = bodyInfo.requestBody;\n requiredParamMissing = concat(requiredParamMissing, bodyInfo.missingParams);\n } else {\n requestBody = paramValue;\n }\n break;\n case 'FORMDATA':\n if (isBodyTypeQueryProcedure && param.name === SWAGGER_CONSTANTS.WM_DATA_JSON) {\n setParamsOfChildNode();\n // Process query/procedure formData non-file params params\n bodyInfo = processRequestBody(paramValueInfo, params);\n requestBody = getFormData(getFormDataObj(), param, bodyInfo.requestBody);\n requiredParamMissing = concat(requiredParamMissing, bodyInfo.missingParams);\n } else {\n requestBody = getFormData(getFormDataObj(), param, paramValue);\n }\n break;\n }\n } else if (param.required) {\n requiredParamMissing.push(param.name || param.id);\n }\n });\n\n // if required param not found, return error\n if (requiredParamMissing.length) {\n return {\n 'error': {\n 'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.REQUIRED_FIELD_MISSING,\n 'field': requiredParamMissing.join(','),\n 'message': replace(VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.REQUIRED_FIELD_MISSING, [requiredParamMissing.join(',')]),\n 'skipDefaultNotification': true\n }\n };\n }\n\n // Setting appropriate content-Type for request accepting request body like POST, PUT, etc\n if (!includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, toUpper(method))) {\n /*Based on the formData browser will automatically set the content type to 'multipart/form-data' and webkit boundary*/\n if (!(operationInfo.consumes && (operationInfo.consumes[0] === WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA))) {\n headers['Content-Type'] = (operationInfo.consumes && operationInfo.consumes[0]) || 'application/json';\n }\n }\n\n // if the consumes has application/x-www-form-urlencoded and\n // if the http request of given method type can have body send the queryParams as Form Data\n if (includes(operationInfo.consumes, WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED)\n && !includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, (method || '').toUpperCase())) {\n // remove the '?' at the start of the queryParams\n if (queryParams) {\n requestBody = (requestBody ? requestBody + '&' : '') + queryParams.substring(1);\n }\n headers['Content-Type'] = WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED;\n } else {\n url += queryParams;\n }\n\n /*\n * for proxy calls:\n * - cloak the proper headers (required only for REST services)\n * - prepare complete url from relativeUrl\n */\n if (isProxyCall) {\n // avoiding cloakHeadersForProxy when the method is invoked from apidesigner.\n headers = (variable.serviceType !== VARIABLE_CONSTANTS.SERVICE_TYPE.REST && variable.serviceType !== VARIABLE_CONSTANTS.SERVICE_TYPE.OPENAPI) || operationInfo.skipCloakHeaders ? headers : cloakHeadersForProxy(headers);\n if (variable.getPrefabName() && VARIABLE_CONSTANTS.REST_SUPPORTED_SERVICES.indexOf(variable.serviceType) !== -1) {\n /* if it is a prefab variable (used in a normal project), modify the url */\n url = 'prefabs/' + variable.getPrefabName() + url;\n target = 'invokePrefabRestService';\n } else if (!variable.getPrefabName()) {\n url = 'services' + url;\n }\n url = $rootScope.project.deployedUrl + url;\n }\n\n // If pagination info exists, process info in request headers or body based on the metadata\n const paginationInfo = PaginationUtils.getPaginationInfo(operationInfo, variable);\n if (paginationInfo && variable.pagination) {\n const resp = PaginationUtils.setPaginationAtReq(paginationInfo, operationInfo, variable, headers, requestBody, url, options);\n if (resp) {\n if (resp['headers']) {\n headers = resp['headers'];\n } else if (resp['requestBody']) {\n requestBody = resp['requestBody']\n } else if (resp['url']) {\n url = resp['url']\n }\n }\n }\n\n /*creating the params needed to invoke the service. url is generated from the relative path for the operation*/\n invokeParams = {\n 'projectID': $rootScope.project.id,\n 'url': url,\n 'target': target,\n 'method': method,\n 'headers': headers,\n 'data': requestBody,\n 'authDetails': authDetails,\n 'isDirectCall': !isProxyCall,\n 'isExtURL': variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.REST,\n 'withCredentials': withCredentials\n };\n\n return invokeParams;\n }\n\n static isFileUploadRequest(variable) {\n // temporary fix, have to find proper solution for deciding weather to upload file through variable\n return variable.service === 'FileService' && variable.operation === 'uploadFile';\n }\n\n /**\n * This method returns array of query param names for variable other then page,size,sort\n * @params {params} params of the variable\n */\n static excludePaginationParams(params) {\n return map(reject(params, (param) => {\n return includes(VARIABLE_CONSTANTS.PAGINATION_PARAMS, param.name);\n }), function (param) {\n return param.name;\n });\n }\n}\n","import { $WebSocket } from 'angular2-websocket/angular2-websocket';\nimport { getValidJSON, isDefined, isInsecureContentRequest, isObject, triggerFn, xmlToJson } from '@wm/core';\nimport { BaseVariableManager } from './base-variable.manager';\nimport { WebSocketVariable } from '../../model/variable/web-socket-variable';\nimport { initiateCallback, metadataService } from '../../util/variable/variables.utils';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { ServiceVariableUtils } from '../../util/variable/service-variable.utils';\nimport { forEach, get } from \"lodash-es\";\n\nexport class WebSocketVariableManager extends BaseVariableManager {\n scope_var_socket_map = new Map();\n PROPERTY = {\n 'SERVICE': 'service',\n 'DATA_UPDATE_STRATEGY': 'dataUpdateStrategy',\n 'DATA_LIMIT': 'dataLimit'\n };\n DATA_UPDATE_STRATEGY = {\n 'REFRESH': 'refresh',\n 'PREPEND': 'prepend',\n 'APPEND': 'append'\n };\n\n /**\n * returns the state of property to decide weather to append new messages to dataSet or not\n * @param variable\n * @returns boolean\n */\n private shouldAppendData(variable) {\n variable = variable || this;\n return variable[this.PROPERTY.DATA_UPDATE_STRATEGY] !== this.DATA_UPDATE_STRATEGY.REFRESH;\n }\n\n /**\n * returns the state of property to decide weather to APPEND or PREPEND new messages to dataSet\n * @param variable\n * @returns boolean\n */\n private shouldAppendLast(variable) {\n return variable[this.PROPERTY.DATA_UPDATE_STRATEGY] === this.DATA_UPDATE_STRATEGY.APPEND;\n }\n\n /**\n * returns upper limit on number of records to be in dataSet\n * this is applicable only when appendData is true\n * @param variable\n * @returns {dataLimit}\n */\n private getDataLimit(variable) {\n return variable.dataLimit;\n }\n\n /**\n * get url from wmServiceOperationInfo\n * @param variable\n * @returns {*}\n */\n private getURL(variable) {\n const prefabName = variable.getPrefabName();\n const opInfo = prefabName ? \n get(metadataService.getByOperationId(variable.operationId, prefabName), 'wmServiceOperationInfo') : \n get(metadataService.getByOperationId(variable.operationId), 'wmServiceOperationInfo');\n const inputFields = variable.dataBinding;\n \n // add sample values to the params (url and path)\n forEach(opInfo.parameters, function (param) {\n param.sampleValue = inputFields[param.name];\n });\n // although, no header params will be present, keeping 'skipCloakHeaders' flag if support provided later\n $.extend(opInfo, {\n skipCloakHeaders: true\n });\n\n // call common method to prepare config for the service operation info.\n const config = ServiceVariableUtils.constructRequestParams(variable, opInfo, inputFields);\n /* if error found, return */\n if (config.error && config.error.message) {\n this._onSocketError(variable, {data: config.error.message});\n return;\n }\n return config.url;\n }\n\n /**\n * handler for onMessage event on a socket connection for a variable\n * the data returned is converted to JSON from string/xml and assigned to dataSet of variable\n * If not able to do so, message is simply assigned to the dataSet of variable\n * If appendData property is set, the message is appended to the dataSet, else it replaces the existing value of dataSet\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketMessage(variable, evt) {\n let data = get(evt, 'data'), dataLength, dataLimit, shouldAddToLast, insertIdx;\n data = getValidJSON(data) || xmlToJson(data) || data;\n // EVENT: ON_MESSAGE\n const value = initiateCallback(VARIABLE_CONSTANTS.EVENT.MESSAGE_RECEIVE, variable, data, evt);\n data = isDefined(value) ? value : data;\n if (this.shouldAppendData(variable)) {\n variable.dataSet = variable.dataSet || [];\n dataLength = variable.dataSet.length;\n dataLimit = this.getDataLimit(variable);\n shouldAddToLast = this.shouldAppendLast(variable);\n if (dataLimit && (dataLength >= dataLimit)) {\n if (shouldAddToLast) {\n variable.dataSet.shift();\n } else {\n variable.dataSet.pop();\n }\n }\n insertIdx = shouldAddToLast ? dataLength : 0;\n variable.dataSet.splice(insertIdx, 0, data);\n } else {\n variable.dataSet = isDefined(value) ? value : data;\n }\n }\n\n /**\n * calls the ON_BEFORE_SEND callback on the variable\n * @param variable\n * @param message\n * @returns {*}\n * @private\n */\n private _onBeforeSend(variable, message) {\n // EVENT: ON_BEFORE_SEND\n return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_SEND, variable, message);\n }\n\n /**\n * calls the ON_BEFORE_CLOSE callback assigned to the variable\n * @param variable\n * @param evt\n * @returns {*}\n * @private\n */\n private _onBeforeSocketClose(variable, evt?) {\n // EVENT: ON_BEFORE_CLOSE\n return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_CLOSE, variable, get(evt, 'data'), evt);\n }\n\n /**\n * calls the ON_BEFORE_OPEN callback assigned\n * called just before the connection is open\n * @param variable\n * @param evt\n * @returns {*}\n * @private\n */\n private _onBeforeSocketOpen(variable, evt?) {\n // EVENT: ON_BEFORE_OPEN\n return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_OPEN, variable, get(evt, 'data'), evt);\n }\n\n /**\n * calls the ON_OPEN event on the variable\n * this is called once the connection is established by the variable with the target WebSocket service\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketOpen(variable, evt) {\n variable._socketConnected = true;\n // EVENT: ON_OPEN\n initiateCallback(VARIABLE_CONSTANTS.EVENT.OPEN, variable, get(evt, 'data'), evt);\n \n // Send initial request body if it exists and connectOnPageLoad is true\n if (variable.startUpdate) {\n const requestBody = get(variable, 'dataBinding.RequestBody');\n if (requestBody) {\n setTimeout(() => {\n this.send(variable, requestBody);\n }, 0); // Using setTimeout to ensure connection is fully established\n }\n }\n }\n\n private freeSocket(variable) {\n this.scope_var_socket_map.set(variable, undefined);\n }\n\n /**\n * calls the ON_CLOSE event on the variable\n * this is called on close of an existing connection on a variable\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketClose(variable, evt) {\n variable._socketConnected = false;\n this.freeSocket(variable);\n // EVENT: ON_CLOSE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CLOSE, variable, get(evt, 'data'), evt);\n }\n\n /**\n * calls the ON_ERROR event on the variable\n * this is called if an error occurs while connecting to the socket service\n * @param variable\n * @param evt\n * @private\n */\n private _onSocketError(variable, evt) {\n variable._socketConnected = false;\n this.freeSocket(variable);\n // EVENT: ON_ERROR\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, get(evt, 'data') || 'Error while connecting with ' + variable.service, evt);\n }\n\n /**\n * returns an existing socket connection on the variable\n * if not present, make the connection and return it\n * @param variable\n * @returns {*}\n */\n private getSocket(variable) {\n const url = this.getURL(variable);\n let _socket = this.scope_var_socket_map.get(variable);\n if (_socket) {\n return _socket;\n }\n\n if (!CONSTANTS.hasCordova && isInsecureContentRequest(url)) {\n triggerFn(this._onSocketError.bind(this, variable));\n return;\n }\n _socket = new $WebSocket(url);\n _socket.onOpen(this._onSocketOpen.bind(this, variable));\n _socket.onError(this._onSocketError.bind(this, variable));\n _socket.onMessage(this._onSocketMessage.bind(this, variable));\n _socket.onClose(this._onSocketClose.bind(this, variable));\n\n this.scope_var_socket_map.set(variable, _socket);\n variable._socket = _socket;\n return _socket;\n}\n\n /**\n * opens a socket connection on the variable.\n * URL & other meta data is fetched from wmServiceOperationInfo\n * @returns {*}\n */\n public open(variable: WebSocketVariable, success?, error?) {\n const shouldOpen = this._onBeforeSocketOpen(variable);\n if (shouldOpen === false) {\n triggerFn(error);\n return;\n }\n const socket = this.getSocket(variable);\n triggerFn(success);\n return socket;\n }\n\n /**\n * closes an existing socket connection on variable\n */\n public close(variable: WebSocketVariable) {\n const shouldClose = this._onBeforeSocketClose(variable);\n const socket = this.getSocket(variable);\n if (shouldClose === false) {\n return;\n }\n socket.close();\n }\n\n /**\n * sends a message to the existing socket connection on the variable\n * If socket connection not open yet, open a connections and then send\n * if message provide, it is sent, else the one present in RequestBody param is sent\n * @param message\n */\n public send(variable: WebSocketVariable, message?: string) {\n const socket = this.getSocket(variable);\n\n if (!socket) {\n console.error('WebSocket connection not established');\n return;\n }\n\n message = message || get(variable, 'dataBinding.RequestBody');\n if (!message) {\n console.warn('No message to send');\n return;\n }\n\n const response = this._onBeforeSend(variable, message);\n if (response === false) {\n return;\n }\n message = isDefined(response) ? response : message;\n message = isObject(message) ? JSON.stringify(message) : message;\n \n try {\n socket.send(message, 0);\n } catch (error) {\n console.error('Error sending message:', error);\n this._onSocketError(variable, { data: error.message });\n }\n }\n}","import { NavigationActionManager } from '../manager/action/navigation-action.manager';\nimport { NotificationActionManager } from '../manager/action/notification-action.manager';\nimport { BaseVariableManager } from '../manager/variable/base-variable.manager';\nimport { BaseActionManager } from '../manager/action/base-action.manager';\nimport { LoginActionManager } from '../manager/action/login-action.manager';\nimport { LogoutActionManager } from '../manager/action/logout-action.manager';\nimport { DeviceVariableManager } from '../manager/variable/device-variable-manager';\nimport { WebSocketVariableManager } from '../manager/variable/web-socket-variable.manager';\n\nconst managerMap = new Map(),\n typeToManagerMap = {\n 'Variable': BaseVariableManager,\n 'Action': BaseActionManager,\n 'wm.NavigationVariable': NavigationActionManager,\n 'wm.NotificationVariable': NotificationActionManager,\n 'wm.LoginVariable': LoginActionManager,\n 'wm.LogoutVariable': LogoutActionManager,\n 'wm.DeviceVariable': DeviceVariableManager,\n 'wm.WebSocketVariable': WebSocketVariableManager\n };\n\nexport class VariableManagerFactory {\n\n static get(type) {\n return managerMap.has(type) ?\n managerMap.get(type) :\n managerMap.set(type, new typeToManagerMap[type]()).get(type);\n }\n}\n","import {$invokeWatchers, hasCordova} from '@wm/core';\n\nimport { initiateCallback } from '../../util/variable/variables.utils';\nimport { IDeviceVariableOperation } from './device-variable-operation';\nimport { CONSTANTS, VARIABLE_CONSTANTS } from '../../constants/variables.constants';\n\nexport class DeviceVariableService {\n\n name: string;\n\n protected operations: IDeviceVariableOperation[];\n\n invoke(variable: any, options: any): Promise<any> {\n const operation = this.operations.find(o => {\n return o.name === variable.operation;\n });\n if (operation == null) {\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, null);\n return Promise.reject(`Could not find operation '${variable.operation}' in service '${this.name}'`);\n } else if (hasCordova()) {\n const dataBindings = new Map<string, any>();\n if (variable.dataBinding !== undefined) {\n Object.entries(variable).forEach(o => {\n dataBindings.set(o[0], o[1]);\n });\n Object.entries(variable.dataBinding).forEach(o => {\n dataBindings.set(o[0], o[1]);\n });\n }\n return operation.invoke(variable, options, dataBindings)\n .then(function (data) {\n variable.dataSet = data;\n $invokeWatchers(true);\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, data);\n return data;\n }, function (reason) {\n variable.dataSet = {};\n $invokeWatchers(true);\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, null);\n return reason;\n });\n } else {\n return Promise.resolve()\n .then(() => {\n initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, operation.model);\n return operation.model;\n });\n }\n }\n}\n","import { VariableManagerFactory } from '../../factory/variable-manager.factory';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { DeviceVariableManager } from '../../manager/variable/device-variable-manager';\nimport { ApiAwareVariable } from '@wavemaker/variables';\n\nconst getManager = () => {\n return <DeviceVariableManager> VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.DEVICE);\n};\n\nexport class DeviceVariable extends ApiAwareVariable {\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n init() {\n getManager().initBinding(this);\n }\n\n invoke(options?, onSuccess?, onError?) {\n getManager().invoke(this, options).then(onSuccess, onError);\n }\n}\n","import { VariableManagerFactory } from '../../factory/variable-manager.factory';\nimport { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.NAVIGATION);\n};\n\nexport class NavigationAction extends BaseAction {\n operation: string;\n pageName: string;\n\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n invoke(options?) {\n getManager().invoke(this, options);\n }\n\n // legacy method.\n navigate(options?) {\n this.invoke(options);\n }\n\n init() {\n // static property bindings\n getManager().initBinding(this, 'dataBinding', 'dataBinding');\n\n // dynamic property bindings (e.g. page params)\n getManager().initBinding(this, 'dataSet', 'dataSet');\n }\n}\n","import { DataSource, IDataSource, isDefined } from '@wm/core';\n\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\nimport { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION);\n};\n\nexport class NotificationAction extends BaseAction implements IDataSource {\n\n message: string;\n\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n execute(operation, options) {\n const returnVal = super.execute(operation, options);\n if (isDefined(returnVal)) {\n return returnVal;\n }\n\n return new Promise((resolve, reject) => {\n switch (operation) {\n case DataSource.Operation.INVOKE :\n this.invoke(options, resolve, reject);\n break;\n case DataSource.Operation.NOTIFY :\n this.notify(options, resolve, reject);\n break;\n default :\n reject(`${operation} operation is not supported on this data source`);\n break;\n }\n });\n }\n\n // Backward compatible method\n notify(options, success, error) {\n getManager().notify(this, options, success, error);\n }\n\n invoke(options, success, error) {\n this.notify(options, success, error);\n }\n\n getMessage() {\n return getManager().getMessage(this);\n }\n\n setMessage(text) {\n return getManager().setMessage(this, text);\n }\n\n clearMessage() {\n return getManager().setMessage(this, '');\n }\n\n getOkButtonText() {\n return getManager().getOkButtonText(this);\n }\n\n setOkButtonText(text) {\n return getManager().setOkButtonText(this, text);\n }\n\n getToasterDuration() {\n return getManager().getToasterDuration(this);\n }\n\n setToasterDuration(duration) {\n return getManager().setToasterDuration(this, duration);\n }\n\n getToasterClass() {\n return getManager().getToasterClass(this);\n }\n\n setToasterClass(classText) {\n return getManager().setToasterClass(this, classText);\n }\n\n getToasterPosition() {\n return getManager().getToasterPosition(this);\n }\n\n setToasterPosition(position) {\n return getManager().setToasterPosition(this, position);\n }\n\n getAlertType() {\n return getManager().getAlertType(this);\n }\n\n setAlertType(type) {\n return getManager().setAlertType(this, type);\n }\n\n getCancelButtonText() {\n return getManager().getCancelButtonText(this);\n }\n\n setCancelButtonText(text) {\n return getManager().setCancelButtonText(this, text);\n }\n\n init() {\n // static property bindings\n getManager().initBinding(this, 'dataBinding', 'dataBinding');\n\n // dynamic property bindings\n getManager().initBinding(this, 'dataSet', 'dataSet');\n }\n}\n","import { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.LOGIN);\n};\n\nexport class LoginAction extends BaseAction {\n\n startUpdate: boolean;\n autoUpdate: boolean;\n useDefaultSuccessHandler: boolean;\n\n constructor(variable: any) {\n super();\n Object.assign(this, variable);\n }\n\n login(options, success, error) {\n return getManager().login(this, options, success, error);\n }\n\n invoke(options, success, error) {\n return this.login(options, success, error);\n }\n\n cancel() {\n // TODO[VIBHU]: implement http abort logic\n }\n\n init() {\n getManager().initBinding(this, 'dataBinding', 'dataBinding');\n }\n}\n","import { BaseAction } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.LOGOUT);\n};\n\nexport class LogoutAction extends BaseAction {\n\n startUpdate: boolean;\n autoUpdate: boolean;\n useDefaultSuccessHandler: boolean;\n\n constructor(variable: any) {\n super();\n Object.assign(this, variable);\n }\n\n logout(options, success, error) {\n getManager().logout(this, options, success, error);\n }\n\n invoke(options, success, error) {\n this.logout(options, success, error);\n }\n\n cancel() {\n // TODO[VIBHU]: implement http abort logic\n }\n}\n","import { ApiAwareVariable } from '@wavemaker/variables';\nimport { VARIABLE_CONSTANTS } from '../../constants/variables.constants';\nimport { VariableManagerFactory } from '../../factory/variable-manager.factory';\n\nconst getManager = () => {\n return VariableManagerFactory.get(VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET);\n};\n\nexport class WebSocketVariable extends ApiAwareVariable {\n\n constructor(variable: any) {\n super();\n Object.assign(this as any, variable);\n }\n\n open(success?, error?) {\n return getManager().open(this, success, error);\n }\n\n close () {\n return getManager().close(this);\n }\n\n update() {\n return getManager().update(this);\n }\n\n send(message?: string) {\n return getManager().send(this, message);\n }\n\n cancel() {\n return this.close();\n }\n\n invoke(options?, success?, error?) {\n this.open(success, error);\n }\n\n init () {\n getManager().initBinding(this);\n }\n}\n","import { DeviceVariable } from '../model/variable/device-variable';\nimport { NavigationAction } from '../model/action/navigation-action';\nimport { NotificationAction } from '../model/action/notification-action';\nimport { ModelVariable, ServiceVariable, LiveVariable, CrudVariable, TimerAction, VARIABLE_CONSTANTS } from '@wavemaker/variables';\nimport { LoginAction } from '../model/action/login-action';\nimport { LogoutAction } from '../model/action/logout-action';\nimport { WebSocketVariable } from '../model/variable/web-socket-variable';\n\nexport class VariableFactory {\n\n static create(variable, context) {\n let variableInstance;\n switch (variable.category) {\n case VARIABLE_CONSTANTS.CATEGORY.MODEL:\n variableInstance = new ModelVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.SERVICE:\n variableInstance = new ServiceVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.LIVE:\n variableInstance = new LiveVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.CRUD:\n variableInstance = new CrudVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.DEVICE:\n variableInstance = new DeviceVariable(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.NAVIGATION:\n variableInstance = new NavigationAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION:\n variableInstance = new NotificationAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.LOGIN:\n variableInstance = new LoginAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.LOGOUT:\n variableInstance = new LogoutAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.TIMER:\n variableInstance = new TimerAction(variable);\n break;\n case VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET:\n variableInstance = new WebSocketVariable(variable);\n }\n\n variableInstance._context = context;\n variableInstance.__cloneable__ = false;\n return variableInstance;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { AbstractHttpService, hasCordova } from '@wm/core';\n\n@Injectable()\nexport class MetadataService {\n metadataMap: Map<string, any>;\n providerMap: Map<string, any>;\n CONTEXT_APP = 'app';\n\n constructor(private $http: AbstractHttpService) {}\n\n isLoaded() {\n return this.metadataMap ? this.metadataMap.has(this.CONTEXT_APP) : false;\n }\n\n load(prefabName?: string): Promise<any> {\n let url;\n if (hasCordova()) {\n url = 'metadata/' + (prefabName ? `prefabs/${prefabName}/` : 'app/') + 'service-definitions.json';\n } else {\n url = './services/' + (prefabName ? `prefabs/${prefabName}/` : '') + 'servicedefs';\n }\n return new Promise((resolve, reject) => {\n this.$http.send({'url' : url, 'method': 'GET'}).then((response) => {\n this.metadataMap = this.metadataMap || new Map();\n this.providerMap = this.providerMap || new Map();\n response.body = response.body || {};\n this.metadataMap.set(prefabName || this.CONTEXT_APP, response.body.serviceDefs);\n if (response.body.securityDefinitions) {\n this.providerMap.set(prefabName || this.CONTEXT_APP, response.body.securityDefinitions.oauthProvider);\n }\n resolve(response.body.serviceDefs);\n }, reject);\n });\n }\n\n getByOperationId(operationId, context) {\n context = context || this.CONTEXT_APP;\n const map = this.metadataMap.get(context);\n return map && map[operationId];\n }\n\n // function to get Provider details from providerMap for the passed providerId\n getByProviderId(providerId, context) {\n context = context || this.CONTEXT_APP;\n const map = this.providerMap.get(context);\n return map && map[providerId];\n }\n\n getByCrudId(crudId, context) {\n context = context || this.CONTEXT_APP;\n const map = this.metadataMap.get(context);\n let ops = [];\n for (let k in map) {\n if (map[k] && map[k].crudOperationId === crudId) {\n ops.push(map[k]);\n }\n }\n return ops;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport {\n $watch,\n $parseEvent,\n AbstractDialogService,\n AbstractHttpService,\n AbstractNavigationService,\n AbstractToasterService, processFilterExpBindNode, $invokeWatchers, getClonedObject\n} from '@wm/core';\nimport { OAuthService } from '@wm/oAuth';\nimport { SecurityService } from '@wm/security';\n\nimport { VariableFactory } from '../factory/variable.factory';\nimport { wmSetDependency, BaseAction, getTarget, setValueToNode, getTargetNodeKey, internalBoundNodeMap } from '@wavemaker/variables';\nimport {setDependency, simulateFileDownload} from '../util/variable/variables.utils';\nimport { MetadataService } from './metadata-service/metadata.service';\nimport { VARIABLE_CONSTANTS } from '../constants/variables.constants';\nimport {appManager} from '../util/variable/variables.utils';\nimport { DateFormatter } from '@wavemaker/variables';\nimport {isArray, isFunction, isUndefined, set} from \"lodash-es\";\n\nexport class Formatter implements DateFormatter {\n format(value, format) {\n return appManager.getPipe('date').transform(value, format);\n }\n}\n\n\n@Injectable()\nexport class VariablesService {\n\n constructor(\n private httpService: AbstractHttpService,\n private metadataService: MetadataService,\n private navigationService: AbstractNavigationService,\n private routerService: Router,\n private toasterService: AbstractToasterService,\n private oAuthService: OAuthService,\n private securityService: SecurityService,\n private dialogService: AbstractDialogService\n ) {\n // set external dependencies, to be used across variable classes, managers and utils\n setDependency('http', this.httpService);\n setDependency('metadata', this.metadataService);\n setDependency('navigationService', this.navigationService);\n setDependency('router', this.routerService);\n setDependency('toaster', this.toasterService);\n setDependency('oAuth', this.oAuthService);\n setDependency('security', this.securityService);\n setDependency('dialog', this.dialogService);\n wmSetDependency('oAuth', this.oAuthService);\n wmSetDependency('security', this.securityService);\n wmSetDependency('metadata', this.metadataService);\n wmSetDependency('http', this.httpService);\n }\n\n /**\n * loop through a collection of variables/actions\n * trigger cancel on each (of exists)\n * @param collection\n */\n bulkCancel(collection) {\n Object.keys(collection).forEach(name => {\n const variable = collection[name];\n if (isFunction(variable.cancel)) {\n variable.cancel();\n }\n });\n }\n\n /**\n * loops over the variable/actions collection and trigger invoke on it if startUpdate on it is true\n * @param collection\n */\n triggerStartUpdate(collection) {\n return Promise.all(\n Object.keys(collection)\n .map(name => collection[name])\n .filter( variable => variable?.startUpdate && variable.invoke)\n .map(variable => variable.invoke())\n );\n }\n\n processBindExp(d: any, scope: any, variable) {\n const root = getTarget(variable),\n targetNodeKey = getTargetNodeKey(d.target),\n runMode = true;\n let v = isArray(d.value) ? d.value[0] : d.value;\n if (v) {\n if (v.startsWith && v.startsWith('bind:')) {\n const watchExpression = $watch(v.replace('bind:', ''), scope, {}, variable.invokeOnParamChange.bind(variable, d), undefined, undefined, d, () => variable.isMuted);\n v = scope.registerDestroyListener ? scope.registerDestroyListener(watchExpression) : watchExpression;\n } else if (!isUndefined(d.value)) {\n setValueToNode(d.target, d, root, variable, d.value, true);\n if (runMode && root !== targetNodeKey) {\n if (!internalBoundNodeMap.has(variable)) {\n internalBoundNodeMap.set(variable, {});\n }\n set(internalBoundNodeMap.get(variable), [variable.name, root, d.target], d.value);\n }\n }\n }\n return {\n name: d.target,\n value: v\n };\n }\n\n processBinding(variable: any, context: any, bindSource?: string, bindTarget?: string) {\n bindSource = bindSource || 'dataBinding';\n bindTarget = bindTarget || 'dataBinding';\n\n const bindMap = variable[bindSource];\n variable[bindSource] = {};\n variable['_bind' + bindSource] = bindMap;\n if (!bindMap || !isArray(bindMap)) {\n return;\n }\n bindMap.forEach( (node) => {\n /* for static variable change the binding with target 'dataBinding' to 'dataSet', as the results have to reflect directly in the dataSet */\n if (variable.category === 'wm.Variable' && node.target === 'dataBinding') {\n node.target = 'dataSet';\n }\n this.processBindExp(node, context, variable);\n });\n }\n\n isVariableSeperated(variablesJson, variableName) {\n return variablesJson[variableName].category === 'wm.Variable' || variablesJson[variableName].category === 'wm.ServiceVariable' ||\n variablesJson[variableName].category === 'wm.LiveVariable' || variablesJson[variableName].category === 'wm.CrudVariable'\n }\n\n getBindSourceTarget(variable) {\n if (variable.category === 'wm.LiveVariable') {\n return variable.operation === 'read' ? 'filterFields' : 'inputFields';\n } else if (variable.category === 'wm.ModelVariable') {\n return 'dataSet';\n } else {\n return 'dataBinding';\n }\n }\n\n /**\n * Takes the raw variables and actions json as input\n * Initialize the variable and action instances through the factory\n * collect the variables and actions in separate maps and return the collection\n * @param {string} page\n * @param variablesJson\n * @param scope\n * @returns {Variables , Actions}\n */\n register(page: string, variablesJson: any, scope: any) {\n const variableInstances = {\n Variables: {},\n Actions: {},\n callback: this.triggerStartUpdate\n };\n let varInstance;\n\n for (const variableName in variablesJson) {\n const params: any = {};\n varInstance = VariableFactory.create(variablesJson[variableName], scope);\n varInstance.init();\n if (this.isVariableSeperated(variablesJson, variableName)) {\n this.processBinding(varInstance, scope, 'dataBinding', this.getBindSourceTarget(varInstance));\n varInstance.httpService = this.httpService;\n varInstance.dateFormatter = new Formatter();\n varInstance.subscribe('afterInvoke', () => $invokeWatchers(true));\n if (varInstance.category === 'wm.LiveVariable' && varInstance.operation === 'read') {\n processFilterExpBindNode(varInstance._context, varInstance.filterExpressions, varInstance);\n }\n if (varInstance.category === 'wm.CrudVariable' || varInstance.category === 'wm.ServiceVariable') {\n varInstance.simulateFileDownload = simulateFileDownload;\n }\n\n }\n\n if (this.isVariableSeperated(variablesJson, variableName) || variablesJson[variableName].category === 'wm.TimerVariable') {\n for (const e in VARIABLE_CONSTANTS.EVENT) {\n if (varInstance[VARIABLE_CONSTANTS.EVENT[e]]) {\n varInstance[VARIABLE_CONSTANTS.EVENT[e]] = $parseEvent(varInstance[VARIABLE_CONSTANTS.EVENT[e]]);\n }\n }\n }\n\n\n // if action type, put it in Actions namespace\n if (varInstance instanceof BaseAction) {\n variableInstances.Actions[variableName] = varInstance;\n } else {\n variableInstances.Variables[variableName] = varInstance;\n }\n }\n\n // if the context has onDestroy listener, subscribe the event and trigger cancel on all varibales\n if (scope.registerDestroyListener) {\n scope.registerDestroyListener(() => {\n this.bulkCancel(variableInstances.Variables);\n this.bulkCancel(variableInstances.Actions);\n });\n }\n\n return variableInstances;\n }\n\n destroy() {\n }\n\n registerDependency(name, ref) {\n setDependency(name, ref);\n wmSetDependency(name, ref);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport {CommonModule, HashLocationStrategy, Location, LocationStrategy} from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { ToastrModule } from 'ngx-toastr';\n\nimport { HttpServiceModule } from '@wm/http';\nimport { SecurityModule } from '@wm/security';\nimport { OAuthModule } from '@wm/oAuth';\n\nimport { VariablesService } from './service/variables.service';\nimport { MetadataService } from './service/metadata-service/metadata.service';\n\nexport const toastrModule: ModuleWithProviders<ToastrModule> = ToastrModule.forRoot({maxOpened: 1, autoDismiss: true});\n\n@NgModule({\n imports: [\n CommonModule,\n toastrModule,\n HttpClientModule,\n HttpServiceModule,\n OAuthModule,\n SecurityModule\n ],\n declarations: []\n})\nexport class VariablesModule {\n\n static forRoot(): ModuleWithProviders<VariablesModule> {\n return {\n ngModule: VariablesModule,\n providers: [\n VariablesService,\n MetadataService,\n Location,\n {provide: LocationStrategy, useClass: HashLocationStrategy}\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["rootScope","NVUtils.navigate","replace","isObject","getManager","VARIABLE_CONSTANTS","getTargetNodeKey","setValueToNode","internalBoundNodeMap","i2.MetadataService","i1"],"mappings":";;;;;;;;;;;;;;;;;;;AACa,MAAA,SAAS,GAAG;AACrB,IAAA,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,SAAS;AAC3C,IAAA,YAAY,EAAE,KAAK;AACnB,IAA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