@wavemaker-ai/app-ng-runtime 12.0.0-rc.335 → 12.0.1-rc.338

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 (351) hide show
  1. package/build-task/bundles/index.umd.js +15 -16
  2. package/build-task/fesm2022/index.mjs +15 -16
  3. package/build-task/fesm2022/index.mjs.map +1 -1
  4. package/components/advanced/carousel/bundles/index.umd.js +9 -9
  5. package/components/advanced/carousel/fesm2022/index.mjs +9 -9
  6. package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
  7. package/components/advanced/carousel/types/index.d.ts +7 -7
  8. package/components/advanced/custom/bundles/index.umd.js +9 -10
  9. package/components/advanced/custom/fesm2022/index.mjs +9 -10
  10. package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
  11. package/components/advanced/custom/types/index.d.ts +3 -3
  12. package/components/advanced/login/bundles/index.umd.js +3 -3
  13. package/components/advanced/login/fesm2022/index.mjs +3 -3
  14. package/components/advanced/login/fesm2022/index.mjs.map +1 -1
  15. package/components/advanced/login/types/index.d.ts +1 -1
  16. package/components/advanced/marquee/bundles/index.umd.js +3 -3
  17. package/components/advanced/marquee/fesm2022/index.mjs +3 -3
  18. package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
  19. package/components/advanced/marquee/types/index.d.ts +1 -1
  20. package/components/base/bundles/index.umd.js +40 -46
  21. package/components/base/fesm2022/index.mjs +40 -46
  22. package/components/base/fesm2022/index.mjs.map +1 -1
  23. package/components/base/types/index.d.ts +47 -46
  24. package/components/basic/anchor/bundles/index.umd.js +3 -3
  25. package/components/basic/anchor/fesm2022/index.mjs +3 -3
  26. package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
  27. package/components/basic/anchor/types/index.d.ts +3 -3
  28. package/components/basic/audio/bundles/index.umd.js +3 -3
  29. package/components/basic/audio/fesm2022/index.mjs +3 -3
  30. package/components/basic/audio/fesm2022/index.mjs.map +1 -1
  31. package/components/basic/audio/types/index.d.ts +1 -1
  32. package/components/basic/html/bundles/index.umd.js +10 -11
  33. package/components/basic/html/fesm2022/index.mjs +10 -11
  34. package/components/basic/html/fesm2022/index.mjs.map +1 -1
  35. package/components/basic/html/types/index.d.ts +3 -3
  36. package/components/basic/icon/bundles/index.umd.js +3 -3
  37. package/components/basic/icon/fesm2022/index.mjs +3 -3
  38. package/components/basic/icon/fesm2022/index.mjs.map +1 -1
  39. package/components/basic/icon/types/index.d.ts +1 -1
  40. package/components/basic/iframe/bundles/index.umd.js +5 -5
  41. package/components/basic/iframe/fesm2022/index.mjs +5 -5
  42. package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
  43. package/components/basic/iframe/types/index.d.ts +3 -3
  44. package/components/basic/label/bundles/index.umd.js +10 -11
  45. package/components/basic/label/fesm2022/index.mjs +10 -11
  46. package/components/basic/label/fesm2022/index.mjs.map +1 -1
  47. package/components/basic/label/types/index.d.ts +1 -1
  48. package/components/basic/picture/bundles/index.umd.js +3 -3
  49. package/components/basic/picture/fesm2022/index.mjs +3 -3
  50. package/components/basic/picture/fesm2022/index.mjs.map +1 -1
  51. package/components/basic/picture/types/index.d.ts +2 -2
  52. package/components/basic/progress/progress-bar/bundles/index.umd.js +8 -10
  53. package/components/basic/progress/progress-bar/fesm2022/index.mjs +8 -10
  54. package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
  55. package/components/basic/progress/progress-bar/types/index.d.ts +2 -2
  56. package/components/basic/progress/progress-circle/bundles/index.umd.js +3 -3
  57. package/components/basic/progress/progress-circle/fesm2022/index.mjs +3 -3
  58. package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
  59. package/components/basic/progress/progress-circle/types/index.d.ts +2 -2
  60. package/components/basic/rich-text-editor/bundles/index.umd.js +3 -3
  61. package/components/basic/rich-text-editor/fesm2022/index.mjs +3 -3
  62. package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  63. package/components/basic/rich-text-editor/types/index.d.ts +3 -3
  64. package/components/basic/search/bundles/index.umd.js +40 -42
  65. package/components/basic/search/fesm2022/index.mjs +40 -42
  66. package/components/basic/search/fesm2022/index.mjs.map +1 -1
  67. package/components/basic/search/types/index.d.ts +13 -13
  68. package/components/basic/spinner/bundles/index.umd.js +3 -3
  69. package/components/basic/spinner/fesm2022/index.mjs +3 -3
  70. package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
  71. package/components/basic/spinner/types/index.d.ts +3 -3
  72. package/components/basic/tree/bundles/index.umd.js +9 -9
  73. package/components/basic/tree/fesm2022/index.mjs +9 -9
  74. package/components/basic/tree/fesm2022/index.mjs.map +1 -1
  75. package/components/basic/tree/types/index.d.ts +7 -7
  76. package/components/basic/video/bundles/index.umd.js +3 -3
  77. package/components/basic/video/fesm2022/index.mjs +3 -3
  78. package/components/basic/video/fesm2022/index.mjs.map +1 -1
  79. package/components/basic/video/types/index.d.ts +2 -2
  80. package/components/chart/bundles/index.umd.js +19 -22
  81. package/components/chart/fesm2022/index.mjs +20 -23
  82. package/components/chart/fesm2022/index.mjs.map +1 -1
  83. package/components/chart/types/index.d.ts +9 -9
  84. package/components/containers/accordion/bundles/index.umd.js +10 -12
  85. package/components/containers/accordion/fesm2022/index.mjs +10 -12
  86. package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  87. package/components/containers/accordion/types/index.d.ts +9 -9
  88. package/components/containers/layout-grid/bundles/index.umd.js +9 -9
  89. package/components/containers/layout-grid/fesm2022/index.mjs +9 -9
  90. package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
  91. package/components/containers/layout-grid/types/index.d.ts +4 -4
  92. package/components/containers/linear-layout/bundles/index.umd.js +6 -6
  93. package/components/containers/linear-layout/fesm2022/index.mjs +6 -6
  94. package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
  95. package/components/containers/linear-layout/types/index.d.ts +2 -2
  96. package/components/containers/panel/bundles/index.umd.js +3 -3
  97. package/components/containers/panel/fesm2022/index.mjs +3 -3
  98. package/components/containers/panel/fesm2022/index.mjs.map +1 -1
  99. package/components/containers/panel/types/index.d.ts +3 -3
  100. package/components/containers/tabs/bundles/index.umd.js +9 -9
  101. package/components/containers/tabs/fesm2022/index.mjs +9 -9
  102. package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  103. package/components/containers/tabs/types/index.d.ts +8 -8
  104. package/components/containers/tile/bundles/index.umd.js +3 -3
  105. package/components/containers/tile/fesm2022/index.mjs +3 -3
  106. package/components/containers/tile/fesm2022/index.mjs.map +1 -1
  107. package/components/containers/tile/types/index.d.ts +1 -1
  108. package/components/containers/wizard/bundles/index.umd.js +18 -18
  109. package/components/containers/wizard/fesm2022/index.mjs +18 -18
  110. package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  111. package/components/containers/wizard/types/index.d.ts +8 -8
  112. package/components/data/card/bundles/index.umd.js +12 -12
  113. package/components/data/card/fesm2022/index.mjs +12 -12
  114. package/components/data/card/fesm2022/index.mjs.map +1 -1
  115. package/components/data/card/types/index.d.ts +6 -6
  116. package/components/data/form/bundles/index.umd.js +72 -75
  117. package/components/data/form/fesm2022/index.mjs +72 -77
  118. package/components/data/form/fesm2022/index.mjs.map +1 -1
  119. package/components/data/form/types/index.d.ts +29 -29
  120. package/components/data/list/bundles/index.umd.js +22 -27
  121. package/components/data/list/fesm2022/index.mjs +22 -27
  122. package/components/data/list/fesm2022/index.mjs.map +1 -1
  123. package/components/data/list/types/index.d.ts +23 -23
  124. package/components/data/live-table/bundles/index.umd.js +3 -3
  125. package/components/data/live-table/fesm2022/index.mjs +3 -3
  126. package/components/data/live-table/fesm2022/index.mjs.map +1 -1
  127. package/components/data/live-table/types/index.d.ts +5 -5
  128. package/components/data/pagination/bundles/index.umd.js +27 -28
  129. package/components/data/pagination/fesm2022/index.mjs +27 -28
  130. package/components/data/pagination/fesm2022/index.mjs.map +1 -1
  131. package/components/data/pagination/types/index.d.ts +1 -1
  132. package/components/data/table/bundles/index.umd.js +131 -142
  133. package/components/data/table/fesm2022/index.mjs +131 -143
  134. package/components/data/table/fesm2022/index.mjs.map +1 -1
  135. package/components/data/table/types/index.d.ts +20 -20
  136. package/components/dialogs/alert-dialog/bundles/index.umd.js +3 -3
  137. package/components/dialogs/alert-dialog/fesm2022/index.mjs +3 -3
  138. package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
  139. package/components/dialogs/alert-dialog/types/index.d.ts +1 -1
  140. package/components/dialogs/confirm-dialog/bundles/index.umd.js +3 -3
  141. package/components/dialogs/confirm-dialog/fesm2022/index.mjs +3 -3
  142. package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
  143. package/components/dialogs/confirm-dialog/types/index.d.ts +1 -1
  144. package/components/dialogs/default/bundles/index.umd.js +12 -12
  145. package/components/dialogs/default/fesm2022/index.mjs +12 -12
  146. package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  147. package/components/dialogs/default/types/index.d.ts +3 -3
  148. package/components/dialogs/design-dialog/bundles/index.umd.js +3 -3
  149. package/components/dialogs/design-dialog/fesm2022/index.mjs +3 -3
  150. package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
  151. package/components/dialogs/design-dialog/types/index.d.ts +1 -1
  152. package/components/dialogs/iframe-dialog/bundles/index.umd.js +3 -3
  153. package/components/dialogs/iframe-dialog/fesm2022/index.mjs +3 -3
  154. package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
  155. package/components/dialogs/iframe-dialog/types/index.d.ts +1 -1
  156. package/components/dialogs/login-dialog/bundles/index.umd.js +3 -3
  157. package/components/dialogs/login-dialog/fesm2022/index.mjs +3 -3
  158. package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
  159. package/components/dialogs/login-dialog/types/index.d.ts +2 -2
  160. package/components/dialogs/partial-dialog/bundles/index.umd.js +3 -3
  161. package/components/dialogs/partial-dialog/fesm2022/index.mjs +3 -3
  162. package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
  163. package/components/dialogs/partial-dialog/types/index.d.ts +1 -1
  164. package/components/input/base-form/bundles/index.umd.js +4 -4
  165. package/components/input/base-form/fesm2022/index.mjs +4 -4
  166. package/components/input/base-form/fesm2022/index.mjs.map +1 -1
  167. package/components/input/base-form-custom/bundles/index.umd.js +3 -3
  168. package/components/input/base-form-custom/fesm2022/index.mjs +3 -3
  169. package/components/input/button/bundles/index.umd.js +3 -3
  170. package/components/input/button/fesm2022/index.mjs +3 -3
  171. package/components/input/button/fesm2022/index.mjs.map +1 -1
  172. package/components/input/button/types/index.d.ts +1 -1
  173. package/components/input/button-group/bundles/index.umd.js +3 -3
  174. package/components/input/button-group/fesm2022/index.mjs +3 -3
  175. package/components/input/button-group/fesm2022/index.mjs.map +1 -1
  176. package/components/input/button-group/types/index.d.ts +1 -1
  177. package/components/input/calendar/bundles/index.umd.js +4 -4
  178. package/components/input/calendar/fesm2022/index.mjs +4 -5
  179. package/components/input/calendar/fesm2022/index.mjs.map +1 -1
  180. package/components/input/calendar/types/index.d.ts +9 -9
  181. package/components/input/caption-position/bundles/index.umd.js +5 -5
  182. package/components/input/caption-position/fesm2022/index.mjs +5 -5
  183. package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
  184. package/components/input/caption-position/types/index.d.ts +4 -4
  185. package/components/input/checkbox/bundles/index.umd.js +3 -3
  186. package/components/input/checkbox/fesm2022/index.mjs +3 -3
  187. package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
  188. package/components/input/checkbox/types/index.d.ts +2 -2
  189. package/components/input/checkboxset/bundles/index.umd.js +4 -4
  190. package/components/input/checkboxset/fesm2022/index.mjs +4 -4
  191. package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
  192. package/components/input/checkboxset/types/index.d.ts +2 -2
  193. package/components/input/chips/bundles/index.umd.js +5 -5
  194. package/components/input/chips/fesm2022/index.mjs +5 -5
  195. package/components/input/chips/fesm2022/index.mjs.map +1 -1
  196. package/components/input/chips/types/index.d.ts +14 -14
  197. package/components/input/color-picker/bundles/index.umd.js +3 -3
  198. package/components/input/color-picker/fesm2022/index.mjs +3 -3
  199. package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
  200. package/components/input/color-picker/types/index.d.ts +2 -2
  201. package/components/input/composite/bundles/index.umd.js +3 -3
  202. package/components/input/composite/fesm2022/index.mjs +3 -3
  203. package/components/input/composite/fesm2022/index.mjs.map +1 -1
  204. package/components/input/composite/types/index.d.ts +1 -1
  205. package/components/input/currency/bundles/index.umd.js +3 -3
  206. package/components/input/currency/fesm2022/index.mjs +3 -3
  207. package/components/input/currency/fesm2022/index.mjs.map +1 -1
  208. package/components/input/currency/types/index.d.ts +3 -3
  209. package/components/input/dataset-aware-form/bundles/index.umd.js +7 -7
  210. package/components/input/dataset-aware-form/fesm2022/index.mjs +7 -7
  211. package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
  212. package/components/input/dataset-aware-form/types/index.d.ts +1 -1
  213. package/components/input/epoch/base-date-time/bundles/index.umd.js +10 -15
  214. package/components/input/epoch/base-date-time/fesm2022/index.mjs +10 -15
  215. package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
  216. package/components/input/epoch/base-date-time/types/index.d.ts +2 -2
  217. package/components/input/epoch/date/bundles/index.umd.js +5 -5
  218. package/components/input/epoch/date/fesm2022/index.mjs +5 -5
  219. package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
  220. package/components/input/epoch/date/types/index.d.ts +4 -4
  221. package/components/input/epoch/date-time/bundles/index.umd.js +3 -3
  222. package/components/input/epoch/date-time/fesm2022/index.mjs +3 -3
  223. package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
  224. package/components/input/epoch/date-time/types/index.d.ts +8 -8
  225. package/components/input/epoch/date-time-picker/bundles/index.umd.js +8 -8
  226. package/components/input/epoch/date-time-picker/fesm2022/index.mjs +8 -8
  227. package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
  228. package/components/input/epoch/date-time-picker/types/index.d.ts +6 -7
  229. package/components/input/epoch/picker/bundles/index.umd.js +6 -6
  230. package/components/input/epoch/picker/fesm2022/index.mjs +6 -6
  231. package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
  232. package/components/input/epoch/time/bundles/index.umd.js +4 -5
  233. package/components/input/epoch/time/fesm2022/index.mjs +5 -6
  234. package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
  235. package/components/input/epoch/time/types/index.d.ts +4 -4
  236. package/components/input/file-upload/bundles/index.umd.js +4 -4
  237. package/components/input/file-upload/fesm2022/index.mjs +4 -4
  238. package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  239. package/components/input/file-upload/types/index.d.ts +5 -5
  240. package/components/input/number/bundles/index.umd.js +3 -3
  241. package/components/input/number/fesm2022/index.mjs +3 -3
  242. package/components/input/number/fesm2022/index.mjs.map +1 -1
  243. package/components/input/number/types/index.d.ts +1 -1
  244. package/components/input/radioset/bundles/index.umd.js +4 -4
  245. package/components/input/radioset/fesm2022/index.mjs +4 -4
  246. package/components/input/radioset/fesm2022/index.mjs.map +1 -1
  247. package/components/input/radioset/types/index.d.ts +2 -2
  248. package/components/input/rating/bundles/index.umd.js +9 -11
  249. package/components/input/rating/fesm2022/index.mjs +9 -11
  250. package/components/input/rating/fesm2022/index.mjs.map +1 -1
  251. package/components/input/rating/types/index.d.ts +2 -2
  252. package/components/input/select/bundles/index.umd.js +4 -4
  253. package/components/input/select/fesm2022/index.mjs +4 -4
  254. package/components/input/select/fesm2022/index.mjs.map +1 -1
  255. package/components/input/select/types/index.d.ts +1 -1
  256. package/components/input/slider/bundles/index.umd.js +3 -3
  257. package/components/input/slider/fesm2022/index.mjs +3 -3
  258. package/components/input/slider/fesm2022/index.mjs.map +1 -1
  259. package/components/input/slider/types/index.d.ts +1 -1
  260. package/components/input/switch/bundles/index.umd.js +3 -3
  261. package/components/input/switch/fesm2022/index.mjs +3 -3
  262. package/components/input/switch/fesm2022/index.mjs.map +1 -1
  263. package/components/input/switch/types/index.d.ts +1 -1
  264. package/components/input/text/bundles/index.umd.js +31 -35
  265. package/components/input/text/fesm2022/index.mjs +31 -35
  266. package/components/input/text/fesm2022/index.mjs.map +1 -1
  267. package/components/input/text/types/index.d.ts +12 -12
  268. package/components/input/textarea/bundles/index.umd.js +3 -3
  269. package/components/input/textarea/fesm2022/index.mjs +3 -3
  270. package/components/input/textarea/fesm2022/index.mjs.map +1 -1
  271. package/components/input/textarea/types/index.d.ts +2 -2
  272. package/components/navigation/breadcrumb/bundles/index.umd.js +3 -3
  273. package/components/navigation/breadcrumb/fesm2022/index.mjs +3 -3
  274. package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  275. package/components/navigation/breadcrumb/types/index.d.ts +4 -4
  276. package/components/navigation/menu/bundles/index.umd.js +25 -33
  277. package/components/navigation/menu/fesm2022/index.mjs +25 -33
  278. package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  279. package/components/navigation/menu/types/index.d.ts +21 -21
  280. package/components/navigation/navbar/bundles/index.umd.js +3 -3
  281. package/components/navigation/navbar/fesm2022/index.mjs +3 -3
  282. package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
  283. package/components/navigation/navbar/types/index.d.ts +1 -1
  284. package/components/navigation/popover/bundles/index.umd.js +4 -4
  285. package/components/navigation/popover/fesm2022/index.mjs +4 -4
  286. package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  287. package/components/navigation/popover/types/index.d.ts +4 -4
  288. package/components/page/default/bundles/index.umd.js +23 -23
  289. package/components/page/default/fesm2022/index.mjs +23 -23
  290. package/components/page/default/fesm2022/index.mjs.map +1 -1
  291. package/components/page/default/types/index.d.ts +14 -14
  292. package/components/page/footer/bundles/index.umd.js +3 -3
  293. package/components/page/footer/fesm2022/index.mjs +3 -3
  294. package/components/page/footer/fesm2022/index.mjs.map +1 -1
  295. package/components/page/footer/types/index.d.ts +1 -1
  296. package/components/page/header/bundles/index.umd.js +3 -3
  297. package/components/page/header/fesm2022/index.mjs +3 -3
  298. package/components/page/header/fesm2022/index.mjs.map +1 -1
  299. package/components/page/header/types/index.d.ts +1 -1
  300. package/components/page/left-panel/bundles/index.umd.js +5 -5
  301. package/components/page/left-panel/fesm2022/index.mjs +5 -5
  302. package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
  303. package/components/page/left-panel/types/index.d.ts +3 -3
  304. package/components/page/right-panel/bundles/index.umd.js +3 -3
  305. package/components/page/right-panel/fesm2022/index.mjs +3 -3
  306. package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
  307. package/components/page/right-panel/types/index.d.ts +1 -1
  308. package/components/page/top-nav/bundles/index.umd.js +3 -3
  309. package/components/page/top-nav/fesm2022/index.mjs +3 -3
  310. package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
  311. package/components/page/top-nav/types/index.d.ts +1 -1
  312. package/components/prefab/bundles/index.umd.js +7 -7
  313. package/components/prefab/fesm2022/index.mjs +7 -7
  314. package/components/prefab/fesm2022/index.mjs.map +1 -1
  315. package/components/prefab/types/index.d.ts +3 -3
  316. package/core/bundles/index.umd.js +84 -89
  317. package/core/fesm2022/index.mjs +84 -89
  318. package/core/fesm2022/index.mjs.map +1 -1
  319. package/core/types/index.d.ts +11 -11
  320. package/http/bundles/index.umd.js +6 -6
  321. package/http/fesm2022/index.mjs +6 -6
  322. package/http/fesm2022/index.mjs.map +1 -1
  323. package/http/types/index.d.ts +1 -1
  324. package/npm-shrinkwrap.json +2 -2
  325. package/oAuth/bundles/index.umd.js +17 -21
  326. package/oAuth/fesm2022/index.mjs +17 -21
  327. package/oAuth/fesm2022/index.mjs.map +1 -1
  328. package/oAuth/types/index.d.ts +1 -1
  329. package/package-lock.json +2 -2
  330. package/package.json +1 -1
  331. package/runtime/base/bundles/index.umd.js +253 -275
  332. package/runtime/base/fesm2022/index.mjs +253 -275
  333. package/runtime/base/fesm2022/index.mjs.map +1 -1
  334. package/runtime/base/types/index.d.ts +90 -96
  335. package/runtime/dynamic/bundles/index.umd.js +28 -28
  336. package/runtime/dynamic/fesm2022/index.mjs +28 -28
  337. package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  338. package/runtime/dynamic/types/index.d.ts +22 -22
  339. package/scripts/datatable/datatable.js +293 -271
  340. package/scripts/tree-keyboard-navigation/keyboard-navigation.js +68 -56
  341. package/security/bundles/index.umd.js +6 -6
  342. package/security/fesm2022/index.mjs +6 -6
  343. package/security/fesm2022/index.mjs.map +1 -1
  344. package/security/types/index.d.ts +5 -5
  345. package/transpiler/bundles/index.umd.js +3 -5
  346. package/transpiler/fesm2022/index.mjs +3 -5
  347. package/transpiler/fesm2022/index.mjs.map +1 -1
  348. package/variables/bundles/index.umd.js +69 -71
  349. package/variables/fesm2022/index.mjs +69 -72
  350. package/variables/fesm2022/index.mjs.map +1 -1
  351. package/variables/types/index.d.ts +9 -9
@@ -1,4 +1,42 @@
1
1
  (function ($) {
2
+ const LETTER_KEY_CODES = Array.from({ length: 26 }, (v, i) => i + 65);
3
+
4
+ function refreshTreeIcon(ele, treeicon) {
5
+ $(ele).addClass(treeicon);
6
+ }
7
+
8
+ function bindTreeIconRefreshOnClick(ele, treeicon) {
9
+ $(ele).on('click', function () {
10
+ setTimeout(() => refreshTreeIcon(ele, treeicon), 0);
11
+ });
12
+ }
13
+
14
+ function updateTreeIcons(treeicon) {
15
+ const eleClose = $('.app-tree li span.button.switch');
16
+ $(eleClose).map((idx, ele) => {
17
+ refreshTreeIcon(ele, treeicon);
18
+ bindTreeIconRefreshOnClick(ele, treeicon);
19
+ });
20
+ }
21
+
22
+ function matchesNodeAccessKey(node, keyCode) {
23
+ return 'accesskey' in node && node.accesskey.length && (node.accesskey.charCodeAt(0) & 95) === keyCode;
24
+ }
25
+
26
+ function findNodeMatchingLetterKey(zTree, rootNodes, keyCode) {
27
+ if (!LETTER_KEY_CODES.includes(keyCode & 95)) return null;
28
+
29
+ const nodes = zTree.transformToArray(rootNodes).filter(node => matchesNodeAccessKey(node, keyCode));
30
+ if (!nodes.length) return null;
31
+
32
+ const selectedNodes = zTree.getSelectedNodes();
33
+ if (!selectedNodes.length) return null;
34
+
35
+ if (selectedNodes[0] === nodes[0]) return null;
36
+
37
+ return nodes[0];
38
+ }
39
+
2
40
  /**
3
41
  * Dummy function to provide a placeholder for the destroy function
4
42
  */
@@ -23,12 +61,13 @@
23
61
  element = $(element);
24
62
  }
25
63
 
26
- var rootNodes = zTree.getNodes();
64
+ const rootNodes = zTree.getNodes();
27
65
  if (!rootNodes) return;
28
66
 
29
- var focusSelectedNode = function () {
30
- if ((selectedNodes = zTree.getSelectedNodes()) && selectedNodes.length) {
31
- $("#" + selectedNodes[0].tId).focus();
67
+ const focusSelectedNode = function () {
68
+ const currentSelectedNodes = zTree.getSelectedNodes();
69
+ if (currentSelectedNodes && currentSelectedNodes.length) {
70
+ $("#" + currentSelectedNodes[0].tId).focus();
32
71
  }
33
72
  }
34
73
 
@@ -43,44 +82,34 @@
43
82
  }
44
83
 
45
84
  $.fn.changeTreeIcons = function () {
46
- let eleClose = $('.app-tree li span.button.switch');
47
-
48
- $(eleClose).map((idx, ele) => {
49
- $(ele).addClass(treeicon);
50
- $(ele).on("click", function (e) {
51
- setTimeout(() => {
52
- $(ele).addClass(treeicon);
53
- }, 0);
54
- });
55
- })
85
+ updateTreeIcons(treeicon);
56
86
  }
57
87
 
58
-
59
88
  $(element).on('keydown', function (e) {
60
- var selectedNodes = zTree.getSelectedNodes();
61
- var selectedNode = selectedNodes.length ? selectedNodes[0] : null;
89
+ const selectedNodes = zTree.getSelectedNodes();
90
+ const selectedNode = selectedNodes.length ? selectedNodes[0] : null;
62
91
 
63
- var processSpace = function () {
92
+ const processSpace = function () {
64
93
  // If there are no nodes or the selected node is not a parent, get out
65
94
  if (selectedNode && selectedNode.isParent) {
66
95
  // Toggle the node
67
- zTree.expandNode(selectedNode, selectedNode.open ? false : true, true, true);
96
+ zTree.expandNode(selectedNode, !selectedNode.open, true, true);
68
97
  $.fn.changeTreeIcons()
69
98
  }
70
99
  }
71
100
 
72
- var processHome = function () {
101
+ const processHome = function () {
73
102
  zTree.selectNode(rootNodes[0], false, true);
74
103
  }
75
104
 
76
- var processEnd = function () {
77
- var nodes = zTree.transformToArray(rootNodes);
105
+ const processEnd = function () {
106
+ const nodes = zTree.transformToArray(rootNodes);
78
107
  // Select the last node
79
108
  zTree.selectNode(nodes[nodes.length - 1]);
80
109
  }
81
110
 
82
- var processUp = function () {
83
- var priorNode;
111
+ const processUp = function () {
112
+ let priorNode;
84
113
  if (selectedNode) {
85
114
  priorNode = selectedNode.getPreNode();
86
115
  if (!priorNode) return;
@@ -94,8 +123,8 @@
94
123
  zTree.selectNode(priorNode);
95
124
  }
96
125
 
97
- var processDown = function () {
98
- var nextNode;
126
+ const processDown = function () {
127
+ let nextNode;
99
128
  if (selectedNode) {
100
129
  nextNode = selectedNode.getNextNode();
101
130
  if (!nextNode) return;
@@ -109,11 +138,11 @@
109
138
  zTree.selectNode(nextNode);
110
139
  }
111
140
 
112
- var processOut = function () {
141
+ const processOut = function () {
113
142
  if (!selectedNode) return;
114
143
 
115
- var parentNode = selectedNode.getParentNode();
116
- var priorNode = selectedNode.getPreNode();
144
+ const parentNode = selectedNode.getParentNode();
145
+ let priorNode = selectedNode.getPreNode();
117
146
  if (!parentNode && !priorNode) return; // Must have been the root node
118
147
 
119
148
  if (priorNode) {
@@ -136,13 +165,13 @@
136
165
 
137
166
  // Find the parent node with a valid prior sibling
138
167
  if (parentNode) {
139
- // This call should be silent otherwise (in my view a bug in)
168
+ // This call should be silent otherwise (in my view a bug in)
140
169
  // selectNode causes the root node to blur
141
170
  zTree.selectNode(parentNode, false, true);
142
171
  }
143
172
  }
144
173
 
145
- var processIn = function () {
174
+ const processIn = function () {
146
175
  if (!selectedNode) return;
147
176
 
148
177
  if (selectedNode.isParent && selectedNode.open && selectedNode.children) {
@@ -150,16 +179,16 @@
150
179
  return;
151
180
  }
152
181
 
153
- var nextNode = selectedNode.getNextNode();
182
+ const nextNode = selectedNode.getNextNode();
154
183
  if (nextNode) {
155
184
  zTree.selectNode(nextNode);
156
185
  }
157
186
  else {
158
187
  // Cannot be root if there is a selected node that is not a parent
159
- var node = selectedNode;
188
+ let node = selectedNode;
160
189
  // Find the parent node with a valid next sibling
161
190
  while (node = node.getParentNode()) {
162
- var nextNode = node.getNextNode();
191
+ const nextNode = node.getNextNode();
163
192
  if (nextNode) {
164
193
  zTree.selectNode(nextNode);
165
194
  break;
@@ -168,29 +197,14 @@
168
197
  }
169
198
  }
170
199
 
171
- var processLetter = function (keyCode) {
172
- if (!Array.from({ length: 26 }, (v, i) => i + 65).includes(keyCode & 95)) return false;
173
-
174
- var nodes = zTree.transformToArray(rootNodes);
175
- nodes = nodes.filter(node => {
176
- return 'accesskey' in node && node.accesskey.length && (node.accesskey.charCodeAt(0) & 95) == keyCode;
177
- });
178
-
179
- if (!nodes.length) return false;
180
-
181
- var selectedNodes = zTree.getSelectedNodes();
182
- if (!selectedNodes.length) return false;
183
-
184
- if (selectedNodes[0] == nodes[0]) return false;
185
-
186
- zTree.selectNode(nodes[0]);
200
+ const processLetter = function (keyCode) {
201
+ const node = findNodeMatchingLetterKey(zTree, rootNodes, keyCode);
202
+ if (!node) return false;
187
203
 
204
+ zTree.selectNode(node);
188
205
  return true;
189
206
  }
190
207
 
191
- // console.log('before');
192
- // console.log(document.activeElement);
193
-
194
208
  switch (e.keyCode) {
195
209
  case 32: /* Toggle parent nodes */
196
210
  processSpace();
@@ -233,8 +247,6 @@
233
247
  break;
234
248
  }
235
249
 
236
- // console.log('after');
237
- // console.log(document.activeElement);
238
250
  focusSelectedNode();
239
251
  });
240
252
 
@@ -248,4 +260,4 @@
248
260
 
249
261
  }
250
262
 
251
- })(jQuery);
263
+ })(jQuery);
@@ -155,7 +155,7 @@
155
155
  }*/
156
156
  }
157
157
  getLastLoggedInUsername() {
158
- return this.lastLoggedInUser && this.lastLoggedInUser.userName;
158
+ return this.lastLoggedInUser?.userName;
159
159
  }
160
160
  /**
161
161
  * Returns the current page name
@@ -395,7 +395,7 @@
395
395
  getLoggedInUser() {
396
396
  return new Promise((resolve, reject) => {
397
397
  this.getConfig((config) => {
398
- if (config && config.userInfo) {
398
+ if (config?.userInfo) {
399
399
  resolve(config.userInfo);
400
400
  }
401
401
  else {
@@ -415,7 +415,7 @@
415
415
  ngOnDestroy() {
416
416
  // MEMORY LEAK FIX: Unsubscribe from all query params subscriptions
417
417
  this.queryParamsSubscriptions.forEach(sub => {
418
- if (sub && sub.unsubscribe) {
418
+ if (sub?.unsubscribe) {
419
419
  sub.unsubscribe();
420
420
  }
421
421
  });
@@ -434,10 +434,10 @@
434
434
  this.requestQueue = null;
435
435
  this.loadPromise = null;
436
436
  }
437
- static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0__namespace, type: SecurityService, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.AbstractHttpService }, { token: i2__namespace.Router }, { token: i2__namespace.ActivatedRoute }, { token: i3__namespace.Location }], target: i0__namespace.ɵɵFactoryTarget.Injectable }); }
438
- static { this.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0__namespace, type: SecurityService }); }
437
+ static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: SecurityService, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.AbstractHttpService }, { token: i2__namespace.Router }, { token: i2__namespace.ActivatedRoute }, { token: i3__namespace.Location }], target: i0__namespace.ɵɵFactoryTarget.Injectable }); }
438
+ static { this.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: SecurityService }); }
439
439
  }
440
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0__namespace, type: SecurityService, decorators: [{
440
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: SecurityService, decorators: [{
441
441
  type: i0.Injectable
442
442
  }], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i1__namespace.AbstractHttpService }, { type: i2__namespace.Router }, { type: i2__namespace.ActivatedRoute }, { type: i3__namespace.Location }] });
443
443
 
@@ -138,7 +138,7 @@ class SecurityService {
138
138
  }*/
139
139
  }
140
140
  getLastLoggedInUsername() {
141
- return this.lastLoggedInUser && this.lastLoggedInUser.userName;
141
+ return this.lastLoggedInUser?.userName;
142
142
  }
143
143
  /**
144
144
  * Returns the current page name
@@ -390,7 +390,7 @@ class SecurityService {
390
390
  getLoggedInUser() {
391
391
  return new Promise((resolve, reject) => {
392
392
  this.getConfig((config) => {
393
- if (config && config.userInfo) {
393
+ if (config?.userInfo) {
394
394
  resolve(config.userInfo);
395
395
  }
396
396
  else {
@@ -410,7 +410,7 @@ class SecurityService {
410
410
  ngOnDestroy() {
411
411
  // MEMORY LEAK FIX: Unsubscribe from all query params subscriptions
412
412
  this.queryParamsSubscriptions.forEach(sub => {
413
- if (sub && sub.unsubscribe) {
413
+ if (sub?.unsubscribe) {
414
414
  sub.unsubscribe();
415
415
  }
416
416
  });
@@ -429,10 +429,10 @@ class SecurityService {
429
429
  this.requestQueue = null;
430
430
  this.loadPromise = null;
431
431
  }
432
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: SecurityService, deps: [{ token: i0.Injector }, { token: i1.AbstractHttpService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Injectable }); }
433
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: SecurityService }); }
432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: SecurityService, deps: [{ token: i0.Injector }, { token: i1.AbstractHttpService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Injectable }); }
433
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: SecurityService }); }
434
434
  }
435
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: SecurityService, decorators: [{
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: SecurityService, decorators: [{
436
436
  type: Injectable
437
437
  }], ctorParameters: () => [{ type: i0.Injector }, { type: i1.AbstractHttpService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3.Location }] });
438
438
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../projects/security/src/security.service.ts","../../../projects/security/src/index.ts"],"sourcesContent":["import { Injectable, Injector, OnDestroy } from '@angular/core';\nimport { Location } from '@angular/common';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport {\n AbstractHttpService,\n App,\n getClonedObject,\n getWmProjectProperties,\n triggerFn\n} from '@wm/core';\nimport {each, forEach, get, isEmpty, join, set} from \"lodash-es\";\ndeclare const _WM_APP_PROPERTIES;\n// Todo[Shubham]: Move below constants to a common file\nconst XSRF_COOKIE_NAME = 'wm_xsrf_token',\n isApplicationType = true;\n\n@Injectable()\nexport class SecurityService implements OnDestroy {\n config;\n lastLoggedInUser;\n loggedInUser;\n loadPromise: Promise<any>;\n requestQueue: any = {};\n private queryParamsSubscriptions: Array<{ unsubscribe: () => void }> = []; // MEMORY LEAK FIX: Track subscriptions\n private appSubscriptions: Array<() => void> = []; // MEMORY LEAK FIX: Track App subscriptions\n\n constructor(\n private injector: Injector,\n private $http: AbstractHttpService,\n private routerService: Router,\n private activatedRoute: ActivatedRoute,\n private _location: Location\n ) {}\n\n isLoaded() {\n return this.config;\n }\n\n get() {\n return this.config;\n }\n\n load(forceFlag?: boolean) {\n if(this.loadPromise) {return this.loadPromise;}\n // Check securityEnabled flag in _WM_APP_PROPERTIES\n if (!_WM_APP_PROPERTIES?.securityEnabled) {\n return Promise.resolve(null);\n }\n if (!forceFlag && this.config) {return Promise.resolve(this.config);}\n this.loadPromise = new Promise((resolve, reject) => {\n this.$http.send({'url': 'services/security/info', 'method': 'GET'}).then((response) => {\n this.config = response.body;\n _WM_APP_PROPERTIES['securityInfo'] = this.config\n this.lastLoggedInUser = getClonedObject(this.loggedInUser);\n this.loggedInUser = this.config.userInfo;\n resolve(response.body);\n }).catch((err)=>{\n reject(err);\n }).finally(()=>{\n this.loadPromise = null;\n });\n });\n return this.loadPromise;\n }\n\n /**\n * gets the security config from the deployed app (backend call)\n * @param success\n * @param error\n */\n getWebConfig(success, error) {\n if (this.get()) {\n // if already fetched, return it\n triggerFn(success, this.get());\n return;\n }\n this.load()\n .then(config => {\n triggerFn(success, config);\n }, error);\n }\n\n /**\n * Returns security config\n * @param successCallback\n * @param failureCallback\n */\n getConfig(successCallback, failureCallback) {\n function invokeQueuedCallbacks(id, method, data) {\n forEach(this.requestQueue[id], fn => triggerFn(fn[method], data));\n this.requestQueue[id] = null;\n }\n\n function onSuccess(config) {\n config = config ? config : {}\n config.homePage = getWmProjectProperties().homePage;\n if (config.userInfo) {\n // Backend returns landingPage instead of homePage, hence this statement(for consistency)\n // config.userInfo.homePage = config.userInfo.landingPage;\n }\n this.config = config;\n this.lastLoggedInUser = getClonedObject(this.loggedInUser);\n this.loggedInUser = config.userInfo;\n invokeQueuedCallbacks.call(this, 'config', 'success', this.get());\n }\n\n function onError(error) {\n /*if ($rootScope.isMobileApplicationType) {\n this.config = {\n 'securityEnabled': false,\n 'authenticated': false,\n 'homePage': _WM_APP_PROPERTIES.homePage,\n 'userInfo': null,\n 'login': null\n };\n invokeQueuedCallbacks('config', 'success', this.get());\n } else {*/\n invokeQueuedCallbacks.call(this, 'config', 'error', error);\n // }\n }\n\n if (this.get()) {\n // if already fetched, return it\n triggerFn(successCallback, this.get());\n return;\n }\n\n // Queue check, if same queue is already in progress, do not send another request\n this.requestQueue.config = this.requestQueue.config || [];\n this.requestQueue.config.push({\n success: successCallback,\n error: failureCallback\n });\n if (this.requestQueue.config.length > 1) {\n return;\n }\n\n // for web project, return config returned from backend API call.\n this.getWebConfig(onSuccess.bind(this), onError.bind(this));\n /* else {\n /!*\n * for mobile app, first get the mobile config (saved in the apk)\n * - if security not enabled, just return mobile config (no backend call required)\n * - else, get Web config (will be the same API hit for login) and merge the config with _mobileconfig\n *!/\n getMobileConfig(function (mobileconfig) {\n if (!mobileconfig.securityEnabled) {\n onSuccess(mobileconfig);\n } else {\n getWebConfig(function (config) {\n config = mergeWebAndMobileConfig(config);\n onSuccess(config);\n }, function () {onSuccess(mobileconfig); });\n }\n }, onError);\n }*/\n }\n\n getLastLoggedInUsername() {\n return this.lastLoggedInUser && this.lastLoggedInUser.userName;\n }\n\n /**\n * Returns the current page name\n * @returns {string}\n */\n getCurrentRoutePage() {\n const p = this._location.path();\n let lIndex = p.indexOf('?');\n lIndex = lIndex === -1 ? p.length : lIndex - 1;\n return p.substr(1, lIndex); // ignore the query params\n }\n\n /**\n * Returns Query params for specified param name in current Route\n * @param paramName, the param name whose query param value is to be retrieved\n * @returns {any}\n */\n getCurrentRouteQueryParam(paramName) {\n let paramVal;\n // MEMORY LEAK FIX: Store subscription for cleanup (though this is a synchronous read)\n // Note: This method is called synchronously, so the subscription completes immediately\n // but we still store it to be safe\n const subscription = this.activatedRoute.queryParams.subscribe(params => {\n paramVal = params[paramName];\n });\n subscription.unsubscribe(); // Immediate unsubscribe since we only need first value\n return paramVal;\n }\n\n isNoPageLoaded() {\n return !isEmpty(this.getCurrentRoutePage());\n }\n\n getPageByLoggedInUser() {\n const that = this;\n return new Promise((resolve) => {\n let page;\n if (!isApplicationType) {\n if (that.isNoPageLoaded()) {\n page = getWmProjectProperties().homePage;\n resolve(page);\n }\n } else {\n that.getConfig((config) => {\n if (config.securityEnabled && config.authenticated) {\n page = config.userInfo.landingPage || getWmProjectProperties().homePage;\n // override the default xsrf cookie name and xsrf header names with WaveMaker specific values\n if (that.isXsrfEnabled()) {\n // this.$http.defaults.xsrfCookieName = XSRF_COOKIE;\n // this.$http.defaults.xsrfHeaderName = config.csrfHeaderName;\n }\n } else {\n page = getWmProjectProperties().homePage;\n }\n resolve(page);\n }, function () {\n resolve(getWmProjectProperties().homePage);\n });\n }\n });\n }\n\n /**\n * Loads the App page as follows:\n * Security disabled:\n * - Home page\n * Security enabled:\n * - User is logged in, respective landing page is loaded\n * - Not logged in:\n * - Home page is public, loads the home page\n * - Home page not public, Login page(in config) is loaded\n * @param forcePageLoad\n * @returns {Promise<T>}\n */\n loadPageByUserRole(forcePageLoad?) {\n const that = this;\n return this.getPageByLoggedInUser().then(page => {\n if (that.isNoPageLoaded() || forcePageLoad) {\n // Reload the page when current page and post login landing page are same\n if (that.getCurrentRoutePage() === page) {\n (window.location as any).reload();\n } else {\n that.routerService.navigate([`/${page}`]);\n }\n }\n });\n }\n\n /**\n * Navigates to the current user's homePage based on the config in SecurityService\n * Assumption is the SecurityService is updated with the latest security config before making call to this function\n */\n navigateOnLogin() {\n this.loadPageByUserRole(true);\n }\n\n /**\n * Gets the page which needs to be redirected to on successful login\n * @param config,\n * @param page, page name for redirection\n * @returns {any|string}\n */\n getRedirectPage(config, page?) {\n const homePage = getWmProjectProperties().homePage,\n loginPage = get(config, 'loginConfig.pageName');\n let prevRedirectPage,\n redirectPage = page || this.getCurrentRoutePage();\n\n // if user is already on Home page or Login page, they should not be redirected to that page, hence return undefined\n if (redirectPage === homePage || redirectPage === loginPage) {\n /*\n * find previous redirect page from URL, if exists, user should redirect to that page.\n * USE CASE:\n * user is on http://localhost:8080/app/#/Login?redirectTo=page\n * a variable call fails resulting 401\n * in this case, redirectTo page should be 'page' and not undefined\n */\n prevRedirectPage = this.getCurrentRouteQueryParam('redirectTo');\n redirectPage = !isEmpty(prevRedirectPage) ? prevRedirectPage : undefined;\n }\n\n return redirectPage;\n }\n\n /**\n * Returns all the query params(including page params and redirect to params) associated with redirected page\n */\n getRedirectedRouteQueryParams() {\n let queryParams = {};\n // MEMORY LEAK FIX: Store subscription for cleanup (though this is a synchronous read)\n // Note: This method is called synchronously, so the subscription completes immediately\n // but we still store it to be safe\n const subscription = this.activatedRoute.queryParams.subscribe((paramVal) => {\n forEach(paramVal, (val, key) => {\n queryParams[key] = val;\n });\n });\n subscription.unsubscribe(); // Immediate unsubscribe since we only need first value\n return queryParams;\n }\n\n // accepts query object like {a:1, b:2} and returns a=1&b=2 string\n getQueryString(queryObject) {\n const params = [];\n forEach(queryObject, function (value, key) {\n params.push(key + '=' + value);\n });\n return join(params, '&');\n }\n\n appLogin(params, successCallback, failureCallback) {\n let payload = '';\n\n // encode all parameters\n each(params, function (value, name) {\n payload += (payload ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\n });\n\n return this.$http.send({\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n url: 'j_spring_security_check',\n 'data': payload\n }).then((response) => {\n const xsrfCookieValue = response.body ? response.body[XSRF_COOKIE_NAME] : '';\n\n // override the default xsrf cookie name and xsrf header names with WaveMaker specific values\n if (xsrfCookieValue) {\n }\n // After the successful login in device, this function triggers the pending onLoginCallbacks.\n this.injector.get(App).notify('userLoggedIn', {});\n triggerFn(successCallback, response);\n }, failureCallback);\n }\n\n /**\n * The API is used to check if the user is authenticated in the RUN mode.\n *\n * @param {function} successCallback to be called on success\n * @param {function} failureCallback to be called on failure\n */\n isAuthenticated(successCallback, failureCallback) {\n this.getConfig(function (config) {\n triggerFn(successCallback, config.authenticated);\n }, failureCallback);\n }\n\n /**\n * The API is used to logout of the app.\n *\n * @param {function} successCallback to be called on success\n * @param {function} failureCallback to be called on failure\n */\n appLogout(successCallback, failureCallback) {\n return this.$http.send({\n target: 'Security',\n url: 'j_spring_security_logout',\n method: 'POST',\n responseType: 'text',\n byPassResult: true\n }).then((response) => {\n set(this.get(), 'authenticated', false);\n set(this.get(), 'userInfo', null);\n this.injector.get(App).notify('userLoggedOut', {});\n triggerFn(successCallback, response);\n }, failureCallback);\n }\n\n /**\n * Checks and return the cookie\n * @param name, cookie key\n * @returns {string}\n */\n 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 */\n isXsrfEnabled() {\n return this.getCookieByName(XSRF_COOKIE_NAME);\n }\n\n /**\n * This function returns a promise. Promise is resolved when security is\n * 1. disabled\n * 2. enabled and user is authenticated\n * 3. enabled and user is not authenticated, then promise is resolved on user login\n * @returns {*} promise\n */\n public onUserLogin(): Promise<any> {\n return new Promise<void>((resolve, reject) => {\n this.getConfig(config => {\n if (config.securityEnabled) {\n if (config.authenticated) {\n resolve();\n } else {\n // MEMORY LEAK FIX: Store unsubscribe function for cleanup\n const unsubscribe = this.injector.get(App).subscribe('userLoggedIn', () => {\n resolve();\n unsubscribe();\n // Remove from tracking array\n const index = this.appSubscriptions.indexOf(unsubscribe);\n if (index > -1) {\n this.appSubscriptions.splice(index, 1);\n }\n });\n this.appSubscriptions.push(unsubscribe);\n }\n } else {\n resolve();\n }\n }, reject);\n });\n }\n\n /**\n * @returns a promise that is resolved with logged-in-user\n */\n getLoggedInUser() {\n return new Promise<any>((resolve, reject) => {\n this.getConfig((config) => {\n if (config && config.userInfo) {\n resolve(config.userInfo);\n } else {\n reject();\n }\n }, reject);\n });\n }\n\n /**\n * This is for mobile apps to authenticate via browser.\n *\n * @returns a promise that is resolved after login\n */\n authInBrowser(): Promise<any> {\n return Promise.reject('This authInBrowser should not be called');\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Unsubscribe from all query params subscriptions\n this.queryParamsSubscriptions.forEach(sub => {\n if (sub && sub.unsubscribe) {\n sub.unsubscribe();\n }\n });\n this.queryParamsSubscriptions = [];\n\n // MEMORY LEAK FIX: Unsubscribe from all App subscriptions\n this.appSubscriptions.forEach(unsubscribe => {\n if (unsubscribe) {\n unsubscribe();\n }\n });\n this.appSubscriptions = [];\n\n // MEMORY LEAK FIX: Clear references\n this.config = null;\n this.lastLoggedInUser = null;\n this.loggedInUser = null;\n this.requestQueue = null;\n this.loadPromise = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAaA;AACA,MAAM,gBAAgB,GAAG,eAAe,EACpC,iBAAiB,GAAG,IAAI;MAGf,eAAe,CAAA;IASxB,WAAA,CACY,QAAkB,EAClB,KAA0B,EAC1B,aAAqB,EACrB,cAA8B,EAC9B,SAAmB,EAAA;QAJnB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,SAAS,GAAT,SAAS;QATrB,IAAA,CAAA,YAAY,GAAQ,EAAE;AACd,QAAA,IAAA,CAAA,wBAAwB,GAAuC,EAAE,CAAC;AAClE,QAAA,IAAA,CAAA,gBAAgB,GAAsB,EAAE,CAAC;IAQ9C;IAEH,QAAQ,GAAA;QACJ,OAAO,IAAI,CAAC,MAAM;IACtB;IAEA,GAAG,GAAA;QACC,OAAO,IAAI,CAAC,MAAM;IACtB;AAEA,IAAA,IAAI,CAAC,SAAmB,EAAA;AACpB,QAAA,IAAG,IAAI,CAAC,WAAW,EAAE;YAAC,OAAO,IAAI,CAAC,WAAW;QAAC;;AAE/C,QAAA,IAAI,CAAC,kBAAkB,EAAE,eAAe,EAAE;AACzC,YAAA,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;QAC5B;AACA,QAAA,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;YAAC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;QAAC;QACpE,IAAI,CAAC,WAAW,GAAG,IAAI,OAAO,CAA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,YAAY,GAAG,IAAI;AACxB,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI;IAC3B;+GArcS,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAf,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../projects/security/src/security.service.ts","../../../projects/security/src/index.ts"],"sourcesContent":["import { Injectable, Injector, OnDestroy } from '@angular/core';\nimport { Location } from '@angular/common';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport {\n AbstractHttpService,\n App,\n getClonedObject,\n getWmProjectProperties,\n triggerFn\n} from '@wm/core';\nimport {each, forEach, get, isEmpty, join, set} from \"lodash-es\";\ndeclare const _WM_APP_PROPERTIES;\n// Todo[Shubham]: Move below constants to a common file\nconst XSRF_COOKIE_NAME = 'wm_xsrf_token',\n isApplicationType = true;\n\n@Injectable()\nexport class SecurityService implements OnDestroy {\n config;\n lastLoggedInUser;\n loggedInUser;\n loadPromise: Promise<any>;\n requestQueue: any = {};\n private queryParamsSubscriptions: Array<{ unsubscribe: () => void }> = []; // MEMORY LEAK FIX: Track subscriptions\n private appSubscriptions: Array<() => void> = []; // MEMORY LEAK FIX: Track App subscriptions\n\n constructor(\n private readonly injector: Injector,\n private readonly $http: AbstractHttpService,\n private readonly routerService: Router,\n private readonly activatedRoute: ActivatedRoute,\n private readonly _location: Location\n ) {}\n\n isLoaded() {\n return this.config;\n }\n\n get() {\n return this.config;\n }\n\n load(forceFlag?: boolean) {\n if(this.loadPromise) {return this.loadPromise;}\n // Check securityEnabled flag in _WM_APP_PROPERTIES\n if (!_WM_APP_PROPERTIES?.securityEnabled) {\n return Promise.resolve(null);\n }\n if (!forceFlag && this.config) {return Promise.resolve(this.config);}\n this.loadPromise = new Promise((resolve, reject) => {\n this.$http.send({'url': 'services/security/info', 'method': 'GET'}).then((response) => {\n this.config = response.body;\n _WM_APP_PROPERTIES['securityInfo'] = this.config\n this.lastLoggedInUser = getClonedObject(this.loggedInUser);\n this.loggedInUser = this.config.userInfo;\n resolve(response.body);\n }).catch((err)=>{\n reject(err);\n }).finally(()=>{\n this.loadPromise = null;\n });\n });\n return this.loadPromise;\n }\n\n /**\n * gets the security config from the deployed app (backend call)\n * @param success\n * @param error\n */\n getWebConfig(success, error) {\n if (this.get()) {\n // if already fetched, return it\n triggerFn(success, this.get());\n return;\n }\n this.load()\n .then(config => {\n triggerFn(success, config);\n }, error);\n }\n\n /**\n * Returns security config\n * @param successCallback\n * @param failureCallback\n */\n getConfig(successCallback, failureCallback) {\n function invokeQueuedCallbacks(id, method, data) {\n forEach(this.requestQueue[id], fn => triggerFn(fn[method], data));\n this.requestQueue[id] = null;\n }\n\n function onSuccess(config) {\n config = config ? config : {}\n config.homePage = getWmProjectProperties().homePage;\n if (config.userInfo) {\n // Backend returns landingPage instead of homePage, hence this statement(for consistency)\n // config.userInfo.homePage = config.userInfo.landingPage;\n }\n this.config = config;\n this.lastLoggedInUser = getClonedObject(this.loggedInUser);\n this.loggedInUser = config.userInfo;\n invokeQueuedCallbacks.call(this, 'config', 'success', this.get());\n }\n\n function onError(error) {\n /*if ($rootScope.isMobileApplicationType) {\n this.config = {\n 'securityEnabled': false,\n 'authenticated': false,\n 'homePage': _WM_APP_PROPERTIES.homePage,\n 'userInfo': null,\n 'login': null\n };\n invokeQueuedCallbacks('config', 'success', this.get());\n } else {*/\n invokeQueuedCallbacks.call(this, 'config', 'error', error);\n // }\n }\n\n if (this.get()) {\n // if already fetched, return it\n triggerFn(successCallback, this.get());\n return;\n }\n\n // Queue check, if same queue is already in progress, do not send another request\n this.requestQueue.config = this.requestQueue.config || [];\n this.requestQueue.config.push({\n success: successCallback,\n error: failureCallback\n });\n if (this.requestQueue.config.length > 1) {\n return;\n }\n\n // for web project, return config returned from backend API call.\n this.getWebConfig(onSuccess.bind(this), onError.bind(this));\n /* else {\n /!*\n * for mobile app, first get the mobile config (saved in the apk)\n * - if security not enabled, just return mobile config (no backend call required)\n * - else, get Web config (will be the same API hit for login) and merge the config with _mobileconfig\n *!/\n getMobileConfig(function (mobileconfig) {\n if (!mobileconfig.securityEnabled) {\n onSuccess(mobileconfig);\n } else {\n getWebConfig(function (config) {\n config = mergeWebAndMobileConfig(config);\n onSuccess(config);\n }, function () {onSuccess(mobileconfig); });\n }\n }, onError);\n }*/\n }\n\n getLastLoggedInUsername() {\n return this.lastLoggedInUser?.userName;\n }\n\n /**\n * Returns the current page name\n * @returns {string}\n */\n getCurrentRoutePage() {\n const p = this._location.path();\n let lIndex = p.indexOf('?');\n lIndex = lIndex === -1 ? p.length : lIndex - 1;\n return p.substr(1, lIndex); // ignore the query params\n }\n\n /**\n * Returns Query params for specified param name in current Route\n * @param paramName, the param name whose query param value is to be retrieved\n * @returns {any}\n */\n getCurrentRouteQueryParam(paramName) {\n let paramVal;\n // MEMORY LEAK FIX: Store subscription for cleanup (though this is a synchronous read)\n // Note: This method is called synchronously, so the subscription completes immediately\n // but we still store it to be safe\n const subscription = this.activatedRoute.queryParams.subscribe(params => {\n paramVal = params[paramName];\n });\n subscription.unsubscribe(); // Immediate unsubscribe since we only need first value\n return paramVal;\n }\n\n isNoPageLoaded() {\n return !isEmpty(this.getCurrentRoutePage());\n }\n\n getPageByLoggedInUser() {\n const that = this;\n return new Promise((resolve) => {\n let page;\n if (!isApplicationType) {\n if (that.isNoPageLoaded()) {\n page = getWmProjectProperties().homePage;\n resolve(page);\n }\n } else {\n that.getConfig((config) => {\n if (config.securityEnabled && config.authenticated) {\n page = config.userInfo.landingPage || getWmProjectProperties().homePage;\n // override the default xsrf cookie name and xsrf header names with WaveMaker specific values\n if (that.isXsrfEnabled()) {\n // this.$http.defaults.xsrfCookieName = XSRF_COOKIE;\n // this.$http.defaults.xsrfHeaderName = config.csrfHeaderName;\n }\n } else {\n page = getWmProjectProperties().homePage;\n }\n resolve(page);\n }, function () {\n resolve(getWmProjectProperties().homePage);\n });\n }\n });\n }\n\n /**\n * Loads the App page as follows:\n * Security disabled:\n * - Home page\n * Security enabled:\n * - User is logged in, respective landing page is loaded\n * - Not logged in:\n * - Home page is public, loads the home page\n * - Home page not public, Login page(in config) is loaded\n * @param forcePageLoad\n * @returns {Promise<T>}\n */\n loadPageByUserRole(forcePageLoad?) {\n const that = this;\n return this.getPageByLoggedInUser().then(page => {\n if (that.isNoPageLoaded() || forcePageLoad) {\n // Reload the page when current page and post login landing page are same\n if (that.getCurrentRoutePage() === page) {\n (window.location as any).reload();\n } else {\n that.routerService.navigate([`/${page}`]);\n }\n }\n });\n }\n\n /**\n * Navigates to the current user's homePage based on the config in SecurityService\n * Assumption is the SecurityService is updated with the latest security config before making call to this function\n */\n navigateOnLogin() {\n this.loadPageByUserRole(true);\n }\n\n /**\n * Gets the page which needs to be redirected to on successful login\n * @param config,\n * @param page, page name for redirection\n * @returns {any|string}\n */\n getRedirectPage(config, page?) {\n const homePage = getWmProjectProperties().homePage,\n loginPage = get(config, 'loginConfig.pageName');\n let prevRedirectPage,\n redirectPage = page || this.getCurrentRoutePage();\n\n // if user is already on Home page or Login page, they should not be redirected to that page, hence return undefined\n if (redirectPage === homePage || redirectPage === loginPage) {\n /*\n * find previous redirect page from URL, if exists, user should redirect to that page.\n * USE CASE:\n * user is on http://localhost:8080/app/#/Login?redirectTo=page\n * a variable call fails resulting 401\n * in this case, redirectTo page should be 'page' and not undefined\n */\n prevRedirectPage = this.getCurrentRouteQueryParam('redirectTo');\n redirectPage = !isEmpty(prevRedirectPage) ? prevRedirectPage : undefined;\n }\n\n return redirectPage;\n }\n\n /**\n * Returns all the query params(including page params and redirect to params) associated with redirected page\n */\n getRedirectedRouteQueryParams() {\n let queryParams = {};\n // MEMORY LEAK FIX: Store subscription for cleanup (though this is a synchronous read)\n // Note: This method is called synchronously, so the subscription completes immediately\n // but we still store it to be safe\n const subscription = this.activatedRoute.queryParams.subscribe((paramVal) => {\n forEach(paramVal, (val, key) => {\n queryParams[key] = val;\n });\n });\n subscription.unsubscribe(); // Immediate unsubscribe since we only need first value\n return queryParams;\n }\n\n // accepts query object like {a:1, b:2} and returns a=1&b=2 string\n getQueryString(queryObject) {\n const params = [];\n forEach(queryObject, function (value, key) {\n params.push(key + '=' + value);\n });\n return join(params, '&');\n }\n\n appLogin(params, successCallback, failureCallback) {\n let payload = '';\n\n // encode all parameters\n each(params, function (value, name) {\n payload += (payload ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\n });\n\n return this.$http.send({\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n url: 'j_spring_security_check',\n 'data': payload\n }).then((response) => {\n const xsrfCookieValue = response.body ? response.body[XSRF_COOKIE_NAME] : '';\n\n // override the default xsrf cookie name and xsrf header names with WaveMaker specific values\n if (xsrfCookieValue) {\n }\n // After the successful login in device, this function triggers the pending onLoginCallbacks.\n this.injector.get(App).notify('userLoggedIn', {});\n triggerFn(successCallback, response);\n }, failureCallback);\n }\n\n /**\n * The API is used to check if the user is authenticated in the RUN mode.\n *\n * @param {function} successCallback to be called on success\n * @param {function} failureCallback to be called on failure\n */\n isAuthenticated(successCallback, failureCallback) {\n this.getConfig(function (config) {\n triggerFn(successCallback, config.authenticated);\n }, failureCallback);\n }\n\n /**\n * The API is used to logout of the app.\n *\n * @param {function} successCallback to be called on success\n * @param {function} failureCallback to be called on failure\n */\n appLogout(successCallback, failureCallback) {\n return this.$http.send({\n target: 'Security',\n url: 'j_spring_security_logout',\n method: 'POST',\n responseType: 'text',\n byPassResult: true\n }).then((response) => {\n set(this.get(), 'authenticated', false);\n set(this.get(), 'userInfo', null);\n this.injector.get(App).notify('userLoggedOut', {});\n triggerFn(successCallback, response);\n }, failureCallback);\n }\n\n /**\n * Checks and return the cookie\n * @param name, cookie key\n * @returns {string}\n */\n 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 */\n isXsrfEnabled() {\n return this.getCookieByName(XSRF_COOKIE_NAME);\n }\n\n /**\n * This function returns a promise. Promise is resolved when security is\n * 1. disabled\n * 2. enabled and user is authenticated\n * 3. enabled and user is not authenticated, then promise is resolved on user login\n * @returns {*} promise\n */\n public onUserLogin(): Promise<any> {\n return new Promise<void>((resolve, reject) => {\n this.getConfig(config => {\n if (config.securityEnabled) {\n if (config.authenticated) {\n resolve();\n } else {\n // MEMORY LEAK FIX: Store unsubscribe function for cleanup\n const unsubscribe = this.injector.get(App).subscribe('userLoggedIn', () => {\n resolve();\n unsubscribe();\n // Remove from tracking array\n const index = this.appSubscriptions.indexOf(unsubscribe);\n if (index > -1) {\n this.appSubscriptions.splice(index, 1);\n }\n });\n this.appSubscriptions.push(unsubscribe);\n }\n } else {\n resolve();\n }\n }, reject);\n });\n }\n\n /**\n * @returns a promise that is resolved with logged-in-user\n */\n getLoggedInUser() {\n return new Promise<any>((resolve, reject) => {\n this.getConfig((config) => {\n if (config?.userInfo) {\n resolve(config.userInfo);\n } else {\n reject();\n }\n }, reject);\n });\n }\n\n /**\n * This is for mobile apps to authenticate via browser.\n *\n * @returns a promise that is resolved after login\n */\n authInBrowser(): Promise<any> {\n return Promise.reject('This authInBrowser should not be called');\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Unsubscribe from all query params subscriptions\n this.queryParamsSubscriptions.forEach(sub => {\n if (sub?.unsubscribe) {\n sub.unsubscribe();\n }\n });\n this.queryParamsSubscriptions = [];\n\n // MEMORY LEAK FIX: Unsubscribe from all App subscriptions\n this.appSubscriptions.forEach(unsubscribe => {\n if (unsubscribe) {\n unsubscribe();\n }\n });\n this.appSubscriptions = [];\n\n // MEMORY LEAK FIX: Clear references\n this.config = null;\n this.lastLoggedInUser = null;\n this.loggedInUser = null;\n this.requestQueue = null;\n this.loadPromise = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAaA;AACA,MAAM,gBAAgB,GAAG,eAAe,EACpC,iBAAiB,GAAG,IAAI;MAGf,eAAe,CAAA;IASxB,WAAA,CACqB,QAAkB,EAClB,KAA0B,EAC1B,aAAqB,EACrB,cAA8B,EAC9B,SAAmB,EAAA;QAJnB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,SAAS,GAAT,SAAS;QAT9B,IAAA,CAAA,YAAY,GAAQ,EAAE;AACd,QAAA,IAAA,CAAA,wBAAwB,GAAuC,EAAE,CAAC;AAClE,QAAA,IAAA,CAAA,gBAAgB,GAAsB,EAAE,CAAC;IAQ9C;IAEH,QAAQ,GAAA;QACJ,OAAO,IAAI,CAAC,MAAM;IACtB;IAEA,GAAG,GAAA;QACC,OAAO,IAAI,CAAC,MAAM;IACtB;AAEA,IAAA,IAAI,CAAC,SAAmB,EAAA;AACpB,QAAA,IAAG,IAAI,CAAC,WAAW,EAAE;YAAC,OAAO,IAAI,CAAC,WAAW;QAAC;;AAE/C,QAAA,IAAI,CAAC,kBAAkB,EAAE,eAAe,EAAE;AACzC,YAAA,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;QAC5B;AACA,QAAA,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;YAAC,OAAO,OAAO,CAA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AAC,YAAY,GAAG,IAAI;AACxB,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI;AACxB,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI;IAC3B;+GArcS,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAf,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACjBD;;AAEG;;;;"}
@@ -5,11 +5,11 @@ import { Router, ActivatedRoute } from '@angular/router';
5
5
  import { AbstractHttpService } from '@wm/core';
6
6
 
7
7
  declare class SecurityService implements OnDestroy {
8
- private injector;
9
- private $http;
10
- private routerService;
11
- private activatedRoute;
12
- private _location;
8
+ private readonly injector;
9
+ private readonly $http;
10
+ private readonly routerService;
11
+ private readonly activatedRoute;
12
+ private readonly _location;
13
13
  config: any;
14
14
  lastLoggedInUser: any;
15
15
  loggedInUser: any;
@@ -692,10 +692,8 @@
692
692
  }
693
693
  markup += post(attrMap, shared, ...requiredProviders);
694
694
  }
695
- else {
696
- if (node.endSourceSpan && !compiler.getHtmlTagDefinition(node.name).isVoid) {
697
- markup += `</${nodeName}>`;
698
- }
695
+ else if (node.endSourceSpan && !compiler.getHtmlTagDefinition(node.name).isVoid) {
696
+ markup += `</${nodeName}>`;
699
697
  }
700
698
  }
701
699
  else if (node instanceof compiler.Text) {
@@ -703,7 +701,7 @@
703
701
  }
704
702
  else ;
705
703
  importCollector(WIDGET_IMPORTS.get(node.name));
706
- if (nodeDef && nodeDef.imports) {
704
+ if (nodeDef?.imports) {
707
705
  let imports = [];
708
706
  if (typeof nodeDef.imports === 'function') {
709
707
  imports = nodeDef.imports(attrMap);
@@ -691,10 +691,8 @@ const processNode = (node, importCollector, providers) => {
691
691
  }
692
692
  markup += post(attrMap, shared, ...requiredProviders);
693
693
  }
694
- else {
695
- if (node.endSourceSpan && !getHtmlTagDefinition(node.name).isVoid) {
696
- markup += `</${nodeName}>`;
697
- }
694
+ else if (node.endSourceSpan && !getHtmlTagDefinition(node.name).isVoid) {
695
+ markup += `</${nodeName}>`;
698
696
  }
699
697
  }
700
698
  else if (node instanceof Text) {
@@ -706,7 +704,7 @@ const processNode = (node, importCollector, providers) => {
706
704
  }
707
705
  }
708
706
  importCollector(WIDGET_IMPORTS.get(node.name));
709
- if (nodeDef && nodeDef.imports) {
707
+ if (nodeDef?.imports) {
710
708
  let imports = [];
711
709
  if (typeof nodeDef.imports === 'function') {
712
710
  imports = nodeDef.imports(attrMap);