@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,776 +1,824 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import { PROP_STRING, PROP_ANY, PROP_NUMBER, PROP_BOOLEAN, register, AUTO_LAYOUT_PROPS, StylableComponent, getCurrentWidgets, styler, APPLY_STYLES_TYPE, RedrawableDirective, provideAsWidgetRef, AutoLayout, createArrayFrom, TextContentDirective, WmAppIconComponent } from '@wm/components/base';
4
- import * as i0 from '@angular/core';
5
- import { inject, Injector, ContentChildren, HostBinding, Attribute, Inject, Optional, Component } from '@angular/core';
6
- import * as i1 from '@wm/core';
7
- import { setCSSFromObj, addClass, setCSS, $appDigest, noop, removeAttr, App, removeClass, appendNode, isDefined } from '@wm/core';
8
- import { SwipeAnimation } from '@swipey';
9
- import { __decorate, __metadata } from 'tslib';
10
- import { find, isArray, forEach, indexOf, get, isEmpty, findIndex } from 'lodash-es';
11
-
12
- class TabsAnimator extends SwipeAnimation {
13
- constructor(tabs) {
14
- super();
15
- this.tabs = tabs;
16
- this._$el = $(this.tabs.getNativeElement()).find('>.tab-content');
17
- this.init(this._$el);
18
- }
19
- calibrate() {
20
- const activeTabIndex = this.tabs.getActiveTabIndex();
21
- const panes = this._$el.find('div[wmTabPane]');
22
- let activeTabVisibleIndex = 0;
23
- let noOfVisiblePanes = 0;
24
- let visiblePanes = [];
25
- panes.each((i, p) => {
26
- if (!$(p).prop('hidden')) {
27
- noOfVisiblePanes++;
28
- if (i === activeTabIndex) {
29
- activeTabVisibleIndex = noOfVisiblePanes - 1;
30
- }
31
- visiblePanes.push(p);
32
- }
33
- return true;
34
- });
35
- return {
36
- activeTabIndex: activeTabVisibleIndex,
37
- noOfTabs: noOfVisiblePanes,
38
- panes: visiblePanes
39
- };
40
- }
41
- bounds() {
42
- const { activeTabIndex, noOfTabs, panes } = this.calibrate(), w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
43
- this.clearContentFocus();
44
- return {
45
- strict: false,
46
- lower: activeTabIndex === noOfTabs - 1 ? 0 : -w,
47
- center: centerVal,
48
- upper: activeTabIndex === 0 ? centerVal : w
49
- };
50
- }
51
- context() {
52
- return {
53
- 'w': this._$el.width()
54
- };
55
- }
56
- animation() {
57
- return {
58
- 'transform': 'translate3d(${{ ($D + $d)/w * 100 + \'%\'}}, 0, 0)',
59
- '-webkit-transform': 'translate3d(${{ ($D + $d)/w * 100 + \'%\'}}, 0, 0)'
60
- };
61
- }
62
- /* WMS-18031 | On Tab Switch | Remove the Focus on the Existing Tab Contents */
63
- clearContentFocus() {
64
- let activeTab = this._$el.find('>.tab-pane.active');
65
- if (activeTab.length && activeTab.find(document.activeElement).length) {
66
- document.activeElement.blur();
67
- }
68
- }
69
- transitionTabIntoView() {
70
- const { activeTabIndex, noOfTabs, panes } = this.calibrate();
71
- const maxWidth = `${noOfTabs * 100}%`;
72
- setCSSFromObj(this._$el[0], { maxWidth: maxWidth, width: maxWidth });
73
- addClass(this.tabs.getNativeElement(), 'has-transition');
74
- const width = `${100 / noOfTabs}%`;
75
- panes.forEach(p => {
76
- setCSS(p, 'width', width);
77
- });
78
- setCSS(this._$el[0], 'transform', `translate3d(${-1 * activeTabIndex / noOfTabs * 100}%, 0, 0)`);
79
- }
80
- onUpper($event) {
81
- this.tabs.prev($event);
82
- $appDigest();
83
- }
84
- onLower($event) {
85
- this.tabs.next($event);
86
- $appDigest();
87
- }
88
- threshold() {
89
- return 5;
90
- }
91
- }
92
-
1
+ import * as i2 from "@angular/common";
2
+ import { CommonModule } from "@angular/common";
3
+ import { APPLY_STYLES_TYPE, AUTO_LAYOUT_PROPS, AutoLayout, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, RedrawableDirective, StylableComponent, TextContentDirective, WmAppIconComponent, createArrayFrom, getCurrentWidgets, provideAsWidgetRef, register, styler } from "@wm/components/base";
4
+ import * as i0 from "@angular/core";
5
+ import { Attribute, ChangeDetectionStrategy, Component, ContentChildren, HostBinding, Inject, Injector, Optional, inject } from "@angular/core";
6
+ import * as i1 from "@wm/core";
7
+ import { $appDigest, App, addClass, appendNode, isDefined, noop, removeAttr, removeClass, setCSS, setCSSFromObj } from "@wm/core";
8
+ import { SwipeAnimation } from "@swipey";
9
+ import { __decorate, __metadata } from "tslib";
10
+ import { find, findIndex, forEach, get, indexOf, isArray, isEmpty } from "lodash-es";
11
+ var TabsAnimator = class extends SwipeAnimation {
12
+ constructor(tabs) {
13
+ super();
14
+ this.tabs = tabs;
15
+ this._$el = $(this.tabs.getNativeElement()).find(">.tab-content");
16
+ this.init(this._$el);
17
+ }
18
+ calibrate() {
19
+ const activeTabIndex = this.tabs.getActiveTabIndex();
20
+ const panes = this._$el.find("div[wmTabPane]");
21
+ let activeTabVisibleIndex = 0;
22
+ let noOfVisiblePanes = 0;
23
+ let visiblePanes = [];
24
+ panes.each((i, p) => {
25
+ if (!$(p).prop("hidden")) {
26
+ noOfVisiblePanes++;
27
+ if (i === activeTabIndex) activeTabVisibleIndex = noOfVisiblePanes - 1;
28
+ visiblePanes.push(p);
29
+ }
30
+ return true;
31
+ });
32
+ return {
33
+ activeTabIndex: activeTabVisibleIndex,
34
+ noOfTabs: noOfVisiblePanes,
35
+ panes: visiblePanes
36
+ };
37
+ }
38
+ bounds() {
39
+ const { activeTabIndex, noOfTabs, panes } = this.calibrate(), w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
40
+ this.clearContentFocus();
41
+ return {
42
+ strict: false,
43
+ lower: activeTabIndex === noOfTabs - 1 ? 0 : -w,
44
+ center: centerVal,
45
+ upper: activeTabIndex === 0 ? centerVal : w
46
+ };
47
+ }
48
+ context() {
49
+ return { "w": this._$el.width() };
50
+ }
51
+ animation() {
52
+ return {
53
+ "transform": "translate3d(${{ ($D + $d)/w * 100 + '%'}}, 0, 0)",
54
+ "-webkit-transform": "translate3d(${{ ($D + $d)/w * 100 + '%'}}, 0, 0)"
55
+ };
56
+ }
57
+ clearContentFocus() {
58
+ let activeTab = this._$el.find(">.tab-pane.active");
59
+ if (activeTab.length && activeTab.find(document.activeElement).length) document.activeElement.blur();
60
+ }
61
+ transitionTabIntoView() {
62
+ const { activeTabIndex, noOfTabs, panes } = this.calibrate();
63
+ const maxWidth = `${noOfTabs * 100}%`;
64
+ setCSSFromObj(this._$el[0], {
65
+ maxWidth,
66
+ width: maxWidth
67
+ });
68
+ addClass(this.tabs.getNativeElement(), "has-transition");
69
+ const width = `${100 / noOfTabs}%`;
70
+ panes.forEach((p) => {
71
+ setCSS(p, "width", width);
72
+ });
73
+ setCSS(this._$el[0], "transform", `translate3d(${-1 * activeTabIndex / noOfTabs * 100}%, 0, 0)`);
74
+ }
75
+ onUpper($event) {
76
+ this.tabs.prev($event);
77
+ $appDigest();
78
+ }
79
+ onLower($event) {
80
+ this.tabs.next($event);
81
+ $appDigest();
82
+ }
83
+ threshold() {
84
+ return 5;
85
+ }
86
+ };
93
87
  const registerProps$1 = () => {
94
- const props = new Map([
95
- ['class', PROP_STRING],
96
- ['dataset', PROP_ANY],
97
- ['defaultpaneindex', { value: 0, ...PROP_NUMBER }],
98
- ['justified', PROP_BOOLEAN],
99
- ['tabsposition', { value: 'top', ...PROP_STRING }],
100
- ['name', PROP_STRING],
101
- ['nodatamessage', { value: 'No Data Found', ...PROP_STRING }],
102
- ['show', { value: true, ...PROP_BOOLEAN }],
103
- ['statehandler', { value: 'none', ...PROP_STRING }],
104
- ['transition', PROP_STRING],
105
- ['type', PROP_STRING],
106
- ['iconposition', PROP_STRING],
107
- ['autotabactivation', { value: true, ...PROP_BOOLEAN }]
108
- ]);
109
- register('wm-tabs', props);
88
+ const props = /* @__PURE__ */ new Map([
89
+ ["class", PROP_STRING],
90
+ ["dataset", PROP_ANY],
91
+ ["defaultpaneindex", {
92
+ value: 0,
93
+ ...PROP_NUMBER
94
+ }],
95
+ ["justified", PROP_BOOLEAN],
96
+ ["tabsposition", {
97
+ value: "top",
98
+ ...PROP_STRING
99
+ }],
100
+ ["name", PROP_STRING],
101
+ ["nodatamessage", {
102
+ value: "No Data Found",
103
+ ...PROP_STRING
104
+ }],
105
+ ["show", {
106
+ value: true,
107
+ ...PROP_BOOLEAN
108
+ }],
109
+ ["statehandler", {
110
+ value: "none",
111
+ ...PROP_STRING
112
+ }],
113
+ ["transition", PROP_STRING],
114
+ ["type", PROP_STRING],
115
+ ["iconposition", PROP_STRING],
116
+ ["autotabactivation", {
117
+ value: true,
118
+ ...PROP_BOOLEAN
119
+ }]
120
+ ]);
121
+ register("wm-tabs", props);
110
122
  };
111
-
112
123
  const registerProps = () => {
113
- register('wm-tabpane', new Map([
114
- ['active', PROP_BOOLEAN], // internal property
115
- ['badgevalue', PROP_STRING],
116
- ['badgetype', { value: 'default', ...PROP_STRING }],
117
- ['class', PROP_STRING],
118
- ['content', PROP_STRING],
119
- ['disabled', PROP_BOOLEAN],
120
- ['dynamicPaneIndex', PROP_NUMBER], // internal property
121
- ['heading', PROP_STRING],
122
- ['isdefaulttab', PROP_STRING],
123
- ['isdynamic', PROP_BOOLEAN], // internal property
124
- ['name', PROP_STRING],
125
- ['paneicon', PROP_STRING],
126
- ['paneiconurl', PROP_STRING],
127
- ['show', { value: true, ...PROP_BOOLEAN }],
128
- ['smoothscroll', { value: false, ...PROP_BOOLEAN }],
129
- ['title', { value: 'Tab Title', ...PROP_STRING }],
130
- ...AUTO_LAYOUT_PROPS
131
- ]));
124
+ register("wm-tabpane", new Map([
125
+ ["active", PROP_BOOLEAN],
126
+ ["badgevalue", PROP_STRING],
127
+ ["badgetype", {
128
+ value: "default",
129
+ ...PROP_STRING
130
+ }],
131
+ ["class", PROP_STRING],
132
+ ["content", PROP_STRING],
133
+ ["disabled", PROP_BOOLEAN],
134
+ ["dynamicPaneIndex", PROP_NUMBER],
135
+ ["heading", PROP_STRING],
136
+ ["isdefaulttab", PROP_STRING],
137
+ ["isdynamic", PROP_BOOLEAN],
138
+ ["name", PROP_STRING],
139
+ ["paneicon", PROP_STRING],
140
+ ["paneiconurl", PROP_STRING],
141
+ ["show", {
142
+ value: true,
143
+ ...PROP_BOOLEAN
144
+ }],
145
+ ["smoothscroll", {
146
+ value: false,
147
+ ...PROP_BOOLEAN
148
+ }],
149
+ ["title", {
150
+ value: "Tab Title",
151
+ ...PROP_STRING
152
+ }],
153
+ ...AUTO_LAYOUT_PROPS
154
+ ]));
132
155
  };
133
-
134
- const DEFAULT_CLS$1 = 'tab-pane';
135
156
  const WIDGET_CONFIG$1 = {
136
- widgetType: 'wm-tabpane',
137
- hostClass: DEFAULT_CLS$1
157
+ widgetType: "wm-tabpane",
158
+ hostClass: "tab-pane"
138
159
  };
139
160
  let TabPaneComponent = class TabPaneComponent extends StylableComponent {
140
- static { this.initializeProps = registerProps(); }
141
- constructor(inj, heading, title, explicitContext, app) {
142
- super(inj, WIDGET_CONFIG$1, explicitContext);
143
- this.heading = heading;
144
- this.title = title;
145
- this.app = app;
146
- this._isFirstLoad = true;
147
- this._isOnLoadTriggered = false;
148
- this.$lazyLoad = noop;
149
- this._currentTabWidgets = {};
150
- this.isActive = false;
151
- this.disabled = false;
152
- this.tabsRef = inject(TabsComponent);
153
- // title property here serves the purpose of heading.
154
- // TODO: make it common for all the widget.
155
- removeAttr(this.nativeElement, 'title');
156
- }
157
- // parent tabs component will call this method for the order of callbacks to be proper
158
- // order of callbacks - deselect, select, change
159
- invokeOnSelectCallback($event) {
160
- this.invokeEventCallback('select', { $event });
161
- }
162
- select($event, isKeyBoardEvent) {
163
- // When called programatically $event won't be available
164
- if (this.isActive || this.disabled) {
165
- return;
166
- }
167
- this.isActive = true;
168
- this.$lazyLoad();
169
- this.redrawChildren();
170
- this.notifyParent($event, isKeyBoardEvent);
171
- }
172
- tabpaneHeaderClick($event, paneIndex) {
173
- this.invokeEventCallback('headerclick', { $event, paneIndex });
174
- }
175
- deselect() {
176
- if (this.isActive) {
177
- this.isActive = false;
178
- this.invokeEventCallback('deselect');
179
- }
180
- }
181
- remove() {
182
- if (this.isActive) {
183
- this === this.tabsRef.panes.last ? this.tabsRef.prev() : this.tabsRef.next();
184
- }
185
- const availablePanes = this.tabsRef.panes.toArray();
186
- availablePanes.splice(this.tabsRef.getPaneIndexByRef(this), 1);
187
- this.tabsRef.panes.reset([...availablePanes]);
188
- this.nativeElement.remove();
189
- this.tabsRef.$element.find(`.tab-header[data-paneid='${this.$element.attr('widget-id')}'] a`).remove();
190
- }
191
- redrawChildren() {
192
- setTimeout(() => {
193
- if (this.reDrawableComponents) {
194
- this.reDrawableComponents.forEach(c => c.redraw());
195
- }
196
- // Fix for [WMS-24564]: trigger Onload event when it is inline content
197
- if (!this._isOnLoadTriggered && !this.content) {
198
- this.invokeEventCallback('load');
199
- this._isOnLoadTriggered = true;
200
- }
201
- }, 100);
202
- }
203
- notifyParent(evt, isKeyBoardEvent) {
204
- this.tabsRef.notifyChange(this, evt, isKeyBoardEvent);
205
- }
206
- // select next valid tab
207
- handleSwipeLeft() {
208
- this.tabsRef.next();
209
- }
210
- // select prev valid tab
211
- handleSwipeRight() {
212
- this.tabsRef.prev();
213
- }
214
- // select event is called manually
215
- handleEvent(node, eventName, callback, locals) {
216
- if (eventName !== 'select') {
217
- super.handleEvent(this.nativeElement, eventName, callback, locals);
218
- }
219
- }
220
- get currentTabWidgets() {
221
- return getCurrentWidgets(this.nativeElement, this._currentTabWidgets);
222
- }
223
- onPropertyChange(key, nv, ov) {
224
- if (key === 'content') {
225
- if (this.isActive) {
226
- setTimeout(() => this.$lazyLoad(), 100);
227
- }
228
- }
229
- else if (key === 'show') {
230
- // overridding the base component show propertyChangeHandler
231
- this.nativeElement.hidden = !nv;
232
- // setting default tab pane on pageload whenever show property is bindable
233
- if (this._isFirstLoad) {
234
- this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex);
235
- }
236
- else if (!nv && this.isActive) {
237
- this.tabsRef.next();
238
- }
239
- else if (nv || !this.isActive) {
240
- this.tabsRef.tabsAnimator?.transitionTabIntoView();
241
- }
242
- this._isFirstLoad = false;
243
- }
244
- else {
245
- super.onPropertyChange(key, nv, ov);
246
- }
247
- }
248
- ngOnInit() {
249
- super.ngOnInit();
250
- this.title = this.title || this.heading;
251
- }
252
- ngAfterViewInit() {
253
- styler(this.nativeElement.querySelector('.tab-body'), this, APPLY_STYLES_TYPE.CONTAINER);
254
- super.ngAfterViewInit();
255
- if (this.isdynamic) {
256
- this.tabsRef.registerDynamicTab(this);
257
- }
258
- }
259
- ngOnDestroy() {
260
- // MEMORY LEAK FIX: Clear ContentChildren QueryList reference
261
- if (this.reDrawableComponents) {
262
- this.reDrawableComponents = null;
263
- }
264
- // MEMORY LEAK FIX: Clear lazy load function reference
265
- this.$lazyLoad = null;
266
- super.ngOnDestroy();
267
- }
268
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: TabPaneComponent, deps: [{ token: i0.Injector }, { token: 'heading', attribute: true }, { token: 'title', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }, { token: i1.App }], target: i0.ɵɵFactoryTarget.Component }); }
269
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: TabPaneComponent, isStandalone: true, selector: "div[wmTabPane]", host: { properties: { "class.active": "this.isActive", "class.disabled": "this.disabled" } }, providers: [
270
- provideAsWidgetRef(TabPaneComponent)
271
- ], queries: [{ propertyName: "reDrawableComponents", predicate: RedrawableDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"tab-body\" partial-container-target >\n <ng-content></ng-content>\n</div>" }); }
161
+ static {
162
+ this.initializeProps = registerProps();
163
+ }
164
+ constructor(inj, heading, title, explicitContext, app) {
165
+ super(inj, WIDGET_CONFIG$1, explicitContext);
166
+ this.heading = heading;
167
+ this.title = title;
168
+ this.app = app;
169
+ this._isFirstLoad = true;
170
+ this._isOnLoadTriggered = false;
171
+ this.$lazyLoad = noop;
172
+ this._currentTabWidgets = {};
173
+ this.isActive = false;
174
+ this.disabled = false;
175
+ this.tabsRef = inject(TabsComponent);
176
+ removeAttr(this.nativeElement, "title");
177
+ }
178
+ invokeOnSelectCallback($event) {
179
+ this.invokeEventCallback("select", { $event });
180
+ }
181
+ select($event, isKeyBoardEvent) {
182
+ if (this.isActive || this.disabled) return;
183
+ this.isActive = true;
184
+ this.$lazyLoad();
185
+ this.redrawChildren();
186
+ this.notifyParent($event, isKeyBoardEvent);
187
+ }
188
+ tabpaneHeaderClick($event, paneIndex) {
189
+ this.invokeEventCallback("headerclick", {
190
+ $event,
191
+ paneIndex
192
+ });
193
+ }
194
+ deselect() {
195
+ if (this.isActive) {
196
+ this.isActive = false;
197
+ this.invokeEventCallback("deselect");
198
+ }
199
+ }
200
+ remove() {
201
+ if (this.isActive) this === this.tabsRef.panes.last ? this.tabsRef.prev() : this.tabsRef.next();
202
+ const availablePanes = this.tabsRef.panes.toArray();
203
+ availablePanes.splice(this.tabsRef.getPaneIndexByRef(this), 1);
204
+ this.tabsRef.panes.reset([...availablePanes]);
205
+ this.nativeElement.remove();
206
+ this.tabsRef.$element.find(`.tab-header[data-paneid='${this.$element.attr("widget-id")}'] a`).remove();
207
+ }
208
+ redrawChildren() {
209
+ setTimeout(() => {
210
+ if (this.reDrawableComponents) this.reDrawableComponents.forEach((c) => c.redraw());
211
+ if (!this._isOnLoadTriggered && !this.content) {
212
+ this.invokeEventCallback("load");
213
+ this._isOnLoadTriggered = true;
214
+ }
215
+ }, 100);
216
+ }
217
+ notifyParent(evt, isKeyBoardEvent) {
218
+ this.tabsRef.notifyChange(this, evt, isKeyBoardEvent);
219
+ }
220
+ handleSwipeLeft() {
221
+ this.tabsRef.next();
222
+ }
223
+ handleSwipeRight() {
224
+ this.tabsRef.prev();
225
+ }
226
+ handleEvent(node, eventName, callback, locals) {
227
+ if (eventName !== "select") super.handleEvent(this.nativeElement, eventName, callback, locals);
228
+ }
229
+ get currentTabWidgets() {
230
+ return getCurrentWidgets(this.nativeElement, this._currentTabWidgets);
231
+ }
232
+ onPropertyChange(key, nv, ov) {
233
+ if (key === "content") {
234
+ if (this.isActive) setTimeout(() => this.$lazyLoad(), 100);
235
+ } else if (key === "show") {
236
+ this.nativeElement.hidden = !nv;
237
+ if (this._isFirstLoad) this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex);
238
+ else if (!nv && this.isActive) this.tabsRef.next();
239
+ else this.tabsRef.tabsAnimator?.transitionTabIntoView();
240
+ this._isFirstLoad = false;
241
+ } else super.onPropertyChange(key, nv, ov);
242
+ }
243
+ ngOnInit() {
244
+ super.ngOnInit();
245
+ this.title = this.title || this.heading;
246
+ }
247
+ ngAfterViewInit() {
248
+ styler(this.nativeElement.querySelector(".tab-body"), this, APPLY_STYLES_TYPE.CONTAINER);
249
+ super.ngAfterViewInit();
250
+ if (this.isdynamic) this.tabsRef.registerDynamicTab(this);
251
+ }
252
+ ngOnDestroy() {
253
+ if (this.reDrawableComponents) this.reDrawableComponents = null;
254
+ this.$lazyLoad = null;
255
+ super.ngOnDestroy();
256
+ }
257
+ static {
258
+ this.ɵfac = i0.ɵɵngDeclareFactory({
259
+ minVersion: "12.0.0",
260
+ version: "22.2.1",
261
+ ngImport: i0,
262
+ type: TabPaneComponent,
263
+ deps: [
264
+ { token: i0.Injector },
265
+ {
266
+ token: "heading",
267
+ attribute: true
268
+ },
269
+ {
270
+ token: "title",
271
+ attribute: true
272
+ },
273
+ {
274
+ token: "EXPLICIT_CONTEXT",
275
+ optional: true
276
+ },
277
+ { token: i1.App }
278
+ ],
279
+ target: i0.ɵɵFactoryTarget.Component
280
+ });
281
+ }
282
+ static {
283
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
284
+ minVersion: "14.0.0",
285
+ version: "22.2.1",
286
+ type: TabPaneComponent,
287
+ isStandalone: true,
288
+ selector: "div[wmTabPane]",
289
+ host: { properties: {
290
+ "class.active": "this.isActive",
291
+ "class.disabled": "this.disabled"
292
+ } },
293
+ providers: [provideAsWidgetRef(TabPaneComponent)],
294
+ queries: [{
295
+ propertyName: "reDrawableComponents",
296
+ predicate: RedrawableDirective,
297
+ descendants: true
298
+ }],
299
+ usesInheritance: true,
300
+ ngImport: i0,
301
+ template: "<div class=\"tab-body\" partial-container-target >\n <ng-content></ng-content>\n</div>",
302
+ changeDetection: i0.ChangeDetectionStrategy.Eager
303
+ });
304
+ }
272
305
  };
273
- TabPaneComponent = __decorate([
274
- AutoLayout({ targetSelector: '.tab-body' }),
275
- __metadata("design:paramtypes", [Injector, Object, Object, Object, App])
276
- ], TabPaneComponent);
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: TabPaneComponent, decorators: [{
278
- type: Component,
279
- args: [{ standalone: true, selector: 'div[wmTabPane]', providers: [
280
- provideAsWidgetRef(TabPaneComponent)
281
- ], template: "<div class=\"tab-body\" partial-container-target >\n <ng-content></ng-content>\n</div>" }]
282
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
283
- type: Attribute,
284
- args: ['heading']
285
- }] }, { type: undefined, decorators: [{
286
- type: Attribute,
287
- args: ['title']
288
- }] }, { type: undefined, decorators: [{
289
- type: Inject,
290
- args: ['EXPLICIT_CONTEXT']
291
- }, {
292
- type: Optional
293
- }] }, { type: i1.App }], propDecorators: { isActive: [{
294
- type: HostBinding,
295
- args: ['class.active']
296
- }], disabled: [{
297
- type: HostBinding,
298
- args: ['class.disabled']
299
- }], reDrawableComponents: [{
300
- type: ContentChildren,
301
- args: [RedrawableDirective, { descendants: true }]
302
- }] } });
303
-
304
- const DEFAULT_CLS = 'app-tabs clearfix';
306
+ TabPaneComponent = __decorate([AutoLayout({ targetSelector: ".tab-body" }), __metadata("design:paramtypes", [
307
+ Injector,
308
+ Object,
309
+ Object,
310
+ Object,
311
+ App
312
+ ])], TabPaneComponent);
313
+ i0.ɵɵngDeclareClassMetadata({
314
+ minVersion: "12.0.0",
315
+ version: "22.2.1",
316
+ ngImport: i0,
317
+ type: TabPaneComponent,
318
+ decorators: [{
319
+ type: Component,
320
+ args: [{
321
+ changeDetection: ChangeDetectionStrategy.Eager,
322
+ standalone: true,
323
+ selector: "div[wmTabPane]",
324
+ providers: [provideAsWidgetRef(TabPaneComponent)],
325
+ template: "<div class=\"tab-body\" partial-container-target >\n <ng-content></ng-content>\n</div>"
326
+ }]
327
+ }],
328
+ ctorParameters: () => [
329
+ { type: i0.Injector },
330
+ {
331
+ type: void 0,
332
+ decorators: [{
333
+ type: Attribute,
334
+ args: ["heading"]
335
+ }]
336
+ },
337
+ {
338
+ type: void 0,
339
+ decorators: [{
340
+ type: Attribute,
341
+ args: ["title"]
342
+ }]
343
+ },
344
+ {
345
+ type: void 0,
346
+ decorators: [{
347
+ type: Inject,
348
+ args: ["EXPLICIT_CONTEXT"]
349
+ }, { type: Optional }]
350
+ },
351
+ { type: i1.App }
352
+ ],
353
+ propDecorators: {
354
+ isActive: [{
355
+ type: HostBinding,
356
+ args: ["class.active"]
357
+ }],
358
+ disabled: [{
359
+ type: HostBinding,
360
+ args: ["class.disabled"]
361
+ }],
362
+ reDrawableComponents: [{
363
+ type: ContentChildren,
364
+ args: [RedrawableDirective, { descendants: true }]
365
+ }]
366
+ }
367
+ });
305
368
  const WIDGET_CONFIG = {
306
- widgetType: 'wm-tabs',
307
- hostClass: DEFAULT_CLS
369
+ widgetType: "wm-tabs",
370
+ hostClass: "app-tabs clearfix"
308
371
  };
309
- class TabsComponent extends StylableComponent {
310
- static { this.initializeProps = registerProps$1(); }
311
- constructor(inj, dynamicComponentProvider, _transition, _tabsPosition, statePersistence, explicitContext) {
312
- // handle to the promise resolver
313
- let resolveFn = noop;
314
- super(inj, WIDGET_CONFIG, explicitContext, new Promise(res => resolveFn = res));
315
- this.dynamicComponentRefs = [];
316
- this.iconposition = '';
317
- this.transition = _transition;
318
- this.tabsposition = _tabsPosition;
319
- this.statePersistence = statePersistence;
320
- this.dynamicComponentProvider = dynamicComponentProvider;
321
- this.dynamicTabs = [];
322
- this.dynamicPaneIndex = 0;
323
- this.promiseResolverFn = resolveFn;
324
- styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
325
- }
326
- animateIn(element) {
327
- const tabHeader = $(element);
328
- // when the animation is not present toggle the active class.
329
- tabHeader.siblings('.active').removeClass('active');
330
- tabHeader.addClass('active');
331
- const ul = this.nativeElement.querySelector('ul.nav.nav-tabs');
332
- // move the tabheader into the viewport
333
- const $prevHeaderEle = tabHeader.prev();
334
- if ($prevHeaderEle.length) {
335
- ul.scrollLeft = $prevHeaderEle[0].offsetLeft;
336
- }
337
- else {
338
- ul.scrollLeft = 0;
339
- }
340
- }
341
- /**
342
- * This method is used to register the dynamic panes.
343
- * After all panes are initialzed, update the querylist manually based on index.
344
- * @param paneRef - refrence of the tabpane
345
- */
346
- registerDynamicTab(paneRef) {
347
- this.dynamicTabs.push(paneRef);
348
- const isLastPane = this.dynamicTabs.length === this.dynamicPaneIndex;
349
- if (isLastPane) {
350
- for (let i = 0; i < this.dynamicTabs.length; i++) {
351
- const newPaneRef = find(this.dynamicTabs, pane => pane.dynamicPaneIndex === i);
352
- const isPaneAlreadyExist = find(this.panes.toArray(), newPaneRef);
353
- if (!isPaneAlreadyExist) {
354
- this.panes.reset([...this.panes.toArray(), newPaneRef]);
355
- if (newPaneRef.active) {
356
- setTimeout(() => {
357
- newPaneRef.select();
358
- }, 20);
359
- }
360
- }
361
- }
362
- }
363
- }
364
- /**
365
- * This method is to add the tabpane dynamically
366
- * @param tabpanes - list of tabpanes
367
- */
368
- addPane(tabpanes) {
369
- if (!isArray(tabpanes)) {
370
- tabpanes = [tabpanes];
371
- }
372
- const paneNamesList = [];
373
- forEach(tabpanes, (pane, index) => {
374
- const isPaneAlreadyCreated = find(this.panes.toArray(), { name: pane.name });
375
- const isPaneNameExist = indexOf(paneNamesList, pane.name);
376
- // If user tries to add tabpane with the same name which is already exists then do not create the pane
377
- if (isPaneAlreadyCreated || isPaneNameExist > 0) {
378
- console.warn(`The tab pane with name ${pane.name} already exists`);
379
- return;
380
- }
381
- let paramMarkup = '';
382
- let propsTmpl = '';
383
- this.dynamicPaneIndex++;
384
- const name = pane.name ? pane.name : `tabpane${this.panes.toArray().length + (index + 1)}`;
385
- paneNamesList.push(name);
386
- const partialParams = get(pane, 'params');
387
- forEach(pane, (value, key) => {
388
- if (key !== 'params') {
389
- propsTmpl = `${propsTmpl} ${key}="${value}"`;
390
- }
391
- });
392
- forEach(partialParams, (value, key) => {
393
- paramMarkup = `${paramMarkup} <wm-param name="${key}" value="${value}"></wm-param>`;
394
- });
395
- const markup = `<wm-tabpane dynamicPaneIndex="${this.dynamicPaneIndex - 1}" isdynamic="true" name="${name}" ${propsTmpl}>
372
+ var TabsComponent = class TabsComponent extends StylableComponent {
373
+ static {
374
+ this.initializeProps = registerProps$1();
375
+ }
376
+ constructor(inj, dynamicComponentProvider, _transition, _tabsPosition, statePersistence, explicitContext) {
377
+ let resolveFn = noop;
378
+ super(inj, WIDGET_CONFIG, explicitContext, new Promise((res) => resolveFn = res));
379
+ this.dynamicComponentRefs = [];
380
+ this.iconposition = "";
381
+ this.transition = _transition;
382
+ this.tabsposition = _tabsPosition;
383
+ this.statePersistence = statePersistence;
384
+ this.dynamicComponentProvider = dynamicComponentProvider;
385
+ this.dynamicTabs = [];
386
+ this.dynamicPaneIndex = 0;
387
+ this.promiseResolverFn = resolveFn;
388
+ styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
389
+ }
390
+ animateIn(element) {
391
+ const tabHeader = $(element);
392
+ tabHeader.siblings(".active").removeClass("active");
393
+ tabHeader.addClass("active");
394
+ const ul = this.nativeElement.querySelector("ul.nav.nav-tabs");
395
+ const $prevHeaderEle = tabHeader.prev();
396
+ if ($prevHeaderEle.length) ul.scrollLeft = $prevHeaderEle[0].offsetLeft;
397
+ else ul.scrollLeft = 0;
398
+ }
399
+ registerDynamicTab(paneRef) {
400
+ this.dynamicTabs.push(paneRef);
401
+ if (this.dynamicTabs.length === this.dynamicPaneIndex) for (let i = 0; i < this.dynamicTabs.length; i++) {
402
+ const newPaneRef = find(this.dynamicTabs, (pane) => pane.dynamicPaneIndex === i);
403
+ if (!find(this.panes.toArray(), newPaneRef)) {
404
+ this.panes.reset([...this.panes.toArray(), newPaneRef]);
405
+ if (newPaneRef.active) setTimeout(() => {
406
+ newPaneRef.select();
407
+ }, 20);
408
+ }
409
+ }
410
+ }
411
+ addPane(tabpanes) {
412
+ if (!isArray(tabpanes)) tabpanes = [tabpanes];
413
+ const paneNamesList = [];
414
+ forEach(tabpanes, (pane, index) => {
415
+ const isPaneAlreadyCreated = find(this.panes.toArray(), { name: pane.name });
416
+ const isPaneNameExist = indexOf(paneNamesList, pane.name);
417
+ if (isPaneAlreadyCreated || isPaneNameExist > 0) {
418
+ console.warn(`The tab pane with name ${pane.name} already exists`);
419
+ return;
420
+ }
421
+ let paramMarkup = "";
422
+ let propsTmpl = "";
423
+ this.dynamicPaneIndex++;
424
+ const name = pane.name ? pane.name : `tabpane${this.panes.toArray().length + (index + 1)}`;
425
+ paneNamesList.push(name);
426
+ const partialParams = get(pane, "params");
427
+ forEach(pane, (value, key) => {
428
+ if (key !== "params") propsTmpl = `${propsTmpl} ${key}="${value}"`;
429
+ });
430
+ forEach(partialParams, (value, key) => {
431
+ paramMarkup = `${paramMarkup} <wm-param name="${key}" value="${value}"></wm-param>`;
432
+ });
433
+ const markup = `<wm-tabpane dynamicPaneIndex="${this.dynamicPaneIndex - 1}" isdynamic="true" name="${name}" ${propsTmpl}>
396
434
  ${paramMarkup}
397
435
  </wm-tabpane>`;
398
- if (!this._dynamicContext) {
399
- this._dynamicContext = Object.create(this.viewParent);
400
- this._dynamicContext[this.getAttr('wmTab')] = this;
401
- }
402
- // MEMORY LEAK FIX: Store component reference for cleanup
403
- this.dynamicComponentProvider.addComponent(this.getNativeElement().querySelector('.tab-content'), markup, this._dynamicContext, { inj: this.inj })
404
- .then(componentRef => {
405
- if (componentRef) {
406
- this.dynamicComponentRefs.push(componentRef);
407
- }
408
- });
409
- });
410
- return paneNamesList;
411
- }
412
- /**
413
- * This method is to remove the tabpane
414
- * @param paneIndex - index of the pane
415
- */
416
- removePane(paneName) {
417
- const paneRef = this.getPaneRefByName(paneName);
418
- if (paneRef) {
419
- paneRef.remove();
420
- }
421
- }
422
- /**
423
- * TabPane children components invoke this method to communicate with the parent
424
- * if the evt argument is defined on-change callback will be invoked.
425
- */
426
- notifyChange(paneRef, evt, isKeyBoardEvent) {
427
- if (!this.isSelectableTab(paneRef)) {
428
- return;
429
- }
430
- let headerElement;
431
- // invoke deselect event callback on the preset active tab
432
- if (!isEmpty(this.activeTab)) {
433
- this.activeTab.deselect();
434
- }
435
- this.activeTab = paneRef.getWidget();
436
- const newPaneIndex = this.getPaneIndexByRef(paneRef);
437
- const mode = this.statePersistence.computeMode(this.statehandler);
438
- if (!this.isPageLoadCall && mode && mode.toLowerCase() !== 'none') {
439
- this.statePersistence.setWidgetState(this, this.activeTab.name);
440
- }
441
- else {
442
- this.defaultpaneindex = this.getPaneIndexByRef(paneRef);
443
- this.isPageLoadCall = false;
444
- }
445
- // invoke select callback on the selected tab
446
- paneRef.invokeOnSelectCallback(evt);
447
- // invoke change callback if the evt is present, select a tab programmatically will not have the event
448
- if (evt) {
449
- this.invokeEventCallback('change', {
450
- $event: evt,
451
- newPaneIndex: newPaneIndex,
452
- oldPaneIndex: this._oldPaneIndex || 0
453
- });
454
- }
455
- this._oldPaneIndex = newPaneIndex;
456
- if (evt) {
457
- headerElement = $(evt.target).closest('li.tab-header');
458
- }
459
- if (!evt || !headerElement?.length) {
460
- headerElement = this.nativeElement.querySelector(`li[data-paneid=${paneRef.widgetId}]`);
461
- const insideTabs = !!$(headerElement).closest('.app-tabs')
462
- .parent().closest('.app-tabs').length;
463
- if (!insideTabs && isKeyBoardEvent) {
464
- $(headerElement).children().focus();
465
- }
466
- }
467
- this.animateIn(headerElement);
468
- // this.setTabsLeftPosition(this.getPaneIndexByRef(this.activeTab), this.panes.length);
469
- if (this.canSlide()) {
470
- if (!this.tabsAnimator) {
471
- this.tabsAnimator = new TabsAnimator(this);
472
- this.tabsAnimator.setGesturesEnabled(this.canSlide());
473
- }
474
- this.tabsAnimator.transitionTabIntoView();
475
- }
476
- }
477
- goToTab(tabIndex) {
478
- if (this.isValidPaneIndex(tabIndex - 1)) {
479
- const tab = this.getPaneRefByIndex(tabIndex - 1);
480
- tab.select();
481
- }
482
- }
483
- getPaneIndexByRef(paneRef) {
484
- return this.panes.toArray().indexOf(paneRef);
485
- }
486
- // Returns the active tab index from tabs.
487
- getActiveTabIndex() {
488
- return findIndex(this.panes.toArray(), { isActive: true });
489
- }
490
- isValidPaneIndex(index) {
491
- return (index >= 0 && index < this.panes.length);
492
- }
493
- getPaneRefByIndex(index) {
494
- return this.panes.toArray()[index];
495
- }
496
- getPaneRefByName(name) {
497
- return find(this.panes.toArray(), { name: name });
498
- }
499
- // returns false if the pane is hidden or disabled
500
- isSelectableTab(paneRef) {
501
- return paneRef.show && !paneRef.disabled;
502
- }
503
- canSlide() {
504
- return this.transition === 'slide' && !this.vertical;
505
- }
506
- getSelectableTabAfterIndex(index) {
507
- for (let i = index + 1; i < this.panes.length; i++) {
508
- const pane = this.getPaneRefByIndex(i);
509
- if (this.isSelectableTab(pane)) {
510
- return pane;
511
- }
512
- }
513
- if (index === this.panes.length - 1) {
514
- const pane = this.getPaneRefByIndex(0);
515
- if (this.isSelectableTab(pane)) {
516
- return pane;
517
- }
518
- }
519
- }
520
- getSelectableTabBeforeIndex(index) {
521
- for (let i = index - 1; i >= 0; i--) {
522
- const pane = this.getPaneRefByIndex(i);
523
- if (this.isSelectableTab(pane)) {
524
- return pane;
525
- }
526
- }
527
- if (index === 0) {
528
- const pane = this.getPaneRefByIndex(this.panes.length - 1);
529
- if (this.isSelectableTab(pane)) {
530
- return pane;
531
- }
532
- }
533
- }
534
- // select next tab relative to the current active tab
535
- next($event, isKeyBoardEvent) {
536
- const pane = this.getSelectableTabAfterIndex(this.getActiveTabIndex());
537
- if (pane) {
538
- pane.select($event, isKeyBoardEvent);
539
- }
540
- }
541
- // select prev tab relative to the current active tab
542
- prev($event, isKeyBoardEvent) {
543
- const pane = this.getSelectableTabBeforeIndex(this.getActiveTabIndex());
544
- if (pane) {
545
- pane.select($event, isKeyBoardEvent);
546
- }
547
- }
548
- /**
549
- * this method will be invoked during the initialization of the component and on defaultpaneindex property change,
550
- * if the provided defaultpaneindex is not valid, find the first pane index which can be shown and select it
551
- */
552
- selectDefaultPaneByIndex(index) {
553
- if (!this.isValidPaneIndex(index)) {
554
- return;
555
- }
556
- let paneRef = this.getPaneRefByIndex(index);
557
- if (!this.isSelectableTab(paneRef)) {
558
- paneRef = this.getSelectableTabAfterIndex(0);
559
- }
560
- if (paneRef) {
561
- paneRef.select();
562
- }
563
- }
564
- // update the postion of tab header
565
- setTabsPosition() {
566
- const ul = this.nativeElement.children[0];
567
- this.vertical = (this.tabsposition === 'left' || this.tabsposition === 'right');
568
- removeClass(this.nativeElement, 'inverted');
569
- if (this.tabsposition === 'bottom' || this.tabsposition === 'right') {
570
- appendNode(ul, this.nativeElement);
571
- addClass(this.nativeElement, 'inverted');
572
- }
573
- }
574
- onDataChange(newVal) {
575
- this.fieldDefs = createArrayFrom(newVal);
576
- setTimeout(() => this.selectDefaultPaneByIndex(this.defaultpaneindex || 0));
577
- }
578
- getWidgets(widgteName, index) {
579
- let $target;
580
- const retVal = [];
581
- if (!widgteName) {
582
- return;
583
- }
584
- if (!isDefined(index)) {
585
- forEach(this.panes.toArray(), (el) => {
586
- $target = get(el.currentTabWidgets, widgteName);
587
- if ($target) {
588
- retVal.push($target);
589
- }
590
- });
591
- return retVal;
592
- }
593
- index = +index || 0;
594
- $target = get(this.panes.toArray(), index);
595
- if ($target) {
596
- return [get($target.currentTabWidgets, widgteName)];
597
- }
598
- }
599
- get currentTabPaneIndex() {
600
- return this.getActiveTabIndex();
601
- }
602
- get isFirstTabPane() {
603
- return this.panes.first.widgetId === this.activeTab.widgetId;
604
- }
605
- get isLastTabPane() {
606
- return this.panes.last.widgetId === this.activeTab.widgetId;
607
- }
608
- onPropertyChange(key, nv, ov) {
609
- if (key === 'defaultpaneindex') {
610
- this.defaultpaneindex = nv;
611
- }
612
- else if (key === 'dataset') {
613
- this.onDataChange(nv);
614
- }
615
- else if (key === 'statehandler') {
616
- this.isPageLoadCall = true;
617
- const widgetState = this.statePersistence.getWidgetState(this);
618
- if (nv !== 'none' && widgetState) {
619
- const paneToSelect = this.panes.filter(function (pane) {
620
- return widgetState === pane.name;
621
- });
622
- if (!paneToSelect.length) {
623
- console.warn('Tab pane name ' + widgetState + ' in State is incorrect. Falling back to the default pane');
624
- setTimeout(() => this.selectDefaultPaneByIndex(this.defaultpaneindex || 0), 20);
625
- }
626
- else {
627
- const index = this.getPaneIndexByRef(paneToSelect[0]);
628
- setTimeout(() => this.selectDefaultPaneByIndex(index), 20);
629
- }
630
- }
631
- else {
632
- setTimeout(() => this.selectDefaultPaneByIndex(this.defaultpaneindex || 0), 20);
633
- }
634
- }
635
- else if (key === 'autotabactivation') {
636
- this.autoActivation = nv;
637
- }
638
- else {
639
- super.onPropertyChange(key, nv, ov);
640
- }
641
- }
642
- registerTabsScroll() {
643
- setTimeout(() => {
644
- const $ul = this.$element.find('> ul');
645
- let $liPosition;
646
- const $li = $ul.children();
647
- $liPosition = $li.last().position();
648
- if ($liPosition && ($liPosition.left > $ul.width())) {
649
- $ul.on('mousewheel', (e) => {
650
- const left = $ul[0].scrollLeft, _delta = -1 * e.originalEvent.wheelDelta;
651
- e.stopPropagation();
652
- e.preventDefault();
653
- $ul.animate({ scrollLeft: left + _delta }, { 'duration': 10 });
654
- });
655
- }
656
- });
657
- }
658
- onkeydown(event) {
659
- let newPane;
660
- switch (event.key) {
661
- case 'ArrowLeft':
662
- case 'ArrowUp':
663
- newPane = this.autoActivation ? (this.prev(null, true), null) : this.getSelectableTabBeforeIndex(this.getSelectedPaneIndex());
664
- break;
665
- case 'ArrowRight':
666
- case 'ArrowDown':
667
- newPane = this.autoActivation ? (this.next(null, true), null) : this.getSelectableTabAfterIndex(this.getSelectedPaneIndex());
668
- break;
669
- case 'Enter': {
670
- const pane = this.getSelectableTabAfterIndex(this.getSelectedPaneIndex() - 1);
671
- if (pane) {
672
- const enterEvent = new KeyboardEvent('keydown', { key: 'Enter', code: 'Enter', bubbles: true, cancelable: true });
673
- pane.nativeElement.dispatchEvent(enterEvent);
674
- pane.select(enterEvent, true);
675
- }
676
- event.preventDefault();
677
- return;
678
- }
679
- default:
680
- return;
681
- }
682
- if (newPane) {
683
- this.nativeElement.querySelector('li.select')?.classList.remove('select');
684
- this.nativeElement.querySelector(`li[data-paneid="${newPane.widgetId}"]`)?.classList.add('select');
685
- }
686
- event.preventDefault();
687
- }
688
- ngAfterContentInit() {
689
- this.promiseResolverFn();
690
- super.ngAfterContentInit();
691
- this.setTabsPosition();
692
- this.panesChangesSubscription = this.panes.changes.subscribe(slides => {
693
- if (this.panes.length) {
694
- this.selectDefaultPaneByIndex(this.defaultpaneindex || 0);
695
- }
696
- });
697
- }
698
- ngAfterViewInit() {
699
- super.ngAfterViewInit();
700
- this.registerTabsScroll();
701
- }
702
- getSelectedPaneIndex() {
703
- const index = this.panes.toArray().findIndex(pane => this.nativeElement.querySelector(`li[data-paneid="${pane.widgetId}"]`)?.classList.contains("select"));
704
- return index >= 0 ? index : this.getActiveTabIndex();
705
- }
706
- ngOnDestroy() {
707
- // MEMORY LEAK FIX: Unsubscribe from panes changes
708
- if (this.panesChangesSubscription) {
709
- this.panesChangesSubscription.unsubscribe();
710
- this.panesChangesSubscription = null;
711
- }
712
- // MEMORY LEAK FIX: Destroy all dynamically created component instances
713
- if (this.dynamicComponentRefs?.length) {
714
- this.dynamicComponentRefs.forEach(componentRef => {
715
- if (componentRef?.destroy) {
716
- componentRef.destroy();
717
- }
718
- });
719
- this.dynamicComponentRefs = [];
720
- }
721
- // MEMORY LEAK FIX: Clear dynamic context
722
- if (this._dynamicContext) {
723
- Object.keys(this._dynamicContext).forEach(key => {
724
- delete this._dynamicContext[key];
725
- });
726
- this._dynamicContext = null;
727
- }
728
- // MEMORY LEAK FIX: Clear dynamic tabs array
729
- if (this.dynamicTabs) {
730
- this.dynamicTabs = [];
731
- }
732
- // MEMORY LEAK FIX: Destroy tabs animator
733
- if (this.tabsAnimator) {
734
- // TabsAnimator may have internal subscriptions or timers
735
- this.tabsAnimator = null;
736
- }
737
- // MEMORY LEAK FIX: Clear field definitions and references
738
- this.fieldDefs = null;
739
- this.activeTab = null;
740
- super.ngOnDestroy();
741
- }
742
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: TabsComponent, deps: [{ token: i0.Injector }, { token: i1.DynamicComponentRefProvider }, { token: 'transition', attribute: true }, { token: 'tabsposition', attribute: true }, { token: i1.StatePersistence }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
743
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: TabsComponent, isStandalone: true, selector: "div[wmTabs]", host: { properties: { "attr.icon-position": "this.iconposition" } }, providers: [
744
- provideAsWidgetRef(TabsComponent)
745
- ], queries: [{ propertyName: "panes", predicate: TabPaneComponent }], exportAs: ["wmTabs"], usesInheritance: true, ngImport: i0, template: "<ul class=\"nav nav-tabs\" [ngClass]=\"{'nav-stacked': vertical, 'nav-justified': justified}\" role=\"tablist\">\n @for (pane of panes; track pane; let i = $index) {\n <li class=\"tab-header\" [attr.data-paneid]=\"pane.widgetId\" [ngClass]=\"{'active': pane.isActive, 'disabled': pane.disabled}\"\n [hidden]=\"!pane.show\" role=\"presentation\">\n <a [attr.aria-label]=\"pane.badgevalue ? pane.title + ' ' + pane.badgevalue : pane.title\"\n [attr.icon-position]=\"iconposition\"\n [attr.title]=\"pane.title\"\n [tabindex]=\"pane.isActive ? '0' : '-1'\"\n class=\"tab-heading\" href=\"javascript:void(0);\"\n [attr.aria-selected]=\"pane.isActive\" role=\"tab\" (click)=\"pane.select($event); pane.tabpaneHeaderClick($event, i);\" (keydown)=\"onkeydown($event)\">\n <wm-app-icon [iconclass]=\"pane.paneicon\" [iconurl]=\"pane.paneiconurl\" alt=\"Tab icon\"></wm-app-icon>\n <span [textContent]=\"pane.title\"></span>\n @if (pane.badgevalue) {\n <span class=\"label label-{{pane.badgetype}}\" [textContent]=\"pane.badgevalue\"></span>\n }\n </a>\n </li>\n }\n</ul>\n@if (type !== 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n <ng-content ngProjectAs=\"div[wmTabPane]\"></ng-content>\n </div>\n}\n@if (type === 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n @if (fieldDefs && !fieldDefs.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["icon", "iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
746
- }
747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: TabsComponent, decorators: [{
748
- type: Component,
749
- args: [{ standalone: true, imports: [CommonModule, TextContentDirective, WmAppIconComponent], selector: 'div[wmTabs]', exportAs: 'wmTabs', providers: [
750
- provideAsWidgetRef(TabsComponent)
751
- ], template: "<ul class=\"nav nav-tabs\" [ngClass]=\"{'nav-stacked': vertical, 'nav-justified': justified}\" role=\"tablist\">\n @for (pane of panes; track pane; let i = $index) {\n <li class=\"tab-header\" [attr.data-paneid]=\"pane.widgetId\" [ngClass]=\"{'active': pane.isActive, 'disabled': pane.disabled}\"\n [hidden]=\"!pane.show\" role=\"presentation\">\n <a [attr.aria-label]=\"pane.badgevalue ? pane.title + ' ' + pane.badgevalue : pane.title\"\n [attr.icon-position]=\"iconposition\"\n [attr.title]=\"pane.title\"\n [tabindex]=\"pane.isActive ? '0' : '-1'\"\n class=\"tab-heading\" href=\"javascript:void(0);\"\n [attr.aria-selected]=\"pane.isActive\" role=\"tab\" (click)=\"pane.select($event); pane.tabpaneHeaderClick($event, i);\" (keydown)=\"onkeydown($event)\">\n <wm-app-icon [iconclass]=\"pane.paneicon\" [iconurl]=\"pane.paneiconurl\" alt=\"Tab icon\"></wm-app-icon>\n <span [textContent]=\"pane.title\"></span>\n @if (pane.badgevalue) {\n <span class=\"label label-{{pane.badgetype}}\" [textContent]=\"pane.badgevalue\"></span>\n }\n </a>\n </li>\n }\n</ul>\n@if (type !== 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n <ng-content ngProjectAs=\"div[wmTabPane]\"></ng-content>\n </div>\n}\n@if (type === 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n @if (fieldDefs && !fieldDefs.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n </div>\n}\n" }]
752
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i1.DynamicComponentRefProvider }, { type: undefined, decorators: [{
753
- type: Attribute,
754
- args: ['transition']
755
- }] }, { type: undefined, decorators: [{
756
- type: Attribute,
757
- args: ['tabsposition']
758
- }] }, { type: i1.StatePersistence }, { type: undefined, decorators: [{
759
- type: Inject,
760
- args: ['EXPLICIT_CONTEXT']
761
- }, {
762
- type: Optional
763
- }] }], propDecorators: { iconposition: [{
764
- type: HostBinding,
765
- args: ['attr.icon-position']
766
- }], panes: [{
767
- type: ContentChildren,
768
- args: [TabPaneComponent]
769
- }] } });
770
-
771
- /**
772
- * Generated bundle index. Do not edit.
773
- */
774
-
436
+ if (!this._dynamicContext) {
437
+ this._dynamicContext = Object.create(this.viewParent);
438
+ this._dynamicContext[this.getAttr("wmTab")] = this;
439
+ }
440
+ this.dynamicComponentProvider.addComponent(this.getNativeElement().querySelector(".tab-content"), markup, this._dynamicContext, { inj: this.inj }).then((componentRef) => {
441
+ if (componentRef) this.dynamicComponentRefs.push(componentRef);
442
+ });
443
+ });
444
+ return paneNamesList;
445
+ }
446
+ removePane(paneName) {
447
+ const paneRef = this.getPaneRefByName(paneName);
448
+ if (paneRef) paneRef.remove();
449
+ }
450
+ notifyChange(paneRef, evt, isKeyBoardEvent) {
451
+ if (!this.isSelectableTab(paneRef)) return;
452
+ let headerElement;
453
+ if (!isEmpty(this.activeTab)) this.activeTab.deselect();
454
+ this.activeTab = paneRef.getWidget();
455
+ const newPaneIndex = this.getPaneIndexByRef(paneRef);
456
+ const mode = this.statePersistence.computeMode(this.statehandler);
457
+ if (!this.isPageLoadCall && mode && mode.toLowerCase() !== "none") this.statePersistence.setWidgetState(this, this.activeTab.name);
458
+ else {
459
+ this.defaultpaneindex = this.getPaneIndexByRef(paneRef);
460
+ this.isPageLoadCall = false;
461
+ }
462
+ paneRef.invokeOnSelectCallback(evt);
463
+ if (evt) this.invokeEventCallback("change", {
464
+ $event: evt,
465
+ newPaneIndex,
466
+ oldPaneIndex: this._oldPaneIndex || 0
467
+ });
468
+ this._oldPaneIndex = newPaneIndex;
469
+ if (evt) headerElement = $(evt.target).closest("li.tab-header");
470
+ if (!evt || !headerElement?.length) {
471
+ headerElement = this.nativeElement.querySelector(`li[data-paneid=${paneRef.widgetId}]`);
472
+ if (!!!$(headerElement).closest(".app-tabs").parent().closest(".app-tabs").length && isKeyBoardEvent) $(headerElement).children().focus();
473
+ }
474
+ this.animateIn(headerElement);
475
+ if (this.canSlide()) {
476
+ if (!this.tabsAnimator) {
477
+ this.tabsAnimator = new TabsAnimator(this);
478
+ this.tabsAnimator.setGesturesEnabled(this.canSlide());
479
+ }
480
+ this.tabsAnimator.transitionTabIntoView();
481
+ }
482
+ }
483
+ goToTab(tabIndex) {
484
+ if (this.isValidPaneIndex(tabIndex - 1)) this.getPaneRefByIndex(tabIndex - 1).select();
485
+ }
486
+ getPaneIndexByRef(paneRef) {
487
+ return this.panes.toArray().indexOf(paneRef);
488
+ }
489
+ getActiveTabIndex() {
490
+ return findIndex(this.panes.toArray(), { isActive: true });
491
+ }
492
+ isValidPaneIndex(index) {
493
+ return index >= 0 && index < this.panes.length;
494
+ }
495
+ getPaneRefByIndex(index) {
496
+ return this.panes.toArray()[index];
497
+ }
498
+ getPaneRefByName(name) {
499
+ return find(this.panes.toArray(), { name });
500
+ }
501
+ isSelectableTab(paneRef) {
502
+ return paneRef.show && !paneRef.disabled;
503
+ }
504
+ canSlide() {
505
+ return this.transition === "slide" && !this.vertical;
506
+ }
507
+ getSelectableTabAfterIndex(index) {
508
+ for (let i = index + 1; i < this.panes.length; i++) {
509
+ const pane = this.getPaneRefByIndex(i);
510
+ if (this.isSelectableTab(pane)) return pane;
511
+ }
512
+ if (index === this.panes.length - 1) {
513
+ const pane = this.getPaneRefByIndex(0);
514
+ if (this.isSelectableTab(pane)) return pane;
515
+ }
516
+ }
517
+ getSelectableTabBeforeIndex(index) {
518
+ for (let i = index - 1; i >= 0; i--) {
519
+ const pane = this.getPaneRefByIndex(i);
520
+ if (this.isSelectableTab(pane)) return pane;
521
+ }
522
+ if (index === 0) {
523
+ const pane = this.getPaneRefByIndex(this.panes.length - 1);
524
+ if (this.isSelectableTab(pane)) return pane;
525
+ }
526
+ }
527
+ next($event, isKeyBoardEvent) {
528
+ const pane = this.getSelectableTabAfterIndex(this.getActiveTabIndex());
529
+ if (pane) pane.select($event, isKeyBoardEvent);
530
+ }
531
+ prev($event, isKeyBoardEvent) {
532
+ const pane = this.getSelectableTabBeforeIndex(this.getActiveTabIndex());
533
+ if (pane) pane.select($event, isKeyBoardEvent);
534
+ }
535
+ selectDefaultPaneByIndex(index) {
536
+ if (!this.isValidPaneIndex(index)) return;
537
+ let paneRef = this.getPaneRefByIndex(index);
538
+ if (!this.isSelectableTab(paneRef)) paneRef = this.getSelectableTabAfterIndex(0);
539
+ if (paneRef) paneRef.select();
540
+ }
541
+ setTabsPosition() {
542
+ const ul = this.nativeElement.children[0];
543
+ this.vertical = this.tabsposition === "left" || this.tabsposition === "right";
544
+ removeClass(this.nativeElement, "inverted");
545
+ if (this.tabsposition === "bottom" || this.tabsposition === "right") {
546
+ appendNode(ul, this.nativeElement);
547
+ addClass(this.nativeElement, "inverted");
548
+ }
549
+ }
550
+ onDataChange(newVal) {
551
+ this.fieldDefs = createArrayFrom(newVal);
552
+ setTimeout(() => this.selectDefaultPaneByIndex(this.defaultpaneindex || 0));
553
+ }
554
+ getWidgets(widgteName, index) {
555
+ let $target;
556
+ const retVal = [];
557
+ if (!widgteName) return;
558
+ if (!isDefined(index)) {
559
+ forEach(this.panes.toArray(), (el) => {
560
+ $target = get(el.currentTabWidgets, widgteName);
561
+ if ($target) retVal.push($target);
562
+ });
563
+ return retVal;
564
+ }
565
+ index = +index || 0;
566
+ $target = get(this.panes.toArray(), index);
567
+ if ($target) return [get($target.currentTabWidgets, widgteName)];
568
+ }
569
+ get currentTabPaneIndex() {
570
+ return this.getActiveTabIndex();
571
+ }
572
+ get isFirstTabPane() {
573
+ return this.panes.first.widgetId === this.activeTab.widgetId;
574
+ }
575
+ get isLastTabPane() {
576
+ return this.panes.last.widgetId === this.activeTab.widgetId;
577
+ }
578
+ onPropertyChange(key, nv, ov) {
579
+ if (key === "defaultpaneindex") this.defaultpaneindex = nv;
580
+ else if (key === "dataset") this.onDataChange(nv);
581
+ else if (key === "statehandler") {
582
+ this.isPageLoadCall = true;
583
+ const widgetState = this.statePersistence.getWidgetState(this);
584
+ if (nv !== "none" && widgetState) {
585
+ const paneToSelect = this.panes.filter(function(pane) {
586
+ return widgetState === pane.name;
587
+ });
588
+ if (!paneToSelect.length) {
589
+ console.warn("Tab pane name " + widgetState + " in State is incorrect. Falling back to the default pane");
590
+ setTimeout(() => this.selectDefaultPaneByIndex(this.defaultpaneindex || 0), 20);
591
+ } else {
592
+ const index = this.getPaneIndexByRef(paneToSelect[0]);
593
+ setTimeout(() => this.selectDefaultPaneByIndex(index), 20);
594
+ }
595
+ } else setTimeout(() => this.selectDefaultPaneByIndex(this.defaultpaneindex || 0), 20);
596
+ } else if (key === "autotabactivation") this.autoActivation = nv;
597
+ else super.onPropertyChange(key, nv, ov);
598
+ }
599
+ registerTabsScroll() {
600
+ setTimeout(() => {
601
+ const $ul = this.$element.find("> ul");
602
+ let $liPosition;
603
+ $liPosition = $ul.children().last().position();
604
+ if ($liPosition && $liPosition.left > $ul.width()) $ul.on("mousewheel", (e) => {
605
+ const left = $ul[0].scrollLeft, _delta = -1 * e.originalEvent.wheelDelta;
606
+ e.stopPropagation();
607
+ e.preventDefault();
608
+ $ul.animate({ scrollLeft: left + _delta }, { "duration": 10 });
609
+ });
610
+ });
611
+ }
612
+ onkeydown(event) {
613
+ let newPane;
614
+ switch (event.key) {
615
+ case "ArrowLeft":
616
+ case "ArrowUp":
617
+ newPane = this.autoActivation ? (this.prev(null, true), null) : this.getSelectableTabBeforeIndex(this.getSelectedPaneIndex());
618
+ break;
619
+ case "ArrowRight":
620
+ case "ArrowDown":
621
+ newPane = this.autoActivation ? (this.next(null, true), null) : this.getSelectableTabAfterIndex(this.getSelectedPaneIndex());
622
+ break;
623
+ case "Enter": {
624
+ const pane = this.getSelectableTabAfterIndex(this.getSelectedPaneIndex() - 1);
625
+ if (pane) {
626
+ const enterEvent = new KeyboardEvent("keydown", {
627
+ key: "Enter",
628
+ code: "Enter",
629
+ bubbles: true,
630
+ cancelable: true
631
+ });
632
+ pane.nativeElement.dispatchEvent(enterEvent);
633
+ pane.select(enterEvent, true);
634
+ }
635
+ event.preventDefault();
636
+ return;
637
+ }
638
+ default: return;
639
+ }
640
+ if (newPane) {
641
+ this.nativeElement.querySelector("li.select")?.classList.remove("select");
642
+ this.nativeElement.querySelector(`li[data-paneid="${newPane.widgetId}"]`)?.classList.add("select");
643
+ }
644
+ event.preventDefault();
645
+ }
646
+ ngAfterContentInit() {
647
+ this.promiseResolverFn();
648
+ super.ngAfterContentInit();
649
+ this.setTabsPosition();
650
+ this.panesChangesSubscription = this.panes.changes.subscribe((slides) => {
651
+ if (this.panes.length) this.selectDefaultPaneByIndex(this.defaultpaneindex || 0);
652
+ });
653
+ }
654
+ ngAfterViewInit() {
655
+ super.ngAfterViewInit();
656
+ this.registerTabsScroll();
657
+ }
658
+ getSelectedPaneIndex() {
659
+ const index = this.panes.toArray().findIndex((pane) => this.nativeElement.querySelector(`li[data-paneid="${pane.widgetId}"]`)?.classList.contains("select"));
660
+ return index >= 0 ? index : this.getActiveTabIndex();
661
+ }
662
+ ngOnDestroy() {
663
+ if (this.panesChangesSubscription) {
664
+ this.panesChangesSubscription.unsubscribe();
665
+ this.panesChangesSubscription = null;
666
+ }
667
+ if (this.dynamicComponentRefs?.length) {
668
+ this.dynamicComponentRefs.forEach((componentRef) => {
669
+ if (componentRef?.destroy) componentRef.destroy();
670
+ });
671
+ this.dynamicComponentRefs = [];
672
+ }
673
+ if (this._dynamicContext) {
674
+ Object.keys(this._dynamicContext).forEach((key) => {
675
+ delete this._dynamicContext[key];
676
+ });
677
+ this._dynamicContext = null;
678
+ }
679
+ if (this.dynamicTabs) this.dynamicTabs = [];
680
+ if (this.tabsAnimator) this.tabsAnimator = null;
681
+ this.fieldDefs = null;
682
+ this.activeTab = null;
683
+ super.ngOnDestroy();
684
+ }
685
+ static {
686
+ this.ɵfac = i0.ɵɵngDeclareFactory({
687
+ minVersion: "12.0.0",
688
+ version: "22.2.1",
689
+ ngImport: i0,
690
+ type: TabsComponent,
691
+ deps: [
692
+ { token: i0.Injector },
693
+ { token: i1.DynamicComponentRefProvider },
694
+ {
695
+ token: "transition",
696
+ attribute: true
697
+ },
698
+ {
699
+ token: "tabsposition",
700
+ attribute: true
701
+ },
702
+ { token: i1.StatePersistence },
703
+ {
704
+ token: "EXPLICIT_CONTEXT",
705
+ optional: true
706
+ }
707
+ ],
708
+ target: i0.ɵɵFactoryTarget.Component
709
+ });
710
+ }
711
+ static {
712
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
713
+ minVersion: "17.0.0",
714
+ version: "22.2.1",
715
+ type: TabsComponent,
716
+ isStandalone: true,
717
+ selector: "div[wmTabs]",
718
+ host: { properties: { "attr.icon-position": "this.iconposition" } },
719
+ providers: [provideAsWidgetRef(TabsComponent)],
720
+ queries: [{
721
+ propertyName: "panes",
722
+ predicate: TabPaneComponent
723
+ }],
724
+ exportAs: ["wmTabs"],
725
+ usesInheritance: true,
726
+ ngImport: i0,
727
+ template: "<ul class=\"nav nav-tabs\" [ngClass]=\"{'nav-stacked': vertical, 'nav-justified': justified}\" role=\"tablist\">\n @for (pane of panes; track pane; let i = $index) {\n <li class=\"tab-header\" [attr.data-paneid]=\"pane.widgetId\" [ngClass]=\"{'active': pane.isActive, 'disabled': pane.disabled}\"\n [hidden]=\"!pane.show\" role=\"presentation\">\n <a [attr.aria-label]=\"pane.badgevalue ? pane.title + ' ' + pane.badgevalue : pane.title\"\n [attr.icon-position]=\"iconposition\"\n [attr.title]=\"pane.title\"\n [tabindex]=\"pane.isActive ? '0' : '-1'\"\n class=\"tab-heading\" href=\"javascript:void(0);\"\n [attr.aria-selected]=\"pane.isActive\" role=\"tab\" (click)=\"pane.select($event); pane.tabpaneHeaderClick($event, i);\" (keydown)=\"onkeydown($event)\">\n <wm-app-icon [iconclass]=\"pane.paneicon\" [iconurl]=\"pane.paneiconurl\" alt=\"Tab icon\"></wm-app-icon>\n <span [textContent]=\"pane.title\"></span>\n @if (pane.badgevalue) {\n <span class=\"label label-{{pane.badgetype}}\" [textContent]=\"pane.badgevalue\"></span>\n }\n </a>\n </li>\n }\n</ul>\n@if (type !== 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n <ng-content ngProjectAs=\"div[wmTabPane]\"></ng-content>\n </div>\n}\n@if (type === 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n @if (fieldDefs && !fieldDefs.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n </div>\n}\n",
728
+ dependencies: [
729
+ {
730
+ kind: "ngmodule",
731
+ type: CommonModule
732
+ },
733
+ {
734
+ kind: "directive",
735
+ type: i2.NgClass,
736
+ selector: "[ngClass]",
737
+ inputs: ["class", "ngClass"]
738
+ },
739
+ {
740
+ kind: "directive",
741
+ type: TextContentDirective,
742
+ selector: "[textContent]",
743
+ inputs: ["textContent"]
744
+ },
745
+ {
746
+ kind: "component",
747
+ type: WmAppIconComponent,
748
+ selector: "wm-app-icon",
749
+ inputs: [
750
+ "icon",
751
+ "iconclass",
752
+ "iconurl",
753
+ "defaultIconClass",
754
+ "defaultClasses",
755
+ "iconStyle",
756
+ "alt"
757
+ ]
758
+ }
759
+ ],
760
+ changeDetection: i0.ChangeDetectionStrategy.Eager
761
+ });
762
+ }
763
+ };
764
+ i0.ɵɵngDeclareClassMetadata({
765
+ minVersion: "12.0.0",
766
+ version: "22.2.1",
767
+ ngImport: i0,
768
+ type: TabsComponent,
769
+ decorators: [{
770
+ type: Component,
771
+ args: [{
772
+ changeDetection: ChangeDetectionStrategy.Eager,
773
+ standalone: true,
774
+ imports: [
775
+ CommonModule,
776
+ TextContentDirective,
777
+ WmAppIconComponent
778
+ ],
779
+ selector: "div[wmTabs]",
780
+ exportAs: "wmTabs",
781
+ providers: [provideAsWidgetRef(TabsComponent)],
782
+ template: "<ul class=\"nav nav-tabs\" [ngClass]=\"{'nav-stacked': vertical, 'nav-justified': justified}\" role=\"tablist\">\n @for (pane of panes; track pane; let i = $index) {\n <li class=\"tab-header\" [attr.data-paneid]=\"pane.widgetId\" [ngClass]=\"{'active': pane.isActive, 'disabled': pane.disabled}\"\n [hidden]=\"!pane.show\" role=\"presentation\">\n <a [attr.aria-label]=\"pane.badgevalue ? pane.title + ' ' + pane.badgevalue : pane.title\"\n [attr.icon-position]=\"iconposition\"\n [attr.title]=\"pane.title\"\n [tabindex]=\"pane.isActive ? '0' : '-1'\"\n class=\"tab-heading\" href=\"javascript:void(0);\"\n [attr.aria-selected]=\"pane.isActive\" role=\"tab\" (click)=\"pane.select($event); pane.tabpaneHeaderClick($event, i);\" (keydown)=\"onkeydown($event)\">\n <wm-app-icon [iconclass]=\"pane.paneicon\" [iconurl]=\"pane.paneiconurl\" alt=\"Tab icon\"></wm-app-icon>\n <span [textContent]=\"pane.title\"></span>\n @if (pane.badgevalue) {\n <span class=\"label label-{{pane.badgetype}}\" [textContent]=\"pane.badgevalue\"></span>\n }\n </a>\n </li>\n }\n</ul>\n@if (type !== 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n <ng-content ngProjectAs=\"div[wmTabPane]\"></ng-content>\n </div>\n}\n@if (type === 'dynamic') {\n <div class=\"tab-content\" [ngClass]=\"{'tab-stacked': vertical, 'tab-justified': justified}\">\n @if (fieldDefs && !fieldDefs.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n </div>\n}\n"
783
+ }]
784
+ }],
785
+ ctorParameters: () => [
786
+ { type: i0.Injector },
787
+ { type: i1.DynamicComponentRefProvider },
788
+ {
789
+ type: void 0,
790
+ decorators: [{
791
+ type: Attribute,
792
+ args: ["transition"]
793
+ }]
794
+ },
795
+ {
796
+ type: void 0,
797
+ decorators: [{
798
+ type: Attribute,
799
+ args: ["tabsposition"]
800
+ }]
801
+ },
802
+ { type: i1.StatePersistence },
803
+ {
804
+ type: void 0,
805
+ decorators: [{
806
+ type: Inject,
807
+ args: ["EXPLICIT_CONTEXT"]
808
+ }, { type: Optional }]
809
+ }
810
+ ],
811
+ propDecorators: {
812
+ iconposition: [{
813
+ type: HostBinding,
814
+ args: ["attr.icon-position"]
815
+ }],
816
+ panes: [{
817
+ type: ContentChildren,
818
+ args: [TabPaneComponent]
819
+ }]
820
+ }
821
+ });
775
822
  export { TabPaneComponent, TabsComponent };
776
- //# sourceMappingURL=index.mjs.map
823
+
824
+ //# sourceMappingURL=index.mjs.map