@wavemaker-ai/app-ng-runtime 12.0.2-rc.344 → 12.1.0-rc.347

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,1112 +1,1572 @@
1
- import * as i0 from '@angular/core';
2
- import { Inject, Optional, Injectable, Injector, ViewChild, Component } from '@angular/core';
3
- import { switchClass, $appDigest, addClass, isDefined, AbstractI18nService, FormWidgetType } from '@wm/core';
4
- import { styler, WidgetConfig, INPUTMODE, TrailingZeroDecimalPipe, PROP_BOOLEAN, PROP_STRING, PROP_ANY, PROP_NUMBER, register, provideAs, provideAsWidgetRef, registerFormWidget, WmAppIconComponent } from '@wm/components/base';
5
- import { BaseFormCustomComponent } from '@wm/components/input/base-form-custom';
6
- import { isString, get, includes, isUndefined, isNull, round, intersection, toArray } from 'lodash-es';
7
- import { __decorate, __param, __metadata } from 'tslib';
8
- import * as i1 from '@angular/common';
9
- import { getLocaleNumberSymbol, NumberSymbol, CommonModule } from '@angular/common';
10
- import * as i2 from '@angular/forms';
11
- import { FormsModule, NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
12
- import * as i3 from 'angular-imask';
13
- import { IMaskModule, IMaskDirective } from 'angular-imask';
14
-
15
- class BaseInput extends BaseFormCustomComponent {
16
- onPropertyChange(key, nv, ov) {
17
- // set the class on the input element
18
- if (key === 'tabindex') {
19
- return;
20
- }
21
- if (key === 'required') {
22
- /* WMS-18269 | Update Angular about the required attr value change */
23
- this._onChange(this.datavalue);
24
- }
25
- if (key === 'updateon') {
26
- this.ngModelOptions.updateOn = nv === 'default' ? 'change' : 'blur';
27
- }
28
- if (key === 'class') {
29
- if (this.inputEl.nativeElement) {
30
- switchClass(this.inputEl.nativeElement, nv, ov);
31
- }
32
- }
33
- else if (key === 'datavalue') {
34
- // update the oldDataValue when the datavalue is modified programmatically
35
- this.updatePrevDatavalue(nv);
36
- this._onChange(this.datavalue);
37
- }
38
- else {
39
- super.onPropertyChange(key, nv, ov);
40
- }
41
- }
42
- // invoke the change callback
43
- handleChange(newValue) {
44
- if (this.autotrim && this.datavalue && isString(this.datavalue)) {
45
- this.datavalue = this.datavalue.trim();
46
- }
47
- this.invokeOnChange(this.datavalue, { type: 'change' }, this.ngModel.valid);
48
- }
49
- // Change event is registered from the template, Prevent the framework from registering one more event
50
- handleEvent(node, eventName, eventCallback, locals) {
51
- if (eventName !== 'change' && eventName !== 'blur') {
52
- super.handleEvent(this.inputEl.nativeElement, eventName, eventCallback, locals);
53
- }
54
- }
55
- // invoke the blur callback
56
- handleBlur($event) {
57
- this.invokeOnTouched($event);
58
- }
59
- // Update the model on enter key press
60
- flushViewChanges(val) {
61
- // when val contains masked value, update the model with unmasked value
62
- const unMaskedVal = get(this.imask, 'maskRef.unmaskedValue');
63
- val = unMaskedVal ? unMaskedVal : val;
64
- this.ngModel.update.next(val);
65
- $appDigest();
66
- }
67
- ngAfterViewInit() {
68
- super.ngAfterViewInit();
69
- // add the class on the input element
70
- if (this.class) {
71
- addClass(this.inputEl.nativeElement, this.class);
72
- }
73
- styler(this.inputEl.nativeElement, this);
74
- }
75
- constructor(inj, config, explicitContext) {
76
- super(inj, config, explicitContext);
77
- // possible values for ngModelOptions are 'blur' and 'change'
78
- // default is 'blur'
79
- this.ngModelOptions = {
80
- updateOn: '',
81
- standalone: true
82
- };
83
- let updateOn = this.nativeElement.getAttribute('updateon') || 'blur';
84
- updateOn = updateOn === 'default' ? 'change' : updateOn;
85
- this.ngModelOptions.updateOn = updateOn;
86
- }
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: BaseInput, deps: [{ token: i0.Injector }, { token: WidgetConfig }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
88
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: BaseInput }); }
89
- }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: BaseInput, decorators: [{
91
- type: Injectable
92
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
93
- type: Inject,
94
- args: [WidgetConfig]
95
- }] }, { type: undefined, decorators: [{
96
- type: Inject,
97
- args: ['EXPLICIT_CONTEXT']
98
- }, {
99
- type: Optional
100
- }] }] });
101
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Inject, Injectable, Injector, Optional, ViewChild } from "@angular/core";
3
+ import { $appDigest, AbstractI18nService, FormWidgetType, addClass, isDefined, switchClass } from "@wm/core";
4
+ import { INPUTMODE, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, TrailingZeroDecimalPipe, WidgetConfig, WmAppIconComponent, provideAs, provideAsWidgetRef, register, registerFormWidget, styler } from "@wm/components/base";
5
+ import { BaseFormCustomComponent } from "@wm/components/input/base-form-custom";
6
+ import { get, includes, intersection, isNull, isString, isUndefined, round, toArray } from "lodash-es";
7
+ import { __decorate, __metadata, __param } from "tslib";
8
+ import * as i1 from "@angular/common";
9
+ import { CommonModule, NumberSymbol, getLocaleNumberSymbol } from "@angular/common";
10
+ import * as i2 from "@angular/forms";
11
+ import { FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgModel } from "@angular/forms";
12
+ import * as i3 from "angular-imask";
13
+ import { IMaskDirective, IMaskModule } from "angular-imask";
14
+ var BaseInput = class BaseInput extends BaseFormCustomComponent {
15
+ onPropertyChange(key, nv, ov) {
16
+ if (key === "tabindex") return;
17
+ if (key === "required") this._onChange(this.datavalue);
18
+ if (key === "updateon") this.ngModelOptions.updateOn = nv === "default" ? "change" : "blur";
19
+ if (key === "class") {
20
+ if (this.inputEl.nativeElement) switchClass(this.inputEl.nativeElement, nv, ov);
21
+ } else if (key === "datavalue") {
22
+ this.updatePrevDatavalue(nv);
23
+ this._onChange(this.datavalue);
24
+ } else super.onPropertyChange(key, nv, ov);
25
+ }
26
+ handleChange(newValue) {
27
+ if (this.autotrim && this.datavalue && isString(this.datavalue)) this.datavalue = this.datavalue.trim();
28
+ this.invokeOnChange(this.datavalue, { type: "change" }, this.ngModel.valid);
29
+ }
30
+ handleEvent(node, eventName, eventCallback, locals) {
31
+ if (eventName !== "change" && eventName !== "blur") super.handleEvent(this.inputEl.nativeElement, eventName, eventCallback, locals);
32
+ }
33
+ handleBlur($event) {
34
+ this.invokeOnTouched($event);
35
+ }
36
+ flushViewChanges(val) {
37
+ const unMaskedVal = get(this.imask, "maskRef.unmaskedValue");
38
+ val = unMaskedVal ? unMaskedVal : val;
39
+ this.ngModel.update.next(val);
40
+ $appDigest();
41
+ }
42
+ ngAfterViewInit() {
43
+ super.ngAfterViewInit();
44
+ if (this.class) addClass(this.inputEl.nativeElement, this.class);
45
+ styler(this.inputEl.nativeElement, this);
46
+ }
47
+ constructor(inj, config, explicitContext) {
48
+ super(inj, config, explicitContext);
49
+ this.ngModelOptions = {
50
+ updateOn: "",
51
+ standalone: true
52
+ };
53
+ let updateOn = this.nativeElement.getAttribute("updateon") || "blur";
54
+ updateOn = updateOn === "default" ? "change" : updateOn;
55
+ this.ngModelOptions.updateOn = updateOn;
56
+ }
57
+ static {
58
+ this.ɵfac = i0.ɵɵngDeclareFactory({
59
+ minVersion: "12.0.0",
60
+ version: "22.2.1",
61
+ ngImport: i0,
62
+ type: BaseInput,
63
+ deps: [
64
+ { token: i0.Injector },
65
+ { token: WidgetConfig },
66
+ {
67
+ token: "EXPLICIT_CONTEXT",
68
+ optional: true
69
+ }
70
+ ],
71
+ target: i0.ɵɵFactoryTarget.Injectable
72
+ });
73
+ }
74
+ static {
75
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
76
+ minVersion: "12.0.0",
77
+ version: "22.2.1",
78
+ ngImport: i0,
79
+ type: BaseInput
80
+ });
81
+ }
82
+ };
83
+ i0.ɵɵngDeclareClassMetadata({
84
+ minVersion: "12.0.0",
85
+ version: "22.2.1",
86
+ ngImport: i0,
87
+ type: BaseInput,
88
+ decorators: [{ type: Injectable }],
89
+ ctorParameters: () => [
90
+ { type: i0.Injector },
91
+ {
92
+ type: void 0,
93
+ decorators: [{
94
+ type: Inject,
95
+ args: [WidgetConfig]
96
+ }]
97
+ },
98
+ {
99
+ type: void 0,
100
+ decorators: [{
101
+ type: Inject,
102
+ args: ["EXPLICIT_CONTEXT"]
103
+ }, { type: Optional }]
104
+ }
105
+ ]
106
+ });
102
107
  let NumberLocale = class NumberLocale extends BaseInput {
103
- constructor(inj, config, i18nService, trailingZeroDecimalPipe, explicitContext) {
104
- super(inj, config, explicitContext);
105
- this.i18nService = i18nService;
106
- this.trailingZeroDecimalPipe = trailingZeroDecimalPipe;
107
- this.isDefaultQuery = true;
108
- this.decimalValue = '';
109
- this.invalidPattern = false;
110
- this.selectedLocale = i18nService.getSelectedLocale();
111
- this.DECIMAL = getLocaleNumberSymbol(this.localefilter || this.selectedLocale, NumberSymbol.Decimal);
112
- this.GROUP = getLocaleNumberSymbol(this.localefilter || this.selectedLocale, NumberSymbol.Group);
113
- this.numberfilter = '1.0-16';
114
- this.resetValidations();
115
- }
116
- // Setter for the datavalue.
117
- // @ts-ignore
118
- set datavalue(value) {
119
- this.lastValIsDecimal = false;
120
- // set text value to null if data value is empty.
121
- // @ts-ignore
122
- if (includes([null, undefined, ''], value)) {
123
- const input = this.inputEl.nativeElement;
124
- const prevDataValue = this.prevDatavalue;
125
- this.displayValue = input.value = this.proxyModel = null;
126
- this.resetValidations();
127
- // Fix for [WMS-27648]: When a decimal value is entered (e.g., "3."), datavalue and prevDatavalue become null as it is an invalid number.
128
- // handleChange() should be called when the invalid datavalue (e.g., "3.") is removed, and the value becomes an empty string ("").
129
- if ((prevDataValue || prevDataValue == 0 || prevDataValue == null) && !this.isDefaultQuery) {
130
- this.handleChange(value);
131
- this._onChange();
132
- }
133
- return;
134
- }
135
- // if the widget has default value and if we change the locale, the value should be in selected locale format.
136
- if (this.isDefaultQuery) {
137
- const isLocalizedNumber = isString(value) && includes(value, this.DECIMAL);
138
- const parts = isLocalizedNumber ? value.split(this.DECIMAL) : isString(value) && value.split('.');
139
- let decimalPlacesAttrVal = this.getAttr('decimalplaces');
140
- const decimalplaces = decimalPlacesAttrVal !== '' && decimalPlacesAttrVal !== undefined ? Number(decimalPlacesAttrVal) : NaN;
141
- if (this.inputmode === INPUTMODE.NATURAL && !isNaN(decimalplaces)) {
142
- if (decimalplaces === 0) {
143
- this.decimalValue = '';
144
- value = isLocalizedNumber ? parts[0] : this.transformNumber(parts[0]);
145
- }
146
- if (decimalplaces > 0) {
147
- this.decimalValue = parts[1]?.substring(0, decimalplaces) || '';
148
- if (isLocalizedNumber) {
149
- value = this.decimalValue.length ? `${parts[0]}${this.DECIMAL}${this.decimalValue}` : parts[0];
150
- }
151
- else {
152
- value = Number.parseFloat(String(value)).toFixed(decimalplaces);
153
- }
154
- }
155
- }
156
- else {
157
- this.decimalValue = parts[1] || '';
158
- value = isLocalizedNumber ? value : this.transformNumber(value);
159
- }
160
- }
161
- const numberReg = /\d/;
162
- const strVal = value.toString();
163
- let model;
164
- // When the input value only contains seperator, do not convert the sepertaor into 0
165
- if (numberReg.test(strVal)) {
166
- model = this.parseNumber(strVal);
167
- }
168
- else {
169
- model = NaN;
170
- }
171
- // On keypress, if the user types a decimal and is still active on the input do not throw error.
172
- if (isNaN(model) && strVal[strVal.length - 1] === this.DECIMAL && this.ngModelOptions.updateOn === 'change' && this.$element.find('input:focus').length) {
173
- this.lastValIsDecimal = true;
174
- }
175
- // get a valid number form the text.
176
- // if the number is valid or if number is not in range update the model value.
177
- if (!this.lastValIsDecimal && this.isValid(model)) {
178
- this.proxyModel = model;
179
- // update the display value in the text box.
180
- this.updateDisplayText();
181
- // Do not trigger onchange event for default value
182
- if (!this.isDefaultQuery) {
183
- this.handleChange(model);
184
- }
185
- }
186
- else {
187
- this.displayValue = value.toString();
188
- this.proxyModel = null;
189
- this.handleChange(null);
190
- }
191
- }
192
- // returns the actual model value of the widget.
193
- get datavalue() {
194
- return this.proxyModel;
195
- }
196
- // resets all the flags related to the widget's validation.
197
- resetValidations() {
198
- this.isInvalidNumber = false;
199
- this.numberNotInRange = false;
200
- }
201
- /**
202
- * Adds validations for the number before updating the widget model. like validating min and max value for the widget.
203
- * @param {number} val number to be validated
204
- * @returns {number}
205
- */
206
- isValid(val) {
207
- // id number is infinite then consider it as invalid value
208
- let invalidDecimalPlaces = false;
209
- if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) {
210
- invalidDecimalPlaces = this.countDecimals(val) > this.decimalplaces;
211
- }
212
- else if (!Number.isInteger(this.step) && this.countDecimals(val) > this.countDecimals(this.step)) {
213
- invalidDecimalPlaces = true;
214
- }
215
- if (isNaN(val) || !isFinite(val) || invalidDecimalPlaces) {
216
- this.isInvalidNumber = true;
217
- return false;
218
- }
219
- if (val !== this.getValueInRange(val)) {
220
- this.numberNotInRange = true;
221
- return true;
222
- }
223
- this.resetValidations();
224
- return true;
225
- }
226
- /**
227
- * returns a valid number by validating the minimum and maximum values.
228
- * @param {number} value
229
- * @returns {number}
230
- */
231
- getValueInRange(value) {
232
- if (!isNaN(this.minvalue) && value < this.minvalue) {
233
- this.validateType = 'minvalue';
234
- return this.minvalue;
235
- }
236
- if (!isNaN(this.maxvalue) && value > this.maxvalue) {
237
- this.validateType = 'maxvalue';
238
- return this.maxvalue;
239
- }
240
- return value;
241
- }
242
- /**
243
- * convert number to localized number using angular decimal pipe. eg 10,00,000 or 1,000,000
244
- * @param number
245
- * @returns {string}
246
- */
247
- transformNumber(number, numberfilter) {
248
- const filterVal = numberfilter ? numberfilter : this.numberfilter;
249
- return this.trailingZeroDecimalPipe.transform(number, this.selectedLocale, filterVal, this.localefilter, this.trailingzero, this.decimalValue, !!numberfilter, this.i18nService?.getwidgetLocale());
250
- }
251
- /**
252
- * resets the cursor position in the text box.
253
- * @param {number} value cursor position index form left to right.
254
- */
255
- resetCursorPosition(value) {
256
- const input = this.inputEl.nativeElement;
257
- // position of the cursor should be given form right to left.
258
- let position = input.value.length - value;
259
- position = position < 0 ? 0 : position;
260
- // set the cursor position in the text box.
261
- input.setSelectionRange(position, position);
262
- }
263
- /**
264
- * Method parses the Localized number(string) to a valid number.
265
- * if the string dose not result to a valid number then returns NaN.
266
- * @param {string} val Localized number.
267
- * @returns {number}
268
- */
269
- parseNumber(val) {
270
- // WMS-22179: split number based on the decimal separator in the val
271
- // splits string into two parts. decimal and number.
272
- const parts = val.split(this.inputmode === INPUTMODE.FINANCIAL ? (val.indexOf(this.DECIMAL) > -1 ? this.DECIMAL : '.') : this.DECIMAL);
273
- if (!parts.length) {
274
- return null;
275
- }
276
- if (parts.length > 2) {
277
- return NaN;
278
- }
279
- // If number have decimal point and not have a decimal value then return.
280
- if (parts[1] === '') {
281
- return NaN;
282
- }
283
- // replaces all group separators form the number.
284
- const number = Number(parts[0].split(this.GROUP).join(''));
285
- const decimal = Number(`0.${parts[1] || 0}`);
286
- if (Number.isNaN(number) || Number.isNaN(decimal)) {
287
- return NaN;
288
- }
289
- const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;
290
- // if the number is negative then calculate the number as number - decimal
291
- // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45
292
- // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal
293
- // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1
294
- if (number === 0) {
295
- return Object.is(0, number) ? sum : number - decimal;
296
- }
297
- return number > 0 ? sum : number - decimal;
298
- }
299
- // updates the widgets text value.
300
- updateDisplayText() {
301
- const input = this.inputEl.nativeElement;
302
- const position = input.selectionStart;
303
- const preValue = input.value;
304
- if (!this.isDefaultQuery) {
305
- const parts = preValue.split(this.DECIMAL);
306
- this.decimalValue = parts[1] || '';
307
- }
308
- const stepVal = this.stepLength();
309
- if (this.inputmode === INPUTMODE.FINANCIAL && stepVal) {
310
- this.displayValue = input.value = this.transformNumber(this.proxyModel, `1.${stepVal}-${stepVal}`);
311
- this.decimalValue = this.decimalValue.replace(/\D/g, '');
312
- }
313
- else {
314
- this.displayValue = input.value = this.transformNumber(this.proxyModel);
315
- }
316
- if (this.trailingzero) {
317
- const regexObj = new RegExp(this.regexPattern);
318
- this.invalidPattern = !regexObj.test(this.displayValue);
319
- }
320
- // in safari browser, setSelectionRange will focus the input by default, which may invoke the focus event on widget.
321
- // Hence preventing the setSelectionRange when default value is set i.e. widget is not focused.
322
- if (this.updateon === 'default' && !this.isDefaultQuery) {
323
- this.resetCursorPosition(preValue.length - position);
324
- }
325
- }
326
- // This function returns the step length set in the studio
327
- stepLength() {
328
- if (this.inputmode === 'INPUTMODE.NATURAL' && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) {
329
- return this.decimalplaces;
330
- }
331
- const stepLen = this.step.toString().split('.');
332
- if (stepLen.length === 1) {
333
- return;
334
- }
335
- else {
336
- return stepLen[1].length;
337
- }
338
- }
339
- // This function checks if the currency widget has input mode as natural and trailing zero is defined or not
340
- isNaturalCurrency() {
341
- return this.inputmode === INPUTMODE.NATURAL && this.widgetType === 'wm-currency' && !!this.trailingzero;
342
- }
343
- /**
344
- * @param value contains the value entered in the input box
345
- * This function modifies the user input value, into financial mode.
346
- * Number starts from highest precesion decimal, on typing number shifts to the left
347
- */
348
- onInputChange(value) {
349
- const stepVal = this.stepLength();
350
- const prevDataValue = this.getPrevDataValue();
351
- // WMS-22355, Trigger change cb if value exists or value is empty but datavalue exists (when value is selected and deleted).
352
- // Fix for [WMS-27041]: Ensure the change callback for the number widget triggers only on focus out (when updateon is set to blur),
353
- // not during initial input when the previous value is undefined and the current value is null.
354
- if (isDefined(value) && (value !== '' || this.datavalue || this.datavalue == 0)) {
355
- if (this.widgetType === "wm-number") {
356
- if (this.inputmode == INPUTMODE.FINANCIAL) {
357
- // Case 1: when there is no default value, prevDataValue is undefined && this.datavalue is null
358
- // Case 2: when there default value, prevDataValue is equal to this.datavalue
359
- if (!((prevDataValue == undefined && this.datavalue == null) || (prevDataValue == this.datavalue))) {
360
- this.handleChange(value);
361
- }
362
- }
363
- else if (!(prevDataValue == undefined && this.datavalue == null)) {
364
- this.handleChange(value);
365
- }
366
- }
367
- else { // currency widget
368
- this.handleChange(value);
369
- }
370
- }
371
- else {
372
- return;
373
- }
374
- if (!stepVal || this.inputmode !== INPUTMODE.FINANCIAL) {
375
- return;
376
- }
377
- let financialVal;
378
- /**
379
- * If the value is entered by the user, format the input
380
- * If the value is provided as default value, skip formatting
381
- */
382
- if (this.isDefaultQuery) {
383
- financialVal = parseFloat(value);
384
- }
385
- else {
386
- const valInWholeNum = parseInt(value.toString().replace(/\D/g, ''));
387
- financialVal = valInWholeNum * this.step;
388
- }
389
- if (!isNaN(financialVal)) {
390
- // When update on key is set keypress, update the datavalue else update only the display value
391
- if (this.ngModelOptions.updateOn === 'change') {
392
- this.datavalue = parseFloat(financialVal.toFixed(stepVal));
393
- this.handleChange(this.datavalue);
394
- }
395
- else {
396
- this.displayValue = financialVal.toFixed(stepVal);
397
- }
398
- }
399
- else if (this.ngModelOptions.updateOn !== 'blur') {
400
- this.datavalue = undefined;
401
- this.handleChange(null);
402
- }
403
- }
404
- // Input mode is financial and trailing zero is set to false, On focus set display val to fixed point notation and On blur strip trailing zeros
405
- // In currency, inputmode is natural and trailing zero and step are defined, on blur display val to fixed point notation and on focus strip the zeros
406
- checkForTrailingZeros($event) {
407
- const stepVal = this.stepLength();
408
- const financialMode = !this.trailingzero && this.inputmode === INPUTMODE.FINANCIAL;
409
- // If the user's last input is a decimal and not active on input field, throw error
410
- if (this.lastValIsDecimal) {
411
- this.onModelChange(this.displayValue);
412
- }
413
- if (!financialMode && !this.isNaturalCurrency()) {
414
- return;
415
- }
416
- if (stepVal && this.datavalue) {
417
- let numberfilter;
418
- if ((financialMode && $event.type === 'focus') || (this.isNaturalCurrency() && $event.type === 'blur')) {
419
- numberfilter = `1.${stepVal}-${stepVal}`;
420
- }
421
- this.displayValue = this.transformNumber(this.datavalue, numberfilter);
422
- }
423
- }
424
- /**
425
- * returns the number of decimal places a number have.
426
- * @param value: number
427
- * @returns {number}
428
- */
429
- countDecimals(value) {
430
- const num = Number(value);
431
- if (num === 0) {
432
- return 0;
433
- }
434
- // Convert to number and handle scientific notation
435
- if (Number.isNaN(num))
436
- return 0;
437
- // Get the exponential form to handle scientific notation properly
438
- const exponentialStr = num.toExponential();
439
- const match = exponentialStr.match(/^-?\d*\.?(\d+)?e([+-]\d+)$/);
440
- if (match) {
441
- const decimals = match[1] ? match[1].length : 0;
442
- const exponent = parseInt(match[2]);
443
- return Math.max(0, decimals - exponent);
444
- }
445
- // Fallback to regular decimal counting
446
- const decimalStr = num.toString();
447
- const isLocalizedNumber = includes(decimalStr, this.DECIMAL);
448
- const parts = isLocalizedNumber ? decimalStr.split(this.DECIMAL) : decimalStr.split('.');
449
- return parts[1] ? parts[1].length : 0;
450
- }
451
- /**
452
- * handles the arrow press event. Increases or decreases the number. triggered fom the template
453
- * @param $event keyboard event.
454
- * @param key identifier to increase or decrease the number.
455
- */
456
- onArrowPress($event, key) {
457
- $event.preventDefault();
458
- if (this.readonly || this.step === 0) {
459
- return;
460
- }
461
- const targetVal = $event.target.value.replace(/,/g, '');
462
- // proxyModel to be updated from $event.target.value if present to support arrow keys when input changes else pick up from this.proxymodel
463
- let proxyModel;
464
- if (targetVal && !isNaN(parseFloat(targetVal))) {
465
- proxyModel = parseFloat(targetVal);
466
- }
467
- else {
468
- proxyModel = this.proxyModel;
469
- }
470
- let value;
471
- // if the number is not in range and when arrow buttons are pressed need to get appropriate number value.
472
- if (this.numberNotInRange) {
473
- const inputValue = this.parseNumber(this.inputEl.nativeElement.value);
474
- // take the textbox value as current model if the value is valid.
475
- if (!isNaN(inputValue)) {
476
- value = this.getValueInRange(inputValue);
477
- proxyModel = inputValue;
478
- this.resetValidations();
479
- }
480
- }
481
- else if (isUndefined(proxyModel) || isNull(proxyModel)) {
482
- proxyModel = value = this.getValueInRange((this.minvalue || 0));
483
- this.resetValidations();
484
- }
485
- else {
486
- value = this.getValueInRange(proxyModel + (key === 'UP' ? this.step : -this.step));
487
- }
488
- if ((key === 'UP' && proxyModel <= value) || (key === 'DOWN' && proxyModel >= value)) {
489
- const decimalRoundValue = Math.max(this.countDecimals(proxyModel), this.countDecimals(this.step));
490
- // update the modelProxy.
491
- this.proxyModel = round(value, decimalRoundValue);
492
- this.updateDisplayText();
493
- this.handleChange(this.proxyModel);
494
- }
495
- }
496
- /**
497
- * method is called from the from widget. to check whether the value entered is valid or not.
498
- * @returns {object}
499
- */
500
- validate(c) {
501
- if (this.isInvalidNumber) {
502
- this.validateType = '';
503
- return {
504
- invalidNumber: {
505
- valid: false
506
- },
507
- };
508
- }
509
- if (this.numberNotInRange) {
510
- return {
511
- numberNotInRange: {
512
- valid: false
513
- },
514
- };
515
- }
516
- if (this.invalidPattern) {
517
- return {
518
- pattern: {
519
- valid: false
520
- }
521
- };
522
- }
523
- this.validateType = '';
524
- /* WMS-18269 | Extending the existing validation for 'required' */
525
- if (this['show'] && this['required']) {
526
- return (!!c.value || c.value === 0) ? null : { required: true };
527
- }
528
- return null;
529
- }
530
- validateInputEntry($event) {
531
- this.isDefaultQuery = false;
532
- // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).
533
- if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {
534
- return;
535
- }
536
- const validity = new RegExp(`^[\\d\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');
537
- const inputValue = $event.target?.value || "";
538
- // when input mode is financial, do not restrict user on entering the value when step value limit is reached.
539
- // const skipStepValidation = this.inputmode === INPUTMODE.FINANCIAL;
540
- // Validates if user eneters more than 16 digits
541
- if (inputValue) {
542
- const parsedVal = parseInt(inputValue.toString().replace(/\D/g, ''));
543
- if (parsedVal.toString().length > 15) {
544
- // WMS-22321: If the number is greater than MAX_SAFE_INTEGER (more than 15 numbers).
545
- // user selects a range of digits and presses a key.
546
- // Do not throw validation of exceeded number as selected range value will be deleted.
547
- const selectedVal = window.getSelection();
548
- if (selectedVal?.toString() && selectedVal.focusNode === this.nativeElement) {
549
- return true;
550
- }
551
- return false;
552
- }
553
- }
554
- // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).
555
- // Restrict user from entering only if the decimal limit is reached and the new digit is entered in decimal place
556
- // if (!skipStepValidation && inputValue && this.countDecimals(this.step) && (this.countDecimals(inputValue) >= this.countDecimals(this.step)) && $event.target.selectionStart >= inputValue.length - 1) {
557
- // return false;
558
- // }
559
- // validates if user entered an invalid character.
560
- if (!validity.test($event.key)) {
561
- return false;
562
- }
563
- if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces)) {
564
- if (this.decimalplaces === 0 && this.DECIMAL === $event.key) {
565
- return false;
566
- }
567
- const parts = includes(inputValue, this.DECIMAL) ? inputValue.split(this.DECIMAL) : inputValue.split('.');
568
- const isCursorPositionAtDecimalPlace = $event.target.selectionStart > parts[0].length;
569
- if (this.decimalplaces > 0 && this.countDecimals(inputValue) >= this.decimalplaces && isCursorPositionAtDecimalPlace) {
570
- return false;
571
- }
572
- }
573
- // comma cannot be entered consecutively
574
- if (includes(inputValue, ',') && inputValue[inputValue.length - 1] === ',' && $event.key === ',') {
575
- return false;
576
- }
577
- // a decimal value can be entered only once in the input.
578
- if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {
579
- return false;
580
- }
581
- // 'e' can be entered only once in the input.
582
- if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {
583
- return false;
584
- }
585
- if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {
586
- return false;
587
- }
588
- // Do not allow user to enter only space without any input value
589
- if (!inputValue && $event.code === 'Space') {
590
- return false;
591
- }
592
- }
593
- onBackspace($event) {
594
- this.isDefaultQuery = false;
595
- }
596
- onDelete($event) {
597
- this.isDefaultQuery = false;
598
- }
599
- onEnter($event) {
600
- this.datavalue = $event.target.value;
601
- }
602
- onModelChange($event) {
603
- if (this.inputmode === INPUTMODE.NATURAL || (this.inputmode === INPUTMODE.FINANCIAL && this.ngModelOptions.updateOn === 'blur')) {
604
- this.datavalue = $event;
605
- }
606
- }
607
- onPropertyChange(key, nv, ov) {
608
- if (key === 'minvalue' || key === 'maxvalue') {
609
- this.isValid(nv);
610
- }
611
- else if (key === 'datavalue' && !ov) {
612
- if (this.isNaturalCurrency()) {
613
- this.checkForTrailingZeros({ type: 'blur' });
614
- }
615
- else {
616
- this.onInputChange(nv);
617
- }
618
- }
619
- else if (key === 'regexp') {
620
- this.regexPattern = nv;
621
- }
622
- else {
623
- super.onPropertyChange(key, nv, ov);
624
- }
625
- }
626
- onPaste($event) {
627
- const pastedData = $event.clipboardData.getData('text');
628
- for (const char of pastedData) {
629
- const mockEvent = new KeyboardEvent('keypress', { key: char });
630
- if (this.validateInputEntry(mockEvent) === false) {
631
- $event.preventDefault();
632
- return;
633
- }
634
- }
635
- }
108
+ constructor(inj, config, i18nService, trailingZeroDecimalPipe, explicitContext) {
109
+ super(inj, config, explicitContext);
110
+ this.i18nService = i18nService;
111
+ this.trailingZeroDecimalPipe = trailingZeroDecimalPipe;
112
+ this.isDefaultQuery = true;
113
+ this.decimalValue = "";
114
+ this.invalidPattern = false;
115
+ this.selectedLocale = i18nService.getSelectedLocale();
116
+ this.DECIMAL = getLocaleNumberSymbol(this.localefilter || this.selectedLocale, NumberSymbol.Decimal);
117
+ this.GROUP = getLocaleNumberSymbol(this.localefilter || this.selectedLocale, NumberSymbol.Group);
118
+ this.numberfilter = "1.0-16";
119
+ this.resetValidations();
120
+ }
121
+ set datavalue(value) {
122
+ this.lastValIsDecimal = false;
123
+ if (includes([
124
+ null,
125
+ void 0,
126
+ ""
127
+ ], value)) {
128
+ const input = this.inputEl.nativeElement;
129
+ const prevDataValue = this.prevDatavalue;
130
+ this.displayValue = input.value = this.proxyModel = null;
131
+ this.resetValidations();
132
+ if ((prevDataValue || prevDataValue == 0 || prevDataValue == null) && !this.isDefaultQuery) {
133
+ this.handleChange(value);
134
+ this._onChange();
135
+ }
136
+ return;
137
+ }
138
+ if (this.isDefaultQuery) {
139
+ const isLocalizedNumber = isString(value) && includes(value, this.DECIMAL);
140
+ const parts = isLocalizedNumber ? value.split(this.DECIMAL) : isString(value) && value.split(".");
141
+ let decimalPlacesAttrVal = this.getAttr("decimalplaces");
142
+ const decimalplaces = decimalPlacesAttrVal !== "" && decimalPlacesAttrVal !== void 0 ? Number(decimalPlacesAttrVal) : NaN;
143
+ if (this.inputmode === INPUTMODE.NATURAL && !isNaN(decimalplaces)) {
144
+ if (decimalplaces === 0) {
145
+ this.decimalValue = "";
146
+ value = isLocalizedNumber ? parts[0] : this.transformNumber(parts[0]);
147
+ }
148
+ if (decimalplaces > 0) {
149
+ this.decimalValue = parts[1]?.substring(0, decimalplaces) || "";
150
+ if (isLocalizedNumber) value = this.decimalValue.length ? `${parts[0]}${this.DECIMAL}${this.decimalValue}` : parts[0];
151
+ else value = Number.parseFloat(String(value)).toFixed(decimalplaces);
152
+ }
153
+ } else {
154
+ this.decimalValue = parts[1] || "";
155
+ value = isLocalizedNumber ? value : this.transformNumber(value);
156
+ }
157
+ }
158
+ const numberReg = /\d/;
159
+ const strVal = value.toString();
160
+ let model;
161
+ if (numberReg.test(strVal)) model = this.parseNumber(strVal);
162
+ else model = NaN;
163
+ if (isNaN(model) && strVal[strVal.length - 1] === this.DECIMAL && this.ngModelOptions.updateOn === "change" && this.$element.find("input:focus").length) this.lastValIsDecimal = true;
164
+ if (!this.lastValIsDecimal && this.isValid(model)) {
165
+ this.proxyModel = model;
166
+ this.updateDisplayText();
167
+ if (!this.isDefaultQuery) this.handleChange(model);
168
+ } else {
169
+ this.displayValue = value.toString();
170
+ this.proxyModel = null;
171
+ this.handleChange(null);
172
+ }
173
+ }
174
+ get datavalue() {
175
+ return this.proxyModel;
176
+ }
177
+ resetValidations() {
178
+ this.isInvalidNumber = false;
179
+ this.numberNotInRange = false;
180
+ }
181
+ isValid(val) {
182
+ let invalidDecimalPlaces = false;
183
+ if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) invalidDecimalPlaces = this.countDecimals(val) > this.decimalplaces;
184
+ else if (!Number.isInteger(this.step) && this.countDecimals(val) > this.countDecimals(this.step)) invalidDecimalPlaces = true;
185
+ if (isNaN(val) || !isFinite(val) || invalidDecimalPlaces) {
186
+ this.isInvalidNumber = true;
187
+ return false;
188
+ }
189
+ if (val !== this.getValueInRange(val)) {
190
+ this.numberNotInRange = true;
191
+ return true;
192
+ }
193
+ this.resetValidations();
194
+ return true;
195
+ }
196
+ getValueInRange(value) {
197
+ if (!isNaN(this.minvalue) && value < this.minvalue) {
198
+ this.validateType = "minvalue";
199
+ return this.minvalue;
200
+ }
201
+ if (!isNaN(this.maxvalue) && value > this.maxvalue) {
202
+ this.validateType = "maxvalue";
203
+ return this.maxvalue;
204
+ }
205
+ return value;
206
+ }
207
+ transformNumber(number, numberfilter) {
208
+ const filterVal = numberfilter ? numberfilter : this.numberfilter;
209
+ return this.trailingZeroDecimalPipe.transform(number, this.selectedLocale, filterVal, this.localefilter, this.trailingzero, this.decimalValue, !!numberfilter, this.i18nService?.getwidgetLocale());
210
+ }
211
+ resetCursorPosition(value) {
212
+ const input = this.inputEl.nativeElement;
213
+ let position = input.value.length - value;
214
+ position = position < 0 ? 0 : position;
215
+ input.setSelectionRange(position, position);
216
+ }
217
+ parseNumber(val) {
218
+ const parts = val.split(this.inputmode === INPUTMODE.FINANCIAL ? val.indexOf(this.DECIMAL) > -1 ? this.DECIMAL : "." : this.DECIMAL);
219
+ if (parts.length > 2) return NaN;
220
+ if (parts[1] === "") return NaN;
221
+ const number = Number(parts[0].split(this.GROUP).join(""));
222
+ const decimal = Number(`0.${parts[1] || 0}`);
223
+ if (Number.isNaN(number) || Number.isNaN(decimal)) return NaN;
224
+ const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;
225
+ if (number === 0) return Object.is(0, number) ? sum : number - decimal;
226
+ return number > 0 ? sum : number - decimal;
227
+ }
228
+ updateDisplayText() {
229
+ const input = this.inputEl.nativeElement;
230
+ const position = input.selectionStart;
231
+ const preValue = input.value;
232
+ if (!this.isDefaultQuery) {
233
+ const parts = preValue.split(this.DECIMAL);
234
+ this.decimalValue = parts[1] || "";
235
+ }
236
+ const stepVal = this.stepLength();
237
+ if (this.inputmode === INPUTMODE.FINANCIAL && stepVal) {
238
+ this.displayValue = input.value = this.transformNumber(this.proxyModel, `1.${stepVal}-${stepVal}`);
239
+ this.decimalValue = this.decimalValue.replace(/\D/g, "");
240
+ } else this.displayValue = input.value = this.transformNumber(this.proxyModel);
241
+ if (this.trailingzero) {
242
+ const regexObj = new RegExp(this.regexPattern);
243
+ this.invalidPattern = !regexObj.test(this.displayValue);
244
+ }
245
+ if (this.updateon === "default" && !this.isDefaultQuery) this.resetCursorPosition(preValue.length - position);
246
+ }
247
+ stepLength() {
248
+ if (this.inputmode === "INPUTMODE.NATURAL" && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) return this.decimalplaces;
249
+ const stepLen = this.step.toString().split(".");
250
+ if (stepLen.length === 1) return;
251
+ else return stepLen[1].length;
252
+ }
253
+ isNaturalCurrency() {
254
+ return this.inputmode === INPUTMODE.NATURAL && this.widgetType === "wm-currency" && !!this.trailingzero;
255
+ }
256
+ onInputChange(value) {
257
+ const stepVal = this.stepLength();
258
+ const prevDataValue = this.getPrevDataValue();
259
+ if (isDefined(value) && (value !== "" || this.datavalue || this.datavalue == 0)) {
260
+ if (this.widgetType === "wm-number") {
261
+ if (this.inputmode == INPUTMODE.FINANCIAL) {
262
+ if (!(prevDataValue == void 0 && this.datavalue == null || prevDataValue == this.datavalue)) this.handleChange(value);
263
+ } else if (!(prevDataValue == void 0 && this.datavalue == null)) this.handleChange(value);
264
+ } else this.handleChange(value);
265
+ } else return;
266
+ if (!stepVal || this.inputmode !== INPUTMODE.FINANCIAL) return;
267
+ let financialVal;
268
+ if (this.isDefaultQuery) financialVal = parseFloat(value);
269
+ else financialVal = parseInt(value.toString().replace(/\D/g, "")) * this.step;
270
+ if (!isNaN(financialVal)) {
271
+ if (this.ngModelOptions.updateOn === "change") {
272
+ this.datavalue = parseFloat(financialVal.toFixed(stepVal));
273
+ this.handleChange(this.datavalue);
274
+ } else this.displayValue = financialVal.toFixed(stepVal);
275
+ } else if (this.ngModelOptions.updateOn !== "blur") {
276
+ this.datavalue = void 0;
277
+ this.handleChange(null);
278
+ }
279
+ }
280
+ checkForTrailingZeros($event) {
281
+ const stepVal = this.stepLength();
282
+ const financialMode = !this.trailingzero && this.inputmode === INPUTMODE.FINANCIAL;
283
+ if (this.lastValIsDecimal) this.onModelChange(this.displayValue);
284
+ if (!financialMode && !this.isNaturalCurrency()) return;
285
+ if (stepVal && this.datavalue) {
286
+ let numberfilter;
287
+ if (financialMode && $event.type === "focus" || this.isNaturalCurrency() && $event.type === "blur") numberfilter = `1.${stepVal}-${stepVal}`;
288
+ this.displayValue = this.transformNumber(this.datavalue, numberfilter);
289
+ }
290
+ }
291
+ countDecimals(value) {
292
+ const num = Number(value);
293
+ if (num === 0) return 0;
294
+ if (Number.isNaN(num)) return 0;
295
+ const match = num.toExponential().match(/^-?\d*\.?(\d+)?e([+-]\d+)$/);
296
+ if (match) {
297
+ const decimals = match[1] ? match[1].length : 0;
298
+ const exponent = parseInt(match[2]);
299
+ return Math.max(0, decimals - exponent);
300
+ }
301
+ const decimalStr = num.toString();
302
+ const parts = includes(decimalStr, this.DECIMAL) ? decimalStr.split(this.DECIMAL) : decimalStr.split(".");
303
+ return parts[1] ? parts[1].length : 0;
304
+ }
305
+ onArrowPress($event, key) {
306
+ $event.preventDefault();
307
+ if (this.readonly || this.step === 0) return;
308
+ const targetVal = $event.target.value.replace(/,/g, "");
309
+ let proxyModel;
310
+ if (targetVal && !isNaN(parseFloat(targetVal))) proxyModel = parseFloat(targetVal);
311
+ else proxyModel = this.proxyModel;
312
+ let value;
313
+ if (this.numberNotInRange) {
314
+ const inputValue = this.parseNumber(this.inputEl.nativeElement.value);
315
+ if (!isNaN(inputValue)) {
316
+ value = this.getValueInRange(inputValue);
317
+ proxyModel = inputValue;
318
+ this.resetValidations();
319
+ }
320
+ } else if (isUndefined(proxyModel) || isNull(proxyModel)) {
321
+ proxyModel = value = this.getValueInRange(this.minvalue || 0);
322
+ this.resetValidations();
323
+ } else value = this.getValueInRange(proxyModel + (key === "UP" ? this.step : -this.step));
324
+ if (key === "UP" && proxyModel <= value || key === "DOWN" && proxyModel >= value) {
325
+ const decimalRoundValue = Math.max(this.countDecimals(proxyModel), this.countDecimals(this.step));
326
+ this.proxyModel = round(value, decimalRoundValue);
327
+ this.updateDisplayText();
328
+ this.handleChange(this.proxyModel);
329
+ }
330
+ }
331
+ validate(c) {
332
+ if (this.isInvalidNumber) {
333
+ this.validateType = "";
334
+ return { invalidNumber: { valid: false } };
335
+ }
336
+ if (this.numberNotInRange) return { numberNotInRange: { valid: false } };
337
+ if (this.invalidPattern) return { pattern: { valid: false } };
338
+ this.validateType = "";
339
+ if (this["show"] && this["required"]) return !!c.value || c.value === 0 ? null : { required: true };
340
+ return null;
341
+ }
342
+ validateInputEntry($event) {
343
+ this.isDefaultQuery = false;
344
+ if ($event.ctrlKey || includes([
345
+ "Backspace",
346
+ "ArrowRight",
347
+ "ArrowLeft",
348
+ "Tab",
349
+ "Enter",
350
+ "Delete"
351
+ ], $event.key)) return;
352
+ const validity = new RegExp(`^[\\d\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, "i");
353
+ const inputValue = $event.target?.value || "";
354
+ if (inputValue) {
355
+ if (parseInt(inputValue.toString().replace(/\D/g, "")).toString().length > 15) {
356
+ const selectedVal = window.getSelection();
357
+ if (selectedVal?.toString() && selectedVal.focusNode === this.nativeElement) return true;
358
+ return false;
359
+ }
360
+ }
361
+ if (!validity.test($event.key)) return false;
362
+ if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces)) {
363
+ if (this.decimalplaces === 0 && this.DECIMAL === $event.key) return false;
364
+ const parts = includes(inputValue, this.DECIMAL) ? inputValue.split(this.DECIMAL) : inputValue.split(".");
365
+ const isCursorPositionAtDecimalPlace = $event.target.selectionStart > parts[0].length;
366
+ if (this.decimalplaces > 0 && this.countDecimals(inputValue) >= this.decimalplaces && isCursorPositionAtDecimalPlace) return false;
367
+ }
368
+ if (includes(inputValue, ",") && inputValue[inputValue.length - 1] === "," && $event.key === ",") return false;
369
+ if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) return false;
370
+ if (intersection(toArray(inputValue), ["e", "E"]).length && includes("eE", $event.key)) return false;
371
+ if ((includes(inputValue, "+") || includes(inputValue, "-")) && ($event.key === "+" || $event.key === "-")) return false;
372
+ if (!inputValue && $event.code === "Space") return false;
373
+ }
374
+ onBackspace($event) {
375
+ this.isDefaultQuery = false;
376
+ }
377
+ onDelete($event) {
378
+ this.isDefaultQuery = false;
379
+ }
380
+ onEnter($event) {
381
+ this.datavalue = $event.target.value;
382
+ }
383
+ onModelChange($event) {
384
+ if (this.inputmode === INPUTMODE.NATURAL || this.inputmode === INPUTMODE.FINANCIAL && this.ngModelOptions.updateOn === "blur") this.datavalue = $event;
385
+ }
386
+ onPropertyChange(key, nv, ov) {
387
+ if (key === "minvalue" || key === "maxvalue") this.isValid(nv);
388
+ else if (key === "datavalue" && !ov) {
389
+ if (this.isNaturalCurrency()) this.checkForTrailingZeros({ type: "blur" });
390
+ else this.onInputChange(nv);
391
+ } else if (key === "regexp") this.regexPattern = nv;
392
+ else super.onPropertyChange(key, nv, ov);
393
+ }
394
+ onPaste($event) {
395
+ const pastedData = $event.clipboardData.getData("text");
396
+ for (const char of pastedData) {
397
+ const mockEvent = new KeyboardEvent("keypress", { key: char });
398
+ if (this.validateInputEntry(mockEvent) === false) {
399
+ $event.preventDefault();
400
+ return;
401
+ }
402
+ }
403
+ }
636
404
  };
637
405
  NumberLocale = __decorate([
638
- __param(4, Inject('EXPLICIT_CONTEXT')),
639
- __param(4, Optional()),
640
- __metadata("design:paramtypes", [Injector, Object, AbstractI18nService,
641
- TrailingZeroDecimalPipe, Object])
406
+ __param(4, Inject("EXPLICIT_CONTEXT")),
407
+ __param(4, Optional()),
408
+ __metadata("design:paramtypes", [
409
+ Injector,
410
+ Object,
411
+ AbstractI18nService,
412
+ TrailingZeroDecimalPipe,
413
+ Object
414
+ ])
642
415
  ], NumberLocale);
643
-
644
- const inputCalendarTypeProps = new Map([
645
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
646
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
647
- ['autofocus', PROP_BOOLEAN],
648
- ['class', PROP_STRING],
649
- ['datasource', PROP_ANY],
650
- ['datavalue', PROP_STRING],
651
- ['disabled', PROP_BOOLEAN],
652
- ['hint', PROP_STRING],
653
- ['arialabel', PROP_STRING],
654
- ['maxvalue', PROP_NUMBER],
655
- ['minvalue', PROP_NUMBER],
656
- ['name', PROP_STRING],
657
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
658
- ['readonly', PROP_BOOLEAN],
659
- ['required', PROP_BOOLEAN],
660
- ['shortcutkey', PROP_STRING],
661
- ['show', { value: true, ...PROP_BOOLEAN }],
662
- ['step', PROP_NUMBER],
663
- ['tabindex', { value: 0, ...PROP_NUMBER }],
664
- ['type', PROP_STRING],
665
- ['updateon', PROP_STRING],
666
- ['conditionalclass', PROP_ANY],
667
- ['conditionalstyle', PROP_ANY]
416
+ const inputCalendarTypeProps = /* @__PURE__ */ new Map([
417
+ ["autocomplete", {
418
+ value: true,
419
+ ...PROP_BOOLEAN
420
+ }],
421
+ ["autotrim", {
422
+ value: true,
423
+ ...PROP_BOOLEAN
424
+ }],
425
+ ["autofocus", PROP_BOOLEAN],
426
+ ["class", PROP_STRING],
427
+ ["datasource", PROP_ANY],
428
+ ["datavalue", PROP_STRING],
429
+ ["disabled", PROP_BOOLEAN],
430
+ ["hint", PROP_STRING],
431
+ ["arialabel", PROP_STRING],
432
+ ["maxvalue", PROP_NUMBER],
433
+ ["minvalue", PROP_NUMBER],
434
+ ["name", PROP_STRING],
435
+ ["placeholder", {
436
+ value: "Enter text",
437
+ ...PROP_STRING
438
+ }],
439
+ ["readonly", PROP_BOOLEAN],
440
+ ["required", PROP_BOOLEAN],
441
+ ["shortcutkey", PROP_STRING],
442
+ ["show", {
443
+ value: true,
444
+ ...PROP_BOOLEAN
445
+ }],
446
+ ["step", PROP_NUMBER],
447
+ ["tabindex", {
448
+ value: 0,
449
+ ...PROP_NUMBER
450
+ }],
451
+ ["type", PROP_STRING],
452
+ ["updateon", PROP_STRING],
453
+ ["conditionalclass", PROP_ANY],
454
+ ["conditionalstyle", PROP_ANY]
668
455
  ]);
669
456
  const registerProps$4 = () => {
670
- register('wm-input-calendar', inputCalendarTypeProps);
457
+ register("wm-input-calendar", inputCalendarTypeProps);
671
458
  };
672
-
673
459
  const WIDGET_CONFIG$4 = {
674
- widgetType: 'wm-input-calendar',
675
- hostClass: 'app-input-wrapper'
460
+ widgetType: "wm-input-calendar",
461
+ hostClass: "app-input-wrapper"
676
462
  };
677
- class InputCalendarComponent extends BaseInput {
678
- static { this.initializeProps = registerProps$4(); }
679
- constructor(inj, explicitContext) {
680
- super(inj, WIDGET_CONFIG$4, explicitContext);
681
- }
682
- ngOnDestroy() {
683
- // MEMORY LEAK FIX: Clear ViewChild references
684
- this.inputEl = null;
685
- this.ngModel = null;
686
- // Call parent ngOnDestroy
687
- super.ngOnDestroy();
688
- }
689
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputCalendarComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
690
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: InputCalendarComponent, isStandalone: true, selector: "wm-input[type=\"date\"], wm-input[type=\"datetime-local\"], wm-input[type=\"month\"], wm-input[type=\"time\"], wm-input[type=\"week\"]", providers: [
691
- provideAs(InputCalendarComponent, NG_VALUE_ACCESSOR, true),
692
- provideAs(InputCalendarComponent, NG_VALIDATORS, true),
693
- provideAsWidgetRef(InputCalendarComponent)
694
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel || type + ' field'\"\n [autofocus]=\"autofocus\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n #input>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
695
- }
696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputCalendarComponent, decorators: [{
697
- type: Component,
698
- args: [{ standalone: true, imports: [CommonModule, FormsModule], selector: 'wm-input[type="date"], wm-input[type="datetime-local"], wm-input[type="month"], wm-input[type="time"], wm-input[type="week"]', providers: [
699
- provideAs(InputCalendarComponent, NG_VALUE_ACCESSOR, true),
700
- provideAs(InputCalendarComponent, NG_VALIDATORS, true),
701
- provideAsWidgetRef(InputCalendarComponent)
702
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel || type + ' field'\"\n [autofocus]=\"autofocus\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n #input>\n" }]
703
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
704
- type: Inject,
705
- args: ['EXPLICIT_CONTEXT']
706
- }, {
707
- type: Optional
708
- }] }], propDecorators: { inputEl: [{
709
- type: ViewChild,
710
- args: ['input', { static: true }]
711
- }], ngModel: [{
712
- type: ViewChild,
713
- args: [NgModel]
714
- }] } });
715
-
716
- const inputColorTypeProps = new Map([
717
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
718
- ['autofocus', PROP_BOOLEAN],
719
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
720
- ['class', PROP_STRING],
721
- ['datavaluesource', PROP_ANY],
722
- ['datavalue', PROP_STRING],
723
- ['disabled', PROP_BOOLEAN],
724
- ['hint', PROP_STRING],
725
- ['arialabel', PROP_STRING],
726
- ['name', PROP_STRING],
727
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
728
- ['readonly', PROP_BOOLEAN],
729
- ['required', PROP_BOOLEAN],
730
- ['shortcutkey', PROP_STRING],
731
- ['show', { value: true, ...PROP_BOOLEAN }],
732
- ['tabindex', { value: 0, ...PROP_NUMBER }],
733
- ['type', { value: 'color', ...PROP_STRING }],
734
- ['updateon', PROP_STRING],
735
- ['conditionalclass', PROP_ANY],
736
- ['conditionalstyle', PROP_ANY]
463
+ var InputCalendarComponent = class InputCalendarComponent extends BaseInput {
464
+ static {
465
+ this.initializeProps = registerProps$4();
466
+ }
467
+ constructor(inj, explicitContext) {
468
+ super(inj, WIDGET_CONFIG$4, explicitContext);
469
+ }
470
+ ngOnDestroy() {
471
+ this.inputEl = null;
472
+ this.ngModel = null;
473
+ super.ngOnDestroy();
474
+ }
475
+ static {
476
+ this.ɵfac = i0.ɵɵngDeclareFactory({
477
+ minVersion: "12.0.0",
478
+ version: "22.2.1",
479
+ ngImport: i0,
480
+ type: InputCalendarComponent,
481
+ deps: [{ token: i0.Injector }, {
482
+ token: "EXPLICIT_CONTEXT",
483
+ optional: true
484
+ }],
485
+ target: i0.ɵɵFactoryTarget.Component
486
+ });
487
+ }
488
+ static {
489
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
490
+ minVersion: "14.0.0",
491
+ version: "22.2.1",
492
+ type: InputCalendarComponent,
493
+ isStandalone: true,
494
+ selector: "wm-input[type=\"date\"], wm-input[type=\"datetime-local\"], wm-input[type=\"month\"], wm-input[type=\"time\"], wm-input[type=\"week\"]",
495
+ providers: [
496
+ provideAs(InputCalendarComponent, NG_VALUE_ACCESSOR, true),
497
+ provideAs(InputCalendarComponent, NG_VALIDATORS, true),
498
+ provideAsWidgetRef(InputCalendarComponent)
499
+ ],
500
+ viewQueries: [{
501
+ propertyName: "inputEl",
502
+ first: true,
503
+ predicate: ["input"],
504
+ descendants: true,
505
+ static: true
506
+ }, {
507
+ propertyName: "ngModel",
508
+ first: true,
509
+ predicate: NgModel,
510
+ descendants: true
511
+ }],
512
+ usesInheritance: true,
513
+ ngImport: i0,
514
+ template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel || type + ' field'\"\n [autofocus]=\"autofocus\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n #input>\n",
515
+ dependencies: [
516
+ {
517
+ kind: "ngmodule",
518
+ type: CommonModule
519
+ },
520
+ {
521
+ kind: "directive",
522
+ type: i1.NgClass,
523
+ selector: "[ngClass]",
524
+ inputs: ["class", "ngClass"]
525
+ },
526
+ {
527
+ kind: "directive",
528
+ type: i1.NgStyle,
529
+ selector: "[ngStyle]",
530
+ inputs: ["ngStyle"]
531
+ },
532
+ {
533
+ kind: "ngmodule",
534
+ type: FormsModule
535
+ },
536
+ {
537
+ kind: "directive",
538
+ type: i2.DefaultValueAccessor,
539
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
540
+ },
541
+ {
542
+ kind: "directive",
543
+ type: i2.NgControlStatus,
544
+ selector: "[formControlName],[ngModel],[formControl]"
545
+ },
546
+ {
547
+ kind: "directive",
548
+ type: i2.RequiredValidator,
549
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
550
+ inputs: ["required"]
551
+ },
552
+ {
553
+ kind: "directive",
554
+ type: i2.NgModel,
555
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
556
+ inputs: [
557
+ "name",
558
+ "disabled",
559
+ "ngModel",
560
+ "ngModelOptions"
561
+ ],
562
+ outputs: ["ngModelChange"],
563
+ exportAs: ["ngModel"]
564
+ }
565
+ ],
566
+ changeDetection: i0.ChangeDetectionStrategy.Eager
567
+ });
568
+ }
569
+ };
570
+ i0.ɵɵngDeclareClassMetadata({
571
+ minVersion: "12.0.0",
572
+ version: "22.2.1",
573
+ ngImport: i0,
574
+ type: InputCalendarComponent,
575
+ decorators: [{
576
+ type: Component,
577
+ args: [{
578
+ changeDetection: ChangeDetectionStrategy.Eager,
579
+ standalone: true,
580
+ imports: [CommonModule, FormsModule],
581
+ selector: "wm-input[type=\"date\"], wm-input[type=\"datetime-local\"], wm-input[type=\"month\"], wm-input[type=\"time\"], wm-input[type=\"week\"]",
582
+ providers: [
583
+ provideAs(InputCalendarComponent, NG_VALUE_ACCESSOR, true),
584
+ provideAs(InputCalendarComponent, NG_VALIDATORS, true),
585
+ provideAsWidgetRef(InputCalendarComponent)
586
+ ],
587
+ template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel || type + ' field'\"\n [autofocus]=\"autofocus\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n #input>\n"
588
+ }]
589
+ }],
590
+ ctorParameters: () => [{ type: i0.Injector }, {
591
+ type: void 0,
592
+ decorators: [{
593
+ type: Inject,
594
+ args: ["EXPLICIT_CONTEXT"]
595
+ }, { type: Optional }]
596
+ }],
597
+ propDecorators: {
598
+ inputEl: [{
599
+ type: ViewChild,
600
+ args: ["input", { static: true }]
601
+ }],
602
+ ngModel: [{
603
+ type: ViewChild,
604
+ args: [NgModel]
605
+ }]
606
+ }
607
+ });
608
+ const inputColorTypeProps = /* @__PURE__ */ new Map([
609
+ ["autocomplete", {
610
+ value: true,
611
+ ...PROP_BOOLEAN
612
+ }],
613
+ ["autofocus", PROP_BOOLEAN],
614
+ ["autotrim", {
615
+ value: true,
616
+ ...PROP_BOOLEAN
617
+ }],
618
+ ["class", PROP_STRING],
619
+ ["datavaluesource", PROP_ANY],
620
+ ["datavalue", PROP_STRING],
621
+ ["disabled", PROP_BOOLEAN],
622
+ ["hint", PROP_STRING],
623
+ ["arialabel", PROP_STRING],
624
+ ["name", PROP_STRING],
625
+ ["placeholder", {
626
+ value: "Enter text",
627
+ ...PROP_STRING
628
+ }],
629
+ ["readonly", PROP_BOOLEAN],
630
+ ["required", PROP_BOOLEAN],
631
+ ["shortcutkey", PROP_STRING],
632
+ ["show", {
633
+ value: true,
634
+ ...PROP_BOOLEAN
635
+ }],
636
+ ["tabindex", {
637
+ value: 0,
638
+ ...PROP_NUMBER
639
+ }],
640
+ ["type", {
641
+ value: "color",
642
+ ...PROP_STRING
643
+ }],
644
+ ["updateon", PROP_STRING],
645
+ ["conditionalclass", PROP_ANY],
646
+ ["conditionalstyle", PROP_ANY]
737
647
  ]);
738
648
  const registerProps$3 = () => {
739
- register('wm-input-color', inputColorTypeProps);
649
+ register("wm-input-color", inputColorTypeProps);
740
650
  };
741
-
742
651
  const WIDGET_CONFIG$3 = {
743
- widgetType: 'wm-input-color',
744
- hostClass: 'app-input-wrapper'
652
+ widgetType: "wm-input-color",
653
+ hostClass: "app-input-wrapper"
745
654
  };
746
- class InputColorComponent extends BaseInput {
747
- static { this.initializeProps = registerProps$3(); }
748
- constructor(inj, explicitContext) {
749
- super(inj, WIDGET_CONFIG$3, explicitContext);
750
- }
751
- ngOnDestroy() {
752
- // MEMORY LEAK FIX: Clear ViewChild references
753
- this.inputEl = null;
754
- this.ngModel = null;
755
- // Call parent ngOnDestroy
756
- super.ngOnDestroy();
757
- }
758
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputColorComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
759
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: InputColorComponent, isStandalone: true, selector: "wm-input[type=\"color\"]", providers: [
760
- provideAs(InputColorComponent, NG_VALUE_ACCESSOR, true),
761
- provideAs(InputColorComponent, NG_VALIDATORS, true),
762
- provideAsWidgetRef(InputColorComponent)
763
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n #input>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
764
- }
765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputColorComponent, decorators: [{
766
- type: Component,
767
- args: [{ standalone: true, imports: [CommonModule, FormsModule], selector: 'wm-input[type="color"]', providers: [
768
- provideAs(InputColorComponent, NG_VALUE_ACCESSOR, true),
769
- provideAs(InputColorComponent, NG_VALIDATORS, true),
770
- provideAsWidgetRef(InputColorComponent)
771
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n #input>\n" }]
772
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
773
- type: Inject,
774
- args: ['EXPLICIT_CONTEXT']
775
- }, {
776
- type: Optional
777
- }] }], propDecorators: { inputEl: [{
778
- type: ViewChild,
779
- args: ['input', { static: true }]
780
- }], ngModel: [{
781
- type: ViewChild,
782
- args: [NgModel]
783
- }] } });
784
-
785
- const inputEmailTypeProps = new Map([
786
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
787
- ['autofocus', PROP_BOOLEAN],
788
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
789
- ['class', PROP_STRING],
790
- ['datavaluesource', PROP_ANY],
791
- ['datavalue', PROP_STRING],
792
- ['disabled', PROP_BOOLEAN],
793
- ['hint', PROP_STRING],
794
- ['arialabel', PROP_STRING],
795
- ['maxchars', PROP_NUMBER],
796
- ['name', PROP_STRING],
797
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
798
- ['readonly', PROP_BOOLEAN],
799
- ['regexp', PROP_STRING],
800
- ['required', PROP_BOOLEAN],
801
- ['shortcutkey', PROP_STRING],
802
- ['show', { value: true, ...PROP_BOOLEAN }],
803
- ['tabindex', { value: 0, ...PROP_NUMBER }],
804
- ['type', { value: 'email', ...PROP_STRING }],
805
- ['updateon', PROP_STRING],
806
- ['conditionalclass', PROP_ANY],
807
- ['conditionalstyle', PROP_ANY]
655
+ var InputColorComponent = class InputColorComponent extends BaseInput {
656
+ static {
657
+ this.initializeProps = registerProps$3();
658
+ }
659
+ constructor(inj, explicitContext) {
660
+ super(inj, WIDGET_CONFIG$3, explicitContext);
661
+ }
662
+ ngOnDestroy() {
663
+ this.inputEl = null;
664
+ this.ngModel = null;
665
+ super.ngOnDestroy();
666
+ }
667
+ static {
668
+ this.ɵfac = i0.ɵɵngDeclareFactory({
669
+ minVersion: "12.0.0",
670
+ version: "22.2.1",
671
+ ngImport: i0,
672
+ type: InputColorComponent,
673
+ deps: [{ token: i0.Injector }, {
674
+ token: "EXPLICIT_CONTEXT",
675
+ optional: true
676
+ }],
677
+ target: i0.ɵɵFactoryTarget.Component
678
+ });
679
+ }
680
+ static {
681
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
682
+ minVersion: "14.0.0",
683
+ version: "22.2.1",
684
+ type: InputColorComponent,
685
+ isStandalone: true,
686
+ selector: "wm-input[type=\"color\"]",
687
+ providers: [
688
+ provideAs(InputColorComponent, NG_VALUE_ACCESSOR, true),
689
+ provideAs(InputColorComponent, NG_VALIDATORS, true),
690
+ provideAsWidgetRef(InputColorComponent)
691
+ ],
692
+ viewQueries: [{
693
+ propertyName: "inputEl",
694
+ first: true,
695
+ predicate: ["input"],
696
+ descendants: true,
697
+ static: true
698
+ }, {
699
+ propertyName: "ngModel",
700
+ first: true,
701
+ predicate: NgModel,
702
+ descendants: true
703
+ }],
704
+ usesInheritance: true,
705
+ ngImport: i0,
706
+ template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n #input>\n",
707
+ dependencies: [
708
+ {
709
+ kind: "ngmodule",
710
+ type: CommonModule
711
+ },
712
+ {
713
+ kind: "directive",
714
+ type: i1.NgClass,
715
+ selector: "[ngClass]",
716
+ inputs: ["class", "ngClass"]
717
+ },
718
+ {
719
+ kind: "directive",
720
+ type: i1.NgStyle,
721
+ selector: "[ngStyle]",
722
+ inputs: ["ngStyle"]
723
+ },
724
+ {
725
+ kind: "ngmodule",
726
+ type: FormsModule
727
+ },
728
+ {
729
+ kind: "directive",
730
+ type: i2.DefaultValueAccessor,
731
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
732
+ },
733
+ {
734
+ kind: "directive",
735
+ type: i2.NgControlStatus,
736
+ selector: "[formControlName],[ngModel],[formControl]"
737
+ },
738
+ {
739
+ kind: "directive",
740
+ type: i2.RequiredValidator,
741
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
742
+ inputs: ["required"]
743
+ },
744
+ {
745
+ kind: "directive",
746
+ type: i2.MaxLengthValidator,
747
+ selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
748
+ inputs: ["maxlength"]
749
+ },
750
+ {
751
+ kind: "directive",
752
+ type: i2.NgModel,
753
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
754
+ inputs: [
755
+ "name",
756
+ "disabled",
757
+ "ngModel",
758
+ "ngModelOptions"
759
+ ],
760
+ outputs: ["ngModelChange"],
761
+ exportAs: ["ngModel"]
762
+ }
763
+ ],
764
+ changeDetection: i0.ChangeDetectionStrategy.Eager
765
+ });
766
+ }
767
+ };
768
+ i0.ɵɵngDeclareClassMetadata({
769
+ minVersion: "12.0.0",
770
+ version: "22.2.1",
771
+ ngImport: i0,
772
+ type: InputColorComponent,
773
+ decorators: [{
774
+ type: Component,
775
+ args: [{
776
+ changeDetection: ChangeDetectionStrategy.Eager,
777
+ standalone: true,
778
+ imports: [CommonModule, FormsModule],
779
+ selector: "wm-input[type=\"color\"]",
780
+ providers: [
781
+ provideAs(InputColorComponent, NG_VALUE_ACCESSOR, true),
782
+ provideAs(InputColorComponent, NG_VALIDATORS, true),
783
+ provideAsWidgetRef(InputColorComponent)
784
+ ],
785
+ template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n #input>\n"
786
+ }]
787
+ }],
788
+ ctorParameters: () => [{ type: i0.Injector }, {
789
+ type: void 0,
790
+ decorators: [{
791
+ type: Inject,
792
+ args: ["EXPLICIT_CONTEXT"]
793
+ }, { type: Optional }]
794
+ }],
795
+ propDecorators: {
796
+ inputEl: [{
797
+ type: ViewChild,
798
+ args: ["input", { static: true }]
799
+ }],
800
+ ngModel: [{
801
+ type: ViewChild,
802
+ args: [NgModel]
803
+ }]
804
+ }
805
+ });
806
+ const inputEmailTypeProps = /* @__PURE__ */ new Map([
807
+ ["autocomplete", {
808
+ value: true,
809
+ ...PROP_BOOLEAN
810
+ }],
811
+ ["autofocus", PROP_BOOLEAN],
812
+ ["autotrim", {
813
+ value: true,
814
+ ...PROP_BOOLEAN
815
+ }],
816
+ ["class", PROP_STRING],
817
+ ["datavaluesource", PROP_ANY],
818
+ ["datavalue", PROP_STRING],
819
+ ["disabled", PROP_BOOLEAN],
820
+ ["hint", PROP_STRING],
821
+ ["arialabel", PROP_STRING],
822
+ ["maxchars", PROP_NUMBER],
823
+ ["name", PROP_STRING],
824
+ ["placeholder", {
825
+ value: "Enter text",
826
+ ...PROP_STRING
827
+ }],
828
+ ["readonly", PROP_BOOLEAN],
829
+ ["regexp", PROP_STRING],
830
+ ["required", PROP_BOOLEAN],
831
+ ["shortcutkey", PROP_STRING],
832
+ ["show", {
833
+ value: true,
834
+ ...PROP_BOOLEAN
835
+ }],
836
+ ["tabindex", {
837
+ value: 0,
838
+ ...PROP_NUMBER
839
+ }],
840
+ ["type", {
841
+ value: "email",
842
+ ...PROP_STRING
843
+ }],
844
+ ["updateon", PROP_STRING],
845
+ ["conditionalclass", PROP_ANY],
846
+ ["conditionalstyle", PROP_ANY]
808
847
  ]);
809
848
  const registerProps$2 = () => {
810
- register('wm-input-email', inputEmailTypeProps);
849
+ register("wm-input-email", inputEmailTypeProps);
811
850
  };
812
-
813
851
  const WIDGET_CONFIG$2 = {
814
- widgetType: 'wm-input-email',
815
- hostClass: 'app-input-wrapper'
852
+ widgetType: "wm-input-email",
853
+ hostClass: "app-input-wrapper"
816
854
  };
817
- class InputEmailComponent extends BaseInput {
818
- static { this.initializeProps = registerProps$2(); }
819
- constructor(inj, explicitContext) {
820
- super(inj, WIDGET_CONFIG$2, explicitContext);
821
- }
822
- ngOnDestroy() {
823
- // MEMORY LEAK FIX: Clear ViewChild references
824
- this.inputEl = null;
825
- this.ngModel = null;
826
- // Call parent ngOnDestroy
827
- super.ngOnDestroy();
828
- }
829
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputEmailComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
830
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: InputEmailComponent, isStandalone: true, selector: "wm-input[type=\"email\"]", providers: [
831
- provideAs(InputEmailComponent, NG_VALUE_ACCESSOR, true),
832
- provideAs(InputEmailComponent, NG_VALIDATORS, true),
833
- provideAsWidgetRef(InputEmailComponent)
834
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n email\n #input>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
835
- }
836
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputEmailComponent, decorators: [{
837
- type: Component,
838
- args: [{ standalone: true, imports: [CommonModule, FormsModule], selector: 'wm-input[type="email"]', providers: [
839
- provideAs(InputEmailComponent, NG_VALUE_ACCESSOR, true),
840
- provideAs(InputEmailComponent, NG_VALIDATORS, true),
841
- provideAsWidgetRef(InputEmailComponent)
842
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n email\n #input>\n" }]
843
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
844
- type: Inject,
845
- args: ['EXPLICIT_CONTEXT']
846
- }, {
847
- type: Optional
848
- }] }], propDecorators: { inputEl: [{
849
- type: ViewChild,
850
- args: ['input', { static: true }]
851
- }], ngModel: [{
852
- type: ViewChild,
853
- args: [NgModel]
854
- }] } });
855
-
856
- const inputNumberTypeProps = new Map([
857
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
858
- ['autofocus', PROP_BOOLEAN],
859
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
860
- ['class', PROP_STRING],
861
- ['datavaluesource', PROP_ANY],
862
- ['datavalue', PROP_STRING],
863
- ['disabled', PROP_BOOLEAN],
864
- ['hint', PROP_STRING],
865
- ['arialabel', PROP_STRING],
866
- ['maxchars', PROP_NUMBER],
867
- ['maxvalue', PROP_NUMBER],
868
- ['minvalue', PROP_NUMBER],
869
- ['name', PROP_STRING],
870
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
871
- ['readonly', PROP_BOOLEAN],
872
- ['regexp', PROP_STRING],
873
- ['required', PROP_BOOLEAN],
874
- ['shortcutkey', PROP_STRING],
875
- ['show', { value: true, ...PROP_BOOLEAN }],
876
- ['step', PROP_NUMBER],
877
- ['tabindex', { value: 0, ...PROP_NUMBER }],
878
- ['type', { value: 'number', ...PROP_STRING }],
879
- ['updateon', PROP_STRING],
880
- ['conditionalclass', PROP_ANY],
881
- ['conditionalstyle', PROP_ANY]
855
+ var InputEmailComponent = class InputEmailComponent extends BaseInput {
856
+ static {
857
+ this.initializeProps = registerProps$2();
858
+ }
859
+ constructor(inj, explicitContext) {
860
+ super(inj, WIDGET_CONFIG$2, explicitContext);
861
+ }
862
+ ngOnDestroy() {
863
+ this.inputEl = null;
864
+ this.ngModel = null;
865
+ super.ngOnDestroy();
866
+ }
867
+ static {
868
+ this.ɵfac = i0.ɵɵngDeclareFactory({
869
+ minVersion: "12.0.0",
870
+ version: "22.2.1",
871
+ ngImport: i0,
872
+ type: InputEmailComponent,
873
+ deps: [{ token: i0.Injector }, {
874
+ token: "EXPLICIT_CONTEXT",
875
+ optional: true
876
+ }],
877
+ target: i0.ɵɵFactoryTarget.Component
878
+ });
879
+ }
880
+ static {
881
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
882
+ minVersion: "14.0.0",
883
+ version: "22.2.1",
884
+ type: InputEmailComponent,
885
+ isStandalone: true,
886
+ selector: "wm-input[type=\"email\"]",
887
+ providers: [
888
+ provideAs(InputEmailComponent, NG_VALUE_ACCESSOR, true),
889
+ provideAs(InputEmailComponent, NG_VALIDATORS, true),
890
+ provideAsWidgetRef(InputEmailComponent)
891
+ ],
892
+ viewQueries: [{
893
+ propertyName: "inputEl",
894
+ first: true,
895
+ predicate: ["input"],
896
+ descendants: true,
897
+ static: true
898
+ }, {
899
+ propertyName: "ngModel",
900
+ first: true,
901
+ predicate: NgModel,
902
+ descendants: true
903
+ }],
904
+ usesInheritance: true,
905
+ ngImport: i0,
906
+ template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n email\n #input>\n",
907
+ dependencies: [
908
+ {
909
+ kind: "ngmodule",
910
+ type: CommonModule
911
+ },
912
+ {
913
+ kind: "directive",
914
+ type: i1.NgClass,
915
+ selector: "[ngClass]",
916
+ inputs: ["class", "ngClass"]
917
+ },
918
+ {
919
+ kind: "directive",
920
+ type: i1.NgStyle,
921
+ selector: "[ngStyle]",
922
+ inputs: ["ngStyle"]
923
+ },
924
+ {
925
+ kind: "ngmodule",
926
+ type: FormsModule
927
+ },
928
+ {
929
+ kind: "directive",
930
+ type: i2.DefaultValueAccessor,
931
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
932
+ },
933
+ {
934
+ kind: "directive",
935
+ type: i2.NgControlStatus,
936
+ selector: "[formControlName],[ngModel],[formControl]"
937
+ },
938
+ {
939
+ kind: "directive",
940
+ type: i2.RequiredValidator,
941
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
942
+ inputs: ["required"]
943
+ },
944
+ {
945
+ kind: "directive",
946
+ type: i2.MaxLengthValidator,
947
+ selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
948
+ inputs: ["maxlength"]
949
+ },
950
+ {
951
+ kind: "directive",
952
+ type: i2.PatternValidator,
953
+ selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",
954
+ inputs: ["pattern"]
955
+ },
956
+ {
957
+ kind: "directive",
958
+ type: i2.EmailValidator,
959
+ selector: "[email][formControlName],[email][formControl],[email][ngModel]",
960
+ inputs: ["email"]
961
+ },
962
+ {
963
+ kind: "directive",
964
+ type: i2.NgModel,
965
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
966
+ inputs: [
967
+ "name",
968
+ "disabled",
969
+ "ngModel",
970
+ "ngModelOptions"
971
+ ],
972
+ outputs: ["ngModelChange"],
973
+ exportAs: ["ngModel"]
974
+ }
975
+ ],
976
+ changeDetection: i0.ChangeDetectionStrategy.Eager
977
+ });
978
+ }
979
+ };
980
+ i0.ɵɵngDeclareClassMetadata({
981
+ minVersion: "12.0.0",
982
+ version: "22.2.1",
983
+ ngImport: i0,
984
+ type: InputEmailComponent,
985
+ decorators: [{
986
+ type: Component,
987
+ args: [{
988
+ changeDetection: ChangeDetectionStrategy.Eager,
989
+ standalone: true,
990
+ imports: [CommonModule, FormsModule],
991
+ selector: "wm-input[type=\"email\"]",
992
+ providers: [
993
+ provideAs(InputEmailComponent, NG_VALUE_ACCESSOR, true),
994
+ provideAs(InputEmailComponent, NG_VALIDATORS, true),
995
+ provideAsWidgetRef(InputEmailComponent)
996
+ ],
997
+ template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n email\n #input>\n"
998
+ }]
999
+ }],
1000
+ ctorParameters: () => [{ type: i0.Injector }, {
1001
+ type: void 0,
1002
+ decorators: [{
1003
+ type: Inject,
1004
+ args: ["EXPLICIT_CONTEXT"]
1005
+ }, { type: Optional }]
1006
+ }],
1007
+ propDecorators: {
1008
+ inputEl: [{
1009
+ type: ViewChild,
1010
+ args: ["input", { static: true }]
1011
+ }],
1012
+ ngModel: [{
1013
+ type: ViewChild,
1014
+ args: [NgModel]
1015
+ }]
1016
+ }
1017
+ });
1018
+ const inputNumberTypeProps = /* @__PURE__ */ new Map([
1019
+ ["autocomplete", {
1020
+ value: true,
1021
+ ...PROP_BOOLEAN
1022
+ }],
1023
+ ["autofocus", PROP_BOOLEAN],
1024
+ ["autotrim", {
1025
+ value: true,
1026
+ ...PROP_BOOLEAN
1027
+ }],
1028
+ ["class", PROP_STRING],
1029
+ ["datavaluesource", PROP_ANY],
1030
+ ["datavalue", PROP_STRING],
1031
+ ["disabled", PROP_BOOLEAN],
1032
+ ["hint", PROP_STRING],
1033
+ ["arialabel", PROP_STRING],
1034
+ ["maxchars", PROP_NUMBER],
1035
+ ["maxvalue", PROP_NUMBER],
1036
+ ["minvalue", PROP_NUMBER],
1037
+ ["name", PROP_STRING],
1038
+ ["placeholder", {
1039
+ value: "Enter text",
1040
+ ...PROP_STRING
1041
+ }],
1042
+ ["readonly", PROP_BOOLEAN],
1043
+ ["regexp", PROP_STRING],
1044
+ ["required", PROP_BOOLEAN],
1045
+ ["shortcutkey", PROP_STRING],
1046
+ ["show", {
1047
+ value: true,
1048
+ ...PROP_BOOLEAN
1049
+ }],
1050
+ ["step", PROP_NUMBER],
1051
+ ["tabindex", {
1052
+ value: 0,
1053
+ ...PROP_NUMBER
1054
+ }],
1055
+ ["type", {
1056
+ value: "number",
1057
+ ...PROP_STRING
1058
+ }],
1059
+ ["updateon", PROP_STRING],
1060
+ ["conditionalclass", PROP_ANY],
1061
+ ["conditionalstyle", PROP_ANY]
882
1062
  ]);
883
1063
  const registerProps$1 = () => {
884
- register('wm-input-number', inputNumberTypeProps);
1064
+ register("wm-input-number", inputNumberTypeProps);
885
1065
  };
886
-
887
- const inputTextTypeProps = new Map([
888
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
889
- ['autofocus', PROP_BOOLEAN],
890
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
891
- ['class', PROP_STRING],
892
- ['datavaluesource', PROP_ANY],
893
- ['datavalue', PROP_STRING],
894
- ['disabled', PROP_BOOLEAN],
895
- ['displayformat', PROP_STRING],
896
- ['hint', PROP_STRING],
897
- ['arialabel', PROP_STRING],
898
- ['maxchars', PROP_NUMBER],
899
- ['name', PROP_STRING],
900
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
901
- ['readonly', PROP_BOOLEAN],
902
- ['regexp', PROP_STRING],
903
- ['required', PROP_BOOLEAN],
904
- ['shortcutkey', PROP_STRING],
905
- ['show', { value: true, ...PROP_BOOLEAN }],
906
- ['showdisplayformaton', { value: 'always', ...PROP_ANY }],
907
- ['tabindex', { value: 0, ...PROP_NUMBER }],
908
- ['type', { value: 'text', ...PROP_STRING }],
909
- ['updateon', PROP_STRING],
910
- ['conditionalclass', PROP_ANY],
911
- ['conditionalstyle', PROP_ANY],
912
- ['trailingiconclass', PROP_STRING],
913
- ['leadingiconclass', PROP_STRING],
914
- ['leadingiconurl', PROP_STRING],
915
- ['trailingiconurl', PROP_STRING]
1066
+ const inputTextTypeProps = /* @__PURE__ */ new Map([
1067
+ ["autocomplete", {
1068
+ value: true,
1069
+ ...PROP_BOOLEAN
1070
+ }],
1071
+ ["autofocus", PROP_BOOLEAN],
1072
+ ["autotrim", {
1073
+ value: true,
1074
+ ...PROP_BOOLEAN
1075
+ }],
1076
+ ["class", PROP_STRING],
1077
+ ["datavaluesource", PROP_ANY],
1078
+ ["datavalue", PROP_STRING],
1079
+ ["disabled", PROP_BOOLEAN],
1080
+ ["displayformat", PROP_STRING],
1081
+ ["hint", PROP_STRING],
1082
+ ["arialabel", PROP_STRING],
1083
+ ["maxchars", PROP_NUMBER],
1084
+ ["name", PROP_STRING],
1085
+ ["placeholder", {
1086
+ value: "Enter text",
1087
+ ...PROP_STRING
1088
+ }],
1089
+ ["readonly", PROP_BOOLEAN],
1090
+ ["regexp", PROP_STRING],
1091
+ ["required", PROP_BOOLEAN],
1092
+ ["shortcutkey", PROP_STRING],
1093
+ ["show", {
1094
+ value: true,
1095
+ ...PROP_BOOLEAN
1096
+ }],
1097
+ ["showdisplayformaton", {
1098
+ value: "always",
1099
+ ...PROP_ANY
1100
+ }],
1101
+ ["tabindex", {
1102
+ value: 0,
1103
+ ...PROP_NUMBER
1104
+ }],
1105
+ ["type", {
1106
+ value: "text",
1107
+ ...PROP_STRING
1108
+ }],
1109
+ ["updateon", PROP_STRING],
1110
+ ["conditionalclass", PROP_ANY],
1111
+ ["conditionalstyle", PROP_ANY],
1112
+ ["trailingiconclass", PROP_STRING],
1113
+ ["leadingiconclass", PROP_STRING],
1114
+ ["leadingiconurl", PROP_STRING],
1115
+ ["trailingiconurl", PROP_STRING]
916
1116
  ]);
917
1117
  const registerProps = () => {
918
- register('wm-input-text', inputTextTypeProps);
919
- registerFormWidget(FormWidgetType.PASSWORD, new Map(inputTextTypeProps));
920
- const formTextProps = new Map(inputTextTypeProps);
921
- const mergeTextProps = (typeProps) => {
922
- typeProps.forEach((v, k) => formTextProps.set(k, v));
923
- };
924
- mergeTextProps(inputCalendarTypeProps);
925
- mergeTextProps(inputColorTypeProps);
926
- mergeTextProps(inputEmailTypeProps);
927
- mergeTextProps(inputNumberTypeProps);
928
- registerFormWidget(FormWidgetType.TEXT, new Map(formTextProps));
1118
+ register("wm-input-text", inputTextTypeProps);
1119
+ registerFormWidget(FormWidgetType.PASSWORD, new Map(inputTextTypeProps));
1120
+ const formTextProps = new Map(inputTextTypeProps);
1121
+ const mergeTextProps = (typeProps) => {
1122
+ typeProps.forEach((v, k) => formTextProps.set(k, v));
1123
+ };
1124
+ mergeTextProps(inputCalendarTypeProps);
1125
+ mergeTextProps(inputColorTypeProps);
1126
+ mergeTextProps(inputEmailTypeProps);
1127
+ mergeTextProps(inputNumberTypeProps);
1128
+ registerFormWidget(FormWidgetType.TEXT, new Map(formTextProps));
929
1129
  };
930
-
931
1130
  const WIDGET_CONFIG$1 = {
932
- widgetType: 'wm-input-text',
933
- hostClass: 'app-input-wrapper'
1131
+ widgetType: "wm-input-text",
1132
+ hostClass: "app-input-wrapper"
934
1133
  };
935
- class InputTextComponent extends BaseInput {
936
- static { this.initializeProps = registerProps(); }
937
- constructor(inj, explicitContext) {
938
- super(inj, WIDGET_CONFIG$1, explicitContext);
939
- this.lazy = false;
940
- }
941
- /* Define the property change handler. This function will be triggered when there is a change in the widget property */
942
- onPropertyChange(key, nv, ov) {
943
- /*Monitoring changes for styles or properties and accordingly handling respective changes.*/
944
- switch (key) {
945
- case 'displayformat':
946
- this.maskVal = this.displayformat;
947
- this.checkForDisplayFormat();
948
- break;
949
- case 'showdisplayformaton':
950
- this.lazy = nv === 'keypress' ? true : false;
951
- break;
952
- default:
953
- super.onPropertyChange(key, nv, ov);
954
- }
955
- }
956
- get computedClasses() {
957
- return { 'with-leading-icon': this.leadingiconclass || this.leadingiconurl, 'with-trailing-icon': this.trailingiconclass || this.trailingiconurl,
958
- ...(typeof this.conditionalclass === 'string' ? { [this.conditionalclass]: true } : this.conditionalclass || {}) };
959
- }
960
- get mask() {
961
- if (this.displayformat && (!this.placeholder || (this.placeholder && this.isFocused))) {
962
- return {
963
- mask: this.maskVal,
964
- lazy: this.lazy,
965
- definitions: {
966
- '9': /\d/,
967
- 'A': /[a-zA-Z]/,
968
- 'a': /[a-z]/,
969
- '*': /\w/
970
- }
971
- };
972
- }
973
- else {
974
- return false;
975
- }
976
- }
977
- // show display format on focus or when it has a data value present. Else show the placeholder
978
- checkForDisplayFormat($event) {
979
- if (this.displayformat) {
980
- this.isFocused = (($event && $event.type === 'focus') || this.datavalue) ? true : false;
981
- // Do not show format placeholder when no value is present on blur
982
- if (!this.isFocused && this.imask?.maskRef) {
983
- this.imask.maskRef.updateOptions({ lazy: true });
984
- // on blur, when no value is present assign maskref to null, as in some cases (where format palceholder starts with pranthesis) the format placeholder is still shown. WMS-20124
985
- if (!this.datavalue && this.imask.maskRef.value) {
986
- this.imask.maskRef.value = this.datavalue;
987
- }
988
- }
989
- else {
990
- // when display format is dynamically populated, cursor position is at the end of the format, readjusting the cursor position based on masked input value
991
- // Adding timeout, as the below code should be on hold until imask model is generated
992
- setTimeout(() => {
993
- if (this.imask?.maskRef?.value) {
994
- const maskValIndex = this.imask.maskRef.value.indexOf('_');
995
- const enteredMaskVal = maskValIndex >= 0 ? this.imask.maskRef.value.slice(0, maskValIndex).length : this.imask.maskRef.value.length;
996
- if (enteredMaskVal !== this.imask.maskRef.cursorPos) {
997
- this.imask.maskRef.updateCursor(enteredMaskVal);
998
- }
999
- }
1000
- }, 50);
1001
- }
1002
- }
1003
- else if (this.imask?.maskRef) { // When display format is bound via condition, remove the placeholder when the format is not applicable
1004
- this.imask.maskRef.updateOptions({ lazy: true });
1005
- // when display format is removed assign input value to the datavalue attr. WMS-20124
1006
- this.inputEl.nativeElement.value = this.datavalue;
1007
- }
1008
- }
1009
- ngOnInit() {
1010
- super.ngOnInit();
1011
- this.isFocused = !!this.datavalue;
1012
- }
1013
- iconClickEvent($event, type) {
1014
- this.invokeEventCallback(type, { $event });
1015
- }
1016
- ngOnDestroy() {
1017
- // MEMORY LEAK FIX: Clear all ViewChild references
1018
- this.inputEl = null;
1019
- this.ngModel = null;
1020
- this.imask = null;
1021
- // Call parent ngOnDestroy (BaseInput → BaseFormCustomComponent → StylableComponent → BaseComponent)
1022
- super.ngOnDestroy();
1023
- }
1024
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputTextComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1025
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: InputTextComponent, isStandalone: true, selector: "wm-input[type=\"text\"], wm-input:not([type]), wm-input[type=\"password\"], wm-input[type=\"search\"], wm-input[type=\"tel\"], wm-input[type=\"url\"]", providers: [
1026
- provideAs(InputTextComponent, NG_VALUE_ACCESSOR, true),
1027
- provideAs(InputTextComponent, NG_VALIDATORS, true),
1028
- provideAsWidgetRef(InputTextComponent)
1029
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }, { propertyName: "imask", first: true, predicate: ["input"], descendants: true, read: IMaskDirective }], usesInheritance: true, ngImport: i0, template: "<button class=\"btn-leading-icon\" type=\"button\" name=\"leadingIcon\" *ngIf=\"leadingiconclass || leadingiconurl\" (click)=\"iconClickEvent($event, 'leadingiconclick')\">\n <wm-app-icon [iconclass]=\"leadingiconclass\" [iconurl]=\"leadingiconurl\"></wm-app-icon>\n</button>\n<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [(ngModel)]=\"datavalue\"\n [imask]=\"mask\"\n [unmask]=\"true\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"computedClasses\"\n [ngStyle]=\"conditionalstyle\"\n (ngModelChange)=\"handleChange($event)\"\n (blur)=\"handleBlur($event); checkForDisplayFormat($event)\"\n (focus)=\"checkForDisplayFormat($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n #input>\n<button class=\"btn-trailing-icon\" type=\"button\" name=\"trailingIcon\" *ngIf=\"trailingiconclass || trailingiconurl\" (click)=\"iconClickEvent($event, 'trailingiconclick')\">\n <wm-app-icon [iconclass]=\"trailingiconclass\" [iconurl]=\"trailingiconurl\"></wm-app-icon>\n</button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: IMaskModule }, { kind: "directive", type: i3.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["icon", "iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
1030
- }
1031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputTextComponent, decorators: [{
1032
- type: Component,
1033
- args: [{ standalone: true, imports: [CommonModule, FormsModule, IMaskModule, WmAppIconComponent], selector: 'wm-input[type="text"], wm-input:not([type]), wm-input[type="password"], wm-input[type="search"], wm-input[type="tel"], wm-input[type="url"]', providers: [
1034
- provideAs(InputTextComponent, NG_VALUE_ACCESSOR, true),
1035
- provideAs(InputTextComponent, NG_VALIDATORS, true),
1036
- provideAsWidgetRef(InputTextComponent)
1037
- ], template: "<button class=\"btn-leading-icon\" type=\"button\" name=\"leadingIcon\" *ngIf=\"leadingiconclass || leadingiconurl\" (click)=\"iconClickEvent($event, 'leadingiconclick')\">\n <wm-app-icon [iconclass]=\"leadingiconclass\" [iconurl]=\"leadingiconurl\"></wm-app-icon>\n</button>\n<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [(ngModel)]=\"datavalue\"\n [imask]=\"mask\"\n [unmask]=\"true\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"computedClasses\"\n [ngStyle]=\"conditionalstyle\"\n (ngModelChange)=\"handleChange($event)\"\n (blur)=\"handleBlur($event); checkForDisplayFormat($event)\"\n (focus)=\"checkForDisplayFormat($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n #input>\n<button class=\"btn-trailing-icon\" type=\"button\" name=\"trailingIcon\" *ngIf=\"trailingiconclass || trailingiconurl\" (click)=\"iconClickEvent($event, 'trailingiconclick')\">\n <wm-app-icon [iconclass]=\"trailingiconclass\" [iconurl]=\"trailingiconurl\"></wm-app-icon>\n</button>\n" }]
1038
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
1039
- type: Inject,
1040
- args: ['EXPLICIT_CONTEXT']
1041
- }, {
1042
- type: Optional
1043
- }] }], propDecorators: { inputEl: [{
1044
- type: ViewChild,
1045
- args: ['input', { static: true }]
1046
- }], ngModel: [{
1047
- type: ViewChild,
1048
- args: [NgModel]
1049
- }], imask: [{
1050
- type: ViewChild,
1051
- args: ['input', { read: IMaskDirective }]
1052
- }] } });
1053
-
1134
+ var InputTextComponent = class InputTextComponent extends BaseInput {
1135
+ static {
1136
+ this.initializeProps = registerProps();
1137
+ }
1138
+ constructor(inj, explicitContext) {
1139
+ super(inj, WIDGET_CONFIG$1, explicitContext);
1140
+ this.lazy = false;
1141
+ }
1142
+ onPropertyChange(key, nv, ov) {
1143
+ switch (key) {
1144
+ case "displayformat":
1145
+ this.maskVal = this.displayformat;
1146
+ this.checkForDisplayFormat();
1147
+ break;
1148
+ case "showdisplayformaton":
1149
+ this.lazy = nv === "keypress" ? true : false;
1150
+ break;
1151
+ default: super.onPropertyChange(key, nv, ov);
1152
+ }
1153
+ }
1154
+ get computedClasses() {
1155
+ return {
1156
+ "with-leading-icon": this.leadingiconclass || this.leadingiconurl,
1157
+ "with-trailing-icon": this.trailingiconclass || this.trailingiconurl,
1158
+ ...typeof this.conditionalclass === "string" ? { [this.conditionalclass]: true } : this.conditionalclass || {}
1159
+ };
1160
+ }
1161
+ get mask() {
1162
+ if (this.displayformat && (!this.placeholder || this.placeholder && this.isFocused)) return {
1163
+ mask: this.maskVal,
1164
+ lazy: this.lazy,
1165
+ definitions: {
1166
+ "9": /\d/,
1167
+ "A": /[a-zA-Z]/,
1168
+ "a": /[a-z]/,
1169
+ "*": /\w/
1170
+ }
1171
+ };
1172
+ else return false;
1173
+ }
1174
+ checkForDisplayFormat($event) {
1175
+ if (this.displayformat) {
1176
+ this.isFocused = $event && $event.type === "focus" || this.datavalue ? true : false;
1177
+ if (!this.isFocused && this.imask?.maskRef) {
1178
+ this.imask.maskRef.updateOptions({ lazy: true });
1179
+ if (!this.datavalue && this.imask.maskRef.value) this.imask.maskRef.value = this.datavalue;
1180
+ } else setTimeout(() => {
1181
+ if (this.imask?.maskRef?.value) {
1182
+ const maskValIndex = this.imask.maskRef.value.indexOf("_");
1183
+ const enteredMaskVal = maskValIndex >= 0 ? this.imask.maskRef.value.slice(0, maskValIndex).length : this.imask.maskRef.value.length;
1184
+ if (enteredMaskVal !== this.imask.maskRef.cursorPos) this.imask.maskRef.updateCursor(enteredMaskVal);
1185
+ }
1186
+ }, 50);
1187
+ } else if (this.imask?.maskRef) {
1188
+ this.imask.maskRef.updateOptions({ lazy: true });
1189
+ this.inputEl.nativeElement.value = this.datavalue;
1190
+ }
1191
+ }
1192
+ ngOnInit() {
1193
+ super.ngOnInit();
1194
+ this.isFocused = !!this.datavalue;
1195
+ }
1196
+ iconClickEvent($event, type) {
1197
+ this.invokeEventCallback(type, { $event });
1198
+ }
1199
+ ngOnDestroy() {
1200
+ this.inputEl = null;
1201
+ this.ngModel = null;
1202
+ this.imask = null;
1203
+ super.ngOnDestroy();
1204
+ }
1205
+ static {
1206
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1207
+ minVersion: "12.0.0",
1208
+ version: "22.2.1",
1209
+ ngImport: i0,
1210
+ type: InputTextComponent,
1211
+ deps: [{ token: i0.Injector }, {
1212
+ token: "EXPLICIT_CONTEXT",
1213
+ optional: true
1214
+ }],
1215
+ target: i0.ɵɵFactoryTarget.Component
1216
+ });
1217
+ }
1218
+ static {
1219
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1220
+ minVersion: "14.0.0",
1221
+ version: "22.2.1",
1222
+ type: InputTextComponent,
1223
+ isStandalone: true,
1224
+ selector: "wm-input[type=\"text\"], wm-input:not([type]), wm-input[type=\"password\"], wm-input[type=\"search\"], wm-input[type=\"tel\"], wm-input[type=\"url\"]",
1225
+ providers: [
1226
+ provideAs(InputTextComponent, NG_VALUE_ACCESSOR, true),
1227
+ provideAs(InputTextComponent, NG_VALIDATORS, true),
1228
+ provideAsWidgetRef(InputTextComponent)
1229
+ ],
1230
+ viewQueries: [
1231
+ {
1232
+ propertyName: "inputEl",
1233
+ first: true,
1234
+ predicate: ["input"],
1235
+ descendants: true,
1236
+ static: true
1237
+ },
1238
+ {
1239
+ propertyName: "ngModel",
1240
+ first: true,
1241
+ predicate: NgModel,
1242
+ descendants: true
1243
+ },
1244
+ {
1245
+ propertyName: "imask",
1246
+ first: true,
1247
+ predicate: ["input"],
1248
+ descendants: true,
1249
+ read: IMaskDirective
1250
+ }
1251
+ ],
1252
+ usesInheritance: true,
1253
+ ngImport: i0,
1254
+ template: "<button class=\"btn-leading-icon\" type=\"button\" name=\"leadingIcon\" *ngIf=\"leadingiconclass || leadingiconurl\" (click)=\"iconClickEvent($event, 'leadingiconclick')\">\n <wm-app-icon [iconclass]=\"leadingiconclass\" [iconurl]=\"leadingiconurl\"></wm-app-icon>\n</button>\n<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [(ngModel)]=\"datavalue\"\n [imask]=\"mask\"\n [unmask]=\"true\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"computedClasses\"\n [ngStyle]=\"conditionalstyle\"\n (ngModelChange)=\"handleChange($event)\"\n (blur)=\"handleBlur($event); checkForDisplayFormat($event)\"\n (focus)=\"checkForDisplayFormat($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n #input>\n<button class=\"btn-trailing-icon\" type=\"button\" name=\"trailingIcon\" *ngIf=\"trailingiconclass || trailingiconurl\" (click)=\"iconClickEvent($event, 'trailingiconclick')\">\n <wm-app-icon [iconclass]=\"trailingiconclass\" [iconurl]=\"trailingiconurl\"></wm-app-icon>\n</button>\n",
1255
+ dependencies: [
1256
+ {
1257
+ kind: "ngmodule",
1258
+ type: CommonModule
1259
+ },
1260
+ {
1261
+ kind: "directive",
1262
+ type: i1.NgClass,
1263
+ selector: "[ngClass]",
1264
+ inputs: ["class", "ngClass"]
1265
+ },
1266
+ {
1267
+ kind: "directive",
1268
+ type: i1.NgIf,
1269
+ selector: "[ngIf]",
1270
+ inputs: [
1271
+ "ngIf",
1272
+ "ngIfThen",
1273
+ "ngIfElse"
1274
+ ]
1275
+ },
1276
+ {
1277
+ kind: "directive",
1278
+ type: i1.NgStyle,
1279
+ selector: "[ngStyle]",
1280
+ inputs: ["ngStyle"]
1281
+ },
1282
+ {
1283
+ kind: "ngmodule",
1284
+ type: FormsModule
1285
+ },
1286
+ {
1287
+ kind: "directive",
1288
+ type: i2.DefaultValueAccessor,
1289
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
1290
+ },
1291
+ {
1292
+ kind: "directive",
1293
+ type: i2.NgControlStatus,
1294
+ selector: "[formControlName],[ngModel],[formControl]"
1295
+ },
1296
+ {
1297
+ kind: "directive",
1298
+ type: i2.RequiredValidator,
1299
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
1300
+ inputs: ["required"]
1301
+ },
1302
+ {
1303
+ kind: "directive",
1304
+ type: i2.MaxLengthValidator,
1305
+ selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
1306
+ inputs: ["maxlength"]
1307
+ },
1308
+ {
1309
+ kind: "directive",
1310
+ type: i2.PatternValidator,
1311
+ selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",
1312
+ inputs: ["pattern"]
1313
+ },
1314
+ {
1315
+ kind: "directive",
1316
+ type: i2.NgModel,
1317
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
1318
+ inputs: [
1319
+ "name",
1320
+ "disabled",
1321
+ "ngModel",
1322
+ "ngModelOptions"
1323
+ ],
1324
+ outputs: ["ngModelChange"],
1325
+ exportAs: ["ngModel"]
1326
+ },
1327
+ {
1328
+ kind: "ngmodule",
1329
+ type: IMaskModule
1330
+ },
1331
+ {
1332
+ kind: "directive",
1333
+ type: i3.IMaskDirective,
1334
+ selector: "[imask]",
1335
+ inputs: [
1336
+ "imask",
1337
+ "unmask",
1338
+ "imaskElement"
1339
+ ],
1340
+ outputs: ["accept", "complete"],
1341
+ exportAs: ["imask"]
1342
+ },
1343
+ {
1344
+ kind: "component",
1345
+ type: WmAppIconComponent,
1346
+ selector: "wm-app-icon",
1347
+ inputs: [
1348
+ "icon",
1349
+ "iconclass",
1350
+ "iconurl",
1351
+ "defaultIconClass",
1352
+ "defaultClasses",
1353
+ "iconStyle",
1354
+ "alt"
1355
+ ]
1356
+ }
1357
+ ],
1358
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1359
+ });
1360
+ }
1361
+ };
1362
+ i0.ɵɵngDeclareClassMetadata({
1363
+ minVersion: "12.0.0",
1364
+ version: "22.2.1",
1365
+ ngImport: i0,
1366
+ type: InputTextComponent,
1367
+ decorators: [{
1368
+ type: Component,
1369
+ args: [{
1370
+ changeDetection: ChangeDetectionStrategy.Eager,
1371
+ standalone: true,
1372
+ imports: [
1373
+ CommonModule,
1374
+ FormsModule,
1375
+ IMaskModule,
1376
+ WmAppIconComponent
1377
+ ],
1378
+ selector: "wm-input[type=\"text\"], wm-input:not([type]), wm-input[type=\"password\"], wm-input[type=\"search\"], wm-input[type=\"tel\"], wm-input[type=\"url\"]",
1379
+ providers: [
1380
+ provideAs(InputTextComponent, NG_VALUE_ACCESSOR, true),
1381
+ provideAs(InputTextComponent, NG_VALIDATORS, true),
1382
+ provideAsWidgetRef(InputTextComponent)
1383
+ ],
1384
+ template: "<button class=\"btn-leading-icon\" type=\"button\" name=\"leadingIcon\" *ngIf=\"leadingiconclass || leadingiconurl\" (click)=\"iconClickEvent($event, 'leadingiconclick')\">\n <wm-app-icon [iconclass]=\"leadingiconclass\" [iconurl]=\"leadingiconurl\"></wm-app-icon>\n</button>\n<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [(ngModel)]=\"datavalue\"\n [imask]=\"mask\"\n [unmask]=\"true\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"computedClasses\"\n [ngStyle]=\"conditionalstyle\"\n (ngModelChange)=\"handleChange($event)\"\n (blur)=\"handleBlur($event); checkForDisplayFormat($event)\"\n (focus)=\"checkForDisplayFormat($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n #input>\n<button class=\"btn-trailing-icon\" type=\"button\" name=\"trailingIcon\" *ngIf=\"trailingiconclass || trailingiconurl\" (click)=\"iconClickEvent($event, 'trailingiconclick')\">\n <wm-app-icon [iconclass]=\"trailingiconclass\" [iconurl]=\"trailingiconurl\"></wm-app-icon>\n</button>\n"
1385
+ }]
1386
+ }],
1387
+ ctorParameters: () => [{ type: i0.Injector }, {
1388
+ type: void 0,
1389
+ decorators: [{
1390
+ type: Inject,
1391
+ args: ["EXPLICIT_CONTEXT"]
1392
+ }, { type: Optional }]
1393
+ }],
1394
+ propDecorators: {
1395
+ inputEl: [{
1396
+ type: ViewChild,
1397
+ args: ["input", { static: true }]
1398
+ }],
1399
+ ngModel: [{
1400
+ type: ViewChild,
1401
+ args: [NgModel]
1402
+ }],
1403
+ imask: [{
1404
+ type: ViewChild,
1405
+ args: ["input", { read: IMaskDirective }]
1406
+ }]
1407
+ }
1408
+ });
1054
1409
  const WIDGET_CONFIG = {
1055
- widgetType: 'wm-input-number',
1056
- hostClass: 'app-input-wrapper'
1410
+ widgetType: "wm-input-number",
1411
+ hostClass: "app-input-wrapper"
1057
1412
  };
1058
- class InputNumberComponent extends BaseInput {
1059
- static { this.initializeProps = registerProps$1(); }
1060
- constructor(inj, explicitContext) {
1061
- super(inj, WIDGET_CONFIG, explicitContext);
1062
- }
1063
- onArrowPress($event) {
1064
- if (this.step === 0) {
1065
- $event.preventDefault();
1066
- }
1067
- }
1068
- validateInputEntry($event) {
1069
- if ($event.key === 'e' && $event.target.value.indexOf($event.key) !== -1) {
1070
- return false;
1071
- }
1072
- }
1073
- ngOnDestroy() {
1074
- // MEMORY LEAK FIX: Clear ViewChild references
1075
- this.inputEl = null;
1076
- this.ngModel = null;
1077
- // Call parent ngOnDestroy
1078
- super.ngOnDestroy();
1079
- }
1080
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputNumberComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1081
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: InputNumberComponent, isStandalone: true, selector: "wm-input[type=\"number\"]", providers: [
1082
- provideAs(InputNumberComponent, NG_VALUE_ACCESSOR, true),
1083
- provideAs(InputNumberComponent, NG_VALIDATORS, true),
1084
- provideAsWidgetRef(InputNumberComponent)
1085
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "<input class=\"form-control app-textbox\"\n [ngClass]=\"{'step-hidden': step === 0}\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n (keydown.ArrowUp)=\"onArrowPress($event)\"\n (keydown.ArrowDown)=\"onArrowPress($event)\"\n (keypress)=\"validateInputEntry($event)\"\n #input>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1086
- }
1087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: InputNumberComponent, decorators: [{
1088
- type: Component,
1089
- args: [{ standalone: true, imports: [CommonModule, FormsModule], selector: 'wm-input[type="number"]', providers: [
1090
- provideAs(InputNumberComponent, NG_VALUE_ACCESSOR, true),
1091
- provideAs(InputNumberComponent, NG_VALIDATORS, true),
1092
- provideAsWidgetRef(InputNumberComponent)
1093
- ], template: "<input class=\"form-control app-textbox\"\n [ngClass]=\"{'step-hidden': step === 0}\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n (keydown.ArrowUp)=\"onArrowPress($event)\"\n (keydown.ArrowDown)=\"onArrowPress($event)\"\n (keypress)=\"validateInputEntry($event)\"\n #input>\n" }]
1094
- }], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
1095
- type: Inject,
1096
- args: ['EXPLICIT_CONTEXT']
1097
- }, {
1098
- type: Optional
1099
- }] }], propDecorators: { inputEl: [{
1100
- type: ViewChild,
1101
- args: ['input', { static: true }]
1102
- }], ngModel: [{
1103
- type: ViewChild,
1104
- args: [NgModel]
1105
- }] } });
1106
-
1107
- /**
1108
- * Generated bundle index. Do not edit.
1109
- */
1110
-
1413
+ var InputNumberComponent = class InputNumberComponent extends BaseInput {
1414
+ static {
1415
+ this.initializeProps = registerProps$1();
1416
+ }
1417
+ constructor(inj, explicitContext) {
1418
+ super(inj, WIDGET_CONFIG, explicitContext);
1419
+ }
1420
+ onArrowPress($event) {
1421
+ if (this.step === 0) $event.preventDefault();
1422
+ }
1423
+ validateInputEntry($event) {
1424
+ if ($event.key === "e" && $event.target.value.indexOf($event.key) !== -1) return false;
1425
+ }
1426
+ ngOnDestroy() {
1427
+ this.inputEl = null;
1428
+ this.ngModel = null;
1429
+ super.ngOnDestroy();
1430
+ }
1431
+ static {
1432
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1433
+ minVersion: "12.0.0",
1434
+ version: "22.2.1",
1435
+ ngImport: i0,
1436
+ type: InputNumberComponent,
1437
+ deps: [{ token: i0.Injector }, {
1438
+ token: "EXPLICIT_CONTEXT",
1439
+ optional: true
1440
+ }],
1441
+ target: i0.ɵɵFactoryTarget.Component
1442
+ });
1443
+ }
1444
+ static {
1445
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1446
+ minVersion: "14.0.0",
1447
+ version: "22.2.1",
1448
+ type: InputNumberComponent,
1449
+ isStandalone: true,
1450
+ selector: "wm-input[type=\"number\"]",
1451
+ providers: [
1452
+ provideAs(InputNumberComponent, NG_VALUE_ACCESSOR, true),
1453
+ provideAs(InputNumberComponent, NG_VALIDATORS, true),
1454
+ provideAsWidgetRef(InputNumberComponent)
1455
+ ],
1456
+ viewQueries: [{
1457
+ propertyName: "inputEl",
1458
+ first: true,
1459
+ predicate: ["input"],
1460
+ descendants: true,
1461
+ static: true
1462
+ }, {
1463
+ propertyName: "ngModel",
1464
+ first: true,
1465
+ predicate: NgModel,
1466
+ descendants: true
1467
+ }],
1468
+ usesInheritance: true,
1469
+ ngImport: i0,
1470
+ template: "<input class=\"form-control app-textbox\"\n [ngClass]=\"{'step-hidden': step === 0}\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n (keydown.ArrowUp)=\"onArrowPress($event)\"\n (keydown.ArrowDown)=\"onArrowPress($event)\"\n (keypress)=\"validateInputEntry($event)\"\n #input>\n",
1471
+ dependencies: [
1472
+ {
1473
+ kind: "ngmodule",
1474
+ type: CommonModule
1475
+ },
1476
+ {
1477
+ kind: "directive",
1478
+ type: i1.NgClass,
1479
+ selector: "[ngClass]",
1480
+ inputs: ["class", "ngClass"]
1481
+ },
1482
+ {
1483
+ kind: "directive",
1484
+ type: i1.NgStyle,
1485
+ selector: "[ngStyle]",
1486
+ inputs: ["ngStyle"]
1487
+ },
1488
+ {
1489
+ kind: "ngmodule",
1490
+ type: FormsModule
1491
+ },
1492
+ {
1493
+ kind: "directive",
1494
+ type: i2.DefaultValueAccessor,
1495
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
1496
+ },
1497
+ {
1498
+ kind: "directive",
1499
+ type: i2.NgControlStatus,
1500
+ selector: "[formControlName],[ngModel],[formControl]"
1501
+ },
1502
+ {
1503
+ kind: "directive",
1504
+ type: i2.RequiredValidator,
1505
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
1506
+ inputs: ["required"]
1507
+ },
1508
+ {
1509
+ kind: "directive",
1510
+ type: i2.MaxLengthValidator,
1511
+ selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
1512
+ inputs: ["maxlength"]
1513
+ },
1514
+ {
1515
+ kind: "directive",
1516
+ type: i2.NgModel,
1517
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
1518
+ inputs: [
1519
+ "name",
1520
+ "disabled",
1521
+ "ngModel",
1522
+ "ngModelOptions"
1523
+ ],
1524
+ outputs: ["ngModelChange"],
1525
+ exportAs: ["ngModel"]
1526
+ }
1527
+ ],
1528
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1529
+ });
1530
+ }
1531
+ };
1532
+ i0.ɵɵngDeclareClassMetadata({
1533
+ minVersion: "12.0.0",
1534
+ version: "22.2.1",
1535
+ ngImport: i0,
1536
+ type: InputNumberComponent,
1537
+ decorators: [{
1538
+ type: Component,
1539
+ args: [{
1540
+ changeDetection: ChangeDetectionStrategy.Eager,
1541
+ standalone: true,
1542
+ imports: [CommonModule, FormsModule],
1543
+ selector: "wm-input[type=\"number\"]",
1544
+ providers: [
1545
+ provideAs(InputNumberComponent, NG_VALUE_ACCESSOR, true),
1546
+ provideAs(InputNumberComponent, NG_VALIDATORS, true),
1547
+ provideAsWidgetRef(InputNumberComponent)
1548
+ ],
1549
+ template: "<input class=\"form-control app-textbox\"\n [ngClass]=\"{'step-hidden': step === 0}\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n (keydown.ArrowUp)=\"onArrowPress($event)\"\n (keydown.ArrowDown)=\"onArrowPress($event)\"\n (keypress)=\"validateInputEntry($event)\"\n #input>\n"
1550
+ }]
1551
+ }],
1552
+ ctorParameters: () => [{ type: i0.Injector }, {
1553
+ type: void 0,
1554
+ decorators: [{
1555
+ type: Inject,
1556
+ args: ["EXPLICIT_CONTEXT"]
1557
+ }, { type: Optional }]
1558
+ }],
1559
+ propDecorators: {
1560
+ inputEl: [{
1561
+ type: ViewChild,
1562
+ args: ["input", { static: true }]
1563
+ }],
1564
+ ngModel: [{
1565
+ type: ViewChild,
1566
+ args: [NgModel]
1567
+ }]
1568
+ }
1569
+ });
1111
1570
  export { BaseInput, InputCalendarComponent, InputColorComponent, InputEmailComponent, InputNumberComponent, InputTextComponent, NumberLocale };
1112
- //# sourceMappingURL=index.mjs.map
1571
+
1572
+ //# sourceMappingURL=index.mjs.map