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