@wavemaker-ai/app-ng-runtime 12.0.2-rc.647771 → 12.1.0-rc.647821

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