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

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,939 +1,1445 @@
1
- import * as i3 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import { ButtonComponent } from '@wm/components/input/button';
4
- import * as i0 from '@angular/core';
5
- import { Input, Directive, HostListener, ContentChild, Inject, Optional, Attribute, Component, forwardRef, inject, Self, ViewChildren } from '@angular/core';
6
- import * as i2 from '@wm/core';
7
- import { setAttr, addClass, removeClass, triggerItemAction, toggleClass, $appDigest } from '@wm/core';
8
- import { register, PROP_STRING, PROP_BOOLEAN, StylableComponent, styler, APPLY_STYLES_TYPE, provideAsWidgetRef, PROP_ANY, DatasetAwareNavComponent, hasLinkToCurrentPage, TextContentDirective, PROP_NUMBER, AUTOCLOSE_TYPE, WmAppIconComponent, BaseContainerComponent } from '@wm/components/base';
9
- import { AnchorComponent } from '@wm/components/basic/anchor';
10
- import * as i1 from '@angular/router';
11
- import { isEmpty, forEach, omit, find, clone, includes } from 'lodash-es';
12
- import * as i3$1 from 'ngx-bootstrap/dropdown';
13
- import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
14
-
1
+ import * as i3 from "@angular/common";
2
+ import { CommonModule } from "@angular/common";
3
+ import { ButtonComponent } from "@wm/components/input/button";
4
+ import * as i0 from "@angular/core";
5
+ import { Attribute, ChangeDetectionStrategy, Component, ContentChild, Directive, HostListener, Inject, Input, Optional, Self, ViewChildren, forwardRef, inject } from "@angular/core";
6
+ import * as i2 from "@wm/core";
7
+ import { $appDigest, addClass, removeClass, setAttr, toggleClass, triggerItemAction } from "@wm/core";
8
+ import { APPLY_STYLES_TYPE, AUTOCLOSE_TYPE, BaseContainerComponent, DatasetAwareNavComponent, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, StylableComponent, TextContentDirective, WmAppIconComponent, hasLinkToCurrentPage, provideAsWidgetRef, register, styler } from "@wm/components/base";
9
+ import { AnchorComponent } from "@wm/components/basic/anchor";
10
+ import * as i1 from "@angular/router";
11
+ import { clone, find, forEach, includes, isEmpty, omit } from "lodash-es";
12
+ import * as i4 from "ngx-bootstrap/dropdown";
13
+ import { BsDropdownModule } from "ngx-bootstrap/dropdown";
15
14
  const disableContextMenu = ($event) => {
16
- $event.preventDefault();
15
+ $event.preventDefault();
17
16
  };
18
- class NavigationControlDirective {
19
- set wmNavigationControl(val) {
20
- this._link = val;
21
- // MEMORY LEAK FIX: Remove existing listener before adding new one
22
- if (this.boundContextMenuHandler) {
23
- this.nativeElement.removeEventListener('contextmenu', this.boundContextMenuHandler);
24
- this.boundContextMenuHandler = null;
25
- }
26
- if (val && !this.disableMenuContext) {
27
- setAttr(this.nativeElement, 'href', val);
28
- }
29
- else {
30
- setAttr(this.nativeElement, 'href', 'javascript:void(0)');
31
- // MEMORY LEAK FIX: Store bound function reference for cleanup
32
- this.boundContextMenuHandler = disableContextMenu;
33
- this.nativeElement.addEventListener('contextmenu', this.boundContextMenuHandler);
34
- }
35
- }
36
- constructor(eleRef) {
37
- this.nativeElement = eleRef.nativeElement;
38
- }
39
- ngOnDestroy() {
40
- // MEMORY LEAK FIX: Remove event listener using stored bound function reference
41
- if (this.boundContextMenuHandler) {
42
- this.nativeElement.removeEventListener('contextmenu', this.boundContextMenuHandler);
43
- this.boundContextMenuHandler = null;
44
- }
45
- }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NavigationControlDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
47
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: NavigationControlDirective, isStandalone: true, selector: "[wmNavigationControl]", inputs: { disableMenuContext: "disableMenuContext", wmNavigationControl: "wmNavigationControl" }, ngImport: i0 }); }
48
- }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NavigationControlDirective, decorators: [{
50
- type: Directive,
51
- args: [{
52
- standalone: true,
53
- selector: '[wmNavigationControl]'
54
- }]
55
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { disableMenuContext: [{
56
- type: Input
57
- }], wmNavigationControl: [{
58
- type: Input
59
- }] } });
60
-
17
+ var NavigationControlDirective = class NavigationControlDirective {
18
+ set wmNavigationControl(val) {
19
+ this._link = val;
20
+ if (this.boundContextMenuHandler) {
21
+ this.nativeElement.removeEventListener("contextmenu", this.boundContextMenuHandler);
22
+ this.boundContextMenuHandler = null;
23
+ }
24
+ if (val && !this.disableMenuContext) setAttr(this.nativeElement, "href", val);
25
+ else {
26
+ setAttr(this.nativeElement, "href", "javascript:void(0)");
27
+ this.boundContextMenuHandler = disableContextMenu;
28
+ this.nativeElement.addEventListener("contextmenu", this.boundContextMenuHandler);
29
+ }
30
+ }
31
+ constructor(eleRef) {
32
+ this.nativeElement = eleRef.nativeElement;
33
+ }
34
+ ngOnDestroy() {
35
+ if (this.boundContextMenuHandler) {
36
+ this.nativeElement.removeEventListener("contextmenu", this.boundContextMenuHandler);
37
+ this.boundContextMenuHandler = null;
38
+ }
39
+ }
40
+ static {
41
+ this.ɵfac = i0.ɵɵngDeclareFactory({
42
+ minVersion: "12.0.0",
43
+ version: "22.2.1",
44
+ ngImport: i0,
45
+ type: NavigationControlDirective,
46
+ deps: [{ token: i0.ElementRef }],
47
+ target: i0.ɵɵFactoryTarget.Directive
48
+ });
49
+ }
50
+ static {
51
+ this.ɵdir = i0.ɵɵngDeclareDirective({
52
+ minVersion: "14.0.0",
53
+ version: "22.2.1",
54
+ type: NavigationControlDirective,
55
+ isStandalone: true,
56
+ selector: "[wmNavigationControl]",
57
+ inputs: {
58
+ disableMenuContext: "disableMenuContext",
59
+ wmNavigationControl: "wmNavigationControl"
60
+ },
61
+ ngImport: i0
62
+ });
63
+ }
64
+ };
65
+ i0.ɵɵngDeclareClassMetadata({
66
+ minVersion: "12.0.0",
67
+ version: "22.2.1",
68
+ ngImport: i0,
69
+ type: NavigationControlDirective,
70
+ decorators: [{
71
+ type: Directive,
72
+ args: [{
73
+ standalone: true,
74
+ selector: "[wmNavigationControl]"
75
+ }]
76
+ }],
77
+ ctorParameters: () => [{ type: i0.ElementRef }],
78
+ propDecorators: {
79
+ disableMenuContext: [{ type: Input }],
80
+ wmNavigationControl: [{ type: Input }]
81
+ }
82
+ });
61
83
  const registerProps$2 = () => {
62
- register('wm-nav-item', new Map([
63
- ['class', PROP_STRING],
64
- ['name', PROP_STRING],
65
- ['show', { value: true, ...PROP_BOOLEAN }]
66
- ]));
84
+ register("wm-nav-item", /* @__PURE__ */ new Map([
85
+ ["class", PROP_STRING],
86
+ ["name", PROP_STRING],
87
+ ["show", {
88
+ value: true,
89
+ ...PROP_BOOLEAN
90
+ }]
91
+ ]));
67
92
  };
68
-
69
- const DEFAULT_CLS$2 = 'app-nav-item';
70
- const WIDGET_CONFIG$2 = { widgetType: 'wm-nav-item', hostClass: DEFAULT_CLS$2 };
71
- class NavItemDirective extends StylableComponent {
72
- static { this.initializeProps = registerProps$2(); }
73
- makeActive() {
74
- const parentNode = this.nativeElement.parentNode;
75
- $(parentNode).find('> li.active').removeClass('active');
76
- if (this.isAttached) {
77
- addClass(this.nativeElement, 'active');
78
- }
79
- }
80
- constructor(inj, explicitContext) {
81
- super(inj, WIDGET_CONFIG$2, explicitContext);
82
- styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
83
- }
84
- ngAfterViewInit() {
85
- if (this.innerLink) {
86
- this.innerLink.onActive(() => this.makeActive());
87
- }
88
- }
89
- ngOnDetach() {
90
- removeClass(this.nativeElement, 'active', true);
91
- super.ngOnDetach();
92
- }
93
- ngOnDestroy() {
94
- // MEMORY LEAK FIX: Clear ContentChild reference
95
- this.innerLink = null;
96
- super.ngOnDestroy();
97
- }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NavItemDirective, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
99
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: NavItemDirective, isStandalone: true, selector: "[wmNavItem]", host: { listeners: { "click": "makeActive()", "keydown.enter": "makeActive()" } }, providers: [
100
- provideAsWidgetRef(NavItemDirective)
101
- ], queries: [{ propertyName: "innerLink", first: true, predicate: AnchorComponent, descendants: true }], exportAs: ["navItemRef"], usesInheritance: true, ngImport: i0 }); }
102
- }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NavItemDirective, decorators: [{
104
- type: Directive,
105
- args: [{
106
- standalone: true,
107
- selector: '[wmNavItem]',
108
- exportAs: 'navItemRef',
109
- providers: [
110
- provideAsWidgetRef(NavItemDirective)
111
- ]
112
- }]
113
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
114
- type: Inject,
115
- args: ['EXPLICIT_CONTEXT']
116
- }, {
117
- type: Optional
118
- }] }], propDecorators: { innerLink: [{
119
- type: ContentChild,
120
- args: [AnchorComponent]
121
- }], makeActive: [{
122
- type: HostListener,
123
- args: ['click']
124
- }, {
125
- type: HostListener,
126
- args: ['keydown.enter']
127
- }] } });
128
-
93
+ const WIDGET_CONFIG$2 = {
94
+ widgetType: "wm-nav-item",
95
+ hostClass: "app-nav-item"
96
+ };
97
+ var NavItemDirective = class NavItemDirective extends StylableComponent {
98
+ static {
99
+ this.initializeProps = registerProps$2();
100
+ }
101
+ makeActive() {
102
+ const parentNode = this.nativeElement.parentNode;
103
+ $(parentNode).find("> li.active").removeClass("active");
104
+ if (this.isAttached) addClass(this.nativeElement, "active");
105
+ }
106
+ constructor(inj, explicitContext) {
107
+ super(inj, WIDGET_CONFIG$2, explicitContext);
108
+ styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
109
+ }
110
+ ngAfterViewInit() {
111
+ if (this.innerLink) this.innerLink.onActive(() => this.makeActive());
112
+ }
113
+ ngOnDetach() {
114
+ removeClass(this.nativeElement, "active", true);
115
+ super.ngOnDetach();
116
+ }
117
+ ngOnDestroy() {
118
+ this.innerLink = null;
119
+ super.ngOnDestroy();
120
+ }
121
+ static {
122
+ this.ɵfac = i0.ɵɵngDeclareFactory({
123
+ minVersion: "12.0.0",
124
+ version: "22.2.1",
125
+ ngImport: i0,
126
+ type: NavItemDirective,
127
+ deps: [{ token: i0.Injector }, {
128
+ token: "EXPLICIT_CONTEXT",
129
+ optional: true
130
+ }],
131
+ target: i0.ɵɵFactoryTarget.Directive
132
+ });
133
+ }
134
+ static {
135
+ this.ɵdir = i0.ɵɵngDeclareDirective({
136
+ minVersion: "14.0.0",
137
+ version: "22.2.1",
138
+ type: NavItemDirective,
139
+ isStandalone: true,
140
+ selector: "[wmNavItem]",
141
+ host: { listeners: {
142
+ "click": "makeActive()",
143
+ "keydown.enter": "makeActive()"
144
+ } },
145
+ providers: [provideAsWidgetRef(NavItemDirective)],
146
+ queries: [{
147
+ propertyName: "innerLink",
148
+ first: true,
149
+ predicate: AnchorComponent,
150
+ descendants: true
151
+ }],
152
+ exportAs: ["navItemRef"],
153
+ usesInheritance: true,
154
+ ngImport: i0
155
+ });
156
+ }
157
+ };
158
+ i0.ɵɵngDeclareClassMetadata({
159
+ minVersion: "12.0.0",
160
+ version: "22.2.1",
161
+ ngImport: i0,
162
+ type: NavItemDirective,
163
+ decorators: [{
164
+ type: Directive,
165
+ args: [{
166
+ standalone: true,
167
+ selector: "[wmNavItem]",
168
+ exportAs: "navItemRef",
169
+ providers: [provideAsWidgetRef(NavItemDirective)]
170
+ }]
171
+ }],
172
+ ctorParameters: () => [{ type: i0.Injector }, {
173
+ type: void 0,
174
+ decorators: [{
175
+ type: Inject,
176
+ args: ["EXPLICIT_CONTEXT"]
177
+ }, { type: Optional }]
178
+ }],
179
+ propDecorators: {
180
+ innerLink: [{
181
+ type: ContentChild,
182
+ args: [AnchorComponent]
183
+ }],
184
+ makeActive: [{
185
+ type: HostListener,
186
+ args: ["click"]
187
+ }, {
188
+ type: HostListener,
189
+ args: ["keydown.enter"]
190
+ }]
191
+ }
192
+ });
129
193
  const registerProps$1 = () => {
130
- register('wm-nav', new Map([
131
- ['autoclose', { value: 'always', ...PROP_STRING }],
132
- ['autoopen', { value: 'never', ...PROP_STRING }],
133
- ['class', PROP_STRING],
134
- ['dataset', PROP_ANY],
135
- ['iconposition', { value: 'left', ...PROP_STRING }],
136
- ['isactive', PROP_STRING],
137
- ['itemlabel', PROP_STRING],
138
- ['itemhint', PROP_STRING],
139
- ['itemlink', PROP_STRING],
140
- ['itemicon', PROP_STRING],
141
- ['itemclass', PROP_STRING],
142
- ['itemchildren', PROP_STRING],
143
- ['itemaction', PROP_STRING],
144
- ['itembadge', PROP_STRING],
145
- ['itemtarget', PROP_STRING],
146
- ['layout', PROP_STRING],
147
- ['name', PROP_STRING],
148
- ['orderby', PROP_STRING],
149
- ['show', { value: true, ...PROP_BOOLEAN }],
150
- ['showonhover', { value: false, ...PROP_BOOLEAN }],
151
- ['type', PROP_STRING],
152
- ['userrole', PROP_STRING]
153
- ]));
194
+ register("wm-nav", /* @__PURE__ */ new Map([
195
+ ["autoclose", {
196
+ value: "always",
197
+ ...PROP_STRING
198
+ }],
199
+ ["autoopen", {
200
+ value: "never",
201
+ ...PROP_STRING
202
+ }],
203
+ ["class", PROP_STRING],
204
+ ["dataset", PROP_ANY],
205
+ ["iconposition", {
206
+ value: "left",
207
+ ...PROP_STRING
208
+ }],
209
+ ["isactive", PROP_STRING],
210
+ ["itemlabel", PROP_STRING],
211
+ ["itemhint", PROP_STRING],
212
+ ["itemlink", PROP_STRING],
213
+ ["itemicon", PROP_STRING],
214
+ ["itemclass", PROP_STRING],
215
+ ["itemchildren", PROP_STRING],
216
+ ["itemaction", PROP_STRING],
217
+ ["itembadge", PROP_STRING],
218
+ ["itemtarget", PROP_STRING],
219
+ ["layout", PROP_STRING],
220
+ ["name", PROP_STRING],
221
+ ["orderby", PROP_STRING],
222
+ ["show", {
223
+ value: true,
224
+ ...PROP_BOOLEAN
225
+ }],
226
+ ["showonhover", {
227
+ value: false,
228
+ ...PROP_BOOLEAN
229
+ }],
230
+ ["type", PROP_STRING],
231
+ ["userrole", PROP_STRING]
232
+ ]));
233
+ };
234
+ const WIDGET_CONFIG$1 = {
235
+ widgetType: "wm-nav",
236
+ hostClass: "nav app-nav"
154
237
  };
155
-
156
- const DEFAULT_CLS$1 = 'nav app-nav';
157
- const WIDGET_CONFIG$1 = { widgetType: 'wm-nav', hostClass: DEFAULT_CLS$1 };
158
238
  const NavClassMap = {
159
- pills: 'nav-pills',
160
- tabs: 'nav-tabs',
161
- navbar: 'navbar-nav'
239
+ pills: "nav-pills",
240
+ tabs: "nav-tabs",
241
+ navbar: "navbar-nav"
162
242
  };
163
- class NavComponent extends DatasetAwareNavComponent {
164
- static { this.initializeProps = registerProps$1(); }
165
- get activePageName() {
166
- return this.app.activePageName;
167
- }
168
- constructor(inj, cdRef, route, userDefinedExecutionContext, app, selectEventCB, explicitContext) {
169
- super(inj, WIDGET_CONFIG$1, explicitContext);
170
- this.cdRef = cdRef;
171
- this.route = route;
172
- this.userDefinedExecutionContext = userDefinedExecutionContext;
173
- this.app = app;
174
- styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
175
- this.disableMenuContext = !!selectEventCB;
176
- this.pageScope = this.viewParent;
177
- // For selecting the item on load
178
- const datasetSubscription = this.nodes$.subscribe(() => {
179
- if (!isEmpty(this.nodes)) {
180
- let itemFound = false;
181
- const getItem = (nodes, isMenuWidget) => {
182
- forEach(nodes, (item) => {
183
- if (itemFound) {
184
- return;
185
- }
186
- if (item.isactive) {
187
- itemFound = true;
188
- this.selecteditem = isMenuWidget ? omit(item, ['children', 'value']) : item.value;
189
- this.invokeEventCallback('select', { $event: {}, $item: item.value });
190
- // Trigger the action associated with active item
191
- triggerItemAction(this, item);
192
- // _selected is used to add active class for nav item. If we have children inside nav widget then it is not required.
193
- if (!isMenuWidget) {
194
- item._selected = true;
195
- }
196
- return false;
197
- }
198
- if (!isEmpty(item.children)) {
199
- getItem(item.children, 'menu');
200
- }
201
- });
202
- };
203
- getItem(this.nodes);
204
- }
205
- });
206
- this.registerDestroyListener(() => datasetSubscription.unsubscribe());
207
- }
208
- setNavType(type) {
209
- addClass(this.nativeElement, NavClassMap[type]);
210
- }
211
- setNavLayout(layout) {
212
- addClass(this.nativeElement, `nav-${layout}`);
213
- }
214
- onNavSelect($event, item) {
215
- $event.preventDefault();
216
- const selectedItem = find(this.nodes, '_selected');
217
- if (selectedItem) {
218
- // @ts-ignore
219
- delete selectedItem._selected;
220
- }
221
- this.selecteditem = item.value;
222
- this.invokeEventCallback('select', { $event, $item: item.value });
223
- // Trigger the action associated with active item
224
- triggerItemAction(this, item);
225
- }
226
- ngOnInit() {
227
- super.ngOnInit();
228
- this.setNavType(this.type);
229
- this.setNavLayout(this.layout);
230
- }
231
- /**
232
- * invoked from the menu widget when a menu item is selected.
233
- * @param $event
234
- * @param widget
235
- * @param $item
236
- */
237
- onMenuItemSelect($event, widget, $item) {
238
- this.selecteditem = omit($item, ['children', 'value']);
239
- this.invokeEventCallback('select', { $event, $item: this.selecteditem });
240
- }
241
- ngOnDestroy() {
242
- // MEMORY LEAK FIX: Cleanup
243
- // Note: Subscription is already cleaned up via registerDestroyListener in constructor
244
- // but adding explicit OnDestroy to ensure proper cleanup lifecycle
245
- // Clear references
246
- this.selecteditem = null;
247
- this.pageScope = null;
248
- this.itemActionFn = null;
249
- super.ngOnDestroy();
250
- }
251
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NavComponent, deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i1.Router }, { token: i2.UserDefinedExecutionContext }, { token: i2.App }, { token: 'select.event', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
252
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: NavComponent, isStandalone: true, selector: "[wmNav]", providers: [
253
- provideAsWidgetRef(NavComponent)
254
- ], usesInheritance: true, ngImport: i0, template: "<ng-template #menuRef let-item=\"item\" let-index=\"index\">\n <div wmMenu dropdown\n type=\"anchor\"\n autoclose.bind=\"autoclose\"\n iconclass.bind=\"item.icon\"\n autoopen.bind=\"autoopen\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n dataset.bind=\"item.children\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n showonhover.bind=\"showonhover\"\n select.event=\"onMenuItemSelect($event, widget, $item)\"></div>\n</ng-template>\n\n<ng-template #anchorRef let-item=\"item\" let-index=\"index\" let-liRef=\"liRef\">\n <a wmAnchor\n [disableMenuContext]=\"disableMenuContext || !!item.action\"\n [wmNavigationControl]=\"item.link\"\n [attr.aria-current]=\"item._selected || (!isactive && item.link === '#/' + activePageName) ? 'page' : ''\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n iconclass.bind=\"item.icon\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n click.event=\"onNavSelect($event, item)\"></a>\n</ng-template>\n\n@for (item of nodes; track item; let index = $index) {\n <li #liRef=\"navItemRef\"\n [ngClass]=\"{active: item._selected || (!isactive && item.link === '#/' + activePageName)}\"\n class=\"app-nav-item {{item.class}}\"\n wmNavItem>\n @if (!item.children.length) {\n <ng-container [ngTemplateOutlet]=\"anchorRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index, liRef: liRef}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('anchor_' + liRef.trackId, {item: item, index:index, liRef: liRef})\"\n ></ng-container>\n }\n @if (item.children.length) {\n <ng-container [ngTemplateOutlet]=\"menuRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('menu_' + liRef.trackId, {item: item, index:index})\"\n ></ng-container>\n }\n </li>\n}\n\n@if (!nodes.length) {\n <ng-content select=\"[wmNavItem]\"></ng-content>\n}\n", dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => CommonModule) }, { kind: "directive", type: i0.forwardRef(() => i3.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i3.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: i0.forwardRef(() => BsDropdownModule) }, { kind: "directive", type: i0.forwardRef(() => i3$1.BsDropdownDirective), selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "component", type: i0.forwardRef(() => AnchorComponent), selector: "a[wmAnchor]", exportAs: ["wmAnchor"] }, { kind: "component", type: i0.forwardRef(() => MenuComponent), selector: "[wmMenu]" }, { kind: "directive", type: i0.forwardRef(() => NavItemDirective), selector: "[wmNavItem]", exportAs: ["navItemRef"] }] }); }
255
- }
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NavComponent, decorators: [{
257
- type: Component,
258
- args: [{ standalone: true, imports: [CommonModule, BsDropdownModule, AnchorComponent, forwardRef(() => MenuComponent), NavItemDirective,], selector: '[wmNav]', providers: [
259
- provideAsWidgetRef(NavComponent)
260
- ], template: "<ng-template #menuRef let-item=\"item\" let-index=\"index\">\n <div wmMenu dropdown\n type=\"anchor\"\n autoclose.bind=\"autoclose\"\n iconclass.bind=\"item.icon\"\n autoopen.bind=\"autoopen\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n dataset.bind=\"item.children\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n showonhover.bind=\"showonhover\"\n select.event=\"onMenuItemSelect($event, widget, $item)\"></div>\n</ng-template>\n\n<ng-template #anchorRef let-item=\"item\" let-index=\"index\" let-liRef=\"liRef\">\n <a wmAnchor\n [disableMenuContext]=\"disableMenuContext || !!item.action\"\n [wmNavigationControl]=\"item.link\"\n [attr.aria-current]=\"item._selected || (!isactive && item.link === '#/' + activePageName) ? 'page' : ''\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n iconclass.bind=\"item.icon\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n click.event=\"onNavSelect($event, item)\"></a>\n</ng-template>\n\n@for (item of nodes; track item; let index = $index) {\n <li #liRef=\"navItemRef\"\n [ngClass]=\"{active: item._selected || (!isactive && item.link === '#/' + activePageName)}\"\n class=\"app-nav-item {{item.class}}\"\n wmNavItem>\n @if (!item.children.length) {\n <ng-container [ngTemplateOutlet]=\"anchorRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index, liRef: liRef}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('anchor_' + liRef.trackId, {item: item, index:index, liRef: liRef})\"\n ></ng-container>\n }\n @if (item.children.length) {\n <ng-container [ngTemplateOutlet]=\"menuRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('menu_' + liRef.trackId, {item: item, index:index})\"\n ></ng-container>\n }\n </li>\n}\n\n@if (!nodes.length) {\n <ng-content select=\"[wmNavItem]\"></ng-content>\n}\n" }]
261
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i1.Router }, { type: i2.UserDefinedExecutionContext }, { type: i2.App }, { type: undefined, decorators: [{
262
- type: Attribute,
263
- args: ['select.event']
264
- }] }, { type: undefined, decorators: [{
265
- type: Inject,
266
- args: ['EXPLICIT_CONTEXT']
267
- }, {
268
- type: Optional
269
- }] }] });
270
-
243
+ var NavComponent = class NavComponent extends DatasetAwareNavComponent {
244
+ static {
245
+ this.initializeProps = registerProps$1();
246
+ }
247
+ get activePageName() {
248
+ return this.app.activePageName;
249
+ }
250
+ constructor(inj, cdRef, route, userDefinedExecutionContext, app, selectEventCB, explicitContext) {
251
+ super(inj, WIDGET_CONFIG$1, explicitContext);
252
+ this.cdRef = cdRef;
253
+ this.route = route;
254
+ this.userDefinedExecutionContext = userDefinedExecutionContext;
255
+ this.app = app;
256
+ styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
257
+ this.disableMenuContext = !!selectEventCB;
258
+ this.pageScope = this.viewParent;
259
+ const datasetSubscription = this.nodes$.subscribe(() => {
260
+ if (!isEmpty(this.nodes)) {
261
+ let itemFound = false;
262
+ const getItem = (nodes, isMenuWidget) => {
263
+ forEach(nodes, (item) => {
264
+ if (itemFound) return;
265
+ if (item.isactive) {
266
+ itemFound = true;
267
+ this.selecteditem = isMenuWidget ? omit(item, ["children", "value"]) : item.value;
268
+ this.invokeEventCallback("select", {
269
+ $event: {},
270
+ $item: item.value
271
+ });
272
+ triggerItemAction(this, item);
273
+ if (!isMenuWidget) item._selected = true;
274
+ return false;
275
+ }
276
+ if (!isEmpty(item.children)) getItem(item.children, "menu");
277
+ });
278
+ };
279
+ getItem(this.nodes);
280
+ }
281
+ });
282
+ this.registerDestroyListener(() => datasetSubscription.unsubscribe());
283
+ }
284
+ setNavType(type) {
285
+ addClass(this.nativeElement, NavClassMap[type]);
286
+ }
287
+ setNavLayout(layout) {
288
+ addClass(this.nativeElement, `nav-${layout}`);
289
+ }
290
+ onNavSelect($event, item) {
291
+ $event.preventDefault();
292
+ const selectedItem = find(this.nodes, "_selected");
293
+ if (selectedItem) delete selectedItem._selected;
294
+ this.selecteditem = item.value;
295
+ this.invokeEventCallback("select", {
296
+ $event,
297
+ $item: item.value
298
+ });
299
+ triggerItemAction(this, item);
300
+ }
301
+ ngOnInit() {
302
+ super.ngOnInit();
303
+ this.setNavType(this.type);
304
+ this.setNavLayout(this.layout);
305
+ }
306
+ onMenuItemSelect($event, widget, $item) {
307
+ this.selecteditem = omit($item, ["children", "value"]);
308
+ this.invokeEventCallback("select", {
309
+ $event,
310
+ $item: this.selecteditem
311
+ });
312
+ }
313
+ ngOnDestroy() {
314
+ this.selecteditem = null;
315
+ this.pageScope = null;
316
+ this.itemActionFn = null;
317
+ super.ngOnDestroy();
318
+ }
319
+ static {
320
+ this.ɵfac = i0.ɵɵngDeclareFactory({
321
+ minVersion: "12.0.0",
322
+ version: "22.2.1",
323
+ ngImport: i0,
324
+ type: NavComponent,
325
+ deps: [
326
+ { token: i0.Injector },
327
+ { token: i0.ChangeDetectorRef },
328
+ { token: i1.Router },
329
+ { token: i2.UserDefinedExecutionContext },
330
+ { token: i2.App },
331
+ {
332
+ token: "select.event",
333
+ attribute: true
334
+ },
335
+ {
336
+ token: "EXPLICIT_CONTEXT",
337
+ optional: true
338
+ }
339
+ ],
340
+ target: i0.ɵɵFactoryTarget.Component
341
+ });
342
+ }
343
+ static {
344
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
345
+ minVersion: "17.0.0",
346
+ version: "22.2.1",
347
+ type: NavComponent,
348
+ isStandalone: true,
349
+ selector: "[wmNav]",
350
+ providers: [provideAsWidgetRef(NavComponent)],
351
+ usesInheritance: true,
352
+ ngImport: i0,
353
+ template: "<ng-template #menuRef let-item=\"item\" let-index=\"index\">\n <div wmMenu dropdown\n type=\"anchor\"\n autoclose.bind=\"autoclose\"\n iconclass.bind=\"item.icon\"\n autoopen.bind=\"autoopen\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n dataset.bind=\"item.children\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n showonhover.bind=\"showonhover\"\n select.event=\"onMenuItemSelect($event, widget, $item)\"></div>\n</ng-template>\n\n<ng-template #anchorRef let-item=\"item\" let-index=\"index\" let-liRef=\"liRef\">\n <a wmAnchor\n [disableMenuContext]=\"disableMenuContext || !!item.action\"\n [wmNavigationControl]=\"item.link\"\n [attr.aria-current]=\"item._selected || (!isactive && item.link === '#/' + activePageName) ? 'page' : ''\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n iconclass.bind=\"item.icon\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n click.event=\"onNavSelect($event, item)\"></a>\n</ng-template>\n\n@for (item of nodes; track item; let index = $index) {\n <li #liRef=\"navItemRef\"\n [ngClass]=\"{active: item._selected || (!isactive && item.link === '#/' + activePageName)}\"\n class=\"app-nav-item {{item.class}}\"\n wmNavItem>\n @if (!item.children.length) {\n <ng-container [ngTemplateOutlet]=\"anchorRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index, liRef: liRef}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('anchor_' + liRef.trackId, {item: item, index:index, liRef: liRef})\"\n ></ng-container>\n }\n @if (item.children.length) {\n <ng-container [ngTemplateOutlet]=\"menuRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('menu_' + liRef.trackId, {item: item, index:index})\"\n ></ng-container>\n }\n </li>\n}\n\n@if (!nodes.length) {\n <ng-content select=\"[wmNavItem]\"></ng-content>\n}\n",
354
+ dependencies: [
355
+ {
356
+ kind: "ngmodule",
357
+ type: i0.forwardRef(() => CommonModule)
358
+ },
359
+ {
360
+ kind: "directive",
361
+ type: i0.forwardRef(() => i3.NgClass),
362
+ selector: "[ngClass]",
363
+ inputs: ["class", "ngClass"]
364
+ },
365
+ {
366
+ kind: "directive",
367
+ type: i0.forwardRef(() => i3.NgTemplateOutlet),
368
+ selector: "[ngTemplateOutlet]",
369
+ inputs: [
370
+ "ngTemplateOutletContext",
371
+ "ngTemplateOutlet",
372
+ "ngTemplateOutletInjector"
373
+ ]
374
+ },
375
+ {
376
+ kind: "ngmodule",
377
+ type: i0.forwardRef(() => BsDropdownModule)
378
+ },
379
+ {
380
+ kind: "directive",
381
+ type: i0.forwardRef(() => i4.BsDropdownDirective),
382
+ selector: "[bsDropdown], [dropdown]",
383
+ inputs: [
384
+ "placement",
385
+ "triggers",
386
+ "container",
387
+ "dropup",
388
+ "autoClose",
389
+ "isAnimated",
390
+ "insideClick",
391
+ "isDisabled",
392
+ "isOpen"
393
+ ],
394
+ outputs: [
395
+ "isOpenChange",
396
+ "onShown",
397
+ "onHidden"
398
+ ],
399
+ exportAs: ["bs-dropdown"]
400
+ },
401
+ {
402
+ kind: "component",
403
+ type: i0.forwardRef(() => AnchorComponent),
404
+ selector: "a[wmAnchor]",
405
+ exportAs: ["wmAnchor"]
406
+ },
407
+ {
408
+ kind: "component",
409
+ type: i0.forwardRef(() => MenuComponent),
410
+ selector: "[wmMenu]"
411
+ },
412
+ {
413
+ kind: "directive",
414
+ type: i0.forwardRef(() => NavItemDirective),
415
+ selector: "[wmNavItem]",
416
+ exportAs: ["navItemRef"]
417
+ }
418
+ ],
419
+ changeDetection: i0.ChangeDetectionStrategy.Eager
420
+ });
421
+ }
422
+ };
423
+ i0.ɵɵngDeclareClassMetadata({
424
+ minVersion: "12.0.0",
425
+ version: "22.2.1",
426
+ ngImport: i0,
427
+ type: NavComponent,
428
+ decorators: [{
429
+ type: Component,
430
+ args: [{
431
+ changeDetection: ChangeDetectionStrategy.Eager,
432
+ standalone: true,
433
+ imports: [
434
+ CommonModule,
435
+ BsDropdownModule,
436
+ AnchorComponent,
437
+ forwardRef(() => MenuComponent),
438
+ NavItemDirective
439
+ ],
440
+ selector: "[wmNav]",
441
+ providers: [provideAsWidgetRef(NavComponent)],
442
+ template: "<ng-template #menuRef let-item=\"item\" let-index=\"index\">\n <div wmMenu dropdown\n type=\"anchor\"\n autoclose.bind=\"autoclose\"\n iconclass.bind=\"item.icon\"\n autoopen.bind=\"autoopen\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n dataset.bind=\"item.children\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n showonhover.bind=\"showonhover\"\n select.event=\"onMenuItemSelect($event, widget, $item)\"></div>\n</ng-template>\n\n<ng-template #anchorRef let-item=\"item\" let-index=\"index\" let-liRef=\"liRef\">\n <a wmAnchor\n [disableMenuContext]=\"disableMenuContext || !!item.action\"\n [wmNavigationControl]=\"item.link\"\n [attr.aria-current]=\"item._selected || (!isactive && item.link === '#/' + activePageName) ? 'page' : ''\"\n caption.bind=\"item.label\"\n hint.bind=\"item.hint\"\n iconclass.bind=\"item.icon\"\n badgevalue.bind=\"item.badge\"\n iconposition.bind=\"iconposition\"\n click.event=\"onNavSelect($event, item)\"></a>\n</ng-template>\n\n@for (item of nodes; track item; let index = $index) {\n <li #liRef=\"navItemRef\"\n [ngClass]=\"{active: item._selected || (!isactive && item.link === '#/' + activePageName)}\"\n class=\"app-nav-item {{item.class}}\"\n wmNavItem>\n @if (!item.children.length) {\n <ng-container [ngTemplateOutlet]=\"anchorRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index, liRef: liRef}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('anchor_' + liRef.trackId, {item: item, index:index, liRef: liRef})\"\n ></ng-container>\n }\n @if (item.children.length) {\n <ng-container [ngTemplateOutlet]=\"menuRef\"\n [ngTemplateOutletContext]=\"{item: item, index:index}\"\n [ngTemplateOutletInjector]=\"createCustomInjector('menu_' + liRef.trackId, {item: item, index:index})\"\n ></ng-container>\n }\n </li>\n}\n\n@if (!nodes.length) {\n <ng-content select=\"[wmNavItem]\"></ng-content>\n}\n"
443
+ }]
444
+ }],
445
+ ctorParameters: () => [
446
+ { type: i0.Injector },
447
+ { type: i0.ChangeDetectorRef },
448
+ { type: i1.Router },
449
+ { type: i2.UserDefinedExecutionContext },
450
+ { type: i2.App },
451
+ {
452
+ type: void 0,
453
+ decorators: [{
454
+ type: Attribute,
455
+ args: ["select.event"]
456
+ }]
457
+ },
458
+ {
459
+ type: void 0,
460
+ decorators: [{
461
+ type: Inject,
462
+ args: ["EXPLICIT_CONTEXT"]
463
+ }, { type: Optional }]
464
+ }
465
+ ]
466
+ });
271
467
  const menuAlignClass = {
272
- 'pull-right': 'fa-caret-left',
273
- 'dropinline-menu': 'fa-caret-down',
274
- 'pull-left': 'fa-caret-right'
468
+ "pull-right": "fa-caret-left",
469
+ "dropinline-menu": "fa-caret-down",
470
+ "pull-left": "fa-caret-right"
275
471
  };
276
472
  const MENU_LAYOUT_TYPE = {
277
- HORIZONTAL: 'horizontal',
278
- VERTICAL: 'vertical'
473
+ HORIZONTAL: "horizontal",
474
+ VERTICAL: "vertical"
279
475
  };
280
- class MenuDropdownItemComponent {
281
- constructor(app, userDefinedExecutionContext, parentNav, elRef) {
282
- this.app = app;
283
- this.userDefinedExecutionContext = userDefinedExecutionContext;
284
- this.parentNav = parentNav;
285
- this.menuRef = inject(MenuComponent);
286
- this.onSelect = ($event, item) => {
287
- if (this.nativeElement !== $($event.target).closest('.app-menu-item').get(0)) {
288
- return;
289
- }
290
- // prevent event event propagation if auto close is outside click.
291
- if (this.menuRef.autoclose === 'outsideClick') {
292
- $event.stopPropagation();
293
- }
294
- $event.preventDefault();
295
- const args = { $event, $item: item };
296
- this.menuRef.onMenuItemSelect(args);
297
- const selectedItem = clone(item);
298
- selectedItem.target = selectedItem.target || this.menuRef.linktarget;
299
- // Trigger the action associated with active item
300
- triggerItemAction(this, selectedItem);
301
- };
302
- this.nativeElement = elRef.nativeElement;
303
- addClass(this.nativeElement, 'app-menu-item');
304
- this.menualign = menuAlignClass[this.menuRef.menualign] || menuAlignClass['pull-left'];
305
- }
306
- ngOnInit() {
307
- // add active class to the item only if it is in nav component.
308
- if (this.parentNav) {
309
- if (hasLinkToCurrentPage([this.item], this.menuRef.route.url)) {
310
- // add active class to the li, if the menu item's link is same as the current page name.
311
- addClass(this.nativeElement, 'active');
312
- }
313
- this.highlightActiveLinkSubscription = this.app.subscribe("highlightActiveLink", (data) => {
314
- toggleClass(this.nativeElement, 'active', hasLinkToCurrentPage([this.item], this.menuRef.route.url));
315
- });
316
- }
317
- }
318
- getInitialKeyMovements() {
319
- const KEY_MOVEMENTS = clone(KEYBOARD_MOVEMENTS);
320
- if (this.menuRef.menulayout === MENU_LAYOUT_TYPE.HORIZONTAL || this.menuRef.menuposition === 'inline') {
321
- KEY_MOVEMENTS.MOVE_UP = 'LEFT-ARROW';
322
- KEY_MOVEMENTS.MOVE_LEFT = 'UP-ARROW';
323
- KEY_MOVEMENTS.MOVE_RIGHT = 'DOWN-ARROW';
324
- KEY_MOVEMENTS.MOVE_DOWN = 'RIGHT-ARROW';
325
- }
326
- else if (this.menuRef.menuposition === MENU_POSITION.DOWN_LEFT || this.menuRef.menuposition === MENU_POSITION.UP_LEFT) {
327
- KEY_MOVEMENTS.MOVE_LEFT = 'RIGHT-ARROW';
328
- KEY_MOVEMENTS.MOVE_RIGHT = 'LEFT-ARROW';
329
- }
330
- return KEY_MOVEMENTS;
331
- }
332
- onKeyDownTab($event) { this.onKeyDown($event, 'TAB'); }
333
- onKeyDownShiftTab($event) { this.onKeyDown($event, 'SHIFT-TAB'); }
334
- onKeyDownEscape($event) { this.onKeyDown($event, 'ESC'); }
335
- onKeyDownEnter($event) { this.onKeyDown($event, 'ENTER'); }
336
- onKeyDownArrowUp($event) { this.onKeyDown($event, 'UP-ARROW'); }
337
- onKeyDownArrowDown($event) { this.onKeyDown($event, 'DOWN-ARROW'); }
338
- onKeyDownArrowRight($event) { this.onKeyDown($event, 'RIGHT-ARROW'); }
339
- onKeyDownArrowLeft($event) { this.onKeyDown($event, 'LEFT-ARROW'); }
340
- onKeyDown($event, eventAction) {
341
- const $li = $(this.nativeElement);
342
- const $ul = $(this.nativeElement).closest('ul.dropdown-menu');
343
- const $parentUl = this.menuRef.$element.find('> ul.dropdown-menu');
344
- const ARROW_KEYS = ['LEFT-ARROW', 'RIGHT-ARROW', 'UP-ARROW', 'DOWN-ARROW'];
345
- const KEY_MOVEMENTS = this.getInitialKeyMovements();
346
- if (includes(ARROW_KEYS, eventAction)) {
347
- // preventing from page scroll when up/down arrow is pressed, in case of menu is opened.
348
- $event.preventDefault();
349
- }
350
- if ((eventAction === KEY_MOVEMENTS.ON_TAB && $parentUl.children().last()[0] === this.nativeElement)
351
- || (eventAction === KEY_MOVEMENTS.ON_SHIFT_TAB && $parentUl.children().first()[0] === this.nativeElement)
352
- || eventAction === KEY_MOVEMENTS.ON_ESCAPE) {
353
- /*closing all the children elements when
354
- * 1. Tab is clicked on the last $element
355
- * 2. Shift Tab is clicked on the first $element
356
- * 3. When Escape key is clicked*/
357
- $event.preventDefault();
358
- this.menuRef.bsDropdown.hide();
359
- }
360
- else if ((eventAction === KEY_MOVEMENTS.ON_ENTER && !this.item.link) || eventAction === KEY_MOVEMENTS.MOVE_RIGHT) {
361
- // when there is no link for the menu, on enter open the inner child elements and focus the first $element
362
- $event.stopPropagation();
363
- if (this.item.children.length) {
364
- $li.toggleClass('open');
365
- $li.find('li').first().find('> a').focus();
366
- }
367
- else {
368
- $li.find('> a').focus();
369
- }
370
- }
371
- else if (eventAction === KEY_MOVEMENTS.MOVE_LEFT
372
- || (eventAction === KEY_MOVEMENTS.ON_TAB && $ul.children().last()[0] === this.nativeElement)
373
- || (eventAction === KEY_MOVEMENTS.ON_SHIFT_TAB && $ul.children().first()[0] === this.nativeElement)) {
374
- if ($parentUl[0] !== $ul[0]) {
375
- const $parentItem = $ul.parent();
376
- $parentItem.toggleClass('open').find('li.open').removeClass('open');
377
- $parentItem.find('> a').focus();
378
- $event.preventDefault();
379
- $event.stopPropagation();
380
- }
381
- }
382
- else if (eventAction === KEY_MOVEMENTS.MOVE_UP) {
383
- if ($parentUl[0] !== $ul[0] || $parentUl.find('> li').first()[0] !== this.nativeElement) {
384
- $event.stopPropagation();
385
- $li.prev().find('> a').focus();
386
- }
387
- }
388
- else if (eventAction === KEY_MOVEMENTS.MOVE_DOWN) {
389
- $event.stopPropagation();
390
- if ($parentUl.find('> li').last()[0] === this.nativeElement
391
- && (this.menuRef.menulayout !== MENU_LAYOUT_TYPE.HORIZONTAL
392
- && this.menuRef.menuposition === MENU_POSITION.UP_RIGHT
393
- || this.menuRef.menuposition === MENU_POSITION.UP_LEFT)) {
394
- this.menuRef.bsDropdown.hide();
395
- }
396
- else {
397
- $li.next().find('> a').focus();
398
- }
399
- }
400
- else if (eventAction === KEY_MOVEMENTS.ON_ENTER) {
401
- this.onSelect($event, this.item);
402
- }
403
- else {
404
- $event.stopPropagation();
405
- }
406
- }
407
- ngOnDestroy() {
408
- if (this.highlightActiveLinkSubscription) {
409
- this.highlightActiveLinkSubscription();
410
- }
411
- }
412
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuDropdownItemComponent, deps: [{ token: i2.App }, { token: i2.UserDefinedExecutionContext }, { token: NavComponent, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
413
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: MenuDropdownItemComponent, isStandalone: true, selector: "li[wmMenuDropdownItem]", inputs: { item: "item" }, host: { listeners: { "keydown.tab": "onKeyDownTab($event)", "keydown.shift.tab": "onKeyDownShiftTab($event)", "keydown.escape": "onKeyDownEscape($event)", "keydown.enter": "onKeyDownEnter($event)", "keydown.arrowup": "onKeyDownArrowUp($event)", "keydown.arrowdown": "onKeyDownArrowDown($event)", "keydown.arrowright": "onKeyDownArrowRight($event)", "keydown.arrowleft": "onKeyDownArrowLeft($event)", "click": "onSelect($event,item)" } }, ngImport: i0, template: "<a href=\"javascript:void(0);\" [title]=\"item.label\" [wmNavigationControl]=\"item.link\" [disableMenuContext]=\"menuRef.disableMenuContext || !!item.action\">\n @if (item.children.length) {\n <span class=\"pull-right fa caret {{menualign}}\"></span>\n }\n <i class=\"app-icon {{item.icon}}\"></i>\n <span class=\"anchor-caption\">{{item.label}}</span>\n @if (item.badge) {\n <span class=\"badge pull-right\" [textContent]=\"item.badge\"></span>\n }\n</a>\n@if (item.children.length) {\n <ul wmMenuDropdown [items]=\"item.children\"></ul>\n}", dependencies: [{ kind: "directive", type: i0.forwardRef(() => TextContentDirective), selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: i0.forwardRef(() => MenuDropdownComponent), selector: "ul[wmMenuDropdown]", inputs: ["items"] }, { kind: "directive", type: i0.forwardRef(() => NavigationControlDirective), selector: "[wmNavigationControl]", inputs: ["disableMenuContext", "wmNavigationControl"] }] }); }
414
- }
415
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuDropdownItemComponent, decorators: [{
416
- type: Component,
417
- args: [{ standalone: true, imports: [TextContentDirective, forwardRef(() => MenuDropdownComponent), NavigationControlDirective], selector: 'li[wmMenuDropdownItem]', template: "<a href=\"javascript:void(0);\" [title]=\"item.label\" [wmNavigationControl]=\"item.link\" [disableMenuContext]=\"menuRef.disableMenuContext || !!item.action\">\n @if (item.children.length) {\n <span class=\"pull-right fa caret {{menualign}}\"></span>\n }\n <i class=\"app-icon {{item.icon}}\"></i>\n <span class=\"anchor-caption\">{{item.label}}</span>\n @if (item.badge) {\n <span class=\"badge pull-right\" [textContent]=\"item.badge\"></span>\n }\n</a>\n@if (item.children.length) {\n <ul wmMenuDropdown [items]=\"item.children\"></ul>\n}" }]
418
- }], ctorParameters: () => [{ type: i2.App }, { type: i2.UserDefinedExecutionContext }, { type: NavComponent, decorators: [{
419
- type: Optional
420
- }] }, { type: i0.ElementRef }], propDecorators: { item: [{
421
- type: Input
422
- }], onKeyDownTab: [{
423
- type: HostListener,
424
- args: ['keydown.tab', ['$event']]
425
- }], onKeyDownShiftTab: [{
426
- type: HostListener,
427
- args: ['keydown.shift.tab', ['$event']]
428
- }], onKeyDownEscape: [{
429
- type: HostListener,
430
- args: ['keydown.escape', ['$event']]
431
- }], onKeyDownEnter: [{
432
- type: HostListener,
433
- args: ['keydown.enter', ['$event']]
434
- }], onKeyDownArrowUp: [{
435
- type: HostListener,
436
- args: ['keydown.arrowup', ['$event']]
437
- }], onKeyDownArrowDown: [{
438
- type: HostListener,
439
- args: ['keydown.arrowdown', ['$event']]
440
- }], onKeyDownArrowRight: [{
441
- type: HostListener,
442
- args: ['keydown.arrowright', ['$event']]
443
- }], onKeyDownArrowLeft: [{
444
- type: HostListener,
445
- args: ['keydown.arrowleft', ['$event']]
446
- }], onSelect: [{
447
- type: HostListener,
448
- args: ['click', ['$event', 'item']]
449
- }] } });
450
-
476
+ var MenuDropdownItemComponent = class MenuDropdownItemComponent {
477
+ constructor(app, userDefinedExecutionContext, parentNav, elRef) {
478
+ this.app = app;
479
+ this.userDefinedExecutionContext = userDefinedExecutionContext;
480
+ this.parentNav = parentNav;
481
+ this.menuRef = inject(MenuComponent);
482
+ this.onSelect = ($event, item) => {
483
+ if (this.nativeElement !== $($event.target).closest(".app-menu-item").get(0)) return;
484
+ if (this.menuRef.autoclose === "outsideClick") $event.stopPropagation();
485
+ $event.preventDefault();
486
+ const args = {
487
+ $event,
488
+ $item: item
489
+ };
490
+ this.menuRef.onMenuItemSelect(args);
491
+ const selectedItem = clone(item);
492
+ selectedItem.target = selectedItem.target || this.menuRef.linktarget;
493
+ triggerItemAction(this, selectedItem);
494
+ };
495
+ this.nativeElement = elRef.nativeElement;
496
+ addClass(this.nativeElement, "app-menu-item");
497
+ this.menualign = menuAlignClass[this.menuRef.menualign] || menuAlignClass["pull-left"];
498
+ }
499
+ ngOnInit() {
500
+ if (this.parentNav) {
501
+ if (hasLinkToCurrentPage([this.item], this.menuRef.route.url)) addClass(this.nativeElement, "active");
502
+ this.highlightActiveLinkSubscription = this.app.subscribe("highlightActiveLink", (data) => {
503
+ toggleClass(this.nativeElement, "active", hasLinkToCurrentPage([this.item], this.menuRef.route.url));
504
+ });
505
+ }
506
+ }
507
+ getInitialKeyMovements() {
508
+ const KEY_MOVEMENTS = clone(KEYBOARD_MOVEMENTS);
509
+ if (this.menuRef.menulayout === MENU_LAYOUT_TYPE.HORIZONTAL || this.menuRef.menuposition === "inline") {
510
+ KEY_MOVEMENTS.MOVE_UP = "LEFT-ARROW";
511
+ KEY_MOVEMENTS.MOVE_LEFT = "UP-ARROW";
512
+ KEY_MOVEMENTS.MOVE_RIGHT = "DOWN-ARROW";
513
+ KEY_MOVEMENTS.MOVE_DOWN = "RIGHT-ARROW";
514
+ } else if (this.menuRef.menuposition === MENU_POSITION.DOWN_LEFT || this.menuRef.menuposition === MENU_POSITION.UP_LEFT) {
515
+ KEY_MOVEMENTS.MOVE_LEFT = "RIGHT-ARROW";
516
+ KEY_MOVEMENTS.MOVE_RIGHT = "LEFT-ARROW";
517
+ }
518
+ return KEY_MOVEMENTS;
519
+ }
520
+ onKeyDownTab($event) {
521
+ this.onKeyDown($event, "TAB");
522
+ }
523
+ onKeyDownShiftTab($event) {
524
+ this.onKeyDown($event, "SHIFT-TAB");
525
+ }
526
+ onKeyDownEscape($event) {
527
+ this.onKeyDown($event, "ESC");
528
+ }
529
+ onKeyDownEnter($event) {
530
+ this.onKeyDown($event, "ENTER");
531
+ }
532
+ onKeyDownArrowUp($event) {
533
+ this.onKeyDown($event, "UP-ARROW");
534
+ }
535
+ onKeyDownArrowDown($event) {
536
+ this.onKeyDown($event, "DOWN-ARROW");
537
+ }
538
+ onKeyDownArrowRight($event) {
539
+ this.onKeyDown($event, "RIGHT-ARROW");
540
+ }
541
+ onKeyDownArrowLeft($event) {
542
+ this.onKeyDown($event, "LEFT-ARROW");
543
+ }
544
+ onKeyDown($event, eventAction) {
545
+ const $li = $(this.nativeElement);
546
+ const $ul = $(this.nativeElement).closest("ul.dropdown-menu");
547
+ const $parentUl = this.menuRef.$element.find("> ul.dropdown-menu");
548
+ const ARROW_KEYS = [
549
+ "LEFT-ARROW",
550
+ "RIGHT-ARROW",
551
+ "UP-ARROW",
552
+ "DOWN-ARROW"
553
+ ];
554
+ const KEY_MOVEMENTS = this.getInitialKeyMovements();
555
+ if (includes(ARROW_KEYS, eventAction)) $event.preventDefault();
556
+ if (eventAction === KEY_MOVEMENTS.ON_TAB && $parentUl.children().last()[0] === this.nativeElement || eventAction === KEY_MOVEMENTS.ON_SHIFT_TAB && $parentUl.children().first()[0] === this.nativeElement || eventAction === KEY_MOVEMENTS.ON_ESCAPE) {
557
+ $event.preventDefault();
558
+ this.menuRef.bsDropdown.hide();
559
+ } else if (eventAction === KEY_MOVEMENTS.ON_ENTER && !this.item.link || eventAction === KEY_MOVEMENTS.MOVE_RIGHT) {
560
+ $event.stopPropagation();
561
+ if (this.item.children.length) {
562
+ $li.toggleClass("open");
563
+ $li.find("li").first().find("> a").focus();
564
+ } else $li.find("> a").focus();
565
+ } else if (eventAction === KEY_MOVEMENTS.MOVE_LEFT || eventAction === KEY_MOVEMENTS.ON_TAB && $ul.children().last()[0] === this.nativeElement || eventAction === KEY_MOVEMENTS.ON_SHIFT_TAB && $ul.children().first()[0] === this.nativeElement) {
566
+ if ($parentUl[0] !== $ul[0]) {
567
+ const $parentItem = $ul.parent();
568
+ $parentItem.toggleClass("open").find("li.open").removeClass("open");
569
+ $parentItem.find("> a").focus();
570
+ $event.preventDefault();
571
+ $event.stopPropagation();
572
+ }
573
+ } else if (eventAction === KEY_MOVEMENTS.MOVE_UP) {
574
+ if ($parentUl[0] !== $ul[0] || $parentUl.find("> li").first()[0] !== this.nativeElement) {
575
+ $event.stopPropagation();
576
+ $li.prev().find("> a").focus();
577
+ }
578
+ } else if (eventAction === KEY_MOVEMENTS.MOVE_DOWN) {
579
+ $event.stopPropagation();
580
+ if ($parentUl.find("> li").last()[0] === this.nativeElement && (this.menuRef.menulayout !== MENU_LAYOUT_TYPE.HORIZONTAL && this.menuRef.menuposition === MENU_POSITION.UP_RIGHT || this.menuRef.menuposition === MENU_POSITION.UP_LEFT)) this.menuRef.bsDropdown.hide();
581
+ else $li.next().find("> a").focus();
582
+ } else if (eventAction === KEY_MOVEMENTS.ON_ENTER) this.onSelect($event, this.item);
583
+ else $event.stopPropagation();
584
+ }
585
+ ngOnDestroy() {
586
+ if (this.highlightActiveLinkSubscription) this.highlightActiveLinkSubscription();
587
+ }
588
+ static {
589
+ this.ɵfac = i0.ɵɵngDeclareFactory({
590
+ minVersion: "12.0.0",
591
+ version: "22.2.1",
592
+ ngImport: i0,
593
+ type: MenuDropdownItemComponent,
594
+ deps: [
595
+ { token: i2.App },
596
+ { token: i2.UserDefinedExecutionContext },
597
+ {
598
+ token: NavComponent,
599
+ optional: true
600
+ },
601
+ { token: i0.ElementRef }
602
+ ],
603
+ target: i0.ɵɵFactoryTarget.Component
604
+ });
605
+ }
606
+ static {
607
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
608
+ minVersion: "17.0.0",
609
+ version: "22.2.1",
610
+ type: MenuDropdownItemComponent,
611
+ isStandalone: true,
612
+ selector: "li[wmMenuDropdownItem]",
613
+ inputs: { item: "item" },
614
+ host: { listeners: {
615
+ "keydown.tab": "onKeyDownTab($event)",
616
+ "keydown.shift.tab": "onKeyDownShiftTab($event)",
617
+ "keydown.escape": "onKeyDownEscape($event)",
618
+ "keydown.enter": "onKeyDownEnter($event)",
619
+ "keydown.arrowup": "onKeyDownArrowUp($event)",
620
+ "keydown.arrowdown": "onKeyDownArrowDown($event)",
621
+ "keydown.arrowright": "onKeyDownArrowRight($event)",
622
+ "keydown.arrowleft": "onKeyDownArrowLeft($event)",
623
+ "click": "onSelect($event,item)"
624
+ } },
625
+ ngImport: i0,
626
+ template: "<a href=\"javascript:void(0);\" [title]=\"item.label\" [wmNavigationControl]=\"item.link\" [disableMenuContext]=\"menuRef.disableMenuContext || !!item.action\">\n @if (item.children.length) {\n <span class=\"pull-right fa caret {{menualign}}\"></span>\n }\n <i class=\"app-icon {{item.icon}}\"></i>\n <span class=\"anchor-caption\">{{item.label}}</span>\n @if (item.badge) {\n <span class=\"badge pull-right\" [textContent]=\"item.badge\"></span>\n }\n</a>\n@if (item.children.length) {\n <ul wmMenuDropdown [items]=\"item.children\"></ul>\n}",
627
+ dependencies: [
628
+ {
629
+ kind: "directive",
630
+ type: i0.forwardRef(() => TextContentDirective),
631
+ selector: "[textContent]",
632
+ inputs: ["textContent"]
633
+ },
634
+ {
635
+ kind: "component",
636
+ type: i0.forwardRef(() => MenuDropdownComponent),
637
+ selector: "ul[wmMenuDropdown]",
638
+ inputs: ["items"]
639
+ },
640
+ {
641
+ kind: "directive",
642
+ type: i0.forwardRef(() => NavigationControlDirective),
643
+ selector: "[wmNavigationControl]",
644
+ inputs: ["disableMenuContext", "wmNavigationControl"]
645
+ }
646
+ ],
647
+ changeDetection: i0.ChangeDetectionStrategy.Eager
648
+ });
649
+ }
650
+ };
651
+ i0.ɵɵngDeclareClassMetadata({
652
+ minVersion: "12.0.0",
653
+ version: "22.2.1",
654
+ ngImport: i0,
655
+ type: MenuDropdownItemComponent,
656
+ decorators: [{
657
+ type: Component,
658
+ args: [{
659
+ changeDetection: ChangeDetectionStrategy.Eager,
660
+ standalone: true,
661
+ imports: [
662
+ TextContentDirective,
663
+ forwardRef(() => MenuDropdownComponent),
664
+ NavigationControlDirective
665
+ ],
666
+ selector: "li[wmMenuDropdownItem]",
667
+ template: "<a href=\"javascript:void(0);\" [title]=\"item.label\" [wmNavigationControl]=\"item.link\" [disableMenuContext]=\"menuRef.disableMenuContext || !!item.action\">\n @if (item.children.length) {\n <span class=\"pull-right fa caret {{menualign}}\"></span>\n }\n <i class=\"app-icon {{item.icon}}\"></i>\n <span class=\"anchor-caption\">{{item.label}}</span>\n @if (item.badge) {\n <span class=\"badge pull-right\" [textContent]=\"item.badge\"></span>\n }\n</a>\n@if (item.children.length) {\n <ul wmMenuDropdown [items]=\"item.children\"></ul>\n}"
668
+ }]
669
+ }],
670
+ ctorParameters: () => [
671
+ { type: i2.App },
672
+ { type: i2.UserDefinedExecutionContext },
673
+ {
674
+ type: NavComponent,
675
+ decorators: [{ type: Optional }]
676
+ },
677
+ { type: i0.ElementRef }
678
+ ],
679
+ propDecorators: {
680
+ item: [{ type: Input }],
681
+ onKeyDownTab: [{
682
+ type: HostListener,
683
+ args: ["keydown.tab", ["$event"]]
684
+ }],
685
+ onKeyDownShiftTab: [{
686
+ type: HostListener,
687
+ args: ["keydown.shift.tab", ["$event"]]
688
+ }],
689
+ onKeyDownEscape: [{
690
+ type: HostListener,
691
+ args: ["keydown.escape", ["$event"]]
692
+ }],
693
+ onKeyDownEnter: [{
694
+ type: HostListener,
695
+ args: ["keydown.enter", ["$event"]]
696
+ }],
697
+ onKeyDownArrowUp: [{
698
+ type: HostListener,
699
+ args: ["keydown.arrowup", ["$event"]]
700
+ }],
701
+ onKeyDownArrowDown: [{
702
+ type: HostListener,
703
+ args: ["keydown.arrowdown", ["$event"]]
704
+ }],
705
+ onKeyDownArrowRight: [{
706
+ type: HostListener,
707
+ args: ["keydown.arrowright", ["$event"]]
708
+ }],
709
+ onKeyDownArrowLeft: [{
710
+ type: HostListener,
711
+ args: ["keydown.arrowleft", ["$event"]]
712
+ }],
713
+ onSelect: [{
714
+ type: HostListener,
715
+ args: ["click", ["$event", "item"]]
716
+ }]
717
+ }
718
+ });
451
719
  const animationClasses = {
452
- scale: {
453
- 'name': 'wmScaleInLeft',
454
- 'down,right': 'wmScaleInLeft',
455
- 'down,left': 'wmScaleInRight',
456
- 'up,right': 'wmScaleInTopLeft',
457
- 'up,left': 'wmScaleInTopRight'
458
- },
459
- fade: {
460
- 'name': 'fadeIn',
461
- 'down,right': 'fadeIn',
462
- 'down,left': 'fadeIn',
463
- 'up,right': 'fadeIn',
464
- 'up,left': 'fadeIn'
465
- },
466
- slide: {
467
- 'name': 'wmSlideInDown',
468
- 'down,right': 'wmSlideInDown',
469
- 'down,left': 'wmSlideInDown',
470
- 'up,right': 'wmSlideInUp',
471
- 'up,left': 'wmSlideInUp'
472
- }
720
+ scale: {
721
+ "name": "wmScaleInLeft",
722
+ "down,right": "wmScaleInLeft",
723
+ "down,left": "wmScaleInRight",
724
+ "up,right": "wmScaleInTopLeft",
725
+ "up,left": "wmScaleInTopRight"
726
+ },
727
+ fade: {
728
+ "name": "fadeIn",
729
+ "down,right": "fadeIn",
730
+ "down,left": "fadeIn",
731
+ "up,right": "fadeIn",
732
+ "up,left": "fadeIn"
733
+ },
734
+ slide: {
735
+ "name": "wmSlideInDown",
736
+ "down,right": "wmSlideInDown",
737
+ "down,left": "wmSlideInDown",
738
+ "up,right": "wmSlideInUp",
739
+ "up,left": "wmSlideInUp"
740
+ }
473
741
  };
474
- const DEFAULT_CLS = 'dropdown-menu';
475
- class MenuDropdownComponent {
476
- constructor(elRef) {
477
- this.menuRef = inject(MenuComponent);
478
- this.nativeElement = elRef.nativeElement;
479
- this.hasExecutedCallback = false;
480
- addClass(this.nativeElement, DEFAULT_CLS);
481
- }
482
- ngAfterViewInit() {
483
- const animateItems = this.menuRef.animateitems;
484
- let animationClass = '';
485
- if (animateItems) {
486
- animationClass = `animated ${(animationClasses[animateItems][this.menuRef.menuposition] || animationClasses[animateItems].name)}`;
487
- }
488
- addClass(this.nativeElement, `dropdown-menu ${this.menuRef.menualign} ${animationClass}`, true);
489
- this.getParentWidget();
490
- }
491
- // Function to check if the menu widget is present inside other widgets like table, tabs, dialog, nav, list, tile, panel, accordion
492
- // if true then call createObserver() which internally calculates dropown height
493
- getParentWidget() {
494
- const closestWidget = $(this.menuRef.nativeElement).closest('table, ul.list-group');
495
- // Check if the closest table is the parent of the menu widget
496
- if (closestWidget && $(closestWidget).has(this.menuRef.nativeElement).length > 0) {
497
- this.createObserver(this, this.callback);
498
- }
499
- }
500
- // function which changes the position of the menu dropdown dynamically if it exceeds viewport height
501
- callback(entries, observer) {
502
- if (!this.hasExecutedCallback) {
503
- const self = this;
504
- const positions = this.menuRef.menuposition?.split(',') || [];
505
- entries.forEach(entry => {
506
- if (entry.isIntersecting) {
507
- positions[0] = 'down';
508
- self.menuRef.menuposition = positions.length > 1 ? positions.join() : 'down,right';
509
- self.nativeElement.parentElement?.classList.add('dropdown');
510
- self.menuRef.setMenuPosition();
511
- }
512
- else {
513
- positions[0] = 'up';
514
- self.menuRef.menuposition = positions.length > 1 ? positions.join() : 'up,right';
515
- self.nativeElement.parentElement?.classList.add('dropup');
516
- self.menuRef.setMenuPosition();
517
- // when container="body" is added to menu dropdown, the dropdown menu ul is attached directly to body.
518
- // so adding a class name inorder to adjust the styling of the dropdown
519
- const dropdownContainer = self.nativeElement.parentElement?.parentElement;
520
- if (dropdownContainer.tagName.toUpperCase() === "BS-DROPDOWN-CONTAINER") {
521
- // The parent element is <bs-dropdown-container>
522
- self.nativeElement.parentElement?.parentElement?.classList.add('parent-position');
523
- }
524
- }
525
- });
526
- this.hasExecutedCallback = true;
527
- }
528
- }
529
- // function which checks if the dropdown is within the viewport height or exceeds viewport height
530
- createObserver(target, callback) {
531
- const options = {
532
- root: null,
533
- threshold: 1,
534
- once: true
535
- };
536
- const observer = new IntersectionObserver(callback.bind(this), options);
537
- observer.observe(target.nativeElement);
538
- }
539
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
540
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: MenuDropdownComponent, isStandalone: true, selector: "ul[wmMenuDropdown]", inputs: { items: "items" }, ngImport: i0, template: "@for (item of items; track item) {\n <li wmMenuDropdownItem\n [item]=\"item\"\n [ngClass]=\"{disabled: item.disabled, 'dropdown-submenu': item.children.length > 0}\"\n class=\"{{item.class}}\"\n role=\"menuitem\">\n </li>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MenuDropdownItemComponent, selector: "li[wmMenuDropdownItem]", inputs: ["item"] }] }); }
541
- }
542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuDropdownComponent, decorators: [{
543
- type: Component,
544
- args: [{ standalone: true, imports: [CommonModule, MenuDropdownItemComponent], selector: 'ul[wmMenuDropdown]', template: "@for (item of items; track item) {\n <li wmMenuDropdownItem\n [item]=\"item\"\n [ngClass]=\"{disabled: item.disabled, 'dropdown-submenu': item.children.length > 0}\"\n class=\"{{item.class}}\"\n role=\"menuitem\">\n </li>\n}\n" }]
545
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { items: [{
546
- type: Input
547
- }] } });
548
-
742
+ const DEFAULT_CLS = "dropdown-menu";
743
+ var MenuDropdownComponent = class MenuDropdownComponent {
744
+ constructor(elRef) {
745
+ this.menuRef = inject(MenuComponent);
746
+ this.nativeElement = elRef.nativeElement;
747
+ this.hasExecutedCallback = false;
748
+ addClass(this.nativeElement, DEFAULT_CLS);
749
+ }
750
+ ngAfterViewInit() {
751
+ const animateItems = this.menuRef.animateitems;
752
+ let animationClass = "";
753
+ if (animateItems) animationClass = `animated ${animationClasses[animateItems][this.menuRef.menuposition] || animationClasses[animateItems].name}`;
754
+ addClass(this.nativeElement, `dropdown-menu ${this.menuRef.menualign} ${animationClass}`, true);
755
+ this.getParentWidget();
756
+ }
757
+ getParentWidget() {
758
+ const closestWidget = $(this.menuRef.nativeElement).closest("table, ul.list-group");
759
+ if (closestWidget && $(closestWidget).has(this.menuRef.nativeElement).length > 0) this.createObserver(this, this.callback);
760
+ }
761
+ callback(entries, observer) {
762
+ if (!this.hasExecutedCallback) {
763
+ const self = this;
764
+ const positions = this.menuRef.menuposition?.split(",") || [];
765
+ entries.forEach((entry) => {
766
+ if (entry.isIntersecting) {
767
+ positions[0] = "down";
768
+ self.menuRef.menuposition = positions.length > 1 ? positions.join() : "down,right";
769
+ self.nativeElement.parentElement?.classList.add("dropdown");
770
+ self.menuRef.setMenuPosition();
771
+ } else {
772
+ positions[0] = "up";
773
+ self.menuRef.menuposition = positions.length > 1 ? positions.join() : "up,right";
774
+ self.nativeElement.parentElement?.classList.add("dropup");
775
+ self.menuRef.setMenuPosition();
776
+ if ((self.nativeElement.parentElement?.parentElement).tagName.toUpperCase() === "BS-DROPDOWN-CONTAINER") self.nativeElement.parentElement?.parentElement?.classList.add("parent-position");
777
+ }
778
+ });
779
+ this.hasExecutedCallback = true;
780
+ }
781
+ }
782
+ createObserver(target, callback) {
783
+ new IntersectionObserver(callback.bind(this), {
784
+ root: null,
785
+ threshold: 1,
786
+ once: true
787
+ }).observe(target.nativeElement);
788
+ }
789
+ static {
790
+ this.ɵfac = i0.ɵɵngDeclareFactory({
791
+ minVersion: "12.0.0",
792
+ version: "22.2.1",
793
+ ngImport: i0,
794
+ type: MenuDropdownComponent,
795
+ deps: [{ token: i0.ElementRef }],
796
+ target: i0.ɵɵFactoryTarget.Component
797
+ });
798
+ }
799
+ static {
800
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
801
+ minVersion: "17.0.0",
802
+ version: "22.2.1",
803
+ type: MenuDropdownComponent,
804
+ isStandalone: true,
805
+ selector: "ul[wmMenuDropdown]",
806
+ inputs: { items: "items" },
807
+ ngImport: i0,
808
+ template: "@for (item of items; track item) {\n <li wmMenuDropdownItem\n [item]=\"item\"\n [ngClass]=\"{disabled: item.disabled, 'dropdown-submenu': item.children.length > 0}\"\n class=\"{{item.class}}\"\n role=\"menuitem\">\n </li>\n}\n",
809
+ dependencies: [
810
+ {
811
+ kind: "ngmodule",
812
+ type: CommonModule
813
+ },
814
+ {
815
+ kind: "directive",
816
+ type: i3.NgClass,
817
+ selector: "[ngClass]",
818
+ inputs: ["class", "ngClass"]
819
+ },
820
+ {
821
+ kind: "component",
822
+ type: MenuDropdownItemComponent,
823
+ selector: "li[wmMenuDropdownItem]",
824
+ inputs: ["item"]
825
+ }
826
+ ],
827
+ changeDetection: i0.ChangeDetectionStrategy.Eager
828
+ });
829
+ }
830
+ };
831
+ i0.ɵɵngDeclareClassMetadata({
832
+ minVersion: "12.0.0",
833
+ version: "22.2.1",
834
+ ngImport: i0,
835
+ type: MenuDropdownComponent,
836
+ decorators: [{
837
+ type: Component,
838
+ args: [{
839
+ changeDetection: ChangeDetectionStrategy.Eager,
840
+ standalone: true,
841
+ imports: [CommonModule, MenuDropdownItemComponent],
842
+ selector: "ul[wmMenuDropdown]",
843
+ template: "@for (item of items; track item) {\n <li wmMenuDropdownItem\n [item]=\"item\"\n [ngClass]=\"{disabled: item.disabled, 'dropdown-submenu': item.children.length > 0}\"\n class=\"{{item.class}}\"\n role=\"menuitem\">\n </li>\n}\n"
844
+ }]
845
+ }],
846
+ ctorParameters: () => [{ type: i0.ElementRef }],
847
+ propDecorators: { items: [{ type: Input }] }
848
+ });
549
849
  const registerProps = () => {
550
- register('wm-menu', new Map([
551
- ['accessroles', { value: 'Everyone', ...PROP_STRING }],
552
- ['animateitems', PROP_STRING],
553
- ['autoclose', { value: 'always', ...PROP_STRING }],
554
- ['autoopen', { value: 'never', ...PROP_STRING }],
555
- ['caption', PROP_STRING],
556
- ['class', PROP_STRING],
557
- ['dataset', { value: 'Menu Item 1, Menu Item 2, Menu Item 3', ...PROP_ANY }],
558
- ['hint', { value: '', ...PROP_STRING }],
559
- ['arialabel', PROP_STRING],
560
- ['isactive', PROP_STRING],
561
- ['iconclass', PROP_STRING],
562
- ['iconurl', PROP_STRING],
563
- ['iconposition', { value: 'left', ...PROP_STRING }],
564
- ['itemaction', PROP_STRING],
565
- ['itemchildren', PROP_STRING],
566
- ['itemclass', PROP_STRING],
567
- ['itemicon', PROP_STRING],
568
- ['itemlabel', PROP_STRING],
569
- ['itemlink', PROP_STRING],
570
- ['itemtarget', PROP_STRING],
571
- ['linktarget', { value: '_self', ...PROP_STRING }],
572
- ['menuclass', PROP_STRING],
573
- ['menulayout', PROP_STRING],
574
- ['menuposition', PROP_STRING],
575
- ['name', PROP_STRING],
576
- ['orderby', PROP_STRING],
577
- ['shortcutkey', PROP_STRING],
578
- ['show', { value: true, ...PROP_BOOLEAN }],
579
- ['showonhover', { value: false, ...PROP_BOOLEAN }],
580
- ['tabindex', { value: 0, ...PROP_NUMBER }],
581
- ['type', { value: 'menu', ...PROP_STRING }],
582
- ['userrole', PROP_STRING]
583
- ]));
850
+ register("wm-menu", /* @__PURE__ */ new Map([
851
+ ["accessroles", {
852
+ value: "Everyone",
853
+ ...PROP_STRING
854
+ }],
855
+ ["animateitems", PROP_STRING],
856
+ ["autoclose", {
857
+ value: "always",
858
+ ...PROP_STRING
859
+ }],
860
+ ["autoopen", {
861
+ value: "never",
862
+ ...PROP_STRING
863
+ }],
864
+ ["caption", PROP_STRING],
865
+ ["class", PROP_STRING],
866
+ ["dataset", {
867
+ value: "Menu Item 1, Menu Item 2, Menu Item 3",
868
+ ...PROP_ANY
869
+ }],
870
+ ["hint", {
871
+ value: "",
872
+ ...PROP_STRING
873
+ }],
874
+ ["arialabel", PROP_STRING],
875
+ ["isactive", PROP_STRING],
876
+ ["iconclass", PROP_STRING],
877
+ ["iconurl", PROP_STRING],
878
+ ["iconposition", {
879
+ value: "left",
880
+ ...PROP_STRING
881
+ }],
882
+ ["itemaction", PROP_STRING],
883
+ ["itemchildren", PROP_STRING],
884
+ ["itemclass", PROP_STRING],
885
+ ["itemicon", PROP_STRING],
886
+ ["itemlabel", PROP_STRING],
887
+ ["itemlink", PROP_STRING],
888
+ ["itemtarget", PROP_STRING],
889
+ ["linktarget", {
890
+ value: "_self",
891
+ ...PROP_STRING
892
+ }],
893
+ ["menuclass", PROP_STRING],
894
+ ["menulayout", PROP_STRING],
895
+ ["menuposition", PROP_STRING],
896
+ ["name", PROP_STRING],
897
+ ["orderby", PROP_STRING],
898
+ ["shortcutkey", PROP_STRING],
899
+ ["show", {
900
+ value: true,
901
+ ...PROP_BOOLEAN
902
+ }],
903
+ ["showonhover", {
904
+ value: false,
905
+ ...PROP_BOOLEAN
906
+ }],
907
+ ["tabindex", {
908
+ value: 0,
909
+ ...PROP_NUMBER
910
+ }],
911
+ ["type", {
912
+ value: "menu",
913
+ ...PROP_STRING
914
+ }],
915
+ ["userrole", PROP_STRING]
916
+ ]));
584
917
  };
585
-
586
918
  const KEYBOARD_MOVEMENTS = {
587
- MOVE_UP: 'UP-ARROW',
588
- MOVE_LEFT: 'LEFT-ARROW',
589
- MOVE_RIGHT: 'RIGHT-ARROW',
590
- MOVE_DOWN: 'DOWN-ARROW',
591
- ON_ENTER: 'ENTER',
592
- ON_MOUSE_ENTER: 'MOUSE-ENTER',
593
- ON_MOUSE_LEAVE: 'MOUSE-LEAVE',
594
- ON_TAB: 'TAB',
595
- ON_SHIFT_TAB: 'SHIFT-TAB',
596
- ON_ESCAPE: 'ESC'
919
+ MOVE_UP: "UP-ARROW",
920
+ MOVE_LEFT: "LEFT-ARROW",
921
+ MOVE_RIGHT: "RIGHT-ARROW",
922
+ MOVE_DOWN: "DOWN-ARROW",
923
+ ON_ENTER: "ENTER",
924
+ ON_MOUSE_ENTER: "MOUSE-ENTER",
925
+ ON_MOUSE_LEAVE: "MOUSE-LEAVE",
926
+ ON_TAB: "TAB",
927
+ ON_SHIFT_TAB: "SHIFT-TAB",
928
+ ON_ESCAPE: "ESC"
597
929
  };
598
930
  const MENU_POSITION = {
599
- UP_LEFT: 'up,left',
600
- UP_RIGHT: 'up,right',
601
- DOWN_LEFT: 'down,left',
602
- DOWN_RIGHT: 'down,right',
603
- INLINE: 'inline'
931
+ UP_LEFT: "up,left",
932
+ UP_RIGHT: "up,right",
933
+ DOWN_LEFT: "down,left",
934
+ DOWN_RIGHT: "down,right",
935
+ INLINE: "inline"
604
936
  };
605
937
  const POSITION = {
606
- DOWN_RIGHT: 'down,right',
607
- DOWN_LEFT: 'down,left',
608
- UP_RIGHT: 'up,right',
609
- UP_LEFT: 'up,left',
610
- INLINE: 'inline'
938
+ DOWN_RIGHT: "down,right",
939
+ DOWN_LEFT: "down,left",
940
+ UP_RIGHT: "up,right",
941
+ UP_LEFT: "up,left",
942
+ INLINE: "inline"
611
943
  };
612
944
  const CARET_CLS = {
613
- UP: 'fa-caret-up',
614
- DOWN: 'fa-caret-down'
945
+ UP: "fa-caret-up",
946
+ DOWN: "fa-caret-down"
615
947
  };
616
948
  const PULL_CLS = {
617
- LEFT: 'pull-left',
618
- RIGHT: 'pull-right'
949
+ LEFT: "pull-left",
950
+ RIGHT: "pull-right"
619
951
  };
620
952
  const AUTO_OPEN = {
621
- NEVER: 'never',
622
- ACTIVE_PAGE: 'activepage',
623
- ALWAYS: 'always'
953
+ NEVER: "never",
954
+ ACTIVE_PAGE: "activepage",
955
+ ALWAYS: "always"
624
956
  };
625
- const WIDGET_CONFIG = { widgetType: 'wm-menu', hostClass: 'dropdown app-menu' };
626
- class MenuComponent extends DatasetAwareNavComponent {
627
- static { this.initializeProps = registerProps(); }
628
- onShow() {
629
- this._menuposition = this.menuposition;
630
- if (this._selectFirstItem) {
631
- setTimeout(() => {
632
- this.$element.find('> ul[wmmenudropdown] li.app-menu-item').first().find('> a').focus();
633
- });
634
- }
635
- $appDigest();
636
- }
637
- onHide() {
638
- this.$element.find('li').removeClass('open');
639
- this._selectFirstItem = false;
640
- // reset the menuposition when dropdown is closed
641
- this.menuposition = this._menuposition ? this._menuposition : MENU_POSITION.DOWN_RIGHT;
642
- this.setMenuPosition();
643
- $appDigest();
644
- }
645
- onKeyDownArrowUp($event) { this.onKeyDown($event, 'UP-ARROW'); }
646
- onMouseEnter($event) { this.onKeyDown($event, 'MOUSE-ENTER'); }
647
- onMouseLeave($event) { this.onKeyDown($event, 'MOUSE-LEAVE'); }
648
- onKeyDownArrowDown($event) { this.onKeyDown($event, 'DOWN-ARROW'); }
649
- onKeyDownArrowRight($event) { this.onKeyDown($event, 'RIGHT-ARROW'); }
650
- onKeyDownArrowLeft($event) { this.onKeyDown($event, 'LEFT-ARROW'); }
651
- onKeyDownEnter($event) { this.onKeyDown($event, 'ENTER'); }
652
- onKeyDown($event, eventAction) {
653
- const KEY_MOVEMENTS = clone(KEYBOARD_MOVEMENTS);
654
- if (this.menuposition === MENU_POSITION.UP_RIGHT) {
655
- KEY_MOVEMENTS.MOVE_UP = 'DOWN-ARROW';
656
- KEY_MOVEMENTS.MOVE_DOWN = 'UP-ARROW';
657
- }
658
- else if (this.menuposition === MENU_POSITION.UP_LEFT) {
659
- KEY_MOVEMENTS.MOVE_UP = 'DOWN-ARROW';
660
- KEY_MOVEMENTS.MOVE_DOWN = 'UP-ARROW';
661
- KEY_MOVEMENTS.MOVE_LEFT = 'RIGHT-ARROW';
662
- KEY_MOVEMENTS.MOVE_RIGHT = 'LEFT-ARROW';
663
- }
664
- else if (this.menuposition === MENU_POSITION.DOWN_LEFT) {
665
- KEY_MOVEMENTS.MOVE_LEFT = 'RIGHT-ARROW';
666
- KEY_MOVEMENTS.MOVE_RIGHT = 'LEFT-ARROW';
667
- }
668
- if (includes([KEY_MOVEMENTS.MOVE_DOWN, KEY_MOVEMENTS.MOVE_RIGHT], eventAction)) {
669
- if (!this.bsDropdown.isOpen) {
670
- this._selectFirstItem = true;
671
- this.bsDropdown.show();
672
- }
673
- else {
674
- this.$element.find('> ul[wmmenudropdown] li.app-menu-item').first().find('> a').focus();
675
- }
676
- }
677
- else if (eventAction === KEY_MOVEMENTS.ON_ENTER || (eventAction === KEY_MOVEMENTS.ON_MOUSE_ENTER && this.showonhover)) {
678
- this.bsDropdown.toggle(true);
679
- }
680
- else if (includes([KEY_MOVEMENTS.MOVE_UP, KEY_MOVEMENTS.MOVE_LEFT], eventAction) || (eventAction == KEY_MOVEMENTS.ON_MOUSE_LEAVE && this.autoclose == AUTOCLOSE_TYPE.ALWAYS && this.showonhover)) {
681
- this.bsDropdown.hide();
682
- }
683
- $event.preventDefault();
684
- }
685
- constructor(inj, route, userDefinedExecutionContext, app, bsDropdown, parentNav, selectEventCB, explicitContext) {
686
- super(inj, WIDGET_CONFIG, explicitContext);
687
- this.route = route;
688
- this.userDefinedExecutionContext = userDefinedExecutionContext;
689
- this.app = app;
690
- this.bsDropdown = bsDropdown;
691
- this.parentNav = parentNav;
692
- this.selectEventCB = selectEventCB;
693
- this.menuCaret = 'fa-caret-down';
694
- this._selectFirstItem = false;
695
- if (parentNav) {
696
- this.disableMenuContext = !!parentNav.disableMenuContext;
697
- }
698
- else {
699
- this.disableMenuContext = !!selectEventCB;
700
- }
701
- // For selecting the item on load
702
- const datasetSubscription = this.nodes$.subscribe(() => {
703
- if (!isEmpty(this.nodes)) {
704
- if (hasLinkToCurrentPage(this.nodes, this.route.url)) {
705
- addClass(this.nativeElement.querySelector('.dropdown-toggle'), 'active');
706
- }
707
- // If menu widget is inside nav widget then dont check for item isactive property because these will be handled form nav widget.
708
- if (this.parentNav) {
709
- return;
710
- }
711
- let itemFound = false;
712
- const getItem = (nodes) => {
713
- forEach(nodes, (item) => {
714
- if (itemFound) {
715
- return;
716
- }
717
- if (item.isactive) {
718
- itemFound = true;
719
- this.onMenuItemSelect({ $event: {}, $item: item });
720
- // Trigger the action associated with active item
721
- triggerItemAction(this, item);
722
- return false;
723
- }
724
- if (!isEmpty(item.children)) {
725
- getItem(item.children);
726
- }
727
- });
728
- };
729
- getItem(this.nodes);
730
- }
731
- });
732
- this.registerDestroyListener(() => datasetSubscription.unsubscribe());
733
- }
734
- resetNodes() {
735
- super.resetNodes();
736
- // open the menu if any of its menu items has link to current page and if autoopen value is 'active page'
737
- if ((this.autoopen === AUTO_OPEN.ACTIVE_PAGE && hasLinkToCurrentPage(this.nodes, this.route.url)) || this.autoopen === AUTO_OPEN.ALWAYS) {
738
- this.bsDropdown.show();
739
- }
740
- }
741
- ngOnInit() {
742
- super.ngOnInit();
743
- this.setMenuPosition();
744
- const cancelSubscription = this.app.subscribe("highlightActiveLink", (data) => {
745
- toggleClass(this.nativeElement.querySelector('.dropdown-toggle'), 'active', hasLinkToCurrentPage(this.nodes, this.route.url));
746
- });
747
- this.registerDestroyListener(() => cancelSubscription());
748
- }
749
- onPropertyChange(key, nv, ov) {
750
- if (key === 'tabindex') {
751
- // Let the base class handle tabindex setting via setAttr
752
- super.onPropertyChange(key, nv, ov);
753
- return;
754
- }
755
- if (key === 'autoclose') {
756
- // ngx-bootstrap 21: autoClose is an InputSignal; WaveMaker sets internal dropdown state at runtime.
757
- this.bsDropdown._state.autoClose =
758
- nv !== AUTOCLOSE_TYPE.DISABLED;
759
- this.autoclose = nv;
760
- }
761
- else {
762
- super.onPropertyChange(key, nv, ov);
763
- }
764
- }
765
- setMenuPosition() {
766
- switch (this.menuposition) {
767
- case POSITION.DOWN_RIGHT:
768
- removeClass(this.nativeElement, 'dropup');
769
- this.menualign = PULL_CLS.LEFT;
770
- this.menuCaret = CARET_CLS.DOWN;
771
- break;
772
- case POSITION.DOWN_LEFT:
773
- removeClass(this.nativeElement, 'dropup');
774
- this.menualign = PULL_CLS.RIGHT;
775
- this.menuCaret = CARET_CLS.DOWN;
776
- break;
777
- case POSITION.UP_LEFT:
778
- addClass(this.nativeElement, 'dropup');
779
- this.menualign = PULL_CLS.RIGHT;
780
- this.menuCaret = CARET_CLS.UP;
781
- break;
782
- case POSITION.UP_RIGHT:
783
- addClass(this.nativeElement, 'dropup');
784
- this.menualign = PULL_CLS.LEFT;
785
- this.menuCaret = CARET_CLS.UP;
786
- break;
787
- case POSITION.INLINE:
788
- this.menualign = 'dropinline-menu';
789
- break;
790
- }
791
- }
792
- onMenuItemSelect(args) {
793
- const { $event } = args;
794
- const $item = args.$item.value;
795
- this.invokeEventCallback('select', { $event, $item });
796
- }
797
- ngAfterViewInit() {
798
- super.ngAfterViewInit();
799
- // Fix tabindex if it's NaN (ensure it's fixed after view initialization)
800
- if (this.widget.tabindex !== undefined && (typeof this.widget.tabindex === 'number' && isNaN(this.widget.tabindex))) {
801
- this.widget.tabindex = 0;
802
- this.tabindex = 0;
803
- }
804
- styler(this.nativeElement.querySelector('.dropdown-toggle'), this);
805
- }
806
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i2.UserDefinedExecutionContext }, { token: i2.App }, { token: i3$1.BsDropdownDirective, optional: true, self: true }, { token: NavComponent, optional: true }, { token: 'select.event', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
807
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: MenuComponent, isStandalone: true, selector: "[wmMenu]", host: { listeners: { "onShown": "onShow()", "onHidden": "onHide()", "keydown.arrowup": "onKeyDownArrowUp($event)", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)", "keydown.arrowdown": "onKeyDownArrowDown($event)", "keydown.arrowright": "onKeyDownArrowRight($event)", "keydown.arrowleft": "onKeyDownArrowLeft($event)", "keydown.enter": "onKeyDownEnter($event)" } }, providers: [
808
- provideAsWidgetRef(MenuComponent),
809
- ], usesInheritance: true, ngImport: i0, template: "\n\n<ng-template #innerTemplate>\n <wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" alt=\"Menu icon\"></wm-app-icon>\n <span class=\"caption\" [textContent]=\"caption\"></span>\n <span class=\"pull-right caret fa {{menuCaret}}\"></span>\n</ng-template>\n\n@if (type === 'anchor') {\n <a wmAnchor\n dropdownToggle\n [attr.aria-label]=\"arialabel || 'Menu'\"\n href=\"javascript:void(0);\"\n role=\"button\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n hint.bind=\"hint\"\n class=\"dropdown-toggle {{menuclass}}\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n badgevalue.bind=\"badgevalue\"\n >\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </a>\n} @else {\n <button wmButton\n dropdownToggle\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n [attr.aria-label]=\"arialabel || 'Menu'\"\n class=\"btn app-button dropdown-toggle {{menuclass}}\"\n hint.bind=\"hint\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n type=\"button\">\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </button>\n}\n\n<ul *dropdownMenu [items]=\"nodes\" [ngClass]=\"menulayout\" class=\"icon-position-{{iconposition}}\" role=\"menubar\"\nwmMenuDropdown></ul>\n", dependencies: [{ kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i3$1.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3$1.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: AnchorComponent, selector: "a[wmAnchor]", exportAs: ["wmAnchor"] }, { kind: "component", type: ButtonComponent, selector: "button[wmButton]", exportAs: ["wmButton"] }, { kind: "component", type: MenuDropdownComponent, selector: "ul[wmMenuDropdown]", inputs: ["items"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["icon", "iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
810
- }
811
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuComponent, decorators: [{
812
- type: Component,
813
- args: [{ standalone: true, imports: [BsDropdownModule, CommonModule, TextContentDirective, AnchorComponent, ButtonComponent, MenuDropdownComponent, WmAppIconComponent], selector: '[wmMenu]', providers: [
814
- provideAsWidgetRef(MenuComponent),
815
- ], template: "\n\n<ng-template #innerTemplate>\n <wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" alt=\"Menu icon\"></wm-app-icon>\n <span class=\"caption\" [textContent]=\"caption\"></span>\n <span class=\"pull-right caret fa {{menuCaret}}\"></span>\n</ng-template>\n\n@if (type === 'anchor') {\n <a wmAnchor\n dropdownToggle\n [attr.aria-label]=\"arialabel || 'Menu'\"\n href=\"javascript:void(0);\"\n role=\"button\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n hint.bind=\"hint\"\n class=\"dropdown-toggle {{menuclass}}\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n badgevalue.bind=\"badgevalue\"\n >\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </a>\n} @else {\n <button wmButton\n dropdownToggle\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n [attr.aria-label]=\"arialabel || 'Menu'\"\n class=\"btn app-button dropdown-toggle {{menuclass}}\"\n hint.bind=\"hint\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n type=\"button\">\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </button>\n}\n\n<ul *dropdownMenu [items]=\"nodes\" [ngClass]=\"menulayout\" class=\"icon-position-{{iconposition}}\" role=\"menubar\"\nwmMenuDropdown></ul>\n" }]
816
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i1.Router }, { type: i2.UserDefinedExecutionContext }, { type: i2.App }, { type: i3$1.BsDropdownDirective, decorators: [{
817
- type: Self
818
- }, {
819
- type: Optional
820
- }] }, { type: NavComponent, decorators: [{
821
- type: Optional
822
- }] }, { type: undefined, decorators: [{
823
- type: Attribute,
824
- args: ['select.event']
825
- }] }, { type: undefined, decorators: [{
826
- type: Inject,
827
- args: ['EXPLICIT_CONTEXT']
828
- }, {
829
- type: Optional
830
- }] }], propDecorators: { onShow: [{
831
- type: HostListener,
832
- args: ['onShown']
833
- }], onHide: [{
834
- type: HostListener,
835
- args: ['onHidden']
836
- }], onKeyDownArrowUp: [{
837
- type: HostListener,
838
- args: ['keydown.arrowup', ['$event']]
839
- }], onMouseEnter: [{
840
- type: HostListener,
841
- args: ['mouseenter', ['$event']]
842
- }], onMouseLeave: [{
843
- type: HostListener,
844
- args: ['mouseleave', ['$event']]
845
- }], onKeyDownArrowDown: [{
846
- type: HostListener,
847
- args: ['keydown.arrowdown', ['$event']]
848
- }], onKeyDownArrowRight: [{
849
- type: HostListener,
850
- args: ['keydown.arrowright', ['$event']]
851
- }], onKeyDownArrowLeft: [{
852
- type: HostListener,
853
- args: ['keydown.arrowleft', ['$event']]
854
- }], onKeyDownEnter: [{
855
- type: HostListener,
856
- args: ['keydown.enter', ['$event']]
857
- }] } });
858
-
859
- const menuProps = ['itemlabel', 'itemicon', 'itemlink', 'itemaction', 'itemchildren', 'userrole'];
860
- class MenuAdapterComponent extends BaseContainerComponent {
861
- constructor(inj, WIDGET_CONFIG, explicitContext) {
862
- super(inj, WIDGET_CONFIG, explicitContext);
863
- this.pageScope = this.viewParent;
864
- this.binditemlabel = this.nativeElement.getAttribute('itemlabel.bind');
865
- this.binditemicon = this.nativeElement.getAttribute('itemicon.bind');
866
- this.binditemaction = this.nativeElement.getAttribute('itemaction.bind');
867
- this.binditemlink = this.nativeElement.getAttribute('itemlink.bind');
868
- this.binduserrole = this.nativeElement.getAttribute('userrole.bind');
869
- this.binditemchildren = this.nativeElement.getAttribute('itemchildren.bind');
870
- }
871
- onPropertyChange(key, nv, ov) {
872
- if (includes(menuProps, key) && this.menuRef) {
873
- this.menuRef.itemlabel = nv;
874
- }
875
- else {
876
- super.onPropertyChange(key, nv, ov);
877
- }
878
- }
879
- ngAfterViewInit() {
880
- super.ngAfterViewInit();
881
- if (this.menuRefQL['first']) {
882
- this.setMenuProperty();
883
- }
884
- this.menuRefQLSubscription = this.menuRefQL.changes.subscribe((menuRefQL) => {
885
- if (menuRefQL.first) {
886
- this.setMenuProperty();
887
- if (this.menuRefQLSubscription) {
888
- this.menuRefQLSubscription.unsubscribe();
889
- this.menuRefQLSubscription = null;
890
- }
891
- }
892
- });
893
- }
894
- ngOnDestroy() {
895
- // MEMORY LEAK FIX: Unsubscribe from QueryList changes
896
- if (this.menuRefQLSubscription) {
897
- this.menuRefQLSubscription.unsubscribe();
898
- this.menuRefQLSubscription = null;
899
- }
900
- // MEMORY LEAK FIX: Clear QueryList reference
901
- this.menuRefQL = null;
902
- this.menuRef = null;
903
- super.ngOnDestroy();
904
- }
905
- setMenuProperty() {
906
- if (this.menuRefQL['first']) {
907
- if (this.menuRefQL.first) {
908
- this.menuRef = this.menuRefQL.first;
909
- menuProps.forEach((prop) => {
910
- const bindProp = `bind${prop}`;
911
- if (this[bindProp]) {
912
- this.menuRef[bindProp] = this[bindProp];
913
- }
914
- this.menuRef[prop] = this[prop];
915
- });
916
- }
917
- }
918
- }
919
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuAdapterComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
920
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: MenuAdapterComponent, isStandalone: true, viewQueries: [{ propertyName: "menuRefQL", predicate: MenuComponent, descendants: true }], usesInheritance: true, ngImport: i0 }); }
921
- }
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: MenuAdapterComponent, decorators: [{
923
- type: Directive
924
- }], ctorParameters: () => [{ type: undefined }, { type: undefined }, { type: undefined, decorators: [{
925
- type: Inject,
926
- args: ['EXPLICIT_CONTEXT']
927
- }, {
928
- type: Optional
929
- }] }], propDecorators: { menuRefQL: [{
930
- type: ViewChildren,
931
- args: [MenuComponent]
932
- }] } });
933
-
934
- /**
935
- * Generated bundle index. Do not edit.
936
- */
937
-
957
+ const WIDGET_CONFIG = {
958
+ widgetType: "wm-menu",
959
+ hostClass: "dropdown app-menu"
960
+ };
961
+ var MenuComponent = class MenuComponent extends DatasetAwareNavComponent {
962
+ static {
963
+ this.initializeProps = registerProps();
964
+ }
965
+ onShow() {
966
+ this._menuposition = this.menuposition;
967
+ if (this._selectFirstItem) setTimeout(() => {
968
+ this.$element.find("> ul[wmmenudropdown] li.app-menu-item").first().find("> a").focus();
969
+ });
970
+ $appDigest();
971
+ }
972
+ onHide() {
973
+ this.$element.find("li").removeClass("open");
974
+ this._selectFirstItem = false;
975
+ this.menuposition = this._menuposition ? this._menuposition : MENU_POSITION.DOWN_RIGHT;
976
+ this.setMenuPosition();
977
+ $appDigest();
978
+ }
979
+ onKeyDownArrowUp($event) {
980
+ this.onKeyDown($event, "UP-ARROW");
981
+ }
982
+ onMouseEnter($event) {
983
+ this.onKeyDown($event, "MOUSE-ENTER");
984
+ }
985
+ onMouseLeave($event) {
986
+ this.onKeyDown($event, "MOUSE-LEAVE");
987
+ }
988
+ onKeyDownArrowDown($event) {
989
+ this.onKeyDown($event, "DOWN-ARROW");
990
+ }
991
+ onKeyDownArrowRight($event) {
992
+ this.onKeyDown($event, "RIGHT-ARROW");
993
+ }
994
+ onKeyDownArrowLeft($event) {
995
+ this.onKeyDown($event, "LEFT-ARROW");
996
+ }
997
+ onKeyDownEnter($event) {
998
+ this.onKeyDown($event, "ENTER");
999
+ }
1000
+ onKeyDown($event, eventAction) {
1001
+ const KEY_MOVEMENTS = clone(KEYBOARD_MOVEMENTS);
1002
+ if (this.menuposition === MENU_POSITION.UP_RIGHT) {
1003
+ KEY_MOVEMENTS.MOVE_UP = "DOWN-ARROW";
1004
+ KEY_MOVEMENTS.MOVE_DOWN = "UP-ARROW";
1005
+ } else if (this.menuposition === MENU_POSITION.UP_LEFT) {
1006
+ KEY_MOVEMENTS.MOVE_UP = "DOWN-ARROW";
1007
+ KEY_MOVEMENTS.MOVE_DOWN = "UP-ARROW";
1008
+ KEY_MOVEMENTS.MOVE_LEFT = "RIGHT-ARROW";
1009
+ KEY_MOVEMENTS.MOVE_RIGHT = "LEFT-ARROW";
1010
+ } else if (this.menuposition === MENU_POSITION.DOWN_LEFT) {
1011
+ KEY_MOVEMENTS.MOVE_LEFT = "RIGHT-ARROW";
1012
+ KEY_MOVEMENTS.MOVE_RIGHT = "LEFT-ARROW";
1013
+ }
1014
+ if (includes([KEY_MOVEMENTS.MOVE_DOWN, KEY_MOVEMENTS.MOVE_RIGHT], eventAction)) {
1015
+ if (!this.bsDropdown.isOpen) {
1016
+ this._selectFirstItem = true;
1017
+ this.bsDropdown.show();
1018
+ } else this.$element.find("> ul[wmmenudropdown] li.app-menu-item").first().find("> a").focus();
1019
+ } else if (eventAction === KEY_MOVEMENTS.ON_ENTER || eventAction === KEY_MOVEMENTS.ON_MOUSE_ENTER && this.showonhover) this.bsDropdown.toggle(true);
1020
+ else if (includes([KEY_MOVEMENTS.MOVE_UP, KEY_MOVEMENTS.MOVE_LEFT], eventAction) || eventAction == KEY_MOVEMENTS.ON_MOUSE_LEAVE && this.autoclose == AUTOCLOSE_TYPE.ALWAYS && this.showonhover) this.bsDropdown.hide();
1021
+ $event.preventDefault();
1022
+ }
1023
+ constructor(inj, route, userDefinedExecutionContext, app, bsDropdown, parentNav, selectEventCB, explicitContext) {
1024
+ super(inj, WIDGET_CONFIG, explicitContext);
1025
+ this.route = route;
1026
+ this.userDefinedExecutionContext = userDefinedExecutionContext;
1027
+ this.app = app;
1028
+ this.bsDropdown = bsDropdown;
1029
+ this.parentNav = parentNav;
1030
+ this.selectEventCB = selectEventCB;
1031
+ this.menuCaret = "fa-caret-down";
1032
+ this._selectFirstItem = false;
1033
+ if (parentNav) this.disableMenuContext = !!parentNav.disableMenuContext;
1034
+ else this.disableMenuContext = !!selectEventCB;
1035
+ const datasetSubscription = this.nodes$.subscribe(() => {
1036
+ if (!isEmpty(this.nodes)) {
1037
+ if (hasLinkToCurrentPage(this.nodes, this.route.url)) addClass(this.nativeElement.querySelector(".dropdown-toggle"), "active");
1038
+ if (this.parentNav) return;
1039
+ let itemFound = false;
1040
+ const getItem = (nodes) => {
1041
+ forEach(nodes, (item) => {
1042
+ if (itemFound) return;
1043
+ if (item.isactive) {
1044
+ itemFound = true;
1045
+ this.onMenuItemSelect({
1046
+ $event: {},
1047
+ $item: item
1048
+ });
1049
+ triggerItemAction(this, item);
1050
+ return false;
1051
+ }
1052
+ if (!isEmpty(item.children)) getItem(item.children);
1053
+ });
1054
+ };
1055
+ getItem(this.nodes);
1056
+ }
1057
+ });
1058
+ this.registerDestroyListener(() => datasetSubscription.unsubscribe());
1059
+ }
1060
+ resetNodes() {
1061
+ super.resetNodes();
1062
+ if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE && hasLinkToCurrentPage(this.nodes, this.route.url) || this.autoopen === AUTO_OPEN.ALWAYS) this.bsDropdown.show();
1063
+ }
1064
+ ngOnInit() {
1065
+ super.ngOnInit();
1066
+ this.setMenuPosition();
1067
+ const cancelSubscription = this.app.subscribe("highlightActiveLink", (data) => {
1068
+ toggleClass(this.nativeElement.querySelector(".dropdown-toggle"), "active", hasLinkToCurrentPage(this.nodes, this.route.url));
1069
+ });
1070
+ this.registerDestroyListener(() => cancelSubscription());
1071
+ }
1072
+ onPropertyChange(key, nv, ov) {
1073
+ if (key === "tabindex") {
1074
+ super.onPropertyChange(key, nv, ov);
1075
+ return;
1076
+ }
1077
+ if (key === "autoclose") {
1078
+ this.bsDropdown._state.autoClose = nv !== AUTOCLOSE_TYPE.DISABLED;
1079
+ this.autoclose = nv;
1080
+ } else super.onPropertyChange(key, nv, ov);
1081
+ }
1082
+ setMenuPosition() {
1083
+ switch (this.menuposition) {
1084
+ case POSITION.DOWN_RIGHT:
1085
+ removeClass(this.nativeElement, "dropup");
1086
+ this.menualign = PULL_CLS.LEFT;
1087
+ this.menuCaret = CARET_CLS.DOWN;
1088
+ break;
1089
+ case POSITION.DOWN_LEFT:
1090
+ removeClass(this.nativeElement, "dropup");
1091
+ this.menualign = PULL_CLS.RIGHT;
1092
+ this.menuCaret = CARET_CLS.DOWN;
1093
+ break;
1094
+ case POSITION.UP_LEFT:
1095
+ addClass(this.nativeElement, "dropup");
1096
+ this.menualign = PULL_CLS.RIGHT;
1097
+ this.menuCaret = CARET_CLS.UP;
1098
+ break;
1099
+ case POSITION.UP_RIGHT:
1100
+ addClass(this.nativeElement, "dropup");
1101
+ this.menualign = PULL_CLS.LEFT;
1102
+ this.menuCaret = CARET_CLS.UP;
1103
+ break;
1104
+ case POSITION.INLINE: this.menualign = "dropinline-menu";
1105
+ }
1106
+ }
1107
+ onMenuItemSelect(args) {
1108
+ const { $event } = args;
1109
+ const $item = args.$item.value;
1110
+ this.invokeEventCallback("select", {
1111
+ $event,
1112
+ $item
1113
+ });
1114
+ }
1115
+ ngAfterViewInit() {
1116
+ super.ngAfterViewInit();
1117
+ if (this.widget.tabindex !== void 0 && typeof this.widget.tabindex === "number" && isNaN(this.widget.tabindex)) {
1118
+ this.widget.tabindex = 0;
1119
+ this.tabindex = 0;
1120
+ }
1121
+ styler(this.nativeElement.querySelector(".dropdown-toggle"), this);
1122
+ }
1123
+ static {
1124
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1125
+ minVersion: "12.0.0",
1126
+ version: "22.2.1",
1127
+ ngImport: i0,
1128
+ type: MenuComponent,
1129
+ deps: [
1130
+ { token: i0.Injector },
1131
+ { token: i1.Router },
1132
+ { token: i2.UserDefinedExecutionContext },
1133
+ { token: i2.App },
1134
+ {
1135
+ token: i4.BsDropdownDirective,
1136
+ optional: true,
1137
+ self: true
1138
+ },
1139
+ {
1140
+ token: NavComponent,
1141
+ optional: true
1142
+ },
1143
+ {
1144
+ token: "select.event",
1145
+ attribute: true
1146
+ },
1147
+ {
1148
+ token: "EXPLICIT_CONTEXT",
1149
+ optional: true
1150
+ }
1151
+ ],
1152
+ target: i0.ɵɵFactoryTarget.Component
1153
+ });
1154
+ }
1155
+ static {
1156
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1157
+ minVersion: "17.0.0",
1158
+ version: "22.2.1",
1159
+ type: MenuComponent,
1160
+ isStandalone: true,
1161
+ selector: "[wmMenu]",
1162
+ host: { listeners: {
1163
+ "onShown": "onShow()",
1164
+ "onHidden": "onHide()",
1165
+ "keydown.arrowup": "onKeyDownArrowUp($event)",
1166
+ "mouseenter": "onMouseEnter($event)",
1167
+ "mouseleave": "onMouseLeave($event)",
1168
+ "keydown.arrowdown": "onKeyDownArrowDown($event)",
1169
+ "keydown.arrowright": "onKeyDownArrowRight($event)",
1170
+ "keydown.arrowleft": "onKeyDownArrowLeft($event)",
1171
+ "keydown.enter": "onKeyDownEnter($event)"
1172
+ } },
1173
+ providers: [provideAsWidgetRef(MenuComponent)],
1174
+ usesInheritance: true,
1175
+ ngImport: i0,
1176
+ template: "\n\n<ng-template #innerTemplate>\n <wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" alt=\"Menu icon\"></wm-app-icon>\n <span class=\"caption\" [textContent]=\"caption\"></span>\n <span class=\"pull-right caret fa {{menuCaret}}\"></span>\n</ng-template>\n\n@if (type === 'anchor') {\n <a wmAnchor\n dropdownToggle\n [attr.aria-label]=\"arialabel || 'Menu'\"\n href=\"javascript:void(0);\"\n role=\"button\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n hint.bind=\"hint\"\n class=\"dropdown-toggle {{menuclass}}\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n badgevalue.bind=\"badgevalue\"\n >\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </a>\n} @else {\n <button wmButton\n dropdownToggle\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n [attr.aria-label]=\"arialabel || 'Menu'\"\n class=\"btn app-button dropdown-toggle {{menuclass}}\"\n hint.bind=\"hint\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n type=\"button\">\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </button>\n}\n\n<ul *dropdownMenu [items]=\"nodes\" [ngClass]=\"menulayout\" class=\"icon-position-{{iconposition}}\" role=\"menubar\"\nwmMenuDropdown></ul>\n",
1177
+ dependencies: [
1178
+ {
1179
+ kind: "ngmodule",
1180
+ type: BsDropdownModule
1181
+ },
1182
+ {
1183
+ kind: "directive",
1184
+ type: i4.BsDropdownMenuDirective,
1185
+ selector: "[bsDropdownMenu],[dropdownMenu]",
1186
+ exportAs: ["bs-dropdown-menu"]
1187
+ },
1188
+ {
1189
+ kind: "directive",
1190
+ type: i4.BsDropdownToggleDirective,
1191
+ selector: "[bsDropdownToggle],[dropdownToggle]",
1192
+ exportAs: ["bs-dropdown-toggle"]
1193
+ },
1194
+ {
1195
+ kind: "ngmodule",
1196
+ type: CommonModule
1197
+ },
1198
+ {
1199
+ kind: "directive",
1200
+ type: i3.NgClass,
1201
+ selector: "[ngClass]",
1202
+ inputs: ["class", "ngClass"]
1203
+ },
1204
+ {
1205
+ kind: "directive",
1206
+ type: TextContentDirective,
1207
+ selector: "[textContent]",
1208
+ inputs: ["textContent"]
1209
+ },
1210
+ {
1211
+ kind: "component",
1212
+ type: AnchorComponent,
1213
+ selector: "a[wmAnchor]",
1214
+ exportAs: ["wmAnchor"]
1215
+ },
1216
+ {
1217
+ kind: "component",
1218
+ type: ButtonComponent,
1219
+ selector: "button[wmButton]",
1220
+ exportAs: ["wmButton"]
1221
+ },
1222
+ {
1223
+ kind: "component",
1224
+ type: MenuDropdownComponent,
1225
+ selector: "ul[wmMenuDropdown]",
1226
+ inputs: ["items"]
1227
+ },
1228
+ {
1229
+ kind: "component",
1230
+ type: WmAppIconComponent,
1231
+ selector: "wm-app-icon",
1232
+ inputs: [
1233
+ "icon",
1234
+ "iconclass",
1235
+ "iconurl",
1236
+ "defaultIconClass",
1237
+ "defaultClasses",
1238
+ "iconStyle",
1239
+ "alt"
1240
+ ]
1241
+ }
1242
+ ],
1243
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1244
+ });
1245
+ }
1246
+ };
1247
+ i0.ɵɵngDeclareClassMetadata({
1248
+ minVersion: "12.0.0",
1249
+ version: "22.2.1",
1250
+ ngImport: i0,
1251
+ type: MenuComponent,
1252
+ decorators: [{
1253
+ type: Component,
1254
+ args: [{
1255
+ changeDetection: ChangeDetectionStrategy.Eager,
1256
+ standalone: true,
1257
+ imports: [
1258
+ BsDropdownModule,
1259
+ CommonModule,
1260
+ TextContentDirective,
1261
+ AnchorComponent,
1262
+ ButtonComponent,
1263
+ MenuDropdownComponent,
1264
+ WmAppIconComponent
1265
+ ],
1266
+ selector: "[wmMenu]",
1267
+ providers: [provideAsWidgetRef(MenuComponent)],
1268
+ template: "\n\n<ng-template #innerTemplate>\n <wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" alt=\"Menu icon\"></wm-app-icon>\n <span class=\"caption\" [textContent]=\"caption\"></span>\n <span class=\"pull-right caret fa {{menuCaret}}\"></span>\n</ng-template>\n\n@if (type === 'anchor') {\n <a wmAnchor\n dropdownToggle\n [attr.aria-label]=\"arialabel || 'Menu'\"\n href=\"javascript:void(0);\"\n role=\"button\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n hint.bind=\"hint\"\n class=\"dropdown-toggle {{menuclass}}\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n badgevalue.bind=\"badgevalue\"\n >\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </a>\n} @else {\n <button wmButton\n dropdownToggle\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n [attr.aria-label]=\"arialabel || 'Menu'\"\n class=\"btn app-button dropdown-toggle {{menuclass}}\"\n hint.bind=\"hint\"\n shortcutkey.bind=\"shortcutkey\"\n tabindex.bind=\"tabindex\"\n caption.bind=\"caption\"\n iconclass.bind=\"iconclass\"\n iconurl.bind=\"iconurl\"\n iconposition.bind=\"iconposition\"\n type=\"button\">\n <span class=\"pull-right caret fa\" [ngClass]=\"[menuCaret]\"></span>\n </button>\n}\n\n<ul *dropdownMenu [items]=\"nodes\" [ngClass]=\"menulayout\" class=\"icon-position-{{iconposition}}\" role=\"menubar\"\nwmMenuDropdown></ul>\n"
1269
+ }]
1270
+ }],
1271
+ ctorParameters: () => [
1272
+ { type: i0.Injector },
1273
+ { type: i1.Router },
1274
+ { type: i2.UserDefinedExecutionContext },
1275
+ { type: i2.App },
1276
+ {
1277
+ type: i4.BsDropdownDirective,
1278
+ decorators: [{ type: Self }, { type: Optional }]
1279
+ },
1280
+ {
1281
+ type: NavComponent,
1282
+ decorators: [{ type: Optional }]
1283
+ },
1284
+ {
1285
+ type: void 0,
1286
+ decorators: [{
1287
+ type: Attribute,
1288
+ args: ["select.event"]
1289
+ }]
1290
+ },
1291
+ {
1292
+ type: void 0,
1293
+ decorators: [{
1294
+ type: Inject,
1295
+ args: ["EXPLICIT_CONTEXT"]
1296
+ }, { type: Optional }]
1297
+ }
1298
+ ],
1299
+ propDecorators: {
1300
+ onShow: [{
1301
+ type: HostListener,
1302
+ args: ["onShown"]
1303
+ }],
1304
+ onHide: [{
1305
+ type: HostListener,
1306
+ args: ["onHidden"]
1307
+ }],
1308
+ onKeyDownArrowUp: [{
1309
+ type: HostListener,
1310
+ args: ["keydown.arrowup", ["$event"]]
1311
+ }],
1312
+ onMouseEnter: [{
1313
+ type: HostListener,
1314
+ args: ["mouseenter", ["$event"]]
1315
+ }],
1316
+ onMouseLeave: [{
1317
+ type: HostListener,
1318
+ args: ["mouseleave", ["$event"]]
1319
+ }],
1320
+ onKeyDownArrowDown: [{
1321
+ type: HostListener,
1322
+ args: ["keydown.arrowdown", ["$event"]]
1323
+ }],
1324
+ onKeyDownArrowRight: [{
1325
+ type: HostListener,
1326
+ args: ["keydown.arrowright", ["$event"]]
1327
+ }],
1328
+ onKeyDownArrowLeft: [{
1329
+ type: HostListener,
1330
+ args: ["keydown.arrowleft", ["$event"]]
1331
+ }],
1332
+ onKeyDownEnter: [{
1333
+ type: HostListener,
1334
+ args: ["keydown.enter", ["$event"]]
1335
+ }]
1336
+ }
1337
+ });
1338
+ const menuProps = [
1339
+ "itemlabel",
1340
+ "itemicon",
1341
+ "itemlink",
1342
+ "itemaction",
1343
+ "itemchildren",
1344
+ "userrole"
1345
+ ];
1346
+ var MenuAdapterComponent = class MenuAdapterComponent extends BaseContainerComponent {
1347
+ constructor(inj, WIDGET_CONFIG, explicitContext) {
1348
+ super(inj, WIDGET_CONFIG, explicitContext);
1349
+ this.pageScope = this.viewParent;
1350
+ this.binditemlabel = this.nativeElement.getAttribute("itemlabel.bind");
1351
+ this.binditemicon = this.nativeElement.getAttribute("itemicon.bind");
1352
+ this.binditemaction = this.nativeElement.getAttribute("itemaction.bind");
1353
+ this.binditemlink = this.nativeElement.getAttribute("itemlink.bind");
1354
+ this.binduserrole = this.nativeElement.getAttribute("userrole.bind");
1355
+ this.binditemchildren = this.nativeElement.getAttribute("itemchildren.bind");
1356
+ }
1357
+ onPropertyChange(key, nv, ov) {
1358
+ if (includes(menuProps, key) && this.menuRef) this.menuRef.itemlabel = nv;
1359
+ else super.onPropertyChange(key, nv, ov);
1360
+ }
1361
+ ngAfterViewInit() {
1362
+ super.ngAfterViewInit();
1363
+ if (this.menuRefQL["first"]) this.setMenuProperty();
1364
+ this.menuRefQLSubscription = this.menuRefQL.changes.subscribe((menuRefQL) => {
1365
+ if (menuRefQL.first) {
1366
+ this.setMenuProperty();
1367
+ if (this.menuRefQLSubscription) {
1368
+ this.menuRefQLSubscription.unsubscribe();
1369
+ this.menuRefQLSubscription = null;
1370
+ }
1371
+ }
1372
+ });
1373
+ }
1374
+ ngOnDestroy() {
1375
+ if (this.menuRefQLSubscription) {
1376
+ this.menuRefQLSubscription.unsubscribe();
1377
+ this.menuRefQLSubscription = null;
1378
+ }
1379
+ this.menuRefQL = null;
1380
+ this.menuRef = null;
1381
+ super.ngOnDestroy();
1382
+ }
1383
+ setMenuProperty() {
1384
+ if (this.menuRefQL["first"]) {
1385
+ if (this.menuRefQL.first) {
1386
+ this.menuRef = this.menuRefQL.first;
1387
+ menuProps.forEach((prop) => {
1388
+ const bindProp = `bind${prop}`;
1389
+ if (this[bindProp]) this.menuRef[bindProp] = this[bindProp];
1390
+ this.menuRef[prop] = this[prop];
1391
+ });
1392
+ }
1393
+ }
1394
+ }
1395
+ static {
1396
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1397
+ minVersion: "12.0.0",
1398
+ version: "22.2.1",
1399
+ ngImport: i0,
1400
+ type: MenuAdapterComponent,
1401
+ deps: "invalid",
1402
+ target: i0.ɵɵFactoryTarget.Directive
1403
+ });
1404
+ }
1405
+ static {
1406
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1407
+ minVersion: "14.0.0",
1408
+ version: "22.2.1",
1409
+ type: MenuAdapterComponent,
1410
+ isStandalone: true,
1411
+ viewQueries: [{
1412
+ propertyName: "menuRefQL",
1413
+ predicate: MenuComponent,
1414
+ descendants: true
1415
+ }],
1416
+ usesInheritance: true,
1417
+ ngImport: i0
1418
+ });
1419
+ }
1420
+ };
1421
+ i0.ɵɵngDeclareClassMetadata({
1422
+ minVersion: "12.0.0",
1423
+ version: "22.2.1",
1424
+ ngImport: i0,
1425
+ type: MenuAdapterComponent,
1426
+ decorators: [{ type: Directive }],
1427
+ ctorParameters: () => [
1428
+ { type: void 0 },
1429
+ { type: void 0 },
1430
+ {
1431
+ type: void 0,
1432
+ decorators: [{
1433
+ type: Inject,
1434
+ args: ["EXPLICIT_CONTEXT"]
1435
+ }, { type: Optional }]
1436
+ }
1437
+ ],
1438
+ propDecorators: { menuRefQL: [{
1439
+ type: ViewChildren,
1440
+ args: [MenuComponent]
1441
+ }] }
1442
+ });
938
1443
  export { KEYBOARD_MOVEMENTS, MENU_POSITION, MenuAdapterComponent, MenuComponent, MenuDropdownComponent, MenuDropdownItemComponent, NavComponent, NavItemDirective, NavigationControlDirective, disableContextMenu };
939
- //# sourceMappingURL=index.mjs.map
1444
+
1445
+ //# sourceMappingURL=index.mjs.map