@wavemaker-ai/app-ng-runtime 12.0.2-rc.647771 → 12.1.0-rc.349

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/build-task/bundles/index.umd.js +2489 -2963
  2. package/build-task/fesm2022/index.mjs +2307 -2786
  3. package/build-task/fesm2022/index.mjs.map +1 -1
  4. package/build-task/types/index.d.ts +401 -844
  5. package/components/advanced/carousel/bundles/index.umd.js +387 -344
  6. package/components/advanced/carousel/fesm2022/index.mjs +363 -325
  7. package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
  8. package/components/advanced/carousel/types/index.d.ts +85 -86
  9. package/components/advanced/custom/bundles/index.umd.js +298 -249
  10. package/components/advanced/custom/fesm2022/index.mjs +280 -236
  11. package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
  12. package/components/advanced/custom/types/index.d.ts +49 -49
  13. package/components/advanced/login/bundles/index.umd.js +177 -127
  14. package/components/advanced/login/fesm2022/index.mjs +162 -117
  15. package/components/advanced/login/fesm2022/index.mjs.map +1 -1
  16. package/components/advanced/login/types/index.d.ts +33 -34
  17. package/components/advanced/marquee/bundles/index.umd.js +93 -63
  18. package/components/advanced/marquee/fesm2022/index.mjs +73 -48
  19. package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
  20. package/components/advanced/marquee/types/index.d.ts +11 -12
  21. package/components/base/bundles/index.umd.js +5515 -6359
  22. package/components/base/fesm2022/index.mjs +5169 -6027
  23. package/components/base/fesm2022/index.mjs.map +1 -1
  24. package/components/base/types/index.d.ts +1198 -1154
  25. package/components/basic/anchor/bundles/index.umd.js +273 -195
  26. package/components/basic/anchor/fesm2022/index.mjs +251 -178
  27. package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
  28. package/components/basic/anchor/types/index.d.ts +40 -41
  29. package/components/basic/audio/bundles/index.umd.js +124 -75
  30. package/components/basic/audio/fesm2022/index.mjs +104 -60
  31. package/components/basic/audio/fesm2022/index.mjs.map +1 -1
  32. package/components/basic/audio/types/index.d.ts +22 -23
  33. package/components/basic/html/bundles/index.umd.js +144 -113
  34. package/components/basic/html/fesm2022/index.mjs +125 -99
  35. package/components/basic/html/fesm2022/index.mjs.map +1 -1
  36. package/components/basic/html/types/index.d.ts +20 -17
  37. package/components/basic/icon/bundles/index.umd.js +144 -72
  38. package/components/basic/icon/fesm2022/index.mjs +124 -57
  39. package/components/basic/icon/fesm2022/index.mjs.map +1 -1
  40. package/components/basic/icon/types/index.d.ts +18 -19
  41. package/components/basic/iframe/bundles/index.umd.js +143 -93
  42. package/components/basic/iframe/fesm2022/index.mjs +124 -79
  43. package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
  44. package/components/basic/iframe/types/index.d.ts +28 -29
  45. package/components/basic/label/bundles/index.umd.js +136 -120
  46. package/components/basic/label/fesm2022/index.mjs +118 -107
  47. package/components/basic/label/fesm2022/index.mjs.map +1 -1
  48. package/components/basic/label/types/index.d.ts +14 -15
  49. package/components/basic/picture/bundles/index.umd.js +171 -130
  50. package/components/basic/picture/fesm2022/index.mjs +152 -116
  51. package/components/basic/picture/fesm2022/index.mjs.map +1 -1
  52. package/components/basic/picture/types/index.d.ts +21 -22
  53. package/components/basic/progress/progress-bar/bundles/index.umd.js +211 -160
  54. package/components/basic/progress/progress-bar/fesm2022/index.mjs +193 -147
  55. package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
  56. package/components/basic/progress/progress-bar/types/index.d.ts +45 -41
  57. package/components/basic/progress/progress-circle/bundles/index.umd.js +294 -165
  58. package/components/basic/progress/progress-circle/fesm2022/index.mjs +274 -150
  59. package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
  60. package/components/basic/progress/progress-circle/types/index.d.ts +41 -42
  61. package/components/basic/progress/progress-utils/bundles/index.umd.js +27 -29
  62. package/components/basic/progress/progress-utils/fesm2022/index.mjs +18 -25
  63. package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -1
  64. package/components/basic/progress/progress-utils/types/index.d.ts +3 -5
  65. package/components/basic/rich-text-editor/bundles/index.umd.js +294 -228
  66. package/components/basic/rich-text-editor/fesm2022/index.mjs +275 -214
  67. package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  68. package/components/basic/rich-text-editor/types/index.d.ts +55 -56
  69. package/components/basic/search/bundles/index.umd.js +1129 -1090
  70. package/components/basic/search/fesm2022/index.mjs +1117 -1083
  71. package/components/basic/search/fesm2022/index.mjs.map +1 -1
  72. package/components/basic/search/types/index.d.ts +132 -130
  73. package/components/basic/spinner/bundles/index.umd.js +216 -120
  74. package/components/basic/spinner/fesm2022/index.mjs +201 -110
  75. package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
  76. package/components/basic/spinner/types/index.d.ts +30 -31
  77. package/components/basic/tree/bundles/index.umd.js +756 -756
  78. package/components/basic/tree/fesm2022/index.mjs +740 -745
  79. package/components/basic/tree/fesm2022/index.mjs.map +1 -1
  80. package/components/basic/tree/types/index.d.ts +106 -97
  81. package/components/basic/video/bundles/index.umd.js +164 -108
  82. package/components/basic/video/fesm2022/index.mjs +145 -94
  83. package/components/basic/video/fesm2022/index.mjs.map +1 -1
  84. package/components/basic/video/types/index.d.ts +29 -30
  85. package/components/chart/bundles/index.umd.js +1768 -1737
  86. package/components/chart/fesm2022/index.mjs +1713 -1728
  87. package/components/chart/fesm2022/index.mjs.map +1 -1
  88. package/components/chart/types/index.d.ts +102 -104
  89. package/components/containers/accordion/bundles/index.umd.js +522 -494
  90. package/components/containers/accordion/fesm2022/index.mjs +502 -479
  91. package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  92. package/components/containers/accordion/types/index.d.ts +116 -116
  93. package/components/containers/layout-grid/bundles/index.umd.js +260 -164
  94. package/components/containers/layout-grid/fesm2022/index.mjs +231 -140
  95. package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
  96. package/components/containers/layout-grid/types/index.d.ts +30 -27
  97. package/components/containers/linear-layout/bundles/index.umd.js +220 -178
  98. package/components/containers/linear-layout/fesm2022/index.mjs +193 -156
  99. package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
  100. package/components/containers/linear-layout/types/index.d.ts +26 -26
  101. package/components/containers/panel/bundles/index.umd.js +343 -215
  102. package/components/containers/panel/fesm2022/index.mjs +330 -207
  103. package/components/containers/panel/fesm2022/index.mjs.map +1 -1
  104. package/components/containers/panel/types/index.d.ts +48 -49
  105. package/components/containers/tabs/bundles/index.umd.js +832 -779
  106. package/components/containers/tabs/fesm2022/index.mjs +811 -763
  107. package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  108. package/components/containers/tabs/types/index.d.ts +134 -126
  109. package/components/containers/tile/bundles/index.umd.js +93 -60
  110. package/components/containers/tile/fesm2022/index.mjs +75 -47
  111. package/components/containers/tile/fesm2022/index.mjs.map +1 -1
  112. package/components/containers/tile/types/index.d.ts +11 -12
  113. package/components/containers/wizard/bundles/index.umd.js +1096 -1078
  114. package/components/containers/wizard/fesm2022/index.mjs +1069 -1056
  115. package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  116. package/components/containers/wizard/types/index.d.ts +258 -252
  117. package/components/data/card/bundles/index.umd.js +439 -229
  118. package/components/data/card/fesm2022/index.mjs +408 -203
  119. package/components/data/card/fesm2022/index.mjs.map +1 -1
  120. package/components/data/card/types/index.d.ts +50 -48
  121. package/components/data/form/bundles/index.umd.js +3392 -3339
  122. package/components/data/form/fesm2022/index.mjs +3350 -3304
  123. package/components/data/form/fesm2022/index.mjs.map +1 -1
  124. package/components/data/form/types/index.d.ts +561 -482
  125. package/components/data/list/bundles/index.umd.js +1523 -1601
  126. package/components/data/list/fesm2022/index.mjs +1507 -1590
  127. package/components/data/list/fesm2022/index.mjs.map +1 -1
  128. package/components/data/list/types/index.d.ts +300 -283
  129. package/components/data/live-table/bundles/index.umd.js +299 -280
  130. package/components/data/live-table/fesm2022/index.mjs +284 -270
  131. package/components/data/live-table/fesm2022/index.mjs.map +1 -1
  132. package/components/data/live-table/types/index.d.ts +42 -39
  133. package/components/data/pagination/bundles/index.umd.js +848 -881
  134. package/components/data/pagination/fesm2022/index.mjs +835 -879
  135. package/components/data/pagination/fesm2022/index.mjs.map +1 -1
  136. package/components/data/pagination/types/index.d.ts +110 -106
  137. package/components/data/table/bundles/index.umd.js +4977 -5042
  138. package/components/data/table/fesm2022/index.mjs +4937 -5007
  139. package/components/data/table/fesm2022/index.mjs.map +1 -1
  140. package/components/data/table/types/index.d.ts +770 -736
  141. package/components/dialogs/alert-dialog/bundles/index.umd.js +259 -118
  142. package/components/dialogs/alert-dialog/fesm2022/index.mjs +243 -109
  143. package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
  144. package/components/dialogs/alert-dialog/types/index.d.ts +31 -26
  145. package/components/dialogs/confirm-dialog/bundles/index.umd.js +250 -121
  146. package/components/dialogs/confirm-dialog/fesm2022/index.mjs +236 -114
  147. package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
  148. package/components/dialogs/confirm-dialog/types/index.d.ts +34 -29
  149. package/components/dialogs/default/bundles/index.umd.js +509 -373
  150. package/components/dialogs/default/fesm2022/index.mjs +485 -354
  151. package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  152. package/components/dialogs/default/types/index.d.ts +129 -86
  153. package/components/dialogs/design-dialog/bundles/index.umd.js +320 -142
  154. package/components/dialogs/design-dialog/fesm2022/index.mjs +305 -132
  155. package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
  156. package/components/dialogs/design-dialog/types/index.d.ts +31 -20
  157. package/components/dialogs/iframe-dialog/bundles/index.umd.js +258 -111
  158. package/components/dialogs/iframe-dialog/fesm2022/index.mjs +245 -105
  159. package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
  160. package/components/dialogs/iframe-dialog/types/index.d.ts +27 -22
  161. package/components/dialogs/login-dialog/bundles/index.umd.js +139 -106
  162. package/components/dialogs/login-dialog/fesm2022/index.mjs +125 -97
  163. package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
  164. package/components/dialogs/login-dialog/types/index.d.ts +27 -26
  165. package/components/dialogs/partial-dialog/bundles/index.umd.js +302 -149
  166. package/components/dialogs/partial-dialog/fesm2022/index.mjs +289 -143
  167. package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
  168. package/components/dialogs/partial-dialog/types/index.d.ts +37 -32
  169. package/components/input/base-form/bundles/index.umd.js +143 -139
  170. package/components/input/base-form/fesm2022/index.mjs +129 -130
  171. package/components/input/base-form/fesm2022/index.mjs.map +1 -1
  172. package/components/input/base-form/types/index.d.ts +28 -29
  173. package/components/input/base-form-custom/bundles/index.umd.js +107 -121
  174. package/components/input/base-form-custom/fesm2022/index.mjs +88 -107
  175. package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -1
  176. package/components/input/base-form-custom/types/index.d.ts +23 -26
  177. package/components/input/button/bundles/index.umd.js +177 -89
  178. package/components/input/button/fesm2022/index.mjs +158 -75
  179. package/components/input/button/fesm2022/index.mjs.map +1 -1
  180. package/components/input/button/types/index.d.ts +24 -25
  181. package/components/input/button-group/bundles/index.umd.js +110 -72
  182. package/components/input/button-group/fesm2022/index.mjs +90 -57
  183. package/components/input/button-group/fesm2022/index.mjs.map +1 -1
  184. package/components/input/button-group/types/index.d.ts +13 -14
  185. package/components/input/calendar/bundles/index.umd.js +615 -647
  186. package/components/input/calendar/fesm2022/index.mjs +596 -649
  187. package/components/input/calendar/fesm2022/index.mjs.map +1 -1
  188. package/components/input/calendar/types/index.d.ts +130 -131
  189. package/components/input/caption-position/bundles/index.umd.js +175 -188
  190. package/components/input/caption-position/fesm2022/index.mjs +159 -177
  191. package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
  192. package/components/input/caption-position/types/index.d.ts +31 -34
  193. package/components/input/checkbox/bundles/index.umd.js +339 -200
  194. package/components/input/checkbox/fesm2022/index.mjs +319 -185
  195. package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
  196. package/components/input/checkbox/types/index.d.ts +46 -41
  197. package/components/input/checkboxset/bundles/index.umd.js +256 -170
  198. package/components/input/checkboxset/fesm2022/index.mjs +242 -161
  199. package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
  200. package/components/input/checkboxset/types/index.d.ts +26 -27
  201. package/components/input/chips/bundles/index.umd.js +721 -733
  202. package/components/input/chips/fesm2022/index.mjs +706 -723
  203. package/components/input/chips/fesm2022/index.mjs.map +1 -1
  204. package/components/input/chips/types/index.d.ts +101 -90
  205. package/components/input/color-picker/bundles/index.umd.js +312 -137
  206. package/components/input/color-picker/fesm2022/index.mjs +296 -126
  207. package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
  208. package/components/input/color-picker/types/index.d.ts +35 -36
  209. package/components/input/composite/bundles/index.umd.js +127 -112
  210. package/components/input/composite/fesm2022/index.mjs +106 -96
  211. package/components/input/composite/fesm2022/index.mjs.map +1 -1
  212. package/components/input/composite/types/index.d.ts +26 -27
  213. package/components/input/currency/bundles/index.umd.js +237 -104
  214. package/components/input/currency/fesm2022/index.mjs +219 -91
  215. package/components/input/currency/fesm2022/index.mjs.map +1 -1
  216. package/components/input/currency/types/index.d.ts +30 -31
  217. package/components/input/dataset-aware-form/bundles/index.umd.js +298 -346
  218. package/components/input/dataset-aware-form/fesm2022/index.mjs +286 -339
  219. package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
  220. package/components/input/dataset-aware-form/types/index.d.ts +80 -80
  221. package/components/input/epoch/base-date-time/bundles/index.umd.js +809 -1081
  222. package/components/input/epoch/base-date-time/fesm2022/index.mjs +796 -1073
  223. package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
  224. package/components/input/epoch/base-date-time/types/index.d.ts +244 -247
  225. package/components/input/epoch/date/bundles/index.umd.js +619 -513
  226. package/components/input/epoch/date/fesm2022/index.mjs +604 -503
  227. package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
  228. package/components/input/epoch/date/types/index.d.ts +63 -64
  229. package/components/input/epoch/date-time/bundles/index.umd.js +682 -511
  230. package/components/input/epoch/date-time/fesm2022/index.mjs +672 -506
  231. package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
  232. package/components/input/epoch/date-time/types/index.d.ts +111 -112
  233. package/components/input/epoch/date-time-picker/bundles/index.umd.js +417 -321
  234. package/components/input/epoch/date-time-picker/fesm2022/index.mjs +405 -314
  235. package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
  236. package/components/input/epoch/date-time-picker/types/index.d.ts +135 -80
  237. package/components/input/epoch/picker/bundles/index.umd.js +201 -148
  238. package/components/input/epoch/picker/fesm2022/index.mjs +183 -135
  239. package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
  240. package/components/input/epoch/picker/types/index.d.ts +46 -38
  241. package/components/input/epoch/time/bundles/index.umd.js +534 -392
  242. package/components/input/epoch/time/fesm2022/index.mjs +523 -386
  243. package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
  244. package/components/input/epoch/time/types/index.d.ts +107 -108
  245. package/components/input/file-upload/bundles/index.umd.js +500 -477
  246. package/components/input/file-upload/fesm2022/index.mjs +484 -466
  247. package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  248. package/components/input/file-upload/types/index.d.ts +110 -109
  249. package/components/input/number/bundles/index.umd.js +241 -101
  250. package/components/input/number/fesm2022/index.mjs +224 -89
  251. package/components/input/number/fesm2022/index.mjs.map +1 -1
  252. package/components/input/number/types/index.d.ts +28 -29
  253. package/components/input/radioset/bundles/index.umd.js +240 -156
  254. package/components/input/radioset/fesm2022/index.mjs +226 -147
  255. package/components/input/radioset/fesm2022/index.mjs.map +1 -1
  256. package/components/input/radioset/types/index.d.ts +25 -26
  257. package/components/input/rating/bundles/index.umd.js +353 -266
  258. package/components/input/rating/fesm2022/index.mjs +337 -255
  259. package/components/input/rating/fesm2022/index.mjs.map +1 -1
  260. package/components/input/rating/types/index.d.ts +52 -53
  261. package/components/input/select/bundles/index.umd.js +295 -217
  262. package/components/input/select/fesm2022/index.mjs +280 -207
  263. package/components/input/select/fesm2022/index.mjs.map +1 -1
  264. package/components/input/select/types/index.d.ts +38 -39
  265. package/components/input/slider/bundles/index.umd.js +316 -197
  266. package/components/input/slider/fesm2022/index.mjs +297 -183
  267. package/components/input/slider/fesm2022/index.mjs.map +1 -1
  268. package/components/input/slider/types/index.d.ts +43 -44
  269. package/components/input/switch/bundles/index.umd.js +257 -219
  270. package/components/input/switch/fesm2022/index.mjs +243 -210
  271. package/components/input/switch/fesm2022/index.mjs.map +1 -1
  272. package/components/input/switch/types/index.d.ts +34 -35
  273. package/components/input/text/bundles/index.umd.js +1585 -1120
  274. package/components/input/text/fesm2022/index.mjs +1542 -1082
  275. package/components/input/text/fesm2022/index.mjs.map +1 -1
  276. package/components/input/text/types/index.d.ts +313 -310
  277. package/components/input/textarea/bundles/index.umd.js +224 -100
  278. package/components/input/textarea/fesm2022/index.mjs +207 -88
  279. package/components/input/textarea/fesm2022/index.mjs.map +1 -1
  280. package/components/input/textarea/types/index.d.ts +32 -33
  281. package/components/navigation/breadcrumb/bundles/index.umd.js +205 -131
  282. package/components/navigation/breadcrumb/fesm2022/index.mjs +188 -118
  283. package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  284. package/components/navigation/breadcrumb/types/index.d.ts +29 -28
  285. package/components/navigation/menu/bundles/index.umd.js +1461 -950
  286. package/components/navigation/menu/fesm2022/index.mjs +1416 -910
  287. package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  288. package/components/navigation/menu/types/index.d.ts +220 -193
  289. package/components/navigation/navbar/bundles/index.umd.js +172 -79
  290. package/components/navigation/navbar/fesm2022/index.mjs +155 -67
  291. package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
  292. package/components/navigation/navbar/types/index.d.ts +19 -20
  293. package/components/navigation/popover/bundles/index.umd.js +543 -519
  294. package/components/navigation/popover/fesm2022/index.mjs +524 -505
  295. package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  296. package/components/navigation/popover/types/index.d.ts +86 -86
  297. package/components/page/default/bundles/index.umd.js +634 -451
  298. package/components/page/default/fesm2022/index.mjs +600 -422
  299. package/components/page/default/fesm2022/index.mjs.map +1 -1
  300. package/components/page/default/types/index.d.ts +123 -119
  301. package/components/page/footer/bundles/index.umd.js +91 -63
  302. package/components/page/footer/fesm2022/index.mjs +71 -48
  303. package/components/page/footer/fesm2022/index.mjs.map +1 -1
  304. package/components/page/footer/types/index.d.ts +11 -12
  305. package/components/page/header/bundles/index.umd.js +96 -59
  306. package/components/page/header/fesm2022/index.mjs +76 -44
  307. package/components/page/header/fesm2022/index.mjs.map +1 -1
  308. package/components/page/header/types/index.d.ts +12 -13
  309. package/components/page/left-panel/bundles/index.umd.js +405 -407
  310. package/components/page/left-panel/fesm2022/index.mjs +386 -393
  311. package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
  312. package/components/page/left-panel/types/index.d.ts +47 -40
  313. package/components/page/right-panel/bundles/index.umd.js +115 -78
  314. package/components/page/right-panel/fesm2022/index.mjs +96 -64
  315. package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
  316. package/components/page/right-panel/types/index.d.ts +14 -13
  317. package/components/page/top-nav/bundles/index.umd.js +91 -60
  318. package/components/page/top-nav/fesm2022/index.mjs +73 -47
  319. package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
  320. package/components/page/top-nav/types/index.d.ts +11 -12
  321. package/components/prefab/bundles/index.umd.js +253 -173
  322. package/components/prefab/fesm2022/index.mjs +233 -158
  323. package/components/prefab/fesm2022/index.mjs.map +1 -1
  324. package/components/prefab/types/index.d.ts +35 -33
  325. package/core/bundles/index.umd.js +4466 -5642
  326. package/core/fesm2022/index.mjs +3997 -5202
  327. package/core/fesm2022/index.mjs.map +1 -1
  328. package/core/types/index.d.ts +1785 -1808
  329. package/http/bundles/index.umd.js +339 -413
  330. package/http/fesm2022/index.mjs +323 -402
  331. package/http/fesm2022/index.mjs.map +1 -1
  332. package/http/types/index.d.ts +107 -112
  333. package/locales/moment/am-et.js +73 -0
  334. package/locales/moment/bm.js +2 -0
  335. package/locales/moment/ca.js +1 -1
  336. package/locales/moment/de-at.js +29 -1
  337. package/locales/moment/de-ch.js +29 -1
  338. package/locales/moment/de.js +29 -1
  339. package/locales/moment/hu.js +3 -3
  340. package/locales/moment/id.js +12 -1
  341. package/locales/moment/ka.js +1 -1
  342. package/locales/moment/mk.js +0 -1
  343. package/locales/moment/nl-be.js +1 -1
  344. package/locales/moment/pl.js +1 -1
  345. package/locales/moment/ps.js +188 -0
  346. package/locales/moment/pt-br.js +14 -6
  347. package/locales/moment/sv.js +1 -1
  348. package/locales/moment/sw.js +56 -14
  349. package/locales/moment/uk.js +5 -4
  350. package/locales/moment/uz-latn.js +1 -1
  351. package/locales/moment/uz.js +1 -1
  352. package/npm-shrinkwrap.json +2 -2
  353. package/oAuth/bundles/index.umd.js +326 -483
  354. package/oAuth/fesm2022/index.mjs +267 -429
  355. package/oAuth/fesm2022/index.mjs.map +1 -1
  356. package/oAuth/types/index.d.ts +22 -26
  357. package/package-lock.json +2 -2
  358. package/package.json +1 -1
  359. package/runtime/base/bundles/index.umd.js +6380 -6093
  360. package/runtime/base/fesm2022/index.mjs +6368 -6107
  361. package/runtime/base/fesm2022/index.mjs.map +1 -1
  362. package/runtime/base/types/index.d.ts +1336 -1359
  363. package/runtime/dynamic/bundles/index.umd.js +1215 -851
  364. package/runtime/dynamic/fesm2022/index.mjs +1253 -898
  365. package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  366. package/runtime/dynamic/types/index.d.ts +140 -128
  367. package/scripts/datatable/datatable.js +20 -30
  368. package/security/bundles/index.umd.js +297 -438
  369. package/security/fesm2022/index.mjs +282 -443
  370. package/security/fesm2022/index.mjs.map +1 -1
  371. package/security/types/index.d.ts +127 -130
  372. package/swipey/bundles/index.umd.js +57 -48
  373. package/swipey/fesm2022/index.mjs +55 -50
  374. package/swipey/fesm2022/index.mjs.map +1 -1
  375. package/swipey/types/index.d.ts +19 -21
  376. package/transpiler/bundles/index.umd.js +1174 -811
  377. package/transpiler/fesm2022/index.mjs +1109 -757
  378. package/transpiler/fesm2022/index.mjs.map +1 -1
  379. package/transpiler/types/index.d.ts +32 -36
  380. package/variables/bundles/index.umd.js +2226 -3245
  381. package/variables/fesm2022/index.mjs +2117 -3237
  382. package/variables/fesm2022/index.mjs.map +1 -1
  383. package/variables/types/index.d.ts +410 -393
  384. package/build-task/.npmignore +0 -2
  385. package/components/advanced/carousel/.npmignore +0 -2
  386. package/components/advanced/custom/.npmignore +0 -2
  387. package/components/advanced/login/.npmignore +0 -2
  388. package/components/advanced/marquee/.npmignore +0 -2
  389. package/components/base/.npmignore +0 -2
  390. package/components/basic/anchor/.npmignore +0 -2
  391. package/components/basic/audio/.npmignore +0 -2
  392. package/components/basic/html/.npmignore +0 -2
  393. package/components/basic/icon/.npmignore +0 -2
  394. package/components/basic/iframe/.npmignore +0 -2
  395. package/components/basic/label/.npmignore +0 -2
  396. package/components/basic/picture/.npmignore +0 -2
  397. package/components/basic/progress/progress-bar/.npmignore +0 -2
  398. package/components/basic/progress/progress-circle/.npmignore +0 -2
  399. package/components/basic/progress/progress-utils/.npmignore +0 -2
  400. package/components/basic/rich-text-editor/.npmignore +0 -2
  401. package/components/basic/search/.npmignore +0 -2
  402. package/components/basic/spinner/.npmignore +0 -2
  403. package/components/basic/tree/.npmignore +0 -2
  404. package/components/basic/video/.npmignore +0 -2
  405. package/components/chart/.npmignore +0 -2
  406. package/components/containers/accordion/.npmignore +0 -2
  407. package/components/containers/layout-grid/.npmignore +0 -2
  408. package/components/containers/linear-layout/.npmignore +0 -2
  409. package/components/containers/panel/.npmignore +0 -2
  410. package/components/containers/tabs/.npmignore +0 -2
  411. package/components/containers/tile/.npmignore +0 -2
  412. package/components/containers/wizard/.npmignore +0 -2
  413. package/components/data/card/.npmignore +0 -2
  414. package/components/data/form/.npmignore +0 -2
  415. package/components/data/list/.npmignore +0 -2
  416. package/components/data/live-table/.npmignore +0 -2
  417. package/components/data/pagination/.npmignore +0 -2
  418. package/components/data/table/.npmignore +0 -2
  419. package/components/dialogs/alert-dialog/.npmignore +0 -2
  420. package/components/dialogs/confirm-dialog/.npmignore +0 -2
  421. package/components/dialogs/default/.npmignore +0 -2
  422. package/components/dialogs/design-dialog/.npmignore +0 -2
  423. package/components/dialogs/iframe-dialog/.npmignore +0 -2
  424. package/components/dialogs/login-dialog/.npmignore +0 -2
  425. package/components/dialogs/partial-dialog/.npmignore +0 -2
  426. package/components/input/base-form/.npmignore +0 -2
  427. package/components/input/base-form-custom/.npmignore +0 -2
  428. package/components/input/button/.npmignore +0 -2
  429. package/components/input/button-group/.npmignore +0 -2
  430. package/components/input/calendar/.npmignore +0 -2
  431. package/components/input/caption-position/.npmignore +0 -2
  432. package/components/input/checkbox/.npmignore +0 -2
  433. package/components/input/checkboxset/.npmignore +0 -2
  434. package/components/input/chips/.npmignore +0 -2
  435. package/components/input/color-picker/.npmignore +0 -2
  436. package/components/input/composite/.npmignore +0 -2
  437. package/components/input/currency/.npmignore +0 -2
  438. package/components/input/dataset-aware-form/.npmignore +0 -2
  439. package/components/input/epoch/base-date-time/.npmignore +0 -2
  440. package/components/input/epoch/date/.npmignore +0 -2
  441. package/components/input/epoch/date-time/.npmignore +0 -2
  442. package/components/input/epoch/date-time-picker/.npmignore +0 -2
  443. package/components/input/epoch/picker/.npmignore +0 -2
  444. package/components/input/epoch/time/.npmignore +0 -2
  445. package/components/input/file-upload/.npmignore +0 -2
  446. package/components/input/number/.npmignore +0 -2
  447. package/components/input/radioset/.npmignore +0 -2
  448. package/components/input/rating/.npmignore +0 -2
  449. package/components/input/select/.npmignore +0 -2
  450. package/components/input/slider/.npmignore +0 -2
  451. package/components/input/switch/.npmignore +0 -2
  452. package/components/input/text/.npmignore +0 -2
  453. package/components/input/textarea/.npmignore +0 -2
  454. package/components/navigation/breadcrumb/.npmignore +0 -2
  455. package/components/navigation/menu/.npmignore +0 -2
  456. package/components/navigation/navbar/.npmignore +0 -2
  457. package/components/navigation/popover/.npmignore +0 -2
  458. package/components/page/default/.npmignore +0 -2
  459. package/components/page/footer/.npmignore +0 -2
  460. package/components/page/header/.npmignore +0 -2
  461. package/components/page/left-panel/.npmignore +0 -2
  462. package/components/page/right-panel/.npmignore +0 -2
  463. package/components/page/top-nav/.npmignore +0 -2
  464. package/components/prefab/.npmignore +0 -2
  465. package/core/.npmignore +0 -2
  466. package/http/.npmignore +0 -2
  467. package/oAuth/.npmignore +0 -2
  468. package/runtime/base/.npmignore +0 -2
  469. package/runtime/dynamic/.npmignore +0 -2
  470. package/security/.npmignore +0 -2
  471. package/swipey/.npmignore +0 -2
  472. package/transpiler/.npmignore +0 -2
  473. package/variables/.npmignore +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../projects/oAuth/src/oAuth.utils.ts","../../../projects/oAuth/src/oAuth.service.ts","../../../projects/oAuth/src/index.ts"],"sourcesContent":["import { _WM_APP_PROJECT, isIE, getWmProjectProperties } from '@wm/core';\nimport {get, isUndefined} from \"lodash-es\";\n\nimport * as momentLib from 'moment';\nconst moment = momentLib.default || window['moment'];\ndeclare const jsSHA;\n\nconst accessTokenSuffix = '.access_token', pkceIdentifier = 'pkce', implicitIdentifier = 'implicit';\n\nlet code_verifier, redirectUri;\n\nexport const parseConfig = (serviceParams: any): any => {\n\n let val, param, config;\n const urlParams = serviceParams.urlParams;\n\n config = {\n url: 'services/oauth2/:providerId/authorizationUrl',\n method: 'GET'\n };\n\n /*To handle dynamic urls, append the serviceParams.config.url with the static url(i.e., config.url)*/\n if (serviceParams.config) {\n config.url = (serviceParams.config.url || '') + config.url;\n config.method = serviceParams.config.method || config.method;\n config.headers = config.headers || {};\n\n // TODO[Shubham] - change to for - of\n for (const key in serviceParams.config.headers) {\n val = serviceParams.config.headers[key];\n config.headers[key] = val;\n }\n }\n /* check for url parameters to replace the url */\n if (urlParams) {\n for (param in urlParams) {\n if (urlParams.hasOwnProperty(param)) {\n val = urlParams[param];\n if (!isUndefined(val) && val !== null) {\n config.url = config.url.replace(new RegExp(':' + param, 'g'), val);\n }\n }\n }\n }\n\n /* check for data */\n if (serviceParams.params) {\n config.params = serviceParams.params;\n }\n /* check for data */\n if (!isUndefined(serviceParams.data)) {\n config.data = serviceParams.data;\n }\n /* check for data parameters, written to support old service calls (.json calls) */\n if (serviceParams.dataParams) {\n config.data.params = serviceParams.dataParams;\n }\n /* check for headers */\n if (serviceParams.headers) {\n config.headers = serviceParams.headers;\n }\n\n /* set extra config flags */\n config.byPassResult = serviceParams.byPassResult;\n config.isDirectCall = serviceParams.isDirectCall;\n config.isExtURL = serviceParams.isExtURL;\n config.preventMultiple = serviceParams.preventMultiple;\n config.responseType = serviceParams.responseType;\n\n return config;\n};\n\nconst listeners = {},\n ACCESSTOKEN_PLACEHOLDERS = {\n 'STUDIO': 'WM_STUDIO_',\n 'RUN': 'WM_RUN_'\n },\n newWindowProps = 'width=400,height=600';\n\n/**\n * This function remove the accessToken for a provider\n * @param provider\n */\nexport const removeAccessToken = (provider) => {\n const accessTokenKey = getAccessTokenPlaceholder(provider);\n localStorage.removeItem(accessTokenKey);\n};\n\n/**\n * This function returns the accesstoken placeholder based on the studio or run mode for the project\n * @param provider\n * @returns {*}\n */\nfunction getAccessTokenPlaceholder(provider) {\n let accessTokenKey;\n accessTokenKey = ACCESSTOKEN_PLACEHOLDERS.RUN + _WM_APP_PROJECT.id + '_' + provider + accessTokenSuffix;\n return accessTokenKey;\n}\n\n/**\n * This function performs the fake local storage update, so the IE gets the latest token instead of returning the cached localStorageValue\n */\nfunction performFakeLocalStorageUpdate() {\n const dummy_key = 'dummy_key';\n localStorage.setItem(dummy_key, dummy_key);\n localStorage.removeItem(dummy_key);\n}\n\n/**\n * This function sets the accessToken\n * @param provider\n * @param accesstoken\n */\nfunction setAccessToken(provider, accesstoken) {\n const accessTokenKey = getAccessTokenPlaceholder(provider);\n localStorage.setItem(accessTokenKey, accesstoken);\n}\n\n/**\n * this is a callback function to check if the authentication is done and invokes the successCallback\n * @param providerId\n * @param successCallback\n * @param evt\n */\nfunction checkAuthenticationStatus(providerId, successCallback, removeProviderConfigCallBack, evt, http?, securityObj?) {\n const accessTokenKey = providerId + accessTokenSuffix,\n accessTokenOrCode = localStorage.getItem(accessTokenKey);\n if (evt && evt.origin !== window.location.origin) {\n return;\n }\n if (accessTokenOrCode) {\n if (isPassedFlow(securityObj, pkceIdentifier)) {\n const req = 'client_id=' + securityObj.clientId + '&code=' + accessTokenOrCode + '&grant_type=authorization_code&code_verifier=' + code_verifier + '&redirect_uri=' + redirectUri;\n http.send({\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n url: securityObj.accessTokenUrl,\n data: req\n }).then(function(response) {\n triggerAccessTokenSuccessCallback(providerId, successCallback, removeProviderConfigCallBack, accessTokenKey, response.body.access_token);\n });\n } else {\n triggerAccessTokenSuccessCallback(providerId, successCallback, removeProviderConfigCallBack, accessTokenKey, accessTokenOrCode);\n }\n }\n}\n\n/**\n * function trigger the successCallback after getting the access token\n */\nfunction triggerAccessTokenSuccessCallback(providerId, successCallback, removeProviderConfigCallBack, accessTokenKey, token) {\n removeProviderConfigCallBack(providerId);\n localStorage.removeItem(accessTokenKey);\n setAccessToken(providerId, token);\n window.removeEventListener('message', listeners[providerId]);\n setTimeout(() => {\n delete listeners[providerId];\n if (successCallback) {\n successCallback(token);\n }\n });\n}\n\n/**\n * this function keeps on checking the accesstoken in the LocalStorage and updates it accordingly\n * @param providerId\n * @param onSuccess\n * @param onError\n * @param startTime\n * @param loginObj\n */\nfunction checkAccessTokenInWindow(providerId, onSuccess, onError, startTime, loginObj, removeProviderConfigCallBack) {\n performFakeLocalStorageUpdate();\n const currentTime = moment.duration(moment().format('HH:mm'), 'HH:mm' as any),\n timeDiff = currentTime.subtract(startTime),\n accessToken = getAccessToken(providerId, true);\n if (accessToken) {\n loginObj.accesstoken_retrieved = true;\n setAccessToken(providerId, accessToken);\n localStorage.removeItem(providerId + accessTokenSuffix);\n removeProviderConfigCallBack(providerId);\n if (onSuccess) {\n onSuccess();\n }\n } else if (timeDiff.minutes() > 1 && onSuccess && !loginObj.accesstoken_retrieved) {\n onSuccess('error');\n } else {\n setTimeout(() => {\n checkAccessTokenInWindow(providerId, onSuccess, onError, startTime, loginObj, removeProviderConfigCallBack);\n }, 3000);\n }\n}\n\n/**\n * checks for the window existence i.e if the window is manually closed by the user or any such\n * @param oAuthWindow\n * @param provider\n * @param callback\n */\nfunction checkForWindowExistence(oAuthWindow, provider, callback, providerInfo?) {\n if (oAuthWindow && listeners[provider]) {\n if (!oAuthWindow.closed) { // .closed is supported across major browser vendors however for IE the user has to enable protected mode from security options\n setTimeout(checkForWindowExistence.bind(undefined, oAuthWindow, provider, callback, providerInfo), 3000);\n } else \n if (!isPassedFlow(providerInfo, pkceIdentifier)) {\n window.removeEventListener('message', listeners[provider]);\n delete listeners[provider];\n if (callback) {\n callback('error');\n }\n }\n \n }\n}\n/**\n * this functions handles the logic related to the window operations in IE\n * @param url\n * @param providerId\n * @param onSuccess\n * @param onError\n */\nfunction handleLoginForIE(url, providerId, onSuccess, onError, removeProviderConfigCallBack, securityObj?, requestSourceType?, customUriScheme?, deployedURL?) {\n const loginObj = {\n 'accesstoken_retrieved': false\n };\n if (isPassedFlow(securityObj, implicitIdentifier)) {\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, null, customUriScheme, deployedURL);\n }\n window.open(url, '_blank', newWindowProps);\n checkAccessTokenInWindow(providerId, onSuccess, onError, moment.duration(moment().format('HH:mm'), 'HH:mm' as any), loginObj, removeProviderConfigCallBack);\n}\n\n/**\n * this functions returns if the current oAuth Flow matches the passed flow or not\n * @param providerInfo\n */\nfunction isPassedFlow(providerInfo, flow) {\n let oAuthFlow = get(providerInfo, 'oauth2Flow');\n oAuthFlow = oAuthFlow ? oAuthFlow.toLowerCase() : oAuthFlow;\n if (flow === pkceIdentifier) {\n if (get(providerInfo, 'oAuth2Pkce.enabled') === true) {\n oAuthFlow = pkceIdentifier;\n }\n }\n return oAuthFlow === flow;\n}\n\n/**\n * this function adds the listener on the window and assigns the listener\n * @param provider\n * @param callback\n */\nfunction onAuthWindowOpen(provider, callback, removeProviderConfigCallBack, http?, securityObj?) {\n listeners[provider] = checkAuthenticationStatus.bind(undefined, provider, callback, removeProviderConfigCallBack, null, http, securityObj);\n window.addEventListener('message', listeners[provider], false);\n}\n\n// Generate a secure random string using the browser crypto functions\nfunction generateRandomString() {\n const array = new Uint32Array(28);\n window.crypto.getRandomValues(array);\n return Array.from(array, dec => ('0' + dec.toString(16)).substr(-2)).join('');\n}\n\n// Returns a promise that resolves to an ArrayBuffer\nfunction getEncryptedCode(plain) {\n const encoder = new TextEncoder();\n const data = encoder.encode(plain);\n const shaObj = new jsSHA(\"SHA-256\", \"UINT8ARRAY\", { encoding: \"UTF8\" });\n shaObj.update(data);\n return shaObj.getHash(\"ARRAYBUFFER\");\n}\n\n// Base64-urlencodes the input string\nfunction base64urlencode(str) {\n // Convert the ArrayBuffer to string using Uint8 array to convert to what btoa accepts.\n // btoa accepts chars only within ascii 0-255 and base64 encodes them.\n // Then convert the base64 encoded to base64url encoded\n // (replace + with -, replace / with _, trim trailing =)\n return btoa(String.fromCharCode.apply(null, new Uint8Array(str)))\n .replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\n\n/**\n * this function is a callback function which enables the listener and checks for the window existence\n * @param providerId\n * @param onSuccess\n * @param url\n */\nfunction postGetAuthorizationURL(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj?, requestSourceType?, customUriScheme?, deployedURL?, http?) {\n if (isPassedFlow(securityObj, implicitIdentifier)) {\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, null, customUriScheme, deployedURL);\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n } else if (isPassedFlow(securityObj, pkceIdentifier)) {\n // Create and store a new PKCE code_verifier (the plaintext random secret)\n code_verifier = generateRandomString();\n let code_challenge;\n if (get(securityObj, 'oAuth2Pkce.challengeMethod') === 'plain') {\n code_challenge = code_verifier;\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, code_challenge, customUriScheme, deployedURL);\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n } else {\n const encryptedCode = getEncryptedCode(code_verifier);\n code_challenge = base64urlencode(encryptedCode);\n //code_challenge = encryptedCode;\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, code_challenge, customUriScheme, deployedURL);\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n\n }\n } else {\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n }\n}\n\nfunction startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj?, requestSourceType?, customUriScheme?, deployedURL?, http?) {\n let oAuthWindow;\n oAuthWindow = window.open(url, '_blank', newWindowProps);\n onAuthWindowOpen(providerId, onSuccess, removeProviderConfigCallBack, http, securityObj);\n checkForWindowExistence(oAuthWindow, providerId, onSuccess, securityObj);\n}\n\n/**\n * function to construct the url for implicit flow.\n * @param providerId provider id for which the url has to be set\n * @param providerInfo provider object which contains details such as scope, client id etc\n * @param requestSourceType requesting source is web or mobile\n * @returns url string\n */\nfunction constructURLForImplicitOrPKCE(providerId, providerInfo, requestSourceType, code_challenge, customUriScheme?, deployedURL?) {\n redirectUri = window.location.href.split('/#/')[0] + '/oAuthCallback.html';\n const clientId = providerInfo.clientId;\n const scopes = providerInfo.scopes.map(function(scope) { return scope.name }).join(' ');\n let state;\n if (getWmProjectProperties().isTestRuntime === true) {\n redirectUri = location.protocol + '//' + window.location.host + '/studio/oAuthCallback.html';\n }\n if (requestSourceType === 'MOBILE') {\n redirectUri = deployedURL + 'oAuthCallback.html';\n }\n const flow = isPassedFlow(providerInfo, implicitIdentifier) ? implicitIdentifier : pkceIdentifier;\n state = {providerId: providerId, suffix: accessTokenSuffix, requestSourceType: requestSourceType, flow: flow, scheme: customUriScheme};\n const authUrlArr = providerInfo.authorizationUrl.split('?');\n let connector;\n if (authUrlArr.length === 1) {\n //query params don't exist\n connector = '?';\n } else if (authUrlArr.length > 1 && authUrlArr[1] !== '') {\n //query params exist. Append & instead of ?.\n connector = '&';\n } else {\n //nothing exists after '?'. client_id can be directly appended;\n connector = '';\n }\n const commonUrl = providerInfo.authorizationUrl + connector + 'client_id=' + clientId + '&redirect_uri=' + redirectUri + '&state=' + encodeURIComponent(JSON.stringify(state)) + '&scope=' + encodeURIComponent(scopes);\n let url;\n if (flow === implicitIdentifier) {\n const responseType = providerInfo.responseType ? providerInfo.responseType : 'token';\n url = commonUrl + '&response_type=' + responseType;\n } else {\n url = commonUrl + '&response_type=code&code_challenge=' + code_challenge + '&code_challenge_method=' + get(providerInfo, 'oAuth2Pkce.challengeMethod');\n }\n return url;\n}\n\n/**\n * function to get the authorization url\n * @param params provider id for which the auth url has to be fetched\n * @param successCallback callback to be invoked upon successful fetch of the providers\n * @param failureCallback callback to be invoked upon error\n * @returns {*}\n */\nfunction getAuthorizationUrl(params, http) {\n const action = 'getAuthorizationUrl',\n serviceSettings = parseConfig({\n target: 'oauthConfiguration',\n action: action,\n urlParams: {\n projectId: _WM_APP_PROJECT.id,\n providerId: params.providerId\n },\n params: {\n 'requestSourceType': params.requestSourceType\n }\n });\n return http.send(serviceSettings);\n}\n\n/**\n * function trigger the addProviderConfigCallBack after getting the authorization url\n */\nfunction triggerProviderConfigCallBack(url, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL) {\n const urlBody = isPassedFlow(securityObj, implicitIdentifier) || isPassedFlow(securityObj, pkceIdentifier) ? url : url.body;\n addProviderConfigCallBack({\n name: providerId,\n url: urlBody,\n invoke: () => {\n if (isIE()) { // handling for IE\n handleLoginForIE(url, providerId, onSuccess, onError, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL);\n } else {\n postGetAuthorizationURL(urlBody, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n }\n }\n });\n}\n\n/**\n * this function retrieves the accessToken based on the run/studiomode\n * @param provider\n * @returns {*}\n */\nexport const getAccessToken = (provider, checkLocalStorage) => {\n const accessTokenKey = getAccessTokenPlaceholder(provider);\n if (checkLocalStorage) {\n return localStorage.getItem(provider + accessTokenSuffix);\n }\n return localStorage.getItem(accessTokenKey);\n};\n\n\n/**\n * this function is used to perform the authorization by opening the window and having active listeners\n * @param url\n * @param providerId\n * @param onSuccess\n * @returns {*}\n */\nexport const performAuthorization = (url, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj?, customUriScheme?, deployedURL?) => {\n let requestSourceType = 'WEB';\n if (url) {\n if (isIE()) { // handling for IE\n handleLoginForIE(url, providerId, onSuccess, onError, removeProviderConfigCallBack);\n } else {\n postGetAuthorizationURL(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, http);\n }\n } else \n if (isPassedFlow(securityObj, implicitIdentifier) || isPassedFlow(securityObj, pkceIdentifier)) {\n triggerProviderConfigCallBack(url, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL);\n } else {\n return getAuthorizationUrl({\n 'providerId': providerId,\n 'requestSourceType': requestSourceType\n }, http).then((response) => {\n triggerProviderConfigCallBack(response, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL);\n });\n }\n \n};\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { AbstractHttpService } from '@wm/core';\n\nimport { getAccessToken, performAuthorization, removeAccessToken } from './oAuth.utils';\nimport {find, remove} from \"lodash-es\";\n\n@Injectable()\nexport class OAuthService implements OnDestroy {\n constructor(private readonly httpService: AbstractHttpService) {}\n\n providers = new Subject();\n\n providersConfig: any = [];\n\n getOAuthProvidersAsObservable(): Observable<any> {\n return this.providers.asObservable();\n }\n\n addProviderConfig(provider) {\n if (!(find(this.providersConfig, {'name': provider.name}))) {\n this.providersConfig.push(provider);\n }\n this.providers.next(this.providersConfig);\n }\n\n removeProviderConfig(providerId) {\n remove<any>(this.providersConfig, provider => provider.name === providerId);\n this.providers.next(this.providersConfig);\n }\n\n perfromOAuthorization(url, providerId, onSuccess, onError, securityObj?, customUriScheme?, deployedURL?) {\n performAuthorization(url, providerId, onSuccess, onError, this.httpService, this.addProviderConfig.bind(this), this.removeProviderConfig.bind(this), securityObj, customUriScheme, deployedURL);\n }\n\n getAccessToken(provider, checkLocalStorage) {\n return getAccessToken(provider, checkLocalStorage);\n }\n\n removeAccessToken(provider) {\n removeAccessToken(provider);\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Complete Subject to release subscriptions\n if (this.providers) {\n this.providers.complete();\n this.providers = null;\n }\n\n // MEMORY LEAK FIX: Clear providers config array\n this.providersConfig = [];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAIA,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC;AAGpD,MAAM,iBAAiB,GAAG,eAAe,EAAE,cAAc,GAAG,MAAM,EAAE,kBAAkB,GAAG,UAAU;AAEnG,IAAI,aAAa,EAAE,WAAW;AAEvB,MAAM,WAAW,GAAG,CAAC,aAAkB,KAAS;AAEnD,IAAA,IAAI,GAAG,EAAE,KAAK,EAAE,MAAM;AACtB,IAAA,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS;AAEzC,IAAA,MAAM,GAAG;AACL,QAAA,GAAG,EAAE,8CAA8C;AACnD,QA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B,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;QACzB;;AAGA,QAAA,IAAI,CAAC,eAAe,GAAG,EAAE;IAC7B;+GA5CS,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAZ,YAAY,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../projects/oAuth/src/oAuth.utils.ts","../../../projects/oAuth/src/oAuth.service.ts"],"sourcesContent":["import { _WM_APP_PROJECT, isIE, getWmProjectProperties } from '@wm/core';\nimport {get, isUndefined} from \"lodash-es\";\n\nimport * as momentLib from 'moment';\nconst moment = momentLib.default || window['moment'];\ndeclare const jsSHA;\n\nconst accessTokenSuffix = '.access_token', pkceIdentifier = 'pkce', implicitIdentifier = 'implicit';\n\nlet code_verifier, redirectUri;\n\nexport const parseConfig = (serviceParams: any): any => {\n\n let val, param, config;\n const urlParams = serviceParams.urlParams;\n\n config = {\n url: 'services/oauth2/:providerId/authorizationUrl',\n method: 'GET'\n };\n\n /*To handle dynamic urls, append the serviceParams.config.url with the static url(i.e., config.url)*/\n if (serviceParams.config) {\n config.url = (serviceParams.config.url || '') + config.url;\n config.method = serviceParams.config.method || config.method;\n config.headers = config.headers || {};\n\n // TODO[Shubham] - change to for - of\n for (const key in serviceParams.config.headers) {\n val = serviceParams.config.headers[key];\n config.headers[key] = val;\n }\n }\n /* check for url parameters to replace the url */\n if (urlParams) {\n for (param in urlParams) {\n if (urlParams.hasOwnProperty(param)) {\n val = urlParams[param];\n if (!isUndefined(val) && val !== null) {\n config.url = config.url.replace(new RegExp(':' + param, 'g'), val);\n }\n }\n }\n }\n\n /* check for data */\n if (serviceParams.params) {\n config.params = serviceParams.params;\n }\n /* check for data */\n if (!isUndefined(serviceParams.data)) {\n config.data = serviceParams.data;\n }\n /* check for data parameters, written to support old service calls (.json calls) */\n if (serviceParams.dataParams) {\n config.data.params = serviceParams.dataParams;\n }\n /* check for headers */\n if (serviceParams.headers) {\n config.headers = serviceParams.headers;\n }\n\n /* set extra config flags */\n config.byPassResult = serviceParams.byPassResult;\n config.isDirectCall = serviceParams.isDirectCall;\n config.isExtURL = serviceParams.isExtURL;\n config.preventMultiple = serviceParams.preventMultiple;\n config.responseType = serviceParams.responseType;\n\n return config;\n};\n\nconst listeners = {},\n ACCESSTOKEN_PLACEHOLDERS = {\n 'STUDIO': 'WM_STUDIO_',\n 'RUN': 'WM_RUN_'\n },\n newWindowProps = 'width=400,height=600';\n\n/**\n * This function remove the accessToken for a provider\n * @param provider\n */\nexport const removeAccessToken = (provider) => {\n const accessTokenKey = getAccessTokenPlaceholder(provider);\n localStorage.removeItem(accessTokenKey);\n};\n\n/**\n * This function returns the accesstoken placeholder based on the studio or run mode for the project\n * @param provider\n * @returns {*}\n */\nfunction getAccessTokenPlaceholder(provider) {\n let accessTokenKey;\n accessTokenKey = ACCESSTOKEN_PLACEHOLDERS.RUN + _WM_APP_PROJECT.id + '_' + provider + accessTokenSuffix;\n return accessTokenKey;\n}\n\n/**\n * This function performs the fake local storage update, so the IE gets the latest token instead of returning the cached localStorageValue\n */\nfunction performFakeLocalStorageUpdate() {\n const dummy_key = 'dummy_key';\n localStorage.setItem(dummy_key, dummy_key);\n localStorage.removeItem(dummy_key);\n}\n\n/**\n * This function sets the accessToken\n * @param provider\n * @param accesstoken\n */\nfunction setAccessToken(provider, accesstoken) {\n const accessTokenKey = getAccessTokenPlaceholder(provider);\n localStorage.setItem(accessTokenKey, accesstoken);\n}\n\n/**\n * this is a callback function to check if the authentication is done and invokes the successCallback\n * @param providerId\n * @param successCallback\n * @param evt\n */\nfunction checkAuthenticationStatus(providerId, successCallback, removeProviderConfigCallBack, evt, http?, securityObj?) {\n const accessTokenKey = providerId + accessTokenSuffix,\n accessTokenOrCode = localStorage.getItem(accessTokenKey);\n // only the same-origin oAuthCallback page may trigger the token handoff\n if (evt && evt.origin !== window.location.origin) {\n return;\n }\n if (accessTokenOrCode) {\n if (isPassedFlow(securityObj, pkceIdentifier)) {\n const req = 'client_id=' + securityObj.clientId + '&code=' + accessTokenOrCode + '&grant_type=authorization_code&code_verifier=' + code_verifier + '&redirect_uri=' + redirectUri;\n http.send({\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n url: securityObj.accessTokenUrl,\n data: req\n }).then(function(response) {\n triggerAccessTokenSuccessCallback(providerId, successCallback, removeProviderConfigCallBack, accessTokenKey, response.body.access_token);\n }).catch(function(error) {\n console.error('OAuth: access token request failed for provider ' + providerId, error);\n });\n } else {\n triggerAccessTokenSuccessCallback(providerId, successCallback, removeProviderConfigCallBack, accessTokenKey, accessTokenOrCode);\n }\n }\n}\n\n/**\n * function trigger the successCallback after getting the access token\n */\nfunction triggerAccessTokenSuccessCallback(providerId, successCallback, removeProviderConfigCallBack, accessTokenKey, token) {\n removeProviderConfigCallBack(providerId);\n localStorage.removeItem(accessTokenKey);\n setAccessToken(providerId, token);\n window.removeEventListener('message', listeners[providerId]);\n setTimeout(() => {\n delete listeners[providerId];\n if (successCallback) {\n successCallback(token);\n }\n });\n}\n\n/**\n * this function keeps on checking the accesstoken in the LocalStorage and updates it accordingly\n * @param providerId\n * @param onSuccess\n * @param onError\n * @param startTime\n * @param loginObj\n */\nfunction checkAccessTokenInWindow(providerId, onSuccess, onError, startTime, loginObj, removeProviderConfigCallBack) {\n performFakeLocalStorageUpdate();\n const currentTime = moment.duration(moment().format('HH:mm'), 'HH:mm' as any),\n timeDiff = currentTime.subtract(startTime),\n accessToken = getAccessToken(providerId, true);\n if (accessToken) {\n loginObj.accesstoken_retrieved = true;\n setAccessToken(providerId, accessToken);\n localStorage.removeItem(providerId + accessTokenSuffix);\n removeProviderConfigCallBack(providerId);\n if (onSuccess) {\n onSuccess();\n }\n } else if (timeDiff.minutes() > 1 && onSuccess && !loginObj.accesstoken_retrieved) {\n onSuccess('error');\n } else {\n setTimeout(() => {\n checkAccessTokenInWindow(providerId, onSuccess, onError, startTime, loginObj, removeProviderConfigCallBack);\n }, 3000);\n }\n}\n\n/**\n * checks for the window existence i.e if the window is manually closed by the user or any such\n * @param oAuthWindow\n * @param provider\n * @param callback\n */\nfunction checkForWindowExistence(oAuthWindow, provider, callback, providerInfo?) {\n if (oAuthWindow && listeners[provider]) {\n if (!oAuthWindow.closed) { // .closed is supported across major browser vendors however for IE the user has to enable protected mode from security options\n setTimeout(checkForWindowExistence.bind(undefined, oAuthWindow, provider, callback, providerInfo), 3000);\n } else \n if (!isPassedFlow(providerInfo, pkceIdentifier)) {\n window.removeEventListener('message', listeners[provider]);\n delete listeners[provider];\n if (callback) {\n callback('error');\n }\n }\n \n }\n}\n/**\n * this functions handles the logic related to the window operations in IE\n * @param url\n * @param providerId\n * @param onSuccess\n * @param onError\n */\nfunction handleLoginForIE(url, providerId, onSuccess, onError, removeProviderConfigCallBack, securityObj?, requestSourceType?, customUriScheme?, deployedURL?) {\n const loginObj = {\n 'accesstoken_retrieved': false\n };\n if (isPassedFlow(securityObj, implicitIdentifier)) {\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, null, customUriScheme, deployedURL);\n }\n window.open(url, '_blank', newWindowProps);\n checkAccessTokenInWindow(providerId, onSuccess, onError, moment.duration(moment().format('HH:mm'), 'HH:mm' as any), loginObj, removeProviderConfigCallBack);\n}\n\n/**\n * this functions returns if the current oAuth Flow matches the passed flow or not\n * @param providerInfo\n */\nfunction isPassedFlow(providerInfo, flow) {\n let oAuthFlow = get(providerInfo, 'oauth2Flow');\n oAuthFlow = oAuthFlow ? oAuthFlow.toLowerCase() : oAuthFlow;\n if (flow === pkceIdentifier) {\n if (get(providerInfo, 'oAuth2Pkce.enabled') === true) {\n oAuthFlow = pkceIdentifier;\n }\n }\n return oAuthFlow === flow;\n}\n\n/**\n * this function adds the listener on the window and assigns the listener\n * @param provider\n * @param callback\n */\nfunction onAuthWindowOpen(provider, callback, removeProviderConfigCallBack, http?, securityObj?) {\n listeners[provider] = (evt: MessageEvent) => checkAuthenticationStatus(provider, callback, removeProviderConfigCallBack, evt, http, securityObj);\n window.addEventListener('message', listeners[provider], false);\n}\n\n// Generate a secure random string using the browser crypto functions\nfunction generateRandomString() {\n const array = new Uint32Array(28);\n window.crypto.getRandomValues(array);\n return Array.from(array, dec => ('0' + dec.toString(16)).substr(-2)).join('');\n}\n\n// Returns a promise that resolves to an ArrayBuffer\nfunction getEncryptedCode(plain) {\n const encoder = new TextEncoder();\n const data = encoder.encode(plain);\n const shaObj = new jsSHA(\"SHA-256\", \"UINT8ARRAY\", { encoding: \"UTF8\" });\n shaObj.update(data);\n return shaObj.getHash(\"ARRAYBUFFER\");\n}\n\n// Base64-urlencodes the input string\nfunction base64urlencode(str) {\n // Convert the ArrayBuffer to string using Uint8 array to convert to what btoa accepts.\n // btoa accepts chars only within ascii 0-255 and base64 encodes them.\n // Then convert the base64 encoded to base64url encoded\n // (replace + with -, replace / with _, trim trailing =)\n return btoa(String.fromCharCode.apply(null, new Uint8Array(str)))\n .replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\n\n/**\n * this function is a callback function which enables the listener and checks for the window existence\n * @param providerId\n * @param onSuccess\n * @param url\n */\nfunction postGetAuthorizationURL(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj?, requestSourceType?, customUriScheme?, deployedURL?, http?) {\n if (isPassedFlow(securityObj, implicitIdentifier)) {\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, null, customUriScheme, deployedURL);\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n } else if (isPassedFlow(securityObj, pkceIdentifier)) {\n // Create and store a new PKCE code_verifier (the plaintext random secret)\n code_verifier = generateRandomString();\n let code_challenge;\n if (get(securityObj, 'oAuth2Pkce.challengeMethod') === 'plain') {\n code_challenge = code_verifier;\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, code_challenge, customUriScheme, deployedURL);\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n } else {\n const encryptedCode = getEncryptedCode(code_verifier);\n code_challenge = base64urlencode(encryptedCode);\n //code_challenge = encryptedCode;\n url = constructURLForImplicitOrPKCE(providerId, securityObj, requestSourceType, code_challenge, customUriScheme, deployedURL);\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n\n }\n } else {\n startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n }\n}\n\nfunction startoAuthFlow(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj?, requestSourceType?, customUriScheme?, deployedURL?, http?) {\n let oAuthWindow;\n oAuthWindow = window.open(url, '_blank', newWindowProps);\n onAuthWindowOpen(providerId, onSuccess, removeProviderConfigCallBack, http, securityObj);\n checkForWindowExistence(oAuthWindow, providerId, onSuccess, securityObj);\n}\n\n/**\n * function to construct the url for implicit flow.\n * @param providerId provider id for which the url has to be set\n * @param providerInfo provider object which contains details such as scope, client id etc\n * @param requestSourceType requesting source is web or mobile\n * @returns url string\n */\nfunction constructURLForImplicitOrPKCE(providerId, providerInfo, requestSourceType, code_challenge, customUriScheme?, deployedURL?) {\n redirectUri = window.location.href.split('/#/')[0] + '/oAuthCallback.html';\n const clientId = providerInfo.clientId;\n const scopes = providerInfo.scopes.map(function(scope) { return scope.name }).join(' ');\n let state;\n if (getWmProjectProperties().isTestRuntime === true) {\n redirectUri = location.protocol + '//' + window.location.host + '/studio/oAuthCallback.html';\n }\n const flow = isPassedFlow(providerInfo, implicitIdentifier) ? implicitIdentifier : pkceIdentifier;\n state = {providerId: providerId, suffix: accessTokenSuffix, requestSourceType: requestSourceType, flow: flow, scheme: customUriScheme};\n const authUrlArr = providerInfo.authorizationUrl.split('?');\n let connector;\n if (authUrlArr.length === 1) {\n //query params don't exist\n connector = '?';\n } else if (authUrlArr.length > 1 && authUrlArr[1] !== '') {\n //query params exist. Append & instead of ?.\n connector = '&';\n } else {\n //nothing exists after '?'. client_id can be directly appended;\n connector = '';\n }\n const commonUrl = providerInfo.authorizationUrl + connector + 'client_id=' + clientId + '&redirect_uri=' + redirectUri + '&state=' + encodeURIComponent(JSON.stringify(state)) + '&scope=' + encodeURIComponent(scopes);\n let url;\n if (flow === implicitIdentifier) {\n const responseType = providerInfo.responseType ? providerInfo.responseType : 'token';\n url = commonUrl + '&response_type=' + responseType;\n } else {\n url = commonUrl + '&response_type=code&code_challenge=' + code_challenge + '&code_challenge_method=' + get(providerInfo, 'oAuth2Pkce.challengeMethod');\n }\n return url;\n}\n\n/**\n * function to get the authorization url\n * @param params provider id for which the auth url has to be fetched\n * @param successCallback callback to be invoked upon successful fetch of the providers\n * @param failureCallback callback to be invoked upon error\n * @returns {*}\n */\nfunction getAuthorizationUrl(params, http) {\n const action = 'getAuthorizationUrl',\n serviceSettings = parseConfig({\n target: 'oauthConfiguration',\n action: action,\n urlParams: {\n projectId: _WM_APP_PROJECT.id,\n providerId: params.providerId\n },\n params: {\n 'requestSourceType': params.requestSourceType\n }\n });\n return http.send(serviceSettings);\n}\n\n/**\n * function trigger the addProviderConfigCallBack after getting the authorization url\n */\nfunction triggerProviderConfigCallBack(url, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL) {\n const urlBody = isPassedFlow(securityObj, implicitIdentifier) || isPassedFlow(securityObj, pkceIdentifier) ? url : url.body;\n addProviderConfigCallBack({\n name: providerId,\n url: urlBody,\n invoke: () => {\n if (isIE()) { // handling for IE\n handleLoginForIE(url, providerId, onSuccess, onError, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL);\n } else {\n postGetAuthorizationURL(urlBody, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n }\n }\n });\n}\n\n/**\n * this function retrieves the accessToken based on the run/studiomode\n * @param provider\n * @returns {*}\n */\nexport const getAccessToken = (provider, checkLocalStorage) => {\n const accessTokenKey = getAccessTokenPlaceholder(provider);\n if (checkLocalStorage) {\n return localStorage.getItem(provider + accessTokenSuffix);\n }\n return localStorage.getItem(accessTokenKey);\n};\n\n\n/**\n * this function is used to perform the authorization by opening the window and having active listeners\n * @param url\n * @param providerId\n * @param onSuccess\n * @returns {*}\n */\nexport const performAuthorization = (url, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj?, customUriScheme?, deployedURL?) => {\n let requestSourceType = 'WEB';\n if (url) {\n if (isIE()) { // handling for IE\n handleLoginForIE(url, providerId, onSuccess, onError, removeProviderConfigCallBack);\n } else {\n postGetAuthorizationURL(url, providerId, onSuccess, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL, http);\n }\n } else \n if (isPassedFlow(securityObj, implicitIdentifier) || isPassedFlow(securityObj, pkceIdentifier)) {\n triggerProviderConfigCallBack(url, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL);\n } else {\n return getAuthorizationUrl({\n 'providerId': providerId,\n 'requestSourceType': requestSourceType\n }, http).then((response) => {\n triggerProviderConfigCallBack(response, providerId, onSuccess, onError, http, addProviderConfigCallBack, removeProviderConfigCallBack, securityObj, requestSourceType, customUriScheme, deployedURL);\n });\n }\n \n};\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { AbstractHttpService } from '@wm/core';\n\nimport { getAccessToken, performAuthorization, removeAccessToken } from './oAuth.utils';\nimport {find, remove} from \"lodash-es\";\n\n@Injectable()\nexport class OAuthService implements OnDestroy {\n constructor(private readonly httpService: AbstractHttpService) {}\n\n providers = new Subject();\n\n providersConfig: any = [];\n\n getOAuthProvidersAsObservable(): Observable<any> {\n return this.providers.asObservable();\n }\n\n addProviderConfig(provider) {\n if (!(find(this.providersConfig, {'name': provider.name}))) {\n this.providersConfig.push(provider);\n }\n this.providers.next(this.providersConfig);\n }\n\n removeProviderConfig(providerId) {\n remove<any>(this.providersConfig, provider => provider.name === providerId);\n this.providers.next(this.providersConfig);\n }\n\n perfromOAuthorization(url, providerId, onSuccess, onError, securityObj?, customUriScheme?, deployedURL?) {\n performAuthorization(url, providerId, onSuccess, onError, this.httpService, this.addProviderConfig.bind(this), this.removeProviderConfig.bind(this), securityObj, customUriScheme, deployedURL);\n }\n\n getAccessToken(provider, checkLocalStorage) {\n return getAccessToken(provider, checkLocalStorage);\n }\n\n removeAccessToken(provider) {\n removeAccessToken(provider);\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Complete Subject to release subscriptions\n if (this.providers) {\n this.providers.complete();\n this.providers = null;\n }\n\n // MEMORY LEAK FIX: Clear providers config array\n this.providersConfig = [];\n }\n}\n"],"mappings":";;;;;;;AAIA,MAAM,SAAS,UAAU,WAAW,OAAO;AAG3C,MAAM,oBAAoB;AAAiB,MAAA,iBAAiB;AAAQ,MAAA,qBAAqB;AAEzF,IAAI;AAAe,IAAA;AAEnB,MAAa,eAAe,kBAA2B;CAEnD,IAAI,KAAK,OAAO;CAChB,MAAM,YAAY,cAAc;CAEhC,SAAS;EACL,KAAK;EACL,QAAQ;CACX;CAGD,IAAI,cAAc,QAAQ;EACtB,OAAO,OAAO,cAAc,OAAO,OAAO,MAAM,OAAO;EACvD,OAAO,SAAS,cAAc,OAAO,UAAU,OAAO;EACtD,OAAO,UAAU,OAAO,WAAW,CAAA;EAGnC,KAAK,MAAM,OAAO,cAAc,OAAO,SAAS;GAC5C,MAAM,cAAc,OAAO,QAAQ;GACnC,OAAO,QAAQ,OAAO;EAC1B;CACJ;CAEA,IAAI,WACA;OAAK,SAAS,WACV,IA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GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAZ;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;EAAY,CAAA;CAAA;;AAAZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA,EADxB,MAAA,WAAA,CAAA"}
@@ -1,36 +1,34 @@
1
- import * as i0 from '@angular/core';
2
- import { OnDestroy } from '@angular/core';
3
- import { Subject, Observable } from 'rxjs';
4
- import { AbstractHttpService } from '@wm/core';
5
-
6
- declare class OAuthService implements OnDestroy {
7
- private readonly httpService;
8
- constructor(httpService: AbstractHttpService);
9
- providers: Subject<unknown>;
10
- providersConfig: any;
11
- getOAuthProvidersAsObservable(): Observable<any>;
12
- addProviderConfig(provider: any): void;
13
- removeProviderConfig(providerId: any): void;
14
- perfromOAuthorization(url: any, providerId: any, onSuccess: any, onError: any, securityObj?: any, customUriScheme?: any, deployedURL?: any): void;
15
- getAccessToken(provider: any, checkLocalStorage: any): string;
16
- removeAccessToken(provider: any): void;
17
- ngOnDestroy(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<OAuthService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<OAuthService>;
1
+ import * as i0 from "@angular/core";
2
+ import { OnDestroy } from "@angular/core";
3
+ import { Observable, Subject } from "rxjs";
4
+ import { AbstractHttpService } from "@wm/core";
5
+ export declare class OAuthService implements OnDestroy {
6
+ private readonly httpService;
7
+ constructor(httpService: AbstractHttpService);
8
+ providers: Subject<unknown>;
9
+ providersConfig: any;
10
+ getOAuthProvidersAsObservable(): Observable<any>;
11
+ addProviderConfig(provider: any): void;
12
+ removeProviderConfig(providerId: any): void;
13
+ perfromOAuthorization(url: any, providerId: any, onSuccess: any, onError: any, securityObj?: any, customUriScheme?: any, deployedURL?: any): void;
14
+ getAccessToken(provider: any, checkLocalStorage: any): string;
15
+ removeAccessToken(provider: any): void;
16
+ ngOnDestroy(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<OAuthService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
20
19
  }
21
-
22
- declare const parseConfig: (serviceParams: any) => any;
20
+ export declare const parseConfig: (serviceParams: any) => any;
23
21
  /**
24
22
  * This function remove the accessToken for a provider
25
23
  * @param provider
26
24
  */
27
- declare const removeAccessToken: (provider: any) => void;
25
+ export declare const removeAccessToken: (provider: any) => void;
28
26
  /**
29
27
  * this function retrieves the accessToken based on the run/studiomode
30
28
  * @param provider
31
29
  * @returns {*}
32
30
  */
33
- declare const getAccessToken: (provider: any, checkLocalStorage: any) => string;
31
+ export declare const getAccessToken: (provider: any, checkLocalStorage: any) => string;
34
32
  /**
35
33
  * this function is used to perform the authorization by opening the window and having active listeners
36
34
  * @param url
@@ -38,6 +36,4 @@ declare const getAccessToken: (provider: any, checkLocalStorage: any) => string;
38
36
  * @param onSuccess
39
37
  * @returns {*}
40
38
  */
41
- declare const performAuthorization: (url: any, providerId: any, onSuccess: any, onError: any, http: any, addProviderConfigCallBack: any, removeProviderConfigCallBack: any, securityObj?: any, customUriScheme?: any, deployedURL?: any) => any;
42
-
43
- export { OAuthService, getAccessToken, parseConfig, performAuthorization, removeAccessToken };
39
+ export declare const performAuthorization: (url: any, providerId: any, onSuccess: any, onError: any, http: any, addProviderConfigCallBack: any, removeProviderConfigCallBack: any, securityObj?: any, customUriScheme?: any, deployedURL?: any) => any;
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@wavemaker-ai/app-ng-runtime",
3
- "version": "12.0.2-rc.647771",
3
+ "version": "12.1.0-rc.349",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker-ai/app-ng-runtime",
9
- "version": "12.0.2-rc.647771",
9
+ "version": "12.1.0-rc.349",
10
10
  "license": "MIT",
11
11
  "engines": {
12
12
  "node": ">=18.16.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker-ai/app-ng-runtime",
3
- "version": "12.0.2-rc.647771",
3
+ "version": "12.1.0-rc.349",
4
4
  "description": "All modules required for a WaveMaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {