@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,1087 +1,1105 @@
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('@angular/forms'), require('lodash-es')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/core', '@wm/core', '@angular/forms', '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.wizard = {}), global.ng.common, global.wm.components.base, global.ng.core, global.wm.core, global.ng.forms, global._));
5
- })(this, (function (exports, i2, base, i0, i1$1, i1, lodashEs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@wm/components/base'), require('@angular/core'), require('@wm/core'), require('@angular/forms'), require('lodash-es')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/core', '@wm/core', '@angular/forms', '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.wizard = {}), global.ng.common, global.wm.components.base, global.ng.core, global.wm.core, global.ng.forms, global._));
5
+ })(this, (function (exports, i2, base, i0, i1, i1$1, 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$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1$1);
27
- 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
+ var i1$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1$1);
28
28
 
29
- const registerProps$2 = () => {
30
- base.register('wm-wizard', new Map([
31
- ['actionsalignment', { value: 'right', ...base.PROP_STRING }],
32
- ['cancelable', { value: true, ...base.PROP_BOOLEAN }],
33
- ['cancelbtnlabel', { value: 'Cancel', ...base.PROP_STRING }],
34
- ['class', { value: 'classic', ...base.PROP_STRING }],
35
- ['dataset', base.PROP_ANY],
36
- ['defaultstep', { value: 'none', ...base.PROP_STRING }],
37
- ['defaultstepindex', { value: 0, ...base.PROP_NUMBER }],
38
- ['donebtnlabel', { value: 'Done', ...base.PROP_STRING }],
39
- ['enablenext', { value: false, ...base.PROP_BOOLEAN }],
40
- ['name', base.PROP_STRING],
41
- ['nextbtnlabel', { value: 'Next', ...base.PROP_STRING }],
42
- ['nodatamessage', { value: 'No Data Found', ...base.PROP_STRING }],
43
- ['previousbtnlabel', { value: 'Previous', ...base.PROP_STRING }],
44
- ['show', { value: true, ...base.PROP_BOOLEAN }],
45
- ['stepstyle', { value: 'auto', ...base.PROP_STRING }],
46
- ['type', base.PROP_STRING]
47
- ]));
48
- };
49
-
50
- const registerProps$1 = () => {
51
- base.register('wm-wizardstep', new Map([
52
- ['class', base.PROP_STRING],
53
- ['content', base.PROP_STRING],
54
- ['doneiconclass', { value: 'wi wi-done', ...base.PROP_STRING }],
55
- ['doneiconurl', base.PROP_STRING],
56
- ['dynamicStepIndex', base.PROP_NUMBER], // internal property
57
- ['enableskip', { value: false, ...base.PROP_BOOLEAN }],
58
- ['iconclass', { value: 'wi wi-person', ...base.PROP_STRING }],
59
- ['iconurl', base.PROP_STRING],
60
- ['isdynamic', base.PROP_STRING], // internal property
61
- ['name', base.PROP_STRING],
62
- ['show', { value: true, ...base.PROP_BOOLEAN }],
63
- ['subtitle', base.PROP_STRING],
64
- ['title', { value: 'Step Title', ...base.PROP_STRING }]
65
- ]));
66
- };
67
-
68
- const DEFAULT_CLS$1 = 'app-wizard-step-content';
69
- const WIDGET_CONFIG$1 = {
70
- widgetType: 'wm-wizardstep',
71
- hostClass: DEFAULT_CLS$1,
72
- };
73
- class WizardStepComponent extends base.StylableComponent {
74
- static { this.initializeProps = registerProps$1(); }
75
- get activeClass() {
76
- return this.isPrism && this.active;
77
- }
78
- get currentClass() {
79
- return !this.isPrism && this.active;
80
- }
81
- get isCurrent() {
82
- return this.active;
83
- }
84
- /**
85
- * along with the wizard form , also validate the forms
86
- * if there are any inside the wizard
87
- * @returns {boolean}
88
- */
89
- get isValid() {
90
- return (this.ngForm.valid || this.ngForm.disabled) && this.areEmbeddedFormsValid();
91
- }
92
- /**
93
- * get all the forms inside the wizard if any and validate
94
- * @returns {boolean}
95
- */
96
- areEmbeddedFormsValid() {
97
- for (const form of this.getAllEmbeddedForms()) {
98
- if (form.widget?.ngform && !form.widget.ngform.valid) {
99
- return false;
100
- }
101
- }
102
- return true;
103
- }
104
- getAllEmbeddedForms() {
105
- return this.$element.find('form');
106
- }
107
- get enableNext() {
108
- return !this.disablenext;
109
- }
110
- get enableDone() {
111
- return !this.disabledone;
112
- }
113
- get enablePrev() {
114
- return !this.disableprevious;
115
- }
116
- set active(nv) {
117
- const isActive = this.active;
118
- this.status = 1 /* STEP_STATUS.CURRENT */;
119
- if (nv && !isActive) {
120
- this.redrawChildren();
121
- }
122
- }
123
- get active() {
124
- return this.status === 1 /* STEP_STATUS.CURRENT */;
125
- }
126
- set done(nv) {
127
- if (nv) {
128
- this.status = 3 /* STEP_STATUS.COMPLETED */;
129
- }
130
- }
131
- get done() {
132
- return this.status === 3 /* STEP_STATUS.COMPLETED */;
133
- }
134
- set disabled(nv) {
135
- if (nv) {
136
- this.status = 2 /* STEP_STATUS.DISABLED */;
137
- }
138
- }
139
- get disabled() {
140
- return this.status === 2 /* STEP_STATUS.DISABLED */;
141
- }
142
- constructor(inj, ngForm, explicitContext) {
143
- super(inj, WIDGET_CONFIG$1, explicitContext);
144
- this.ngForm = ngForm;
145
- this.$lazyLoad = i1$1.noop;
146
- this.isDone = false;
147
- this.nextCBInProgress = false;
148
- this.prevCBInProgress = false;
149
- this.status = 2 /* STEP_STATUS.DISABLED */;
150
- this._currentWizardWidgets = {};
151
- this.isPrism = false;
152
- // If we inject directly as a param in the constructor, getting circular dependency error in unit testcases
153
- this.wizardComponent = this.inj.get(WizardComponent);
154
- this.isPrism = !!this.inj.get(i1$1.App, null)?.isPrism;
155
- }
156
- invokeNextCB(index) {
157
- return this.invokeEventCallback('next', { currentStep: this, stepIndex: index });
158
- }
159
- invokePrevCB(index) {
160
- return this.invokeEventCallback('prev', { currentStep: this, stepIndex: index });
161
- }
162
- invokeSkipCB(index) {
163
- return this.invokeEventCallback('skip', { currentStep: this, stepIndex: index });
164
- }
165
- // redraw all the projected components which are projected.
166
- redrawChildren() {
167
- setTimeout(() => {
168
- if (this.reDrawableComponents) {
169
- this.reDrawableComponents.forEach(c => c.redraw());
170
- }
171
- if (this.wizardComponent) {
172
- const stepIndex = this.wizardComponent.getCurrentStepIndex();
173
- this.invokeEventCallback('load', { stepIndex });
174
- }
175
- }, 100);
176
- }
177
- remove() {
178
- if (this.active) {
179
- this === this.wizardComponent.steps.last ? this.wizardComponent.prev() : this.wizardComponent.next();
180
- }
181
- const availablePanes = this.wizardComponent.steps.toArray();
182
- availablePanes.splice(this.wizardComponent.getStepIndexByRef(this), 1);
183
- this.wizardComponent.steps.reset([...availablePanes]);
184
- this.nativeElement.remove();
185
- }
186
- get currentWizardWidgets() {
187
- return base.getCurrentWidgets(this.nativeElement, this._currentWizardWidgets);
188
- }
189
- onPropertyChange(key, nv, ov) {
190
- if (key === 'content') {
191
- setTimeout(() => this.$lazyLoad(), 100);
192
- }
193
- else {
194
- super.onPropertyChange(key, nv, ov);
195
- }
196
- }
197
- ngOnInit() {
198
- super.ngOnInit();
199
- }
200
- ngAfterViewInit() {
201
- super.ngAfterViewInit();
202
- if (this.isdynamic) {
203
- this.wizardComponent.registerDynamicStep(this);
204
- }
205
- }
206
- ngOnDestroy() {
207
- // MEMORY LEAK FIX: Clear redrawable components references
208
- if (this.reDrawableComponents) {
209
- this.reDrawableComponents.reset([]);
210
- }
211
- // MEMORY LEAK FIX: Clear wizard component reference
212
- this.wizardComponent = null;
213
- // Call parent ngOnDestroy (StylableComponent → BaseComponent)
214
- // This will clear the context and unregister the widget
215
- super.ngOnDestroy();
216
- }
217
- static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: WizardStepComponent, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.NgForm, self: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
218
- static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: WizardStepComponent, isStandalone: true, selector: "form[wmWizardStep]", host: { properties: { "class.active": "this.activeClass", "class.current": "this.currentClass" } }, providers: [
219
- base.provideAsWidgetRef(WizardStepComponent),
220
- i1.NgForm
221
- ], queries: [{ propertyName: "reDrawableComponents", predicate: base.RedrawableDirective, descendants: true }], exportAs: ["wmWizardStep"], usesInheritance: true, ngImport: i0__namespace, template: `<ng-content partial-container-target></ng-content>`, isInline: true }); }
222
- }
223
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: WizardStepComponent, decorators: [{
224
- type: i0.Component,
225
- args: [{
226
- standalone: true,
227
- selector: 'form[wmWizardStep]',
228
- template: `<ng-content partial-container-target></ng-content>`,
229
- providers: [
230
- base.provideAsWidgetRef(WizardStepComponent),
231
- i1.NgForm
232
- ],
233
- exportAs: 'wmWizardStep'
234
- }]
235
- }], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i1__namespace.NgForm, decorators: [{
236
- type: i0.Self
237
- }] }, { type: undefined, decorators: [{
238
- type: i0.Inject,
239
- args: ['EXPLICIT_CONTEXT']
240
- }, {
241
- type: i0.Optional
242
- }] }], propDecorators: { reDrawableComponents: [{
243
- type: i0.ContentChildren,
244
- args: [base.RedrawableDirective, { descendants: true }]
245
- }], activeClass: [{
246
- type: i0.HostBinding,
247
- args: ['class.active']
248
- }], currentClass: [{
249
- type: i0.HostBinding,
250
- args: ['class.current']
251
- }] } });
252
-
253
- const DEFAULT_CLS = 'app-wizard panel clearfix';
254
- const WIDGET_CONFIG = {
255
- widgetType: 'wm-wizard',
256
- hostClass: DEFAULT_CLS
257
- };
258
- class WizardComponent extends base.StylableComponent {
259
- static { this.initializeProps = registerProps$2(); }
260
- get hasPrevStep() {
261
- return !this._isFirstStep(this.currentStep);
262
- }
263
- get hasNextStep() {
264
- return !this._isLastStep(this.currentStep);
265
- }
266
- get showDoneBtn() {
267
- if (!this.currentStep) {
268
- return false;
269
- }
270
- return !this.hasNextStep && this.currentStep.enableDone;
271
- }
272
- get enablePrev() {
273
- if (!this.currentStep) {
274
- return false;
275
- }
276
- return this.currentStep.enablePrev;
277
- }
278
- get enableNext() {
279
- if (!this.currentStep) {
280
- return false;
281
- }
282
- return this.enablenext ? true : (this.currentStep.enableNext && this.currentStep.isValid);
283
- }
284
- /**
285
- * Step header icons (iconclass / doneiconclass): same rules as iconstepper, plus tabstepper
286
- * (e.g. wizard-tabstepper, tabstepper, tabstepper_vertical). Uses class property + host className
287
- * so preview stays correct when the DOM is updated before the bound property.
288
- */
289
- wizardHostClassString() {
290
- const fromProp = typeof this.class === 'string' ? this.class : '';
291
- const rawDom = this.nativeElement?.className;
292
- const fromDom = typeof rawDom === 'string' ? rawDom : rawDom?.baseVal || '';
293
- return `${fromProp} ${fromDom}`.trim();
294
- }
295
- get showWizardStepIcons() {
296
- const c = this.wizardHostClassString();
297
- if (!c) {
298
- return false;
299
- }
300
- return c.includes('iconstepper') || c.includes('tabstepper');
301
- }
302
- /** Tab layout only (not icon stepper): omit icon column when step has no icon. */
303
- get isTabStepperWizard() {
304
- const c = this.wizardHostClassString();
305
- return c.includes('tabstepper') && !c.includes('iconstepper');
306
- }
307
- /** Default matches wm-wizardstep props; used for icon stepper when iconclass is empty. */
308
- stepIconClassOrDefault(step) {
309
- const c = step?.iconclass || step?.iconurl;
310
- return typeof c === 'string' && c.trim() ? c.trim() : 'wi wi-person';
311
- }
312
- hasNonEmptyIconClass(step) {
313
- const ic = step?.iconclass || step?.iconurl;
314
- return typeof ic === 'string' && ic.trim() !== '';
315
- }
316
- /**
317
- * Primary `app-icon` for icon/tab stepper: only when `iconclass` is set (no default glyph for icon stepper).
318
- * When `doneiconclass` is set, the done row is shown instead of this primary icon.
319
- */
320
- shouldShowPrimaryStepIcon(step) {
321
- if (!step || !this.showWizardStepIcons) {
322
- return false;
323
- }
324
- if (!step.isDone) {
325
- return this.hasNonEmptyIconClass(step);
326
- }
327
- const d = step.doneiconclass;
328
- const hasDone = typeof d === 'string' && d.trim() !== '';
329
- if (hasDone) {
330
- return false;
331
- }
332
- return this.hasNonEmptyIconClass(step);
333
- }
334
- /**
335
- * Tab stepper: no `wizard-step-number` when the step is done but `doneiconclass` is empty.
336
- * Icon stepper: omit the wrapper when there is no primary icon and no done icon to show.
337
- * Other layouts: keep the wrapper (numbers, dots, etc.).
338
- */
339
- shouldRenderWizardStepNumberSpan(step) {
340
- if (!this.showWizardStepIcons) {
341
- return true;
342
- }
343
- if (this.isTabStepperWizard) {
344
- if (step.isDone && !this.hasNonEmptyDoneIconClass(step)) {
345
- return false;
346
- }
347
- return (this.shouldShowPrimaryStepIcon(step) ||
348
- (step.isDone && this.hasNonEmptyDoneIconClass(step)));
349
- }
350
- if (this.wizardHostClassString().includes('iconstepper')) {
351
- return (this.shouldShowPrimaryStepIcon(step) ||
352
- (step.isDone && this.hasNonEmptyDoneIconClass(step)));
353
- }
354
- return true;
355
- }
356
- /** Avoid `String()` in templates (strict mode treats it as a component property). */
357
- hasNonEmptyDoneIconClass(step) {
358
- const d = step?.doneiconclass || step?.doneiconurl;
359
- return typeof d === 'string' && d.trim() !== '';
360
- }
361
- get enableDone() {
362
- if (!this.currentStep) {
363
- return false;
364
- }
365
- return this.currentStep.enableDone && this.currentStep.isValid;
366
- }
367
- /**
368
- * returns current step index of the Wizard's current step
369
- */
370
- get currentStepIndex() {
371
- return this.getStepIndexByRef(this.currentStep);
372
- }
373
- /**
374
- * returns weather the current step is first step or not
375
- */
376
- get isFirstStep() {
377
- return this._isFirstStep(this.currentStep);
378
- }
379
- /**
380
- * returns weather the current step is last step or not
381
- */
382
- get isLastStep() {
383
- return this._isLastStep(this.currentStep);
384
- }
385
- constructor(inj, dynamicComponentProvider, contexts, explicitContext) {
386
- let resolveFn = i1$1.noop;
387
- super(inj, WIDGET_CONFIG, explicitContext, new Promise(res => resolveFn = res));
388
- this._isFirstLoad = true;
389
- this.isPromise = (obj) => obj instanceof Promise || (obj !== null && typeof obj === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function');
390
- base.styler(this.nativeElement, this, base.APPLY_STYLES_TYPE.SHELL);
391
- this.promiseResolverFn = resolveFn;
392
- // initialize the message object with default values
393
- this.message = {
394
- caption: '',
395
- type: ''
396
- };
397
- this.wizContext = contexts[0];
398
- this.dynamicComponentProvider = dynamicComponentProvider;
399
- this.dynamicWizard = [];
400
- this.dynamicStepIndex = 0;
401
- }
402
- /**
403
- * This method is used to register the dynamic steps.
404
- * After all steps are initialzed, update the querylist manually based on index.
405
- * @param stepRef - refrence of the wizardstep
406
- */
407
- registerDynamicStep(stepRef) {
408
- this.dynamicWizard.push(stepRef);
409
- const isLastStep = this.dynamicWizard.length === this.dynamicStepIndex;
410
- if (isLastStep) {
411
- for (let i = 0; i < this.dynamicWizard.length; i++) {
412
- const newStepRef = lodashEs.find(this.dynamicWizard, step => step.dynamicStepIndex === i);
413
- const isStepAlreadyExist = lodashEs.find(this.steps.toArray(), newStepRef);
414
- if (!isStepAlreadyExist) {
415
- this.steps.reset([...this.steps.toArray(), newStepRef]);
416
- if (newStepRef.active) {
417
- setTimeout(() => {
418
- newStepRef.select();
419
- }, 20);
420
- }
421
- }
422
- }
423
- }
424
- }
425
- /**
426
- * This method is to add the wizard step dynamically
427
- * @param wizardSteps - list of wizardsteps
428
- */
429
- addStep(wizardSteps) {
430
- if (!lodashEs.isArray(wizardSteps)) {
431
- wizardSteps = [wizardSteps];
432
- }
433
- const stepNamesList = [];
434
- lodashEs.forEach(wizardSteps, (step, index) => {
435
- const isStepAlreadyCreated = lodashEs.find(this.steps.toArray(), { name: step.name });
436
- const isStepNameExist = lodashEs.indexOf(stepNamesList, step.name);
437
- // If user tries to add wizardstep with the same name which is already exists then do not create the step
438
- if (isStepAlreadyCreated || isStepNameExist > 0) {
439
- console.warn(`The wizard step with name ${step.name} already exists`);
440
- return;
441
- }
442
- let paramMarkup = '';
443
- let propsTmpl = '';
444
- this.dynamicStepIndex++;
445
- const name = step.name ? step.name : `wizardstep${this.steps.toArray().length + (index + 1)}`;
446
- stepNamesList.push(name);
447
- const partialParams = lodashEs.get(step, 'params');
448
- lodashEs.forEach(step, (value, key) => {
449
- if (key !== 'params') {
450
- propsTmpl = `${propsTmpl} ${key}="${value}"`;
451
- }
452
- });
453
- lodashEs.forEach(partialParams, (value, key) => {
454
- paramMarkup = `${paramMarkup} <wm-param name="${key}" value="${value}"></wm-param>`;
455
- });
456
- const markup = `<wm-wizardstep dynamicStepIndex="${this.dynamicStepIndex - 1}" isdynamic="true" name="${name}" ${propsTmpl}>
29
+ const registerProps$2 = () => {
30
+ base.register("wm-wizard", /* @__PURE__ */ new Map([
31
+ ["actionsalignment", {
32
+ value: "right",
33
+ ...base.PROP_STRING
34
+ }],
35
+ ["cancelable", {
36
+ value: true,
37
+ ...base.PROP_BOOLEAN
38
+ }],
39
+ ["cancelbtnlabel", {
40
+ value: "Cancel",
41
+ ...base.PROP_STRING
42
+ }],
43
+ ["class", {
44
+ value: "classic",
45
+ ...base.PROP_STRING
46
+ }],
47
+ ["dataset", base.PROP_ANY],
48
+ ["defaultstep", {
49
+ value: "none",
50
+ ...base.PROP_STRING
51
+ }],
52
+ ["defaultstepindex", {
53
+ value: 0,
54
+ ...base.PROP_NUMBER
55
+ }],
56
+ ["donebtnlabel", {
57
+ value: "Done",
58
+ ...base.PROP_STRING
59
+ }],
60
+ ["enablenext", {
61
+ value: false,
62
+ ...base.PROP_BOOLEAN
63
+ }],
64
+ ["name", base.PROP_STRING],
65
+ ["nextbtnlabel", {
66
+ value: "Next",
67
+ ...base.PROP_STRING
68
+ }],
69
+ ["nodatamessage", {
70
+ value: "No Data Found",
71
+ ...base.PROP_STRING
72
+ }],
73
+ ["previousbtnlabel", {
74
+ value: "Previous",
75
+ ...base.PROP_STRING
76
+ }],
77
+ ["show", {
78
+ value: true,
79
+ ...base.PROP_BOOLEAN
80
+ }],
81
+ ["stepstyle", {
82
+ value: "auto",
83
+ ...base.PROP_STRING
84
+ }],
85
+ ["type", base.PROP_STRING]
86
+ ]));
87
+ };
88
+ const registerProps$1 = () => {
89
+ base.register("wm-wizardstep", /* @__PURE__ */ new Map([
90
+ ["class", base.PROP_STRING],
91
+ ["content", base.PROP_STRING],
92
+ ["doneiconclass", {
93
+ value: "wi wi-done",
94
+ ...base.PROP_STRING
95
+ }],
96
+ ["doneiconurl", base.PROP_STRING],
97
+ ["dynamicStepIndex", base.PROP_NUMBER],
98
+ ["enableskip", {
99
+ value: false,
100
+ ...base.PROP_BOOLEAN
101
+ }],
102
+ ["iconclass", {
103
+ value: "wi wi-person",
104
+ ...base.PROP_STRING
105
+ }],
106
+ ["iconurl", base.PROP_STRING],
107
+ ["isdynamic", base.PROP_STRING],
108
+ ["name", base.PROP_STRING],
109
+ ["show", {
110
+ value: true,
111
+ ...base.PROP_BOOLEAN
112
+ }],
113
+ ["subtitle", base.PROP_STRING],
114
+ ["title", {
115
+ value: "Step Title",
116
+ ...base.PROP_STRING
117
+ }]
118
+ ]));
119
+ };
120
+ const WIDGET_CONFIG$1 = {
121
+ widgetType: "wm-wizardstep",
122
+ hostClass: "app-wizard-step-content"
123
+ };
124
+ var WizardStepComponent = class WizardStepComponent extends base.StylableComponent {
125
+ static {
126
+ this.initializeProps = registerProps$1();
127
+ }
128
+ get activeClass() {
129
+ return this.isPrism && this.active;
130
+ }
131
+ get currentClass() {
132
+ return !this.isPrism && this.active;
133
+ }
134
+ get isCurrent() {
135
+ return this.active;
136
+ }
137
+ get isValid() {
138
+ return (this.ngForm.valid || this.ngForm.disabled) && this.areEmbeddedFormsValid();
139
+ }
140
+ areEmbeddedFormsValid() {
141
+ for (const form of this.getAllEmbeddedForms()) if (form.widget?.ngform && !form.widget.ngform.valid) return false;
142
+ return true;
143
+ }
144
+ getAllEmbeddedForms() {
145
+ return this.$element.find("form");
146
+ }
147
+ get enableNext() {
148
+ return !this.disablenext;
149
+ }
150
+ get enableDone() {
151
+ return !this.disabledone;
152
+ }
153
+ get enablePrev() {
154
+ return !this.disableprevious;
155
+ }
156
+ set active(nv) {
157
+ const isActive = this.active;
158
+ this.status = 1;
159
+ if (nv && !isActive) this.redrawChildren();
160
+ }
161
+ get active() {
162
+ return this.status === 1;
163
+ }
164
+ set done(nv) {
165
+ if (nv) this.status = 3;
166
+ }
167
+ get done() {
168
+ return this.status === 3;
169
+ }
170
+ set disabled(nv) {
171
+ if (nv) this.status = 2;
172
+ }
173
+ get disabled() {
174
+ return this.status === 2;
175
+ }
176
+ constructor(inj, ngForm, explicitContext) {
177
+ super(inj, WIDGET_CONFIG$1, explicitContext);
178
+ this.ngForm = ngForm;
179
+ this.$lazyLoad = i1.noop;
180
+ this.isDone = false;
181
+ this.nextCBInProgress = false;
182
+ this.prevCBInProgress = false;
183
+ this.status = 2;
184
+ this._currentWizardWidgets = {};
185
+ this.isPrism = false;
186
+ this.wizardComponent = this.inj.get(WizardComponent);
187
+ this.isPrism = !!this.inj.get(i1.App, null)?.isPrism;
188
+ }
189
+ invokeNextCB(index) {
190
+ return this.invokeEventCallback("next", {
191
+ currentStep: this,
192
+ stepIndex: index
193
+ });
194
+ }
195
+ invokePrevCB(index) {
196
+ return this.invokeEventCallback("prev", {
197
+ currentStep: this,
198
+ stepIndex: index
199
+ });
200
+ }
201
+ invokeSkipCB(index) {
202
+ return this.invokeEventCallback("skip", {
203
+ currentStep: this,
204
+ stepIndex: index
205
+ });
206
+ }
207
+ redrawChildren() {
208
+ setTimeout(() => {
209
+ if (this.reDrawableComponents) this.reDrawableComponents.forEach((c) => c.redraw());
210
+ if (this.wizardComponent) {
211
+ const stepIndex = this.wizardComponent.getCurrentStepIndex();
212
+ this.invokeEventCallback("load", { stepIndex });
213
+ }
214
+ }, 100);
215
+ }
216
+ remove() {
217
+ if (this.active) this === this.wizardComponent.steps.last ? this.wizardComponent.prev() : this.wizardComponent.next();
218
+ const availablePanes = this.wizardComponent.steps.toArray();
219
+ availablePanes.splice(this.wizardComponent.getStepIndexByRef(this), 1);
220
+ this.wizardComponent.steps.reset([...availablePanes]);
221
+ this.nativeElement.remove();
222
+ }
223
+ get currentWizardWidgets() {
224
+ return base.getCurrentWidgets(this.nativeElement, this._currentWizardWidgets);
225
+ }
226
+ onPropertyChange(key, nv, ov) {
227
+ if (key === "content") setTimeout(() => this.$lazyLoad(), 100);
228
+ else super.onPropertyChange(key, nv, ov);
229
+ }
230
+ ngOnInit() {
231
+ super.ngOnInit();
232
+ }
233
+ ngAfterViewInit() {
234
+ super.ngAfterViewInit();
235
+ if (this.isdynamic) this.wizardComponent.registerDynamicStep(this);
236
+ }
237
+ ngOnDestroy() {
238
+ if (this.reDrawableComponents) this.reDrawableComponents.reset([]);
239
+ this.wizardComponent = null;
240
+ super.ngOnDestroy();
241
+ }
242
+ static {
243
+ this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
244
+ minVersion: "12.0.0",
245
+ version: "22.2.1",
246
+ ngImport: i0__namespace,
247
+ type: WizardStepComponent,
248
+ deps: [
249
+ { token: i0__namespace.Injector },
250
+ {
251
+ token: i1$1__namespace.NgForm,
252
+ self: true
253
+ },
254
+ {
255
+ token: "EXPLICIT_CONTEXT",
256
+ optional: true
257
+ }
258
+ ],
259
+ target: i0__namespace.ɵɵFactoryTarget.Component
260
+ });
261
+ }
262
+ static {
263
+ this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({
264
+ minVersion: "14.0.0",
265
+ version: "22.2.1",
266
+ type: WizardStepComponent,
267
+ isStandalone: true,
268
+ selector: "form[wmWizardStep]",
269
+ host: { properties: {
270
+ "class.active": "this.activeClass",
271
+ "class.current": "this.currentClass"
272
+ } },
273
+ providers: [base.provideAsWidgetRef(WizardStepComponent), i1$1.NgForm],
274
+ queries: [{
275
+ propertyName: "reDrawableComponents",
276
+ predicate: base.RedrawableDirective,
277
+ descendants: true
278
+ }],
279
+ exportAs: ["wmWizardStep"],
280
+ usesInheritance: true,
281
+ ngImport: i0__namespace,
282
+ template: `<ng-content partial-container-target></ng-content>`,
283
+ isInline: true,
284
+ changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
285
+ });
286
+ }
287
+ };
288
+ i0__namespace.ɵɵngDeclareClassMetadata({
289
+ minVersion: "12.0.0",
290
+ version: "22.2.1",
291
+ ngImport: i0__namespace,
292
+ type: WizardStepComponent,
293
+ decorators: [{
294
+ type: i0.Component,
295
+ args: [{
296
+ changeDetection: i0.ChangeDetectionStrategy.Eager,
297
+ standalone: true,
298
+ selector: "form[wmWizardStep]",
299
+ template: `<ng-content partial-container-target></ng-content>`,
300
+ providers: [base.provideAsWidgetRef(WizardStepComponent), i1$1.NgForm],
301
+ exportAs: "wmWizardStep"
302
+ }]
303
+ }],
304
+ ctorParameters: () => [
305
+ { type: i0__namespace.Injector },
306
+ {
307
+ type: i1$1__namespace.NgForm,
308
+ decorators: [{ type: i0.Self }]
309
+ },
310
+ {
311
+ type: void 0,
312
+ decorators: [{
313
+ type: i0.Inject,
314
+ args: ["EXPLICIT_CONTEXT"]
315
+ }, { type: i0.Optional }]
316
+ }
317
+ ],
318
+ propDecorators: {
319
+ reDrawableComponents: [{
320
+ type: i0.ContentChildren,
321
+ args: [base.RedrawableDirective, { descendants: true }]
322
+ }],
323
+ activeClass: [{
324
+ type: i0.HostBinding,
325
+ args: ["class.active"]
326
+ }],
327
+ currentClass: [{
328
+ type: i0.HostBinding,
329
+ args: ["class.current"]
330
+ }]
331
+ }
332
+ });
333
+ const WIDGET_CONFIG = {
334
+ widgetType: "wm-wizard",
335
+ hostClass: "app-wizard panel clearfix"
336
+ };
337
+ var WizardComponent = class WizardComponent extends base.StylableComponent {
338
+ static {
339
+ this.initializeProps = registerProps$2();
340
+ }
341
+ get hasPrevStep() {
342
+ return !this._isFirstStep(this.currentStep);
343
+ }
344
+ get hasNextStep() {
345
+ return !this._isLastStep(this.currentStep);
346
+ }
347
+ get showDoneBtn() {
348
+ if (!this.currentStep) return false;
349
+ return !this.hasNextStep && this.currentStep.enableDone;
350
+ }
351
+ get enablePrev() {
352
+ if (!this.currentStep) return false;
353
+ return this.currentStep.enablePrev;
354
+ }
355
+ get enableNext() {
356
+ if (!this.currentStep) return false;
357
+ return this.enablenext ? true : this.currentStep.enableNext && this.currentStep.isValid;
358
+ }
359
+ wizardHostClassString() {
360
+ const fromProp = typeof this.class === "string" ? this.class : "";
361
+ const rawDom = this.nativeElement?.className;
362
+ return `${fromProp} ${typeof rawDom === "string" ? rawDom : rawDom?.baseVal || ""}`.trim();
363
+ }
364
+ get showWizardStepIcons() {
365
+ const c = this.wizardHostClassString();
366
+ if (!c) return false;
367
+ return c.includes("iconstepper") || c.includes("tabstepper");
368
+ }
369
+ get isTabStepperWizard() {
370
+ const c = this.wizardHostClassString();
371
+ return c.includes("tabstepper") && !c.includes("iconstepper");
372
+ }
373
+ stepIconClassOrDefault(step) {
374
+ const c = step?.iconclass || step?.iconurl;
375
+ return typeof c === "string" && c.trim() ? c.trim() : "wi wi-person";
376
+ }
377
+ hasNonEmptyIconClass(step) {
378
+ const ic = step?.iconclass || step?.iconurl;
379
+ return typeof ic === "string" && ic.trim() !== "";
380
+ }
381
+ shouldShowPrimaryStepIcon(step) {
382
+ if (!step || !this.showWizardStepIcons) return false;
383
+ if (!step.isDone) return this.hasNonEmptyIconClass(step);
384
+ const d = step.doneiconclass;
385
+ if (typeof d === "string" && d.trim() !== "") return false;
386
+ return this.hasNonEmptyIconClass(step);
387
+ }
388
+ shouldRenderWizardStepNumberSpan(step) {
389
+ if (!this.showWizardStepIcons) return true;
390
+ if (this.isTabStepperWizard) {
391
+ if (step.isDone && !this.hasNonEmptyDoneIconClass(step)) return false;
392
+ return this.shouldShowPrimaryStepIcon(step) || step.isDone && this.hasNonEmptyDoneIconClass(step);
393
+ }
394
+ if (this.wizardHostClassString().includes("iconstepper")) return this.shouldShowPrimaryStepIcon(step) || step.isDone && this.hasNonEmptyDoneIconClass(step);
395
+ return true;
396
+ }
397
+ hasNonEmptyDoneIconClass(step) {
398
+ const d = step?.doneiconclass || step?.doneiconurl;
399
+ return typeof d === "string" && d.trim() !== "";
400
+ }
401
+ get enableDone() {
402
+ if (!this.currentStep) return false;
403
+ return this.currentStep.enableDone && this.currentStep.isValid;
404
+ }
405
+ get currentStepIndex() {
406
+ return this.getStepIndexByRef(this.currentStep);
407
+ }
408
+ get isFirstStep() {
409
+ return this._isFirstStep(this.currentStep);
410
+ }
411
+ get isLastStep() {
412
+ return this._isLastStep(this.currentStep);
413
+ }
414
+ constructor(inj, dynamicComponentProvider, contexts, explicitContext) {
415
+ let resolveFn = i1.noop;
416
+ super(inj, WIDGET_CONFIG, explicitContext, new Promise((res) => resolveFn = res));
417
+ this._isFirstLoad = true;
418
+ this.isPromise = (obj) => obj instanceof Promise || obj !== null && typeof obj === "object" && typeof obj.then === "function" && typeof obj.catch === "function";
419
+ base.styler(this.nativeElement, this, base.APPLY_STYLES_TYPE.SHELL);
420
+ this.promiseResolverFn = resolveFn;
421
+ this.message = {
422
+ caption: "",
423
+ type: ""
424
+ };
425
+ this.wizContext = contexts[0];
426
+ this.dynamicComponentProvider = dynamicComponentProvider;
427
+ this.dynamicWizard = [];
428
+ this.dynamicStepIndex = 0;
429
+ }
430
+ registerDynamicStep(stepRef) {
431
+ this.dynamicWizard.push(stepRef);
432
+ if (this.dynamicWizard.length === this.dynamicStepIndex) for (let i = 0; i < this.dynamicWizard.length; i++) {
433
+ const newStepRef = lodashEs.find(this.dynamicWizard, (step) => step.dynamicStepIndex === i);
434
+ if (!lodashEs.find(this.steps.toArray(), newStepRef)) {
435
+ this.steps.reset([...this.steps.toArray(), newStepRef]);
436
+ if (newStepRef.active) setTimeout(() => {
437
+ newStepRef.select();
438
+ }, 20);
439
+ }
440
+ }
441
+ }
442
+ addStep(wizardSteps) {
443
+ if (!lodashEs.isArray(wizardSteps)) wizardSteps = [wizardSteps];
444
+ const stepNamesList = [];
445
+ lodashEs.forEach(wizardSteps, (step, index) => {
446
+ const isStepAlreadyCreated = lodashEs.find(this.steps.toArray(), { name: step.name });
447
+ const isStepNameExist = lodashEs.indexOf(stepNamesList, step.name);
448
+ if (isStepAlreadyCreated || isStepNameExist > 0) {
449
+ console.warn(`The wizard step with name ${step.name} already exists`);
450
+ return;
451
+ }
452
+ let paramMarkup = "";
453
+ let propsTmpl = "";
454
+ this.dynamicStepIndex++;
455
+ const name = step.name ? step.name : `wizardstep${this.steps.toArray().length + (index + 1)}`;
456
+ stepNamesList.push(name);
457
+ const partialParams = lodashEs.get(step, "params");
458
+ lodashEs.forEach(step, (value, key) => {
459
+ if (key !== "params") propsTmpl = `${propsTmpl} ${key}="${value}"`;
460
+ });
461
+ lodashEs.forEach(partialParams, (value, key) => {
462
+ paramMarkup = `${paramMarkup} <wm-param name="${key}" value="${value}"></wm-param>`;
463
+ });
464
+ const markup = `<wm-wizardstep dynamicStepIndex="${this.dynamicStepIndex - 1}" isdynamic="true" name="${name}" ${propsTmpl}>
457
465
  ${paramMarkup}
458
466
  </wm-wizardstep>`;
459
- if (!this._dynamicContext) {
460
- this._dynamicContext = Object.create(this.viewParent);
461
- this._dynamicContext[this.getAttr('wmWizard')] = this;
462
- }
463
- this.dynamicComponentProvider.addComponent(this.getNativeElement().querySelector('.app-wizard-body'), markup, this._dynamicContext, { inj: this.inj });
464
- });
465
- return stepNamesList;
466
- }
467
- /**
468
- * This method is to remove the wizard step
469
- * @param step - index or name of the step
470
- */
471
- removeStep(step) {
472
- const stepRef = lodashEs.isString(step) ? this.getStepRefByName(step) : lodashEs.isNumber(step)
473
- ? this.getStepRefByIndex(step) : null;
474
- stepRef ? stepRef.remove() : console.warn(`Could not find step with name or index '${step}' to remove`);
475
- }
476
- /**
477
- * returns next valid step. the index passed is also checked if its valid step
478
- * @param index
479
- * @returns {WizardStepComponent}
480
- */
481
- getNextValidStepFormIndex(index) {
482
- for (let i = index; i < this.steps.length; i++) {
483
- const step = this.getStepRefByIndex(i);
484
- if (step.show) {
485
- return step;
486
- }
487
- }
488
- }
489
- /**
490
- * returns previous valid step. the index passed is also checked if its valid step
491
- * @param index
492
- * @returns {WizardStepComponent}
493
- */
494
- getPreviousValidStepFormIndex(index) {
495
- for (let i = index; i >= 0; i--) {
496
- const step = this.getStepRefByIndex(i);
497
- if (step.show) {
498
- return step;
499
- }
500
- }
501
- }
502
- /**
503
- * returns current step index value.
504
- * @returns {number}
505
- */
506
- getCurrentStepIndex() {
507
- return this.getStepIndexByRef(this.currentStep);
508
- }
509
- /**
510
- * returns stepRef when index is passed.
511
- * @param {number} index
512
- * @returns {WizardStepComponent}
513
- */
514
- getStepRefByIndex(index) {
515
- return this.steps.toArray()[index];
516
- }
517
- /**
518
- * returns the index value of the step.
519
- * @param {WizardStepComponent} wizardStep
520
- * @returns {number}
521
- */
522
- getStepIndexByRef(wizardStep) {
523
- return this.steps.toArray().indexOf(wizardStep);
524
- }
525
- /**
526
- * gets stepRef by searching on the name property.
527
- * @param {string} name
528
- * @returns {WizardStepComponent}
529
- */
530
- getStepRefByName(name) {
531
- return this.steps.find(step => step.name === name);
532
- }
533
- /**
534
- * sets default step as current step if configured
535
- * or finds first valid step and set it as current step.
536
- * @param {WizardStepComponent} step
537
- */
538
- setDefaultStep(step) {
539
- // If the default step has show true then only update the currentStep
540
- if (step?.show) {
541
- this.currentStep = step;
542
- step.active = true;
543
- step.isInitialized = true;
544
- // Mark all previous step status COMPLETED
545
- let index = this.getStepIndexByRef(step) - 1;
546
- while (index >= 0) {
547
- const prevStep = this.getStepRefByIndex(index);
548
- prevStep.done = true;
549
- prevStep.isInitialized = true;
550
- index--;
551
- }
552
- }
553
- else {
554
- // set next valid step as current step
555
- step = this.getNextValidStepFormIndex(0);
556
- if (step) {
557
- this.setDefaultStep(step);
558
- }
559
- }
560
- this.addMoreText();
561
- }
562
- /**
563
- * Selects the associated step when the wizard header is clicked.
564
- * @param $event
565
- * @param {WizardStepComponent} currentStep
566
- */
567
- onWizardHeaderClick($event, currentStep) {
568
- // select the step if it's status is done
569
- if (currentStep.done) {
570
- // set all the next steps status as disabled and previous steps as done
571
- this.steps.forEach((step, index) => {
572
- if (index < this.getStepIndexByRef(currentStep)) {
573
- step.done = true;
574
- step.isDone = true;
575
- }
576
- else {
577
- step.disabled = true;
578
- step.isDone = false;
579
- }
580
- });
581
- // set the selected step as current step and make it active
582
- this.currentStep = currentStep;
583
- this.currentStep.active = true;
584
- this.addMoreText();
585
- }
586
- }
587
- // Method to navigate to next step
588
- handleNext(value, currentStep, currentStepIndex) {
589
- if (this.isPromise(value)) {
590
- value.then(response => {
591
- this.currentStep.nextCBInProgress = false;
592
- if (response === false) {
593
- return;
594
- }
595
- this.extendNextFn(currentStep, currentStepIndex);
596
- }, err => {
597
- this.currentStep.nextCBInProgress = false;
598
- });
599
- }
600
- else {
601
- this.currentStep.nextCBInProgress = false;
602
- if (value === false) {
603
- return;
604
- }
605
- this.extendNextFn(currentStep, currentStepIndex);
606
- }
607
- }
608
- next(eventName = 'next') {
609
- if (this.currentStep.nextCBInProgress) {
610
- return;
611
- }
612
- const currentStep = this.currentStep;
613
- const currentStepIndex = this.getCurrentStepIndex();
614
- // abort if onSkip method returns false
615
- if (eventName === 'skip') {
616
- this.currentStep.nextCBInProgress = true;
617
- const response = currentStep.invokeSkipCB(currentStepIndex);
618
- this.handleNext(response, currentStep, currentStepIndex);
619
- }
620
- else if (this.currentStep.isValid && eventName === 'next') {
621
- this.currentStep.nextCBInProgress = true;
622
- const response = currentStep.invokeNextCB(currentStepIndex);
623
- this.handleNext(response, currentStep, currentStepIndex);
624
- }
625
- else if (this.enablenext && !this.currentStep.isValid) {
626
- Array.from(this.currentStep.getAllEmbeddedForms())?.forEach((form) => {
627
- form.widget.highlightInvalidFields();
628
- });
629
- const invalidFormInputElement = this.currentStep.nativeElement?.querySelector("input.ng-invalid");
630
- invalidFormInputElement?.focus();
631
- }
632
- }
633
- extendNextFn(currentStep, currentStepIndex) {
634
- const nextStep = this.getNextValidStepFormIndex(currentStepIndex + 1);
635
- // If there are any steps which has show then only change state of current step else remain same
636
- if (nextStep) {
637
- nextStep.isInitialized = true;
638
- currentStep.isDone = true;
639
- currentStep.done = true;
640
- nextStep.active = true;
641
- this.currentStep = nextStep;
642
- // Remove 'active' class from all wizard steps in header
643
- const allStepItems = this.nativeElement.querySelectorAll('li[data-stepid]');
644
- allStepItems.forEach((el) => {
645
- el.classList.remove('active');
646
- const anchor = el.querySelector('a');
647
- if (anchor) {
648
- anchor.setAttribute('tabindex', '-1');
649
- }
650
- });
651
- // Add 'active' to next step header item
652
- const newStepLi = this.nativeElement.querySelector(`li[data-stepid="${nextStep.widgetId}"]`);
653
- const newStepAnchor = newStepLi?.querySelector('a');
654
- if (newStepLi && newStepAnchor) {
655
- newStepLi.classList.add('active');
656
- newStepAnchor.setAttribute('tabindex', '0');
657
- newStepAnchor.focus();
658
- }
659
- this.updateStepFocus();
660
- }
661
- this.addMoreText();
662
- }
663
- // Method to navigate to previous step
664
- prev() {
665
- if (this.currentStep.prevCBInProgress) {
666
- return;
667
- }
668
- const currentStep = this.currentStep;
669
- const currentStepIndex = this.getCurrentStepIndex();
670
- this.currentStep.prevCBInProgress = true;
671
- // abort if onPrev method returns false.
672
- const response = currentStep.invokePrevCB(currentStepIndex);
673
- if (this.isPromise(response)) {
674
- response.then(response => {
675
- this.currentStep.prevCBInProgress = false;
676
- if (response === false) {
677
- return;
678
- }
679
- this.extendPrevFn(currentStep, currentStepIndex);
680
- }, err => {
681
- this.currentStep.prevCBInProgress = false;
682
- });
683
- }
684
- else {
685
- this.currentStep.prevCBInProgress = false;
686
- if (response === false) {
687
- return;
688
- }
689
- this.extendPrevFn(currentStep, currentStepIndex);
690
- }
691
- }
692
- extendPrevFn(currentStep, currentStepIndex) {
693
- const prevStep = this.getPreviousValidStepFormIndex(currentStepIndex - 1);
694
- // If there are any steps which has show then only change state of current step else remain same
695
- if (prevStep) {
696
- currentStep.isDone = false;
697
- currentStep.disabled = true;
698
- prevStep.active = true;
699
- this.currentStep = prevStep;
700
- // Remove 'active' class from all steps
701
- const allStepItems = this.nativeElement.querySelectorAll('li[data-stepid]');
702
- allStepItems.forEach((el) => {
703
- el.classList.remove('active');
704
- const anchor = el.querySelector('a');
705
- if (anchor) {
706
- anchor.setAttribute('tabindex', '-1');
707
- }
708
- });
709
- // Apply 'active' to prev step
710
- const prevStepLi = this.nativeElement.querySelector(`li[data-stepid="${prevStep.widgetId}"]`);
711
- const prevStepAnchor = prevStepLi?.querySelector('a');
712
- if (prevStepLi && prevStepAnchor) {
713
- prevStepLi.classList.add('active');
714
- prevStepAnchor.setAttribute('tabindex', '0');
715
- prevStepAnchor.focus();
716
- }
717
- this.updateStepFocus();
718
- }
719
- this.addMoreText();
720
- }
721
- skip() {
722
- this.next('skip');
723
- }
724
- /**
725
- * Navigates to the given step based on step name or step index
726
- * This will work only if the step is already in done state
727
- * @param step
728
- */
729
- gotoStep(step) {
730
- let gotoStepIndex;
731
- if (lodashEs.isString(step)) {
732
- gotoStepIndex = this.steps.toArray().map(step => step.name).indexOf(step);
733
- if (gotoStepIndex === -1) {
734
- console.error(`Could not find step '${step}'`);
735
- return;
736
- }
737
- }
738
- else if (lodashEs.isNumber(step) && step >= 0) {
739
- gotoStepIndex = step;
740
- }
741
- else {
742
- console.error("Invalid step name or index provided");
743
- return;
744
- }
745
- const gotoStep = this.getStepRefByIndex(gotoStepIndex);
746
- if (gotoStep?.show) {
747
- this.onWizardHeaderClick(event, gotoStep);
748
- }
749
- else {
750
- console.error("The gotoStep function cannot navigate to hidden steps");
751
- }
752
- }
753
- // Method to invoke on-Done event on wizard
754
- done() {
755
- this.currentStep.isDone = true;
756
- this.invokeEventCallback('done', { steps: this.steps.toArray() });
757
- }
758
- // Method to invoke on-Cancel event on wizard
759
- cancel() {
760
- this.invokeEventCallback('cancel', { steps: this.steps.toArray() });
761
- }
762
- addMoreText() {
763
- setTimeout(() => {
764
- const newWindowWidth = $(window).width();
765
- if (newWindowWidth < 768) {
766
- $(".app-wizard-step.active .subtitle-wrapper .step-title").css({ "height": "auto", "display": "block" });
767
- const subtitleTextLength = $(".app-wizard-step.active .subtitle-wrapper .step-title").height();
768
- $(".read_more").css("display", "none");
769
- $(".app-wizard-step.active .subtitle-wrapper").removeClass("readmore_subtitle");
770
- if (subtitleTextLength > 44) {
771
- $(".app-wizard-step.active .subtitle-wrapper .step-title").css({ "height": "44px", "display": "-webkit-box" });
772
- $(".app-wizard-step.active .read_more").css("display", "block");
773
- $(".app-wizard-step.finished .read_more").css("display", "none");
774
- $(".app-wizard-step.default .read_more").css("display", "none");
775
- $(".app-wizard-step>a").css("height", "100px");
776
- }
777
- }
778
- });
779
- }
780
- readMoreSubtitle() {
781
- $(".app-wizard-step.active .subtitle-wrapper").addClass("readmore_subtitle");
782
- $(".app-wizard-step.active .read_more").css("display", "none");
783
- $(document).on("mouseup", function (e) {
784
- const container = $(".subtitle-wrapper");
785
- // if the target of the click isn't the container nor a descendant of the container
786
- if (!container.is(e.target) && container.has(e.target).length === 0) {
787
- $(".app-wizard-step.active .subtitle-wrapper").removeClass("readmore_subtitle");
788
- $(".app-wizard-step.active .read_more").css("display", "block");
789
- $(document).off("mouseup");
790
- }
791
- });
792
- }
793
- _isFirstStep(stepRef) {
794
- return this.steps.first === stepRef;
795
- }
796
- _isLastStep(stepRef) {
797
- return this.steps.last === stepRef;
798
- }
799
- onDataChange(newVal) {
800
- this.fieldDefs = base.createArrayFrom(newVal);
801
- }
802
- updateStepFocus() {
803
- setTimeout(() => {
804
- const currentStepElement = this.nativeElement.querySelector(".app-wizard-heading li.active a");
805
- currentStepElement?.focus();
806
- });
807
- }
808
- // Define the property change handler. This Method will be triggered when there is a change in the widget property
809
- onPropertyChange(key, nv, ov) {
810
- // Monitoring changes for properties and accordingly handling respective changes
811
- if (key === 'stepstyle') {
812
- this.stepClass = nv === 'justified' ? 'nav-justified' : '';
813
- }
814
- else if (key === 'dataset') {
815
- this.onDataChange(nv);
816
- }
817
- else if (key === 'defaultstep') {
818
- this.setDefaultStep(this.getStepRefByName(nv));
819
- }
820
- else if (key === 'actionsalignment') {
821
- this.nativeElement.querySelector('div.app-wizard-actions')?.classList.replace(ov, nv);
822
- }
823
- else {
824
- super.onPropertyChange(key, nv, ov);
825
- }
826
- }
827
- ngAfterContentInit() {
828
- super.ngAfterContentInit();
829
- this.promiseResolverFn();
830
- this.wizContext.hasNextStep = () => this.hasNextStep;
831
- this.wizContext.hasPreviousStep = () => this.hasPrevStep;
832
- this.wizContext.hasNoNextStep = () => this.showDoneBtn;
833
- this.wizContext.cancelable = () => this.cancelable;
834
- this.wizContext.skippable = () => this.currentStep?.enableskip;
835
- this.wizContext.next = () => this.next();
836
- this.wizContext.previous = () => this.prev();
837
- this.wizContext.done = () => this.done();
838
- this.wizContext.cancel = () => this.cancel();
839
- this.wizContext.skip = () => this.skip();
840
- this.wizContext.nextbtnlabel = () => this.nextbtnlabel;
841
- this.wizContext.previousbtnlabel = () => this.previousbtnlabel;
842
- this.wizContext.donebtnlabel = () => this.donebtnlabel;
843
- this.wizContext.cancelbtnlabel = () => this.cancelbtnlabel;
844
- this.wizContext.actionsalignment = () => this.actionsalignment;
845
- this.wizContext.disableNext = () => !this.enableNext;
846
- this.wizContext.disablePrevious = () => !this.enablePrev;
847
- this.wizContext.disableDone = () => !this.enableDone;
848
- // MEMORY LEAK FIX: Store subscription for cleanup
849
- this.stepsSubscription = this.steps.changes.subscribe(() => {
850
- if (this.steps.length > 1 && this.type === 'dynamic' && this._isFirstLoad) {
851
- this.setDefaultStep(this.getStepRefByIndex(this.defaultstepindex));
852
- this._isFirstLoad = false;
853
- }
854
- });
855
- }
856
- isSelectableStep(stepRef) {
857
- return stepRef.show && !stepRef.disabled;
858
- }
859
- getSelectableStepBeforeIndex(index) {
860
- for (let i = index - 1; i >= 0; i--) {
861
- const step = this.getStepRefByIndex(i);
862
- if (this.isSelectableStep(step)) {
863
- return step;
864
- }
865
- }
866
- if (index === 0) {
867
- const step = this.getStepRefByIndex(this.steps.length - 1);
868
- if (this.isSelectableStep(step)) {
869
- return step;
870
- }
871
- }
872
- }
873
- getSelectableStepAfterIndex(index) {
874
- for (let i = index + 1; i < this.steps.length; i++) {
875
- const step = this.getStepRefByIndex(i);
876
- if (this.isSelectableStep(step)) {
877
- return step;
878
- }
879
- }
880
- if (index === this.steps.length - 1) {
881
- const step = this.getStepRefByIndex(0);
882
- if (this.isSelectableStep(step)) {
883
- return step;
884
- }
885
- }
886
- }
887
- getWidgets(widgteName, index) {
888
- let $target;
889
- const retVal = [];
890
- if (!widgteName) {
891
- return;
892
- }
893
- if (!i1$1.isDefined(index)) {
894
- lodashEs.forEach(this.steps.toArray(), (el) => {
895
- $target = lodashEs.get(el.currentWizardWidgets, widgteName);
896
- if ($target) {
897
- retVal.push($target);
898
- }
899
- });
900
- return retVal;
901
- }
902
- index = +index || 0;
903
- $target = lodashEs.get(this.steps.toArray(), index);
904
- if ($target) {
905
- return [lodashEs.get($target.currentWizardWidgets, widgteName)];
906
- }
907
- }
908
- ngAfterViewInit() {
909
- super.ngAfterViewInit();
910
- base.styler(this.nativeElement.querySelector('.panel-body'), this, base.APPLY_STYLES_TYPE.INNER_SHELL);
911
- setTimeout(() => {
912
- if ($(window).width() < 768) {
913
- $(".app-wizard").removeClass("vertical");
914
- }
915
- });
916
- }
917
- ngAfterViewChecked() {
918
- this.nativeElement.querySelectorAll('div.app-wizard-actions').forEach(el => el?.classList.add(this.actionsalignment));
919
- this.nativeElement.querySelectorAll('div.app-wizard-actions-right').forEach(el => el?.classList.remove('app-container'));
920
- }
921
- getActiveStepIndex() {
922
- return lodashEs.findIndex(this.steps.toArray(), { isCurrent: true });
923
- }
924
- onkeydown(event) {
925
- let newStep;
926
- switch (event.key) {
927
- case 'ArrowLeft':
928
- case 'ArrowUp':
929
- event.preventDefault();
930
- newStep = this.autoActivation ? null : this.getSelectableStepBeforeIndex(this.getSelectedStepIndex());
931
- break;
932
- case 'ArrowRight':
933
- case 'ArrowDown':
934
- event.preventDefault();
935
- newStep = this.autoActivation ? null : this.getSelectableStepAfterIndex(this.getSelectedStepIndex());
936
- break;
937
- case 'Enter':
938
- case ' ':
939
- case 'Spacebar':
940
- event.preventDefault();
941
- setTimeout(() => {
942
- const activeElement = this.nativeElement.querySelector('li.active');
943
- const stepLi = activeElement.closest('li[data-stepid]');
944
- const isInWizardHeader = activeElement.closest('.app-wizard-heading');
945
- if (stepLi && isInWizardHeader) {
946
- const stepId = stepLi.getAttribute('data-stepid');
947
- const stepIndex = this.steps.toArray().findIndex(step => step.widgetId === stepId);
948
- const currentStep = this.steps.toArray()[stepIndex];
949
- if (currentStep && currentStep !== this.currentStep) {
950
- this.onWizardHeaderClick(event, currentStep);
951
- // Update tabindex for accessibility
952
- const allStepItems = this.nativeElement.querySelectorAll('li[data-stepid]');
953
- allStepItems.forEach((el) => {
954
- el.setAttribute('tabindex', '-1');
955
- });
956
- const stepAnchor = stepLi.querySelector('a');
957
- if (stepAnchor) {
958
- stepAnchor.setAttribute('tabindex', '0');
959
- stepAnchor.focus();
960
- }
961
- }
962
- }
963
- }, 0);
964
- break;
965
- default:
966
- return;
967
- }
968
- if (newStep) {
969
- this.nativeElement.querySelector('li.active')?.classList.remove('active');
970
- this.nativeElement.querySelector(`li[data-stepid="${newStep.widgetId}"]`)?.classList.add('active');
971
- const stepLi = this.nativeElement.querySelector(".app-wizard-heading li.active a");
972
- const allStepItems = this.nativeElement.querySelectorAll('li[data-stepid] a');
973
- allStepItems.forEach((el) => {
974
- el.setAttribute('tabindex', '-1');
975
- });
976
- (stepLi).setAttribute('tabindex', '0');
977
- stepLi?.focus();
978
- }
979
- }
980
- getSelectedStepIndex() {
981
- const index = this.steps.toArray().findIndex(step => this.nativeElement.querySelector(`li[data-stepid="${step.widgetId}"]`)?.classList.contains("active"));
982
- return index >= 0 ? index : this.getActiveStepIndex();
983
- }
984
- ngOnDestroy() {
985
- // MEMORY LEAK FIX: Unsubscribe from steps changes
986
- if (this.stepsSubscription) {
987
- this.stepsSubscription.unsubscribe();
988
- this.stepsSubscription = null;
989
- }
990
- // MEMORY LEAK FIX: Remove jQuery event handlers
991
- $(document).off("mouseup");
992
- // MEMORY LEAK FIX: Clear wizard context to release references to step data
993
- if (this.wizContext) {
994
- Object.keys(this.wizContext).forEach(key => {
995
- delete this.wizContext[key];
996
- });
997
- this.wizContext = null;
998
- }
999
- // MEMORY LEAK FIX: Clear dynamic context
1000
- if (this._dynamicContext) {
1001
- Object.keys(this._dynamicContext).forEach(key => {
1002
- delete this._dynamicContext[key];
1003
- });
1004
- this._dynamicContext = null;
1005
- }
1006
- // MEMORY LEAK FIX: Clear dynamic wizard array
1007
- if (this.dynamicWizard) {
1008
- this.dynamicWizard = [];
1009
- }
1010
- // MEMORY LEAK FIX: Clear current step reference
1011
- this.currentStep = null;
1012
- super.ngOnDestroy();
1013
- }
1014
- static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: WizardComponent, deps: [{ token: i0__namespace.Injector }, { token: i1$1__namespace.DynamicComponentRefProvider }, { token: base.Context, self: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
1015
- static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: WizardComponent, isStandalone: true, selector: "div[wmWizard]", providers: [
1016
- base.provideAsWidgetRef(WizardComponent),
1017
- { provide: base.Context, useFactory: () => { return {}; }, multi: true }
1018
- ], queries: [{ propertyName: "wizardAction", first: true, predicate: ["wizardAction"], read: i0.TemplateRef }, { propertyName: "steps", predicate: WizardStepComponent }], exportAs: ["wmWizard"], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"app-wizard-heading\">\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onWizardHeaderClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':class && class.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onkeydown($event)\">\n @if (class && class.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (class && class.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (class && class.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n</div>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n", dependencies: [{ kind: "ngmodule", type: i2.CommonModule }, { kind: "directive", type: i2__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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"] }] }); }
1019
- }
1020
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: WizardComponent, decorators: [{
1021
- type: i0.Component,
1022
- args: [{ standalone: true, imports: [i2.CommonModule, base.TextContentDirective, base.WmAppIconComponent], selector: 'div[wmWizard]', providers: [
1023
- base.provideAsWidgetRef(WizardComponent),
1024
- { provide: base.Context, useFactory: () => { return {}; }, multi: true }
1025
- ], exportAs: 'wmWizard', template: "<div class=\"app-wizard-heading\">\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onWizardHeaderClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':class && class.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onkeydown($event)\">\n @if (class && class.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (class && class.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (class && class.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n</div>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n" }]
1026
- }], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i1$1__namespace.DynamicComponentRefProvider }, { type: Array, decorators: [{
1027
- type: i0.Self
1028
- }, {
1029
- type: i0.Inject,
1030
- args: [base.Context]
1031
- }] }, { type: undefined, decorators: [{
1032
- type: i0.Inject,
1033
- args: ['EXPLICIT_CONTEXT']
1034
- }, {
1035
- type: i0.Optional
1036
- }] }], propDecorators: { steps: [{
1037
- type: i0.ContentChildren,
1038
- args: [WizardStepComponent]
1039
- }], wizardAction: [{
1040
- type: i0.ContentChild,
1041
- args: ['wizardAction', { read: i0.TemplateRef, descendants: false }]
1042
- }] } });
1043
-
1044
- const registerProps = () => {
1045
- base.register('wm-wizardaction', new Map([
1046
- ['class', base.PROP_STRING],
1047
- ['name', base.PROP_STRING],
1048
- ['show', { value: true, ...base.PROP_BOOLEAN }]
1049
- ]));
1050
- };
1051
-
1052
- const WIDGET_INFO = {
1053
- widgetType: 'wm-wizardaction',
1054
- hostClass: 'app-wizard-actions panel-footer '
1055
- };
1056
- class WizardActionDirective extends base.BaseComponent {
1057
- static { this.initializeProps = registerProps(); }
1058
- constructor(inj, explicitContext) {
1059
- super(inj, WIDGET_INFO, explicitContext);
1060
- }
1061
- static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: WizardActionDirective, deps: [{ token: i0__namespace.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive }); }
1062
- static { this.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: WizardActionDirective, isStandalone: true, selector: "div[wmWizardAction]", providers: [
1063
- base.provideAsWidgetRef(WizardActionDirective)
1064
- ], exportAs: ["wmWizardAction"], usesInheritance: true, ngImport: i0__namespace }); }
1065
- }
1066
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: WizardActionDirective, decorators: [{
1067
- type: i0.Directive,
1068
- args: [{
1069
- standalone: true,
1070
- selector: 'div[wmWizardAction]',
1071
- providers: [
1072
- base.provideAsWidgetRef(WizardActionDirective)
1073
- ],
1074
- exportAs: 'wmWizardAction',
1075
- }]
1076
- }], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
1077
- type: i0.Inject,
1078
- args: ['EXPLICIT_CONTEXT']
1079
- }, {
1080
- type: i0.Optional
1081
- }] }] });
467
+ if (!this._dynamicContext) {
468
+ this._dynamicContext = Object.create(this.viewParent);
469
+ this._dynamicContext[this.getAttr("wmWizard")] = this;
470
+ }
471
+ this.dynamicComponentProvider.addComponent(this.getNativeElement().querySelector(".app-wizard-body"), markup, this._dynamicContext, { inj: this.inj });
472
+ });
473
+ return stepNamesList;
474
+ }
475
+ removeStep(step) {
476
+ const stepRef = lodashEs.isString(step) ? this.getStepRefByName(step) : lodashEs.isNumber(step) ? this.getStepRefByIndex(step) : null;
477
+ stepRef ? stepRef.remove() : console.warn(`Could not find step with name or index '${step}' to remove`);
478
+ }
479
+ getNextValidStepFormIndex(index) {
480
+ for (let i = index; i < this.steps.length; i++) {
481
+ const step = this.getStepRefByIndex(i);
482
+ if (step.show) return step;
483
+ }
484
+ }
485
+ getPreviousValidStepFormIndex(index) {
486
+ for (let i = index; i >= 0; i--) {
487
+ const step = this.getStepRefByIndex(i);
488
+ if (step.show) return step;
489
+ }
490
+ }
491
+ getCurrentStepIndex() {
492
+ return this.getStepIndexByRef(this.currentStep);
493
+ }
494
+ getStepRefByIndex(index) {
495
+ return this.steps.toArray()[index];
496
+ }
497
+ getStepIndexByRef(wizardStep) {
498
+ return this.steps.toArray().indexOf(wizardStep);
499
+ }
500
+ getStepRefByName(name) {
501
+ return this.steps.find((step) => step.name === name);
502
+ }
503
+ setDefaultStep(step) {
504
+ if (step?.show) {
505
+ this.currentStep = step;
506
+ step.active = true;
507
+ step.isInitialized = true;
508
+ let index = this.getStepIndexByRef(step) - 1;
509
+ while (index >= 0) {
510
+ const prevStep = this.getStepRefByIndex(index);
511
+ prevStep.done = true;
512
+ prevStep.isInitialized = true;
513
+ index--;
514
+ }
515
+ } else {
516
+ step = this.getNextValidStepFormIndex(0);
517
+ if (step) this.setDefaultStep(step);
518
+ }
519
+ this.addMoreText();
520
+ }
521
+ onWizardHeaderClick($event, currentStep) {
522
+ if (currentStep.done) {
523
+ this.steps.forEach((step, index) => {
524
+ if (index < this.getStepIndexByRef(currentStep)) {
525
+ step.done = true;
526
+ step.isDone = true;
527
+ } else {
528
+ step.disabled = true;
529
+ step.isDone = false;
530
+ }
531
+ });
532
+ this.currentStep = currentStep;
533
+ this.currentStep.active = true;
534
+ this.addMoreText();
535
+ }
536
+ }
537
+ handleNext(value, currentStep, currentStepIndex) {
538
+ if (this.isPromise(value)) value.then((response) => {
539
+ this.currentStep.nextCBInProgress = false;
540
+ if (response === false) return;
541
+ this.extendNextFn(currentStep, currentStepIndex);
542
+ }, (err) => {
543
+ this.currentStep.nextCBInProgress = false;
544
+ });
545
+ else {
546
+ this.currentStep.nextCBInProgress = false;
547
+ if (value === false) return;
548
+ this.extendNextFn(currentStep, currentStepIndex);
549
+ }
550
+ }
551
+ next(eventName = "next") {
552
+ if (this.currentStep.nextCBInProgress) return;
553
+ const currentStep = this.currentStep;
554
+ const currentStepIndex = this.getCurrentStepIndex();
555
+ if (eventName === "skip") {
556
+ this.currentStep.nextCBInProgress = true;
557
+ const response = currentStep.invokeSkipCB(currentStepIndex);
558
+ this.handleNext(response, currentStep, currentStepIndex);
559
+ } else if (this.currentStep.isValid && eventName === "next") {
560
+ this.currentStep.nextCBInProgress = true;
561
+ const response = currentStep.invokeNextCB(currentStepIndex);
562
+ this.handleNext(response, currentStep, currentStepIndex);
563
+ } else if (this.enablenext && !this.currentStep.isValid) {
564
+ Array.from(this.currentStep.getAllEmbeddedForms())?.forEach((form) => {
565
+ form.widget.highlightInvalidFields();
566
+ });
567
+ (this.currentStep.nativeElement?.querySelector("input.ng-invalid"))?.focus();
568
+ }
569
+ }
570
+ extendNextFn(currentStep, currentStepIndex) {
571
+ const nextStep = this.getNextValidStepFormIndex(currentStepIndex + 1);
572
+ if (nextStep) {
573
+ nextStep.isInitialized = true;
574
+ currentStep.isDone = true;
575
+ currentStep.done = true;
576
+ nextStep.active = true;
577
+ this.currentStep = nextStep;
578
+ this.nativeElement.querySelectorAll("li[data-stepid]").forEach((el) => {
579
+ el.classList.remove("active");
580
+ const anchor = el.querySelector("a");
581
+ if (anchor) anchor.setAttribute("tabindex", "-1");
582
+ });
583
+ const newStepLi = this.nativeElement.querySelector(`li[data-stepid="${nextStep.widgetId}"]`);
584
+ const newStepAnchor = newStepLi?.querySelector("a");
585
+ if (newStepLi && newStepAnchor) {
586
+ newStepLi.classList.add("active");
587
+ newStepAnchor.setAttribute("tabindex", "0");
588
+ newStepAnchor.focus();
589
+ }
590
+ this.updateStepFocus();
591
+ }
592
+ this.addMoreText();
593
+ }
594
+ prev() {
595
+ if (this.currentStep.prevCBInProgress) return;
596
+ const currentStep = this.currentStep;
597
+ const currentStepIndex = this.getCurrentStepIndex();
598
+ this.currentStep.prevCBInProgress = true;
599
+ const response = currentStep.invokePrevCB(currentStepIndex);
600
+ if (this.isPromise(response)) response.then((response) => {
601
+ this.currentStep.prevCBInProgress = false;
602
+ if (response === false) return;
603
+ this.extendPrevFn(currentStep, currentStepIndex);
604
+ }, (err) => {
605
+ this.currentStep.prevCBInProgress = false;
606
+ });
607
+ else {
608
+ this.currentStep.prevCBInProgress = false;
609
+ if (response === false) return;
610
+ this.extendPrevFn(currentStep, currentStepIndex);
611
+ }
612
+ }
613
+ extendPrevFn(currentStep, currentStepIndex) {
614
+ const prevStep = this.getPreviousValidStepFormIndex(currentStepIndex - 1);
615
+ if (prevStep) {
616
+ currentStep.isDone = false;
617
+ currentStep.disabled = true;
618
+ prevStep.active = true;
619
+ this.currentStep = prevStep;
620
+ this.nativeElement.querySelectorAll("li[data-stepid]").forEach((el) => {
621
+ el.classList.remove("active");
622
+ const anchor = el.querySelector("a");
623
+ if (anchor) anchor.setAttribute("tabindex", "-1");
624
+ });
625
+ const prevStepLi = this.nativeElement.querySelector(`li[data-stepid="${prevStep.widgetId}"]`);
626
+ const prevStepAnchor = prevStepLi?.querySelector("a");
627
+ if (prevStepLi && prevStepAnchor) {
628
+ prevStepLi.classList.add("active");
629
+ prevStepAnchor.setAttribute("tabindex", "0");
630
+ prevStepAnchor.focus();
631
+ }
632
+ this.updateStepFocus();
633
+ }
634
+ this.addMoreText();
635
+ }
636
+ skip() {
637
+ this.next("skip");
638
+ }
639
+ gotoStep(step) {
640
+ let gotoStepIndex;
641
+ if (lodashEs.isString(step)) {
642
+ gotoStepIndex = this.steps.toArray().map((step) => step.name).indexOf(step);
643
+ if (gotoStepIndex === -1) {
644
+ console.error(`Could not find step '${step}'`);
645
+ return;
646
+ }
647
+ } else if (lodashEs.isNumber(step) && step >= 0) gotoStepIndex = step;
648
+ else {
649
+ console.error("Invalid step name or index provided");
650
+ return;
651
+ }
652
+ const gotoStep = this.getStepRefByIndex(gotoStepIndex);
653
+ if (gotoStep?.show) this.onWizardHeaderClick(event, gotoStep);
654
+ else console.error("The gotoStep function cannot navigate to hidden steps");
655
+ }
656
+ done() {
657
+ this.currentStep.isDone = true;
658
+ this.invokeEventCallback("done", { steps: this.steps.toArray() });
659
+ }
660
+ cancel() {
661
+ this.invokeEventCallback("cancel", { steps: this.steps.toArray() });
662
+ }
663
+ addMoreText() {
664
+ setTimeout(() => {
665
+ if ($(window).width() < 768) {
666
+ $(".app-wizard-step.active .subtitle-wrapper .step-title").css({
667
+ "height": "auto",
668
+ "display": "block"
669
+ });
670
+ const subtitleTextLength = $(".app-wizard-step.active .subtitle-wrapper .step-title").height();
671
+ $(".read_more").css("display", "none");
672
+ $(".app-wizard-step.active .subtitle-wrapper").removeClass("readmore_subtitle");
673
+ if (subtitleTextLength > 44) {
674
+ $(".app-wizard-step.active .subtitle-wrapper .step-title").css({
675
+ "height": "44px",
676
+ "display": "-webkit-box"
677
+ });
678
+ $(".app-wizard-step.active .read_more").css("display", "block");
679
+ $(".app-wizard-step.finished .read_more").css("display", "none");
680
+ $(".app-wizard-step.default .read_more").css("display", "none");
681
+ $(".app-wizard-step>a").css("height", "100px");
682
+ }
683
+ }
684
+ });
685
+ }
686
+ readMoreSubtitle() {
687
+ $(".app-wizard-step.active .subtitle-wrapper").addClass("readmore_subtitle");
688
+ $(".app-wizard-step.active .read_more").css("display", "none");
689
+ $(document).on("mouseup", function(e) {
690
+ const container = $(".subtitle-wrapper");
691
+ if (!container.is(e.target) && container.has(e.target).length === 0) {
692
+ $(".app-wizard-step.active .subtitle-wrapper").removeClass("readmore_subtitle");
693
+ $(".app-wizard-step.active .read_more").css("display", "block");
694
+ $(document).off("mouseup");
695
+ }
696
+ });
697
+ }
698
+ _isFirstStep(stepRef) {
699
+ return this.steps.first === stepRef;
700
+ }
701
+ _isLastStep(stepRef) {
702
+ return this.steps.last === stepRef;
703
+ }
704
+ onDataChange(newVal) {
705
+ this.fieldDefs = base.createArrayFrom(newVal);
706
+ }
707
+ updateStepFocus() {
708
+ setTimeout(() => {
709
+ this.nativeElement.querySelector(".app-wizard-heading li.active a")?.focus();
710
+ });
711
+ }
712
+ onPropertyChange(key, nv, ov) {
713
+ if (key === "stepstyle") this.stepClass = nv === "justified" ? "nav-justified" : "";
714
+ else if (key === "dataset") this.onDataChange(nv);
715
+ else if (key === "defaultstep") this.setDefaultStep(this.getStepRefByName(nv));
716
+ else if (key === "actionsalignment") this.nativeElement.querySelector("div.app-wizard-actions")?.classList.replace(ov, nv);
717
+ else super.onPropertyChange(key, nv, ov);
718
+ }
719
+ ngAfterContentInit() {
720
+ super.ngAfterContentInit();
721
+ this.promiseResolverFn();
722
+ this.wizContext.hasNextStep = () => this.hasNextStep;
723
+ this.wizContext.hasPreviousStep = () => this.hasPrevStep;
724
+ this.wizContext.hasNoNextStep = () => this.showDoneBtn;
725
+ this.wizContext.cancelable = () => this.cancelable;
726
+ this.wizContext.skippable = () => this.currentStep?.enableskip;
727
+ this.wizContext.next = () => this.next();
728
+ this.wizContext.previous = () => this.prev();
729
+ this.wizContext.done = () => this.done();
730
+ this.wizContext.cancel = () => this.cancel();
731
+ this.wizContext.skip = () => this.skip();
732
+ this.wizContext.nextbtnlabel = () => this.nextbtnlabel;
733
+ this.wizContext.previousbtnlabel = () => this.previousbtnlabel;
734
+ this.wizContext.donebtnlabel = () => this.donebtnlabel;
735
+ this.wizContext.cancelbtnlabel = () => this.cancelbtnlabel;
736
+ this.wizContext.actionsalignment = () => this.actionsalignment;
737
+ this.wizContext.disableNext = () => !this.enableNext;
738
+ this.wizContext.disablePrevious = () => !this.enablePrev;
739
+ this.wizContext.disableDone = () => !this.enableDone;
740
+ this.stepsSubscription = this.steps.changes.subscribe(() => {
741
+ if (this.steps.length > 1 && this.type === "dynamic" && this._isFirstLoad) {
742
+ this.setDefaultStep(this.getStepRefByIndex(this.defaultstepindex));
743
+ this._isFirstLoad = false;
744
+ }
745
+ });
746
+ }
747
+ isSelectableStep(stepRef) {
748
+ return stepRef.show && !stepRef.disabled;
749
+ }
750
+ getSelectableStepBeforeIndex(index) {
751
+ for (let i = index - 1; i >= 0; i--) {
752
+ const step = this.getStepRefByIndex(i);
753
+ if (this.isSelectableStep(step)) return step;
754
+ }
755
+ if (index === 0) {
756
+ const step = this.getStepRefByIndex(this.steps.length - 1);
757
+ if (this.isSelectableStep(step)) return step;
758
+ }
759
+ }
760
+ getSelectableStepAfterIndex(index) {
761
+ for (let i = index + 1; i < this.steps.length; i++) {
762
+ const step = this.getStepRefByIndex(i);
763
+ if (this.isSelectableStep(step)) return step;
764
+ }
765
+ if (index === this.steps.length - 1) {
766
+ const step = this.getStepRefByIndex(0);
767
+ if (this.isSelectableStep(step)) return step;
768
+ }
769
+ }
770
+ getWidgets(widgteName, index) {
771
+ let $target;
772
+ const retVal = [];
773
+ if (!widgteName) return;
774
+ if (!i1.isDefined(index)) {
775
+ lodashEs.forEach(this.steps.toArray(), (el) => {
776
+ $target = lodashEs.get(el.currentWizardWidgets, widgteName);
777
+ if ($target) retVal.push($target);
778
+ });
779
+ return retVal;
780
+ }
781
+ index = +index || 0;
782
+ $target = lodashEs.get(this.steps.toArray(), index);
783
+ if ($target) return [lodashEs.get($target.currentWizardWidgets, widgteName)];
784
+ }
785
+ ngAfterViewInit() {
786
+ super.ngAfterViewInit();
787
+ base.styler(this.nativeElement.querySelector(".panel-body"), this, base.APPLY_STYLES_TYPE.INNER_SHELL);
788
+ setTimeout(() => {
789
+ if ($(window).width() < 768) $(".app-wizard").removeClass("vertical");
790
+ });
791
+ }
792
+ ngAfterViewChecked() {
793
+ this.nativeElement.querySelectorAll("div.app-wizard-actions").forEach((el) => el?.classList.add(this.actionsalignment));
794
+ this.nativeElement.querySelectorAll("div.app-wizard-actions-right").forEach((el) => el?.classList.remove("app-container"));
795
+ }
796
+ getActiveStepIndex() {
797
+ return lodashEs.findIndex(this.steps.toArray(), { isCurrent: true });
798
+ }
799
+ onkeydown(event) {
800
+ let newStep;
801
+ switch (event.key) {
802
+ case "ArrowLeft":
803
+ case "ArrowUp":
804
+ event.preventDefault();
805
+ newStep = this.autoActivation ? null : this.getSelectableStepBeforeIndex(this.getSelectedStepIndex());
806
+ break;
807
+ case "ArrowRight":
808
+ case "ArrowDown":
809
+ event.preventDefault();
810
+ newStep = this.autoActivation ? null : this.getSelectableStepAfterIndex(this.getSelectedStepIndex());
811
+ break;
812
+ case "Enter":
813
+ case " ":
814
+ case "Spacebar":
815
+ event.preventDefault();
816
+ setTimeout(() => {
817
+ const activeElement = this.nativeElement.querySelector("li.active");
818
+ const stepLi = activeElement.closest("li[data-stepid]");
819
+ const isInWizardHeader = activeElement.closest(".app-wizard-heading");
820
+ if (stepLi && isInWizardHeader) {
821
+ const stepId = stepLi.getAttribute("data-stepid");
822
+ const stepIndex = this.steps.toArray().findIndex((step) => step.widgetId === stepId);
823
+ const currentStep = this.steps.toArray()[stepIndex];
824
+ if (currentStep && currentStep !== this.currentStep) {
825
+ this.onWizardHeaderClick(event, currentStep);
826
+ this.nativeElement.querySelectorAll("li[data-stepid]").forEach((el) => {
827
+ el.setAttribute("tabindex", "-1");
828
+ });
829
+ const stepAnchor = stepLi.querySelector("a");
830
+ if (stepAnchor) {
831
+ stepAnchor.setAttribute("tabindex", "0");
832
+ stepAnchor.focus();
833
+ }
834
+ }
835
+ }
836
+ }, 0);
837
+ break;
838
+ default: return;
839
+ }
840
+ if (newStep) {
841
+ this.nativeElement.querySelector("li.active")?.classList.remove("active");
842
+ this.nativeElement.querySelector(`li[data-stepid="${newStep.widgetId}"]`)?.classList.add("active");
843
+ const stepLi = this.nativeElement.querySelector(".app-wizard-heading li.active a");
844
+ this.nativeElement.querySelectorAll("li[data-stepid] a").forEach((el) => {
845
+ el.setAttribute("tabindex", "-1");
846
+ });
847
+ stepLi.setAttribute("tabindex", "0");
848
+ stepLi?.focus();
849
+ }
850
+ }
851
+ getSelectedStepIndex() {
852
+ const index = this.steps.toArray().findIndex((step) => this.nativeElement.querySelector(`li[data-stepid="${step.widgetId}"]`)?.classList.contains("active"));
853
+ return index >= 0 ? index : this.getActiveStepIndex();
854
+ }
855
+ ngOnDestroy() {
856
+ if (this.stepsSubscription) {
857
+ this.stepsSubscription.unsubscribe();
858
+ this.stepsSubscription = null;
859
+ }
860
+ $(document).off("mouseup");
861
+ if (this.wizContext) {
862
+ Object.keys(this.wizContext).forEach((key) => {
863
+ delete this.wizContext[key];
864
+ });
865
+ this.wizContext = null;
866
+ }
867
+ if (this._dynamicContext) {
868
+ Object.keys(this._dynamicContext).forEach((key) => {
869
+ delete this._dynamicContext[key];
870
+ });
871
+ this._dynamicContext = null;
872
+ }
873
+ if (this.dynamicWizard) this.dynamicWizard = [];
874
+ this.currentStep = null;
875
+ super.ngOnDestroy();
876
+ }
877
+ static {
878
+ this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
879
+ minVersion: "12.0.0",
880
+ version: "22.2.1",
881
+ ngImport: i0__namespace,
882
+ type: WizardComponent,
883
+ deps: [
884
+ { token: i0__namespace.Injector },
885
+ { token: i1__namespace.DynamicComponentRefProvider },
886
+ {
887
+ token: base.Context,
888
+ self: true
889
+ },
890
+ {
891
+ token: "EXPLICIT_CONTEXT",
892
+ optional: true
893
+ }
894
+ ],
895
+ target: i0__namespace.ɵɵFactoryTarget.Component
896
+ });
897
+ }
898
+ static {
899
+ this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({
900
+ minVersion: "17.0.0",
901
+ version: "22.2.1",
902
+ type: WizardComponent,
903
+ isStandalone: true,
904
+ selector: "div[wmWizard]",
905
+ providers: [base.provideAsWidgetRef(WizardComponent), {
906
+ provide: base.Context,
907
+ useFactory: () => {
908
+ return {};
909
+ },
910
+ multi: true
911
+ }],
912
+ queries: [{
913
+ propertyName: "wizardAction",
914
+ first: true,
915
+ predicate: ["wizardAction"],
916
+ read: i0.TemplateRef
917
+ }, {
918
+ propertyName: "steps",
919
+ predicate: WizardStepComponent
920
+ }],
921
+ exportAs: ["wmWizard"],
922
+ usesInheritance: true,
923
+ ngImport: i0__namespace,
924
+ template: "<div class=\"app-wizard-heading\">\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onWizardHeaderClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':class && class.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onkeydown($event)\">\n @if (class && class.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (class && class.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (class && class.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n</div>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n",
925
+ dependencies: [
926
+ {
927
+ kind: "ngmodule",
928
+ type: i2.CommonModule
929
+ },
930
+ {
931
+ kind: "directive",
932
+ type: i2__namespace.NgClass,
933
+ selector: "[ngClass]",
934
+ inputs: ["class", "ngClass"]
935
+ },
936
+ {
937
+ kind: "directive",
938
+ type: i2__namespace.NgTemplateOutlet,
939
+ selector: "[ngTemplateOutlet]",
940
+ inputs: [
941
+ "ngTemplateOutletContext",
942
+ "ngTemplateOutlet",
943
+ "ngTemplateOutletInjector"
944
+ ]
945
+ },
946
+ {
947
+ kind: "directive",
948
+ type: base.TextContentDirective,
949
+ selector: "[textContent]",
950
+ inputs: ["textContent"]
951
+ },
952
+ {
953
+ kind: "component",
954
+ type: base.WmAppIconComponent,
955
+ selector: "wm-app-icon",
956
+ inputs: [
957
+ "icon",
958
+ "iconclass",
959
+ "iconurl",
960
+ "defaultIconClass",
961
+ "defaultClasses",
962
+ "iconStyle",
963
+ "alt"
964
+ ]
965
+ }
966
+ ],
967
+ changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
968
+ });
969
+ }
970
+ };
971
+ i0__namespace.ɵɵngDeclareClassMetadata({
972
+ minVersion: "12.0.0",
973
+ version: "22.2.1",
974
+ ngImport: i0__namespace,
975
+ type: WizardComponent,
976
+ decorators: [{
977
+ type: i0.Component,
978
+ args: [{
979
+ changeDetection: i0.ChangeDetectionStrategy.Eager,
980
+ standalone: true,
981
+ imports: [
982
+ i2.CommonModule,
983
+ base.TextContentDirective,
984
+ base.WmAppIconComponent
985
+ ],
986
+ selector: "div[wmWizard]",
987
+ providers: [base.provideAsWidgetRef(WizardComponent), {
988
+ provide: base.Context,
989
+ useFactory: () => {
990
+ return {};
991
+ },
992
+ multi: true
993
+ }],
994
+ exportAs: "wmWizard",
995
+ template: "<div class=\"app-wizard-heading\">\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onWizardHeaderClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':class && class.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onkeydown($event)\">\n @if (class && class.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (class && class.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (class && class.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n</div>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n"
996
+ }]
997
+ }],
998
+ ctorParameters: () => [
999
+ { type: i0__namespace.Injector },
1000
+ { type: i1__namespace.DynamicComponentRefProvider },
1001
+ {
1002
+ type: Array,
1003
+ decorators: [{ type: i0.Self }, {
1004
+ type: i0.Inject,
1005
+ args: [base.Context]
1006
+ }]
1007
+ },
1008
+ {
1009
+ type: void 0,
1010
+ decorators: [{
1011
+ type: i0.Inject,
1012
+ args: ["EXPLICIT_CONTEXT"]
1013
+ }, { type: i0.Optional }]
1014
+ }
1015
+ ],
1016
+ propDecorators: {
1017
+ steps: [{
1018
+ type: i0.ContentChildren,
1019
+ args: [WizardStepComponent]
1020
+ }],
1021
+ wizardAction: [{
1022
+ type: i0.ContentChild,
1023
+ args: ["wizardAction", {
1024
+ read: i0.TemplateRef,
1025
+ descendants: false
1026
+ }]
1027
+ }]
1028
+ }
1029
+ });
1030
+ const registerProps = () => {
1031
+ base.register("wm-wizardaction", /* @__PURE__ */ new Map([
1032
+ ["class", base.PROP_STRING],
1033
+ ["name", base.PROP_STRING],
1034
+ ["show", {
1035
+ value: true,
1036
+ ...base.PROP_BOOLEAN
1037
+ }]
1038
+ ]));
1039
+ };
1040
+ const WIDGET_INFO = {
1041
+ widgetType: "wm-wizardaction",
1042
+ hostClass: "app-wizard-actions panel-footer "
1043
+ };
1044
+ var WizardActionDirective = class WizardActionDirective extends base.BaseComponent {
1045
+ static {
1046
+ this.initializeProps = registerProps();
1047
+ }
1048
+ constructor(inj, explicitContext) {
1049
+ super(inj, WIDGET_INFO, explicitContext);
1050
+ }
1051
+ static {
1052
+ this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
1053
+ minVersion: "12.0.0",
1054
+ version: "22.2.1",
1055
+ ngImport: i0__namespace,
1056
+ type: WizardActionDirective,
1057
+ deps: [{ token: i0__namespace.Injector }, {
1058
+ token: "EXPLICIT_CONTEXT",
1059
+ optional: true
1060
+ }],
1061
+ target: i0__namespace.ɵɵFactoryTarget.Directive
1062
+ });
1063
+ }
1064
+ static {
1065
+ this.ɵdir = i0__namespace.ɵɵngDeclareDirective({
1066
+ minVersion: "14.0.0",
1067
+ version: "22.2.1",
1068
+ type: WizardActionDirective,
1069
+ isStandalone: true,
1070
+ selector: "div[wmWizardAction]",
1071
+ providers: [base.provideAsWidgetRef(WizardActionDirective)],
1072
+ exportAs: ["wmWizardAction"],
1073
+ usesInheritance: true,
1074
+ ngImport: i0__namespace
1075
+ });
1076
+ }
1077
+ };
1078
+ i0__namespace.ɵɵngDeclareClassMetadata({
1079
+ minVersion: "12.0.0",
1080
+ version: "22.2.1",
1081
+ ngImport: i0__namespace,
1082
+ type: WizardActionDirective,
1083
+ decorators: [{
1084
+ type: i0.Directive,
1085
+ args: [{
1086
+ standalone: true,
1087
+ selector: "div[wmWizardAction]",
1088
+ providers: [base.provideAsWidgetRef(WizardActionDirective)],
1089
+ exportAs: "wmWizardAction"
1090
+ }]
1091
+ }],
1092
+ ctorParameters: () => [{ type: i0__namespace.Injector }, {
1093
+ type: void 0,
1094
+ decorators: [{
1095
+ type: i0.Inject,
1096
+ args: ["EXPLICIT_CONTEXT"]
1097
+ }, { type: i0.Optional }]
1098
+ }]
1099
+ });
1082
1100
 
1083
- exports.WizardActionDirective = WizardActionDirective;
1084
- exports.WizardComponent = WizardComponent;
1085
- exports.WizardStepComponent = WizardStepComponent;
1101
+ exports.WizardActionDirective = WizardActionDirective;
1102
+ exports.WizardComponent = WizardComponent;
1103
+ exports.WizardStepComponent = WizardStepComponent;
1086
1104
 
1087
1105
  }));