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