@progress/kendo-angular-inputs 8.0.9-dev.202203231216 → 9.0.0-dev.202204191046

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 (561) hide show
  1. package/bundles/kendo-angular-inputs.umd.js +5 -0
  2. package/{dist/es2015/checkbox → checkbox}/checkbox.directive.d.ts +15 -10
  3. package/{dist/es2015/checkbox.module.d.ts → checkbox.module.d.ts} +6 -0
  4. package/{dist/es2015/colorpicker → colorpicker}/color-contrast-svg.component.d.ts +3 -0
  5. package/{dist/es2015/colorpicker → colorpicker}/color-gradient.component.d.ts +23 -17
  6. package/{dist/es2015/colorpicker → colorpicker}/color-input.component.d.ts +6 -3
  7. package/{dist/es2015/colorpicker → colorpicker}/color-palette.component.d.ts +17 -10
  8. package/{dist/es2015/colorpicker → colorpicker}/colorpicker.component.d.ts +43 -31
  9. package/{dist/es2015/colorpicker → colorpicker}/constants.d.ts +0 -0
  10. package/{dist/es2015/colorpicker → colorpicker}/contrast-validation.component.d.ts +6 -3
  11. package/{dist/es2015/colorpicker → colorpicker}/contrast.component.d.ts +8 -5
  12. package/{dist/es2015/colorpicker → colorpicker}/events/active-color-click-event.d.ts +0 -0
  13. package/{dist/es2015/colorpicker → colorpicker}/events/cancel-event.d.ts +0 -0
  14. package/{dist/es2015/colorpicker → colorpicker}/events/close-event.d.ts +0 -0
  15. package/{dist/es2015/colorpicker → colorpicker}/events/kendo-drag-event.d.ts +0 -0
  16. package/{dist/es2015/colorpicker → colorpicker}/events/open-event.d.ts +0 -0
  17. package/{dist/es2015/colorpicker → colorpicker}/events.d.ts +0 -0
  18. package/{dist/es2015/colorpicker → colorpicker}/flatcolorpicker-actions.component.d.ts +3 -0
  19. package/{dist/es2015/colorpicker → colorpicker}/flatcolorpicker-header.component.d.ts +5 -2
  20. package/{dist/es2015/colorpicker → colorpicker}/flatcolorpicker.component.d.ts +15 -8
  21. package/{dist/es2015/colorpicker → colorpicker}/focus-on-dom-ready.directive.d.ts +3 -0
  22. package/{dist/es2015/colorpicker → colorpicker}/localization/colorgradient-localization.service.d.ts +3 -0
  23. package/{dist/es2015/colorpicker → colorpicker}/localization/colorpalette-localization.service.d.ts +3 -0
  24. package/{dist/es2015/colorpicker → colorpicker}/localization/colorpicker-localization.service.d.ts +3 -0
  25. package/{dist/es2015/colorpicker → colorpicker}/localization/custom-messages.component.d.ts +4 -1
  26. package/{dist/es2015/colorpicker → colorpicker}/localization/flatcolorpicker-localization.service.d.ts +3 -0
  27. package/{dist/es2015/colorpicker → colorpicker}/localization/localized-colorpicker-messages.directive.d.ts +3 -0
  28. package/{dist/es2015/colorpicker → colorpicker}/localization/messages.d.ts +3 -0
  29. package/{dist/es2015/colorpicker → colorpicker}/models/actions-layout.d.ts +0 -0
  30. package/{dist/es2015/colorpicker → colorpicker}/models/colorpicker-view.d.ts +0 -0
  31. package/{dist/es2015/colorpicker → colorpicker}/models/gradient-settings.d.ts +0 -0
  32. package/{dist/es2015/colorpicker → colorpicker}/models/hsva.d.ts +0 -0
  33. package/{dist/es2015/colorpicker → colorpicker}/models/output-format.d.ts +0 -0
  34. package/{dist/es2015/colorpicker → colorpicker}/models/palette-presets.d.ts +0 -0
  35. package/{dist/es2015/colorpicker → colorpicker}/models/palette-settings.d.ts +0 -0
  36. package/{dist/es2015/colorpicker → colorpicker}/models/popup-settings.d.ts +0 -0
  37. package/{dist/es2015/colorpicker → colorpicker}/models/rgb.d.ts +0 -0
  38. package/{dist/es2015/colorpicker → colorpicker}/models/rgba.d.ts +0 -0
  39. package/{dist/es2015/colorpicker → colorpicker}/models/table-cell.d.ts +0 -0
  40. package/{dist/es2015/colorpicker → colorpicker}/models/tile-size.d.ts +2 -2
  41. package/{dist/es2015/colorpicker → colorpicker}/models.d.ts +0 -0
  42. package/{dist/es2015/colorpicker → colorpicker}/services/color-palette.service.d.ts +3 -0
  43. package/{dist/es2015/colorpicker → colorpicker}/services/flatcolorpicker.service.d.ts +3 -0
  44. package/{dist/es2015/colorpicker → colorpicker}/utils/color-parser.d.ts +0 -0
  45. package/{dist/es2015/colorpicker → colorpicker}/utils/contrast-curve.d.ts +0 -0
  46. package/{dist/es2015/colorpicker → colorpicker}/utils.d.ts +0 -0
  47. package/colorpicker.module.d.ts +32 -0
  48. package/{dist/es2015/common → common}/dom-utils.d.ts +0 -0
  49. package/{dist/es2015/common → common}/math.d.ts +0 -0
  50. package/{dist/es2015/common → common}/models/fillmode.d.ts +2 -6
  51. package/{dist/es2015/common → common}/models/rounded.d.ts +4 -13
  52. package/{dist/es2015/common → common}/models/size.d.ts +2 -7
  53. package/{dist/es2015/common → common}/models/styling-classes.d.ts +0 -0
  54. package/{dist/es2015/common → common}/models.d.ts +0 -0
  55. package/{dist/es2015/common → common}/utils.d.ts +0 -0
  56. package/{dist/es2015 → esm2015}/checkbox/checkbox.directive.js +35 -38
  57. package/{dist/es2015 → esm2015}/checkbox.module.js +14 -11
  58. package/{dist/es2015 → esm2015}/colorpicker/color-contrast-svg.component.js +25 -30
  59. package/{dist/es2015 → esm2015}/colorpicker/color-gradient.component.js +231 -137
  60. package/{dist/es2015 → esm2015}/colorpicker/color-input.component.js +143 -65
  61. package/{dist/es2015 → esm2015}/colorpicker/color-palette.component.js +139 -132
  62. package/{dist/es2015 → esm2015}/colorpicker/colorpicker.component.js +249 -231
  63. package/{dist/es2015 → esm2015}/colorpicker/constants.js +0 -0
  64. package/esm2015/colorpicker/contrast-validation.component.js +67 -0
  65. package/esm2015/colorpicker/contrast.component.js +95 -0
  66. package/{dist/es2015 → esm2015}/colorpicker/events/active-color-click-event.js +0 -0
  67. package/{dist/es2015 → esm2015}/colorpicker/events/cancel-event.js +0 -0
  68. package/{dist/es2015 → esm2015}/colorpicker/events/close-event.js +0 -0
  69. package/{dist/es2015 → esm2015}/colorpicker/events/kendo-drag-event.js +1 -0
  70. package/{dist/es2015 → esm2015}/colorpicker/events/open-event.js +0 -0
  71. package/{dist/es → esm2015}/colorpicker/events.js +0 -0
  72. package/esm2015/colorpicker/flatcolorpicker-actions.component.js +77 -0
  73. package/esm2015/colorpicker/flatcolorpicker-header.component.js +161 -0
  74. package/{dist/es2015 → esm2015}/colorpicker/flatcolorpicker.component.js +207 -153
  75. package/esm2015/colorpicker/focus-on-dom-ready.directive.js +29 -0
  76. package/esm2015/colorpicker/localization/colorgradient-localization.service.js +45 -0
  77. package/esm2015/colorpicker/localization/colorpalette-localization.service.js +45 -0
  78. package/esm2015/colorpicker/localization/colorpicker-localization.service.js +31 -0
  79. package/esm2015/colorpicker/localization/custom-messages.component.js +40 -0
  80. package/esm2015/colorpicker/localization/flatcolorpicker-localization.service.js +45 -0
  81. package/esm2015/colorpicker/localization/localized-colorpicker-messages.directive.js +36 -0
  82. package/esm2015/colorpicker/localization/messages.js +67 -0
  83. package/{dist/es2015 → esm2015}/colorpicker/models/actions-layout.js +1 -0
  84. package/{dist/es → esm2015}/colorpicker/models/colorpicker-view.js +1 -0
  85. package/{dist/es2015 → esm2015}/colorpicker/models/gradient-settings.js +1 -0
  86. package/{dist/es → esm2015}/colorpicker/models/hsva.js +1 -0
  87. package/{dist/es → esm2015}/colorpicker/models/output-format.js +1 -0
  88. package/{dist/es2015 → esm2015}/colorpicker/models/palette-presets.js +1 -1
  89. package/{dist/es → esm2015}/colorpicker/models/palette-settings.js +1 -0
  90. package/{dist/es → esm2015}/colorpicker/models/popup-settings.js +1 -0
  91. package/{dist/es → esm2015}/colorpicker/models/rgb.js +1 -0
  92. package/{dist/es → esm2015}/colorpicker/models/rgba.js +1 -0
  93. package/{dist/es → esm2015}/colorpicker/models/table-cell.js +1 -0
  94. package/{dist/es → esm2015}/colorpicker/models/tile-size.js +2 -0
  95. package/esm2015/colorpicker/models.js +16 -0
  96. package/{dist/es2015 → esm2015}/colorpicker/services/color-palette.service.js +8 -10
  97. package/{dist/es2015 → esm2015}/colorpicker/services/flatcolorpicker.service.js +8 -7
  98. package/{dist/es2015 → esm2015}/colorpicker/utils/color-parser.js +0 -0
  99. package/{dist/es2015 → esm2015}/colorpicker/utils/contrast-curve.js +0 -0
  100. package/{dist/es → esm2015}/colorpicker/utils.js +0 -0
  101. package/{dist/es2015 → esm2015}/colorpicker.module.js +44 -15
  102. package/{dist/es2015 → esm2015}/common/dom-utils.js +0 -2
  103. package/{dist/es2015 → esm2015}/common/math.js +0 -2
  104. package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
  105. package/{dist/es → esm2015}/common/models/rounded.js +1 -0
  106. package/{dist/es → esm2015}/common/models/size.js +1 -0
  107. package/{dist/es → esm2015}/common/models/styling-classes.js +1 -0
  108. package/{dist/es → esm2015}/common/models.js +4 -0
  109. package/{dist/es2015 → esm2015}/common/utils.js +3 -3
  110. package/esm2015/formfield/error.component.js +68 -0
  111. package/{dist/es2015 → esm2015}/formfield/formfield.component.js +68 -72
  112. package/esm2015/formfield/hint.component.js +63 -0
  113. package/{dist/es → esm2015}/formfield/models/message-align.js +1 -0
  114. package/{dist/es → esm2015}/formfield/models/orientation.js +1 -0
  115. package/{dist/es → esm2015}/formfield/models/show-options.js +1 -0
  116. package/{dist/es2015 → esm2015}/formfield.module.js +14 -11
  117. package/{dist/es2015 → esm2015}/inputs.module.js +45 -22
  118. package/{dist/es2015/sliders-common/sliders-common.module.d.ts → esm2015/kendo-angular-inputs.js} +2 -3
  119. package/{dist/es2015 → esm2015}/main.js +6 -0
  120. package/{dist/es2015 → esm2015}/maskedtextbox/maskedtextbox.component.js +163 -171
  121. package/{dist/es2015 → esm2015}/maskedtextbox/masking.service.js +8 -10
  122. package/{dist/es2015 → esm2015}/maskedtextbox/parsing/combinators.js +0 -3
  123. package/{dist/es2015 → esm2015}/maskedtextbox/parsing/parsers.js +0 -2
  124. package/{dist/es2015 → esm2015}/maskedtextbox/parsing/result.js +1 -0
  125. package/{dist/es2015 → esm2015}/maskedtextbox/parsing/stream.js +0 -0
  126. package/{dist/es → esm2015}/maskedtextbox.module.js +14 -14
  127. package/{dist/es → esm2015}/numerictextbox/arrow-direction.js +0 -0
  128. package/{dist/es2015 → esm2015}/numerictextbox/constants.js +0 -0
  129. package/esm2015/numerictextbox/localization/custom-messages.component.js +40 -0
  130. package/esm2015/numerictextbox/localization/localized-numerictextbox-messages.directive.js +36 -0
  131. package/esm2015/numerictextbox/localization/messages.js +25 -0
  132. package/{dist/es2015 → esm2015}/numerictextbox/numerictextbox.component.js +185 -169
  133. package/{dist/es2015 → esm2015}/numerictextbox/utils.js +1 -1
  134. package/{dist/es2015 → esm2015}/numerictextbox.module.js +24 -18
  135. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  136. package/{dist/es2015 → esm2015}/radiobutton/radiobutton.directive.js +25 -26
  137. package/{dist/es2015 → esm2015}/radiobutton.module.js +14 -11
  138. package/esm2015/rangeslider/localization/custom-messages.component.js +40 -0
  139. package/esm2015/rangeslider/localization/localized-rangeslider-messages.directive.js +36 -0
  140. package/esm2015/rangeslider/localization/messages.js +25 -0
  141. package/{dist/es2015 → esm2015}/rangeslider/rangeslider-model.js +0 -0
  142. package/{dist/es → esm2015}/rangeslider/rangeslider-value.type.js +1 -0
  143. package/{dist/es2015 → esm2015}/rangeslider/rangeslider.component.js +114 -38
  144. package/{dist/es2015 → esm2015}/rangeslider.module.js +28 -20
  145. package/esm2015/shared/input-separator.component.js +41 -0
  146. package/{dist/es2015 → esm2015}/shared/textarea.directive.js +58 -52
  147. package/{dist/es2015 → esm2015}/shared/utils.js +0 -0
  148. package/esm2015/shared.module.js +32 -0
  149. package/esm2015/slider/localization/custom-messages.component.js +40 -0
  150. package/esm2015/slider/localization/localized-slider-messages.directive.js +36 -0
  151. package/esm2015/slider/localization/messages.js +27 -0
  152. package/{dist/es2015 → esm2015}/slider/slider-model.js +0 -0
  153. package/{dist/es2015 → esm2015}/slider/slider.component.js +132 -70
  154. package/{dist/es → esm2015}/slider.module.js +28 -23
  155. package/{dist/es2015 → esm2015}/sliders-common/label-template.directive.js +14 -12
  156. package/{dist/es2015 → esm2015}/sliders-common/slider-base.js +77 -112
  157. package/{dist/es2015 → esm2015}/sliders-common/slider-model.base.js +0 -0
  158. package/esm2015/sliders-common/slider-ticks.component.js +125 -0
  159. package/esm2015/sliders-common/sliders-common.module.js +42 -0
  160. package/{dist/es2015 → esm2015}/sliders-common/sliders-util.js +0 -0
  161. package/{dist/es/colorpicker/events/kendo-drag-event.js → esm2015/sliders-common/title-callback.js} +1 -0
  162. package/esm2015/switch/localization/custom-messages.component.js +40 -0
  163. package/esm2015/switch/localization/localized-switch-messages.directive.js +36 -0
  164. package/esm2015/switch/localization/messages.js +25 -0
  165. package/{dist/es2015 → esm2015}/switch/switch.component.js +166 -154
  166. package/{dist/es2015 → esm2015}/switch.module.js +26 -19
  167. package/{dist/es2015 → esm2015}/text-fields-common/text-fields-base.js +37 -47
  168. package/{dist/es → esm2015}/textarea/models/flow.js +1 -0
  169. package/{dist/es → esm2015}/textarea/models/resize.js +1 -0
  170. package/esm2015/textarea/textarea-suffix.component.js +40 -0
  171. package/{dist/es2015 → esm2015}/textarea/textarea.component.js +126 -122
  172. package/{dist/es → esm2015}/textarea.module.js +27 -22
  173. package/esm2015/textbox/localization/custom-messages.component.js +40 -0
  174. package/esm2015/textbox/localization/localized-textbox-messages.directive.js +36 -0
  175. package/esm2015/textbox/localization/messages.js +23 -0
  176. package/{dist/es → esm2015}/textbox/models/icon-show-options.js +1 -0
  177. package/esm2015/textbox/textbox-prefix.directive.js +38 -0
  178. package/esm2015/textbox/textbox-suffix.directive.js +37 -0
  179. package/{dist/es2015 → esm2015}/textbox/textbox.component.js +180 -174
  180. package/{dist/es2015 → esm2015}/textbox/textbox.directive.js +36 -31
  181. package/esm2015/textbox.module.js +88 -0
  182. package/{dist/es2015 → esm2015}/validators/max.validator.js +0 -0
  183. package/{dist/es2015 → esm2015}/validators/min.validator.js +0 -0
  184. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-inputs.js} +4205 -3515
  185. package/{dist/es2015/formfield → formfield}/error.component.d.ts +6 -3
  186. package/{dist/es2015/formfield → formfield}/formfield.component.d.ts +9 -6
  187. package/{dist/es2015/formfield → formfield}/hint.component.d.ts +6 -3
  188. package/{dist/es2015/formfield → formfield}/models/message-align.d.ts +0 -0
  189. package/{dist/es2015/formfield → formfield}/models/orientation.d.ts +1 -5
  190. package/{dist/es2015/formfield → formfield}/models/show-options.d.ts +0 -0
  191. package/{dist/es2015/formfield.module.d.ts → formfield.module.d.ts} +8 -0
  192. package/{dist/es2015/inputs.module.d.ts → inputs.module.d.ts} +16 -0
  193. package/kendo-angular-inputs.d.ts +9 -0
  194. package/{dist/es2015/main.d.ts → main.d.ts} +6 -0
  195. package/{dist/es2015/maskedtextbox → maskedtextbox}/maskedtextbox.component.d.ts +28 -17
  196. package/{dist/es2015/maskedtextbox → maskedtextbox}/masking.service.d.ts +7 -4
  197. package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/combinators.d.ts +0 -0
  198. package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/parsers.d.ts +0 -0
  199. package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/result.d.ts +0 -0
  200. package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/stream.d.ts +0 -0
  201. package/{dist/es2015/maskedtextbox.module.d.ts → maskedtextbox.module.d.ts} +7 -0
  202. package/{dist/es2015/numerictextbox → numerictextbox}/arrow-direction.d.ts +0 -0
  203. package/{dist/es2015/numerictextbox → numerictextbox}/constants.d.ts +0 -0
  204. package/{dist/es2015/numerictextbox → numerictextbox}/localization/custom-messages.component.d.ts +4 -1
  205. package/{dist/es2015/numerictextbox → numerictextbox}/localization/localized-numerictextbox-messages.directive.d.ts +3 -0
  206. package/{dist/es2015/numerictextbox → numerictextbox}/localization/messages.d.ts +3 -0
  207. package/{dist/es2015/numerictextbox → numerictextbox}/numerictextbox.component.d.ts +35 -25
  208. package/{dist/es2015/numerictextbox → numerictextbox}/utils.d.ts +0 -0
  209. package/{dist/es2015/numerictextbox.module.d.ts → numerictextbox.module.d.ts} +9 -0
  210. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  211. package/package.json +40 -114
  212. package/{dist/es2015/radiobutton → radiobutton}/radiobutton.directive.d.ts +9 -5
  213. package/{dist/es2015/radiobutton.module.d.ts → radiobutton.module.d.ts} +6 -0
  214. package/{dist/es2015/rangeslider → rangeslider}/localization/custom-messages.component.d.ts +4 -1
  215. package/{dist/es2015/rangeslider → rangeslider}/localization/localized-rangeslider-messages.directive.d.ts +3 -0
  216. package/{dist/es2015/rangeslider → rangeslider}/localization/messages.d.ts +3 -0
  217. package/{dist/es2015/rangeslider → rangeslider}/rangeslider-model.d.ts +0 -0
  218. package/{dist/es2015/rangeslider → rangeslider}/rangeslider-value.type.d.ts +0 -0
  219. package/{dist/es2015/rangeslider → rangeslider}/rangeslider.component.d.ts +7 -4
  220. package/{dist/es2015/rangeslider.module.d.ts → rangeslider.module.d.ts} +10 -0
  221. package/schematics/ngAdd/index.js +5 -2
  222. package/schematics/ngAdd/index.js.map +1 -1
  223. package/{dist/es2015/shared → shared}/input-separator.component.d.ts +3 -0
  224. package/{dist/es2015/shared → shared}/textarea.directive.d.ts +7 -2
  225. package/{dist/es2015/shared → shared}/utils.d.ts +0 -0
  226. package/{dist/es2015/shared.module.d.ts → shared.module.d.ts} +6 -0
  227. package/{dist/es2015/slider → slider}/localization/custom-messages.component.d.ts +4 -1
  228. package/{dist/es2015/slider → slider}/localization/localized-slider-messages.directive.d.ts +3 -0
  229. package/{dist/es2015/slider → slider}/localization/messages.d.ts +3 -0
  230. package/{dist/es2015/slider → slider}/slider-model.d.ts +0 -0
  231. package/{dist/es2015/slider → slider}/slider.component.d.ts +11 -7
  232. package/{dist/es2015/slider.module.d.ts → slider.module.d.ts} +10 -0
  233. package/{dist/es2015/sliders-common → sliders-common}/label-template.directive.d.ts +3 -0
  234. package/{dist/es2015/sliders-common → sliders-common}/slider-base.d.ts +11 -8
  235. package/{dist/es2015/sliders-common → sliders-common}/slider-model.base.d.ts +0 -0
  236. package/{dist/es2015/sliders-common → sliders-common}/slider-ticks.component.d.ts +3 -0
  237. package/sliders-common/sliders-common.module.d.ts +17 -0
  238. package/{dist/es2015/sliders-common → sliders-common}/sliders-util.d.ts +3 -2
  239. package/sliders-common/title-callback.d.ts +10 -0
  240. package/{dist/es2015/switch → switch}/localization/custom-messages.component.d.ts +4 -1
  241. package/{dist/es2015/switch → switch}/localization/localized-switch-messages.directive.d.ts +3 -0
  242. package/{dist/es2015/switch → switch}/localization/messages.d.ts +3 -0
  243. package/{dist/es2015/switch → switch}/switch.component.d.ts +35 -27
  244. package/{dist/es2015/switch.module.d.ts → switch.module.d.ts} +9 -0
  245. package/{dist/es2015/text-fields-common → text-fields-common}/text-fields-base.d.ts +4 -1
  246. package/{dist/es2015/textarea → textarea}/models/flow.d.ts +0 -0
  247. package/{dist/es2015/textarea → textarea}/models/resize.d.ts +0 -0
  248. package/{dist/es2015/textarea → textarea}/textarea-suffix.component.d.ts +3 -0
  249. package/{dist/es2015/textarea → textarea}/textarea.component.d.ts +28 -20
  250. package/{dist/es2015/textarea.module.d.ts → textarea.module.d.ts} +11 -0
  251. package/{dist/es2015/textbox → textbox}/localization/custom-messages.component.d.ts +4 -1
  252. package/{dist/es2015/textbox → textbox}/localization/localized-textbox-messages.directive.d.ts +3 -0
  253. package/{dist/es2015/textbox → textbox}/localization/messages.d.ts +3 -0
  254. package/{dist/es2015/textbox → textbox}/models/icon-show-options.d.ts +0 -0
  255. package/{dist/es2015/textbox → textbox}/textbox-prefix.directive.d.ts +3 -0
  256. package/{dist/es2015/textbox → textbox}/textbox-suffix.directive.d.ts +3 -0
  257. package/{dist/es2015/textbox → textbox}/textbox.component.d.ts +32 -24
  258. package/{dist/es2015/textbox → textbox}/textbox.directive.d.ts +9 -4
  259. package/textbox.module.d.ts +52 -0
  260. package/{dist/es2015/validators → validators}/max.validator.d.ts +0 -0
  261. package/{dist/es2015/validators → validators}/min.validator.d.ts +0 -0
  262. package/dist/cdn/js/kendo-angular-inputs.js +0 -20
  263. package/dist/cdn/main.js +0 -5
  264. package/dist/es/checkbox/checkbox.directive.js +0 -107
  265. package/dist/es/checkbox.module.js +0 -52
  266. package/dist/es/colorpicker/color-contrast-svg.component.js +0 -95
  267. package/dist/es/colorpicker/color-gradient.component.js +0 -697
  268. package/dist/es/colorpicker/color-input.component.js +0 -193
  269. package/dist/es/colorpicker/color-palette.component.js +0 -523
  270. package/dist/es/colorpicker/colorpicker.component.js +0 -958
  271. package/dist/es/colorpicker/constants.js +0 -36
  272. package/dist/es/colorpicker/contrast-validation.component.js +0 -59
  273. package/dist/es/colorpicker/contrast.component.js +0 -70
  274. package/dist/es/colorpicker/events/active-color-click-event.js +0 -60
  275. package/dist/es/colorpicker/events/cancel-event.js +0 -19
  276. package/dist/es/colorpicker/events/close-event.js +0 -17
  277. package/dist/es/colorpicker/events/open-event.js +0 -17
  278. package/dist/es/colorpicker/flatcolorpicker-actions.component.js +0 -50
  279. package/dist/es/colorpicker/flatcolorpicker-header.component.js +0 -94
  280. package/dist/es/colorpicker/flatcolorpicker.component.js +0 -549
  281. package/dist/es/colorpicker/focus-on-dom-ready.directive.js +0 -31
  282. package/dist/es/colorpicker/localization/colorgradient-localization.service.js +0 -34
  283. package/dist/es/colorpicker/localization/colorpalette-localization.service.js +0 -34
  284. package/dist/es/colorpicker/localization/colorpicker-localization.service.js +0 -24
  285. package/dist/es/colorpicker/localization/custom-messages.component.js +0 -43
  286. package/dist/es/colorpicker/localization/flatcolorpicker-localization.service.js +0 -34
  287. package/dist/es/colorpicker/localization/localized-colorpicker-messages.directive.js +0 -35
  288. package/dist/es/colorpicker/localization/messages.js +0 -110
  289. package/dist/es/colorpicker/models/actions-layout.js +0 -4
  290. package/dist/es/colorpicker/models/gradient-settings.js +0 -4
  291. package/dist/es/colorpicker/models/palette-presets.js +0 -62
  292. package/dist/es/colorpicker/models.js +0 -5
  293. package/dist/es/colorpicker/services/color-palette.service.js +0 -67
  294. package/dist/es/colorpicker/services/flatcolorpicker.service.js +0 -41
  295. package/dist/es/colorpicker/utils/color-parser.js +0 -170
  296. package/dist/es/colorpicker/utils/contrast-curve.js +0 -91
  297. package/dist/es/colorpicker.module.js +0 -67
  298. package/dist/es/common/dom-utils.js +0 -47
  299. package/dist/es/common/math.js +0 -67
  300. package/dist/es/common/utils.js +0 -73
  301. package/dist/es/formfield/error.component.js +0 -85
  302. package/dist/es/formfield/formfield.component.js +0 -296
  303. package/dist/es/formfield/hint.component.js +0 -79
  304. package/dist/es/formfield.module.js +0 -54
  305. package/dist/es/index.js +0 -37
  306. package/dist/es/inputs.module.js +0 -74
  307. package/dist/es/main.js +0 -53
  308. package/dist/es/maskedtextbox/maskedtextbox.component.js +0 -729
  309. package/dist/es/maskedtextbox/masking.service.js +0 -215
  310. package/dist/es/maskedtextbox/parsing/combinators.js +0 -31
  311. package/dist/es/maskedtextbox/parsing/parsers.js +0 -160
  312. package/dist/es/maskedtextbox/parsing/result.js +0 -43
  313. package/dist/es/maskedtextbox/parsing/stream.js +0 -45
  314. package/dist/es/numerictextbox/constants.js +0 -28
  315. package/dist/es/numerictextbox/localization/custom-messages.component.js +0 -43
  316. package/dist/es/numerictextbox/localization/localized-numerictextbox-messages.directive.js +0 -35
  317. package/dist/es/numerictextbox/localization/messages.js +0 -26
  318. package/dist/es/numerictextbox/numerictextbox.component.js +0 -1049
  319. package/dist/es/numerictextbox/utils.js +0 -91
  320. package/dist/es/numerictextbox.module.js +0 -62
  321. package/dist/es/package-metadata.js +0 -15
  322. package/dist/es/radiobutton/radiobutton.directive.js +0 -83
  323. package/dist/es/radiobutton.module.js +0 -52
  324. package/dist/es/rangeslider/localization/custom-messages.component.js +0 -43
  325. package/dist/es/rangeslider/localization/localized-rangeslider-messages.directive.js +0 -35
  326. package/dist/es/rangeslider/localization/messages.js +0 -26
  327. package/dist/es/rangeslider/rangeslider-model.js +0 -59
  328. package/dist/es/rangeslider/rangeslider.component.js +0 -471
  329. package/dist/es/rangeslider.module.js +0 -66
  330. package/dist/es/shared/input-separator.component.js +0 -41
  331. package/dist/es/shared/textarea.directive.js +0 -269
  332. package/dist/es/shared/utils.js +0 -24
  333. package/dist/es/shared.module.js +0 -30
  334. package/dist/es/slider/localization/custom-messages.component.js +0 -43
  335. package/dist/es/slider/localization/localized-slider-messages.directive.js +0 -35
  336. package/dist/es/slider/localization/messages.js +0 -30
  337. package/dist/es/slider/slider-model.js +0 -41
  338. package/dist/es/slider/slider.component.js +0 -482
  339. package/dist/es/sliders-common/label-template.directive.js +0 -44
  340. package/dist/es/sliders-common/slider-base.js +0 -326
  341. package/dist/es/sliders-common/slider-model.base.js +0 -96
  342. package/dist/es/sliders-common/slider-ticks.component.js +0 -104
  343. package/dist/es/sliders-common/sliders-common.module.js +0 -35
  344. package/dist/es/sliders-common/sliders-util.js +0 -234
  345. package/dist/es/switch/localization/custom-messages.component.js +0 -43
  346. package/dist/es/switch/localization/localized-switch-messages.directive.js +0 -35
  347. package/dist/es/switch/localization/messages.js +0 -26
  348. package/dist/es/switch/switch.component.js +0 -570
  349. package/dist/es/switch.module.js +0 -64
  350. package/dist/es/text-fields-common/text-fields-base.js +0 -144
  351. package/dist/es/textarea/textarea-suffix.component.js +0 -40
  352. package/dist/es/textarea/textarea.component.js +0 -600
  353. package/dist/es/textbox/localization/custom-messages.component.js +0 -43
  354. package/dist/es/textbox/localization/localized-textbox-messages.directive.js +0 -35
  355. package/dist/es/textbox/localization/messages.js +0 -22
  356. package/dist/es/textbox/textbox-prefix.directive.js +0 -37
  357. package/dist/es/textbox/textbox-suffix.directive.js +0 -36
  358. package/dist/es/textbox/textbox.component.js +0 -763
  359. package/dist/es/textbox/textbox.directive.js +0 -127
  360. package/dist/es/textbox.module.js +0 -75
  361. package/dist/es/validators/max.validator.js +0 -21
  362. package/dist/es/validators/min.validator.js +0 -21
  363. package/dist/es2015/colorpicker/contrast-validation.component.js +0 -58
  364. package/dist/es2015/colorpicker/contrast.component.js +0 -72
  365. package/dist/es2015/colorpicker/events.js +0 -8
  366. package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +0 -62
  367. package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +0 -133
  368. package/dist/es2015/colorpicker/focus-on-dom-ready.directive.js +0 -29
  369. package/dist/es2015/colorpicker/localization/colorgradient-localization.service.js +0 -31
  370. package/dist/es2015/colorpicker/localization/colorpalette-localization.service.js +0 -31
  371. package/dist/es2015/colorpicker/localization/colorpicker-localization.service.js +0 -22
  372. package/dist/es2015/colorpicker/localization/custom-messages.component.js +0 -35
  373. package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.js +0 -31
  374. package/dist/es2015/colorpicker/localization/localized-colorpicker-messages.directive.js +0 -31
  375. package/dist/es2015/colorpicker/localization/messages.js +0 -104
  376. package/dist/es2015/colorpicker/models/colorpicker-view.js +0 -4
  377. package/dist/es2015/colorpicker/models/hsva.js +0 -4
  378. package/dist/es2015/colorpicker/models/output-format.js +0 -4
  379. package/dist/es2015/colorpicker/models/palette-settings.js +0 -4
  380. package/dist/es2015/colorpicker/models/popup-settings.js +0 -4
  381. package/dist/es2015/colorpicker/models/rgb.js +0 -4
  382. package/dist/es2015/colorpicker/models/rgba.js +0 -4
  383. package/dist/es2015/colorpicker/models/table-cell.js +0 -4
  384. package/dist/es2015/colorpicker/models/tile-size.js +0 -4
  385. package/dist/es2015/colorpicker/models.js +0 -5
  386. package/dist/es2015/colorpicker/utils.js +0 -6
  387. package/dist/es2015/colorpicker.module.d.ts +0 -10
  388. package/dist/es2015/common/models/fillmode.js +0 -4
  389. package/dist/es2015/common/models/rounded.js +0 -4
  390. package/dist/es2015/common/models/size.js +0 -4
  391. package/dist/es2015/common/models/styling-classes.js +0 -4
  392. package/dist/es2015/common/models.js +0 -4
  393. package/dist/es2015/formfield/error.component.js +0 -78
  394. package/dist/es2015/formfield/hint.component.js +0 -71
  395. package/dist/es2015/formfield/models/message-align.js +0 -4
  396. package/dist/es2015/formfield/models/orientation.js +0 -4
  397. package/dist/es2015/formfield/models/show-options.js +0 -4
  398. package/dist/es2015/index.d.ts +0 -37
  399. package/dist/es2015/index.js +0 -37
  400. package/dist/es2015/index.metadata.json +0 -1
  401. package/dist/es2015/maskedtextbox.module.js +0 -50
  402. package/dist/es2015/numerictextbox/arrow-direction.js +0 -13
  403. package/dist/es2015/numerictextbox/localization/custom-messages.component.js +0 -35
  404. package/dist/es2015/numerictextbox/localization/localized-numerictextbox-messages.directive.js +0 -31
  405. package/dist/es2015/numerictextbox/localization/messages.js +0 -20
  406. package/dist/es2015/rangeslider/localization/custom-messages.component.js +0 -35
  407. package/dist/es2015/rangeslider/localization/localized-rangeslider-messages.directive.js +0 -31
  408. package/dist/es2015/rangeslider/localization/messages.js +0 -20
  409. package/dist/es2015/rangeslider/rangeslider-value.type.js +0 -4
  410. package/dist/es2015/shared/input-separator.component.js +0 -58
  411. package/dist/es2015/shared.module.js +0 -27
  412. package/dist/es2015/slider/localization/custom-messages.component.js +0 -35
  413. package/dist/es2015/slider/localization/localized-slider-messages.directive.js +0 -31
  414. package/dist/es2015/slider/localization/messages.js +0 -24
  415. package/dist/es2015/slider.module.js +0 -63
  416. package/dist/es2015/sliders-common/slider-ticks.component.js +0 -123
  417. package/dist/es2015/sliders-common/sliders-common.module.js +0 -32
  418. package/dist/es2015/switch/localization/custom-messages.component.js +0 -35
  419. package/dist/es2015/switch/localization/localized-switch-messages.directive.js +0 -31
  420. package/dist/es2015/switch/localization/messages.js +0 -20
  421. package/dist/es2015/textarea/models/flow.js +0 -4
  422. package/dist/es2015/textarea/models/resize.js +0 -4
  423. package/dist/es2015/textarea/textarea-suffix.component.js +0 -55
  424. package/dist/es2015/textarea.module.js +0 -60
  425. package/dist/es2015/textbox/localization/custom-messages.component.js +0 -35
  426. package/dist/es2015/textbox/localization/localized-textbox-messages.directive.js +0 -31
  427. package/dist/es2015/textbox/localization/messages.js +0 -16
  428. package/dist/es2015/textbox/models/icon-show-options.js +0 -4
  429. package/dist/es2015/textbox/textbox-prefix.directive.js +0 -36
  430. package/dist/es2015/textbox/textbox-suffix.directive.js +0 -35
  431. package/dist/es2015/textbox.module.d.ts +0 -37
  432. package/dist/es2015/textbox.module.js +0 -72
  433. package/dist/fesm5/index.js +0 -12461
  434. package/dist/npm/checkbox/checkbox.directive.js +0 -109
  435. package/dist/npm/checkbox.module.js +0 -54
  436. package/dist/npm/colorpicker/color-contrast-svg.component.js +0 -97
  437. package/dist/npm/colorpicker/color-gradient.component.js +0 -699
  438. package/dist/npm/colorpicker/color-input.component.js +0 -195
  439. package/dist/npm/colorpicker/color-palette.component.js +0 -525
  440. package/dist/npm/colorpicker/colorpicker.component.js +0 -960
  441. package/dist/npm/colorpicker/constants.js +0 -38
  442. package/dist/npm/colorpicker/contrast-validation.component.js +0 -61
  443. package/dist/npm/colorpicker/contrast.component.js +0 -72
  444. package/dist/npm/colorpicker/events/active-color-click-event.js +0 -62
  445. package/dist/npm/colorpicker/events/cancel-event.js +0 -21
  446. package/dist/npm/colorpicker/events/close-event.js +0 -19
  447. package/dist/npm/colorpicker/events/kendo-drag-event.js +0 -6
  448. package/dist/npm/colorpicker/events/open-event.js +0 -19
  449. package/dist/npm/colorpicker/events.js +0 -11
  450. package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +0 -52
  451. package/dist/npm/colorpicker/flatcolorpicker-header.component.js +0 -96
  452. package/dist/npm/colorpicker/flatcolorpicker.component.js +0 -551
  453. package/dist/npm/colorpicker/focus-on-dom-ready.directive.js +0 -33
  454. package/dist/npm/colorpicker/localization/colorgradient-localization.service.js +0 -36
  455. package/dist/npm/colorpicker/localization/colorpalette-localization.service.js +0 -36
  456. package/dist/npm/colorpicker/localization/colorpicker-localization.service.js +0 -26
  457. package/dist/npm/colorpicker/localization/custom-messages.component.js +0 -45
  458. package/dist/npm/colorpicker/localization/flatcolorpicker-localization.service.js +0 -36
  459. package/dist/npm/colorpicker/localization/localized-colorpicker-messages.directive.js +0 -37
  460. package/dist/npm/colorpicker/localization/messages.js +0 -112
  461. package/dist/npm/colorpicker/models/actions-layout.js +0 -6
  462. package/dist/npm/colorpicker/models/colorpicker-view.js +0 -6
  463. package/dist/npm/colorpicker/models/gradient-settings.js +0 -6
  464. package/dist/npm/colorpicker/models/hsva.js +0 -6
  465. package/dist/npm/colorpicker/models/output-format.js +0 -6
  466. package/dist/npm/colorpicker/models/palette-presets.js +0 -64
  467. package/dist/npm/colorpicker/models/palette-settings.js +0 -6
  468. package/dist/npm/colorpicker/models/popup-settings.js +0 -6
  469. package/dist/npm/colorpicker/models/rgb.js +0 -6
  470. package/dist/npm/colorpicker/models/rgba.js +0 -6
  471. package/dist/npm/colorpicker/models/table-cell.js +0 -6
  472. package/dist/npm/colorpicker/models/tile-size.js +0 -6
  473. package/dist/npm/colorpicker/models.js +0 -8
  474. package/dist/npm/colorpicker/services/color-palette.service.js +0 -69
  475. package/dist/npm/colorpicker/services/flatcolorpicker.service.js +0 -43
  476. package/dist/npm/colorpicker/utils/color-parser.js +0 -173
  477. package/dist/npm/colorpicker/utils/contrast-curve.js +0 -93
  478. package/dist/npm/colorpicker/utils.js +0 -9
  479. package/dist/npm/colorpicker.module.js +0 -69
  480. package/dist/npm/common/dom-utils.js +0 -50
  481. package/dist/npm/common/math.js +0 -69
  482. package/dist/npm/common/models/fillmode.js +0 -6
  483. package/dist/npm/common/models/rounded.js +0 -6
  484. package/dist/npm/common/models/size.js +0 -6
  485. package/dist/npm/common/models/styling-classes.js +0 -6
  486. package/dist/npm/common/models.js +0 -6
  487. package/dist/npm/common/utils.js +0 -75
  488. package/dist/npm/formfield/error.component.js +0 -87
  489. package/dist/npm/formfield/formfield.component.js +0 -298
  490. package/dist/npm/formfield/hint.component.js +0 -81
  491. package/dist/npm/formfield/models/message-align.js +0 -6
  492. package/dist/npm/formfield/models/orientation.js +0 -6
  493. package/dist/npm/formfield/models/show-options.js +0 -6
  494. package/dist/npm/formfield.module.js +0 -56
  495. package/dist/npm/index.js +0 -69
  496. package/dist/npm/inputs.module.js +0 -76
  497. package/dist/npm/main.js +0 -100
  498. package/dist/npm/maskedtextbox/maskedtextbox.component.js +0 -731
  499. package/dist/npm/maskedtextbox/masking.service.js +0 -217
  500. package/dist/npm/maskedtextbox/parsing/combinators.js +0 -34
  501. package/dist/npm/maskedtextbox/parsing/parsers.js +0 -162
  502. package/dist/npm/maskedtextbox/parsing/result.js +0 -45
  503. package/dist/npm/maskedtextbox/parsing/stream.js +0 -47
  504. package/dist/npm/maskedtextbox.module.js +0 -55
  505. package/dist/npm/numerictextbox/arrow-direction.js +0 -15
  506. package/dist/npm/numerictextbox/constants.js +0 -30
  507. package/dist/npm/numerictextbox/localization/custom-messages.component.js +0 -45
  508. package/dist/npm/numerictextbox/localization/localized-numerictextbox-messages.directive.js +0 -37
  509. package/dist/npm/numerictextbox/localization/messages.js +0 -28
  510. package/dist/npm/numerictextbox/numerictextbox.component.js +0 -1051
  511. package/dist/npm/numerictextbox/utils.js +0 -94
  512. package/dist/npm/numerictextbox.module.js +0 -64
  513. package/dist/npm/package-metadata.js +0 -17
  514. package/dist/npm/radiobutton/radiobutton.directive.js +0 -85
  515. package/dist/npm/radiobutton.module.js +0 -54
  516. package/dist/npm/rangeslider/localization/custom-messages.component.js +0 -45
  517. package/dist/npm/rangeslider/localization/localized-rangeslider-messages.directive.js +0 -37
  518. package/dist/npm/rangeslider/localization/messages.js +0 -28
  519. package/dist/npm/rangeslider/rangeslider-model.js +0 -61
  520. package/dist/npm/rangeslider/rangeslider-value.type.js +0 -6
  521. package/dist/npm/rangeslider/rangeslider.component.js +0 -473
  522. package/dist/npm/rangeslider.module.js +0 -68
  523. package/dist/npm/shared/input-separator.component.js +0 -43
  524. package/dist/npm/shared/textarea.directive.js +0 -271
  525. package/dist/npm/shared/utils.js +0 -26
  526. package/dist/npm/shared.module.js +0 -32
  527. package/dist/npm/slider/localization/custom-messages.component.js +0 -45
  528. package/dist/npm/slider/localization/localized-slider-messages.directive.js +0 -37
  529. package/dist/npm/slider/localization/messages.js +0 -32
  530. package/dist/npm/slider/slider-model.js +0 -43
  531. package/dist/npm/slider/slider.component.js +0 -484
  532. package/dist/npm/slider.module.js +0 -68
  533. package/dist/npm/sliders-common/label-template.directive.js +0 -46
  534. package/dist/npm/sliders-common/slider-base.js +0 -328
  535. package/dist/npm/sliders-common/slider-model.base.js +0 -98
  536. package/dist/npm/sliders-common/slider-ticks.component.js +0 -106
  537. package/dist/npm/sliders-common/sliders-common.module.js +0 -37
  538. package/dist/npm/sliders-common/sliders-util.js +0 -236
  539. package/dist/npm/switch/localization/custom-messages.component.js +0 -45
  540. package/dist/npm/switch/localization/localized-switch-messages.directive.js +0 -37
  541. package/dist/npm/switch/localization/messages.js +0 -28
  542. package/dist/npm/switch/switch.component.js +0 -572
  543. package/dist/npm/switch.module.js +0 -66
  544. package/dist/npm/text-fields-common/text-fields-base.js +0 -146
  545. package/dist/npm/textarea/models/flow.js +0 -6
  546. package/dist/npm/textarea/models/resize.js +0 -6
  547. package/dist/npm/textarea/textarea-suffix.component.js +0 -42
  548. package/dist/npm/textarea/textarea.component.js +0 -602
  549. package/dist/npm/textarea.module.js +0 -65
  550. package/dist/npm/textbox/localization/custom-messages.component.js +0 -45
  551. package/dist/npm/textbox/localization/localized-textbox-messages.directive.js +0 -37
  552. package/dist/npm/textbox/localization/messages.js +0 -24
  553. package/dist/npm/textbox/models/icon-show-options.js +0 -6
  554. package/dist/npm/textbox/textbox-prefix.directive.js +0 -39
  555. package/dist/npm/textbox/textbox-suffix.directive.js +0 -38
  556. package/dist/npm/textbox/textbox.component.js +0 -765
  557. package/dist/npm/textbox/textbox.directive.js +0 -129
  558. package/dist/npm/textbox.module.js +0 -77
  559. package/dist/npm/validators/max.validator.js +0 -23
  560. package/dist/npm/validators/min.validator.js +0 -23
  561. package/dist/systemjs/kendo-angular-inputs.js +0 -5
@@ -1,1049 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, ViewChild, forwardRef, isDevMode, NgZone, ChangeDetectorRef, Injector } from '@angular/core';
7
- import { anyChanged, hasObservers, Keys, guid, KendoInput } from '@progress/kendo-angular-common';
8
- import { areSame, getStylingClasses, requiresZoneOnBlur } from '../common/utils';
9
- import { invokeElementMethod } from '../common/dom-utils';
10
- import { add, toFixedPrecision, limitPrecision } from '../common/math';
11
- import { createMaxValidator } from '../validators/max.validator';
12
- import { createMinValidator } from '../validators/min.validator';
13
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
14
- import { IntlService } from '@progress/kendo-angular-intl';
15
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
16
- import { validatePackage } from '@progress/kendo-licensing';
17
- import { packageMetadata } from '../package-metadata';
18
- import { MIN_DOC_LINK, MAX_DOC_LINK, POINT, INITIAL_SPIN_DELAY, SPIN_DELAY, EXPONENT_REGEX } from './constants';
19
- import { defined, noop, numericRegex, isNumber, pad, decimalPart, getDeltaFromMouseWheel, getCaretPosition, extractSignificantNumericChars, isRightClick } from './utils';
20
- import { ArrowDirection } from './arrow-direction';
21
- import { mobileOS } from '@progress/kendo-common';
22
- var PARSABLE_OPTIONS = ['min', 'max', 'step', 'decimals'];
23
- var PARSABLE_DEFAULTS = {
24
- decimals: null,
25
- max: null,
26
- min: null,
27
- step: 1
28
- };
29
- var FOCUSED = 'k-focus';
30
- /**
31
- * Represents the [Kendo UI NumericTextBox component for Angular]({% slug overview_numerictextbox %}).
32
- */
33
- var NumericTextBoxComponent = /** @class */ (function () {
34
- function NumericTextBoxComponent(intl, renderer, localizationService, injector, ngZone, changeDetector, hostElement) {
35
- var _this = this;
36
- this.intl = intl;
37
- this.renderer = renderer;
38
- this.localizationService = localizationService;
39
- this.injector = injector;
40
- this.ngZone = ngZone;
41
- this.changeDetector = changeDetector;
42
- this.hostElement = hostElement;
43
- /**
44
- * @hidden
45
- */
46
- this.focusableId = "k-" + guid();
47
- /**
48
- * Determines whether the NumericTextBox is disabled ([see example]({% slug disabled_numerictextbox %})).
49
- */
50
- this.disabled = false;
51
- /**
52
- * Determines whether the NumericTextBox is in its read-only state ([see example]({% slug readonly_numerictextbox %})).
53
- */
54
- this.readonly = false;
55
- /**
56
- * Sets the title of the `input` element of the NumericTextBox.
57
- */
58
- this.title = '';
59
- /**
60
- * Specifies whether the value will be auto-corrected based on the minimum and maximum values
61
- * ([see example]({% slug precision_numerictextbox %})).
62
- */
63
- this.autoCorrect = false;
64
- /**
65
- * Specifies the number of decimals that the user can enter when the input is focused
66
- * ([see example]({% slug precision_numerictextbox %})).
67
- */
68
- this.decimals = null;
69
- /**
70
- * Specifies the value that is used to increment or decrement the component value
71
- * ([see example]({% slug predefinedsteps_numerictextbox %})).
72
- */
73
- this.step = 1;
74
- /**
75
- * Specifies whether the **Up** and **Down** spin buttons will be rendered
76
- * ([see example]({% slug spinbuttons_numerictextbox %})).
77
- */
78
- this.spinners = true;
79
- /**
80
- * Determines whether the built-in minimum or maximum validators are enforced when a form is validated.
81
- *
82
- * > The 4.2.0 Angular version introduces the `min` and `max` validation directives. As a result, even if you set `rangeValidation`
83
- * to `false`, the built-in Angular validators will be executed.
84
- */
85
- this.rangeValidation = true;
86
- /**
87
- * Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
88
- */
89
- this.tabindex = 0;
90
- /**
91
- * Determines whether the value of the NumericTextBox will be changed via scrolling. Defaults to `true`.
92
- *
93
- * @default true
94
- */
95
- this.changeValueOnScroll = true;
96
- /**
97
- * Determines whether the whole value will be selected when the NumericTextBox is clicked. Defaults to `true`.
98
- */
99
- this.selectOnFocus = true;
100
- /**
101
- * Specifies the value of the NumericTextBox
102
- * ([see example]({% slug formats_numerictextbox %})).
103
- */
104
- this.value = null;
105
- /**
106
- * Fires each time the user selects a new value ([see example]({% slug overview_numerictextbox %}#toc-events)).
107
- */
108
- this.valueChange = new EventEmitter();
109
- /**
110
- * Fires each time the user focuses the `input` element ([see example]({% slug overview_numerictextbox %}#toc-events)).
111
- */
112
- this.onFocus = new EventEmitter();
113
- /**
114
- * Fires each time the `input` element gets blurred ([see example]({% slug overview_numerictextbox %}#toc-events)).
115
- */
116
- this.onBlur = new EventEmitter();
117
- /**
118
- * @hidden
119
- */
120
- this.ArrowDirection = ArrowDirection;
121
- /**
122
- * @hidden
123
- */
124
- this.arrowDirection = ArrowDirection.None;
125
- this.hostClasses = true;
126
- this.inputValue = '';
127
- this.minValidateFn = noop;
128
- this.maxValidateFn = noop;
129
- this._format = "n2";
130
- this.isPasted = false;
131
- this.mouseDown = false;
132
- this._size = 'medium';
133
- this._rounded = 'medium';
134
- this._fillMode = 'solid';
135
- this.ngChange = noop;
136
- this.ngTouched = noop;
137
- this.ngValidatorChange = noop;
138
- this.domEvents = [];
139
- /**
140
- * @hidden
141
- */
142
- this.increasePress = function (e) {
143
- _this.arrowPress(ArrowDirection.Up, e);
144
- };
145
- /**
146
- * @hidden
147
- */
148
- this.decreasePress = function (e) {
149
- _this.arrowPress(ArrowDirection.Down, e);
150
- };
151
- /**
152
- * @hidden
153
- */
154
- this.releaseArrow = function () {
155
- clearTimeout(_this.spinTimeout);
156
- if (_this.arrowDirection !== ArrowDirection.None) {
157
- _this.arrowDirection = ArrowDirection.None;
158
- _this.changeDetector.detectChanges();
159
- }
160
- };
161
- /**
162
- * @hidden
163
- */
164
- this.handlePaste = function () {
165
- _this.isPasted = true;
166
- };
167
- /**
168
- * @hidden
169
- */
170
- this.handleInput = function () {
171
- var input = _this.numericInput.nativeElement;
172
- var selectionStart = input.selectionStart, selectionEnd = input.selectionEnd, inputValue = input.value;
173
- if (_this.pressedKey === Keys.NumpadDecimal) {
174
- inputValue = _this.replaceNumpadDotValue();
175
- }
176
- if (_this.isPasted) {
177
- inputValue = _this.formatInputValue(_this.intl.parseNumber(inputValue));
178
- }
179
- if (!_this.isValid(inputValue)) {
180
- input.value = _this.inputValue;
181
- _this.setSelection(selectionStart - 1, selectionEnd - 1);
182
- return;
183
- }
184
- var parsedValue = _this.intl.parseNumber(inputValue);
185
- var value = _this.restrictDecimals(parsedValue);
186
- if (_this.autoCorrect) {
187
- var limited = _this.limitInputValue(value);
188
- value = limited.value;
189
- selectionStart = limited.selectionStart;
190
- selectionEnd = limited.selectionEnd;
191
- }
192
- if (parsedValue !== value || _this.hasTrailingZeros(inputValue) || !_this.focused) {
193
- _this.setInputValue(value);
194
- _this.setSelection(selectionStart, selectionEnd);
195
- }
196
- else {
197
- _this.inputValue = inputValue;
198
- }
199
- if (_this.isPasted) {
200
- input.value = _this.inputValue;
201
- }
202
- _this.updateValue(value);
203
- _this.previousSelection = null;
204
- _this.isPasted = false;
205
- };
206
- /**
207
- * @hidden
208
- */
209
- this.handleDragEnter = function () {
210
- if (!_this.focused && !_this.isDisabled) {
211
- _this.setInputValue(_this.value, true);
212
- }
213
- };
214
- /**
215
- * @hidden
216
- */
217
- this.handleMouseDown = function () {
218
- _this.mouseDown = true;
219
- };
220
- /**
221
- * @hidden
222
- */
223
- this.handleFocus = function () {
224
- if (!_this.focused) {
225
- _this.focused = true;
226
- if (!_this.isDisabled) {
227
- var shouldSelectAll_1 = _this.selectOnFocus || !_this.mouseDown;
228
- _this.ngZone.runOutsideAngular(function () {
229
- setTimeout(function () {
230
- if (shouldSelectAll_1) {
231
- _this.selectAll();
232
- }
233
- else {
234
- _this.selectCaret();
235
- }
236
- }, 0);
237
- });
238
- }
239
- }
240
- _this.mouseDown = false;
241
- if (hasObservers(_this.onFocus)) {
242
- _this.ngZone.run(function () {
243
- _this.onFocus.emit();
244
- });
245
- }
246
- };
247
- /**
248
- * @hidden
249
- */
250
- this.handleBlur = function () {
251
- _this.changeDetector.markForCheck();
252
- _this.focused = false;
253
- //blur is thrown before input when dragging the input text in IE
254
- if (_this.inputValue !== _this.elementValue) {
255
- _this.handleInput();
256
- }
257
- _this.setInputValue();
258
- if (hasObservers(_this.onBlur) || requiresZoneOnBlur(_this.control)) {
259
- _this.ngZone.run(function () {
260
- _this.ngTouched();
261
- _this.onBlur.emit();
262
- });
263
- }
264
- };
265
- /**
266
- * @hidden
267
- */
268
- this.handleKeyDown = function (e) {
269
- if (_this.isDisabled) {
270
- return;
271
- }
272
- var step;
273
- if (e.keyCode === Keys.ArrowDown) {
274
- step = -1;
275
- }
276
- else if (e.keyCode === Keys.ArrowUp) {
277
- step = 1;
278
- }
279
- if (step && _this.step) {
280
- e.preventDefault();
281
- _this.addStep(step);
282
- }
283
- var input = _this.numericInput.nativeElement;
284
- _this.previousSelection = {
285
- end: input.selectionEnd,
286
- start: input.selectionStart
287
- };
288
- _this.pressedKey = e.keyCode;
289
- };
290
- /**
291
- * @hidden
292
- */
293
- this.handleWheel = function (e) {
294
- if (_this.focused && !_this.isDisabled && _this.changeValueOnScroll) {
295
- e.preventDefault();
296
- var delta = getDeltaFromMouseWheel(e);
297
- _this.addStep(delta);
298
- }
299
- };
300
- validatePackage(packageMetadata);
301
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
302
- }
303
- NumericTextBoxComponent_1 = NumericTextBoxComponent;
304
- Object.defineProperty(NumericTextBoxComponent.prototype, "format", {
305
- /**
306
- * Specifies the number format which is used when the NumericTextBox is not focused
307
- * ([see example]({% slug formats_numerictextbox %})).
308
- * If `format` is set to `null` or `undefined`, the default format will be used.
309
- */
310
- get: function () {
311
- var format = this._format;
312
- return format !== null && format !== undefined ? format : 'n2';
313
- },
314
- set: function (value) {
315
- this._format = value;
316
- },
317
- enumerable: true,
318
- configurable: true
319
- });
320
- Object.defineProperty(NumericTextBoxComponent.prototype, "tabIndex", {
321
- get: function () {
322
- return this.tabindex;
323
- },
324
- /**
325
- * @hidden
326
- */
327
- set: function (tabIndex) {
328
- this.tabindex = tabIndex;
329
- },
330
- enumerable: true,
331
- configurable: true
332
- });
333
- Object.defineProperty(NumericTextBoxComponent.prototype, "size", {
334
- get: function () {
335
- return this._size;
336
- },
337
- /**
338
- * The size property specifies padding of the NumericTextBox internal input element
339
- * ([see example]({% slug appearance_numerictextbox %}#toc-size)).
340
- * The possible values are:
341
- * * `'small'`
342
- * * `'medium'` (default)
343
- * * `'large'`
344
- * * `null`
345
- */
346
- set: function (size) {
347
- this.handleClasses(size, 'size');
348
- this._size = size;
349
- },
350
- enumerable: true,
351
- configurable: true
352
- });
353
- Object.defineProperty(NumericTextBoxComponent.prototype, "rounded", {
354
- get: function () {
355
- return this._rounded;
356
- },
357
- /**
358
- * The rounded property specifies the border radius of the NumericTextBox
359
- * ([see example]({% slug appearance_numerictextbox %}#toc-rounded)).
360
- * The possible values are:
361
- * * `'small'`
362
- * * `'medium'` (default)
363
- * * `'large'`
364
- * * `null`
365
- */
366
- set: function (rounded) {
367
- this.handleClasses(rounded, 'rounded');
368
- this._rounded = rounded;
369
- },
370
- enumerable: true,
371
- configurable: true
372
- });
373
- Object.defineProperty(NumericTextBoxComponent.prototype, "fillMode", {
374
- get: function () {
375
- return this._fillMode;
376
- },
377
- /**
378
- * The fillMode property specifies the background and border styles of the NumericTextBox
379
- * ([see example]({% slug appearance_numerictextbox %}#toc-fillMode)).
380
- * The possible values are:
381
- * * `'flat'`
382
- * * `'solid'` (default)
383
- * * `'outline'`
384
- * * `null`
385
- */
386
- set: function (fillMode) {
387
- this.handleClasses(fillMode, 'fillMode');
388
- this._fillMode = fillMode;
389
- },
390
- enumerable: true,
391
- configurable: true
392
- });
393
- Object.defineProperty(NumericTextBoxComponent.prototype, "disableClass", {
394
- get: function () {
395
- return this.disabled;
396
- },
397
- enumerable: true,
398
- configurable: true
399
- });
400
- NumericTextBoxComponent.prototype.ngOnInit = function () {
401
- var _this = this;
402
- this.subscriptions = this.localizationService
403
- .changes
404
- .subscribe(function (_a) {
405
- var rtl = _a.rtl;
406
- _this.direction = rtl ? 'rtl' : 'ltr';
407
- });
408
- this.subscriptions.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
409
- if (this.hostElement) {
410
- this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
411
- }
412
- this.control = this.injector.get(NgControl, null);
413
- this.ngZone.runOutsideAngular(function () {
414
- _this.domEvents.push(_this.renderer.listen(_this.hostElement.nativeElement, 'mousewheel', _this.handleWheel.bind(_this)));
415
- _this.domEvents.push(_this.renderer.listen(_this.hostElement.nativeElement, 'DOMMouseScroll', _this.handleWheel.bind(_this)));
416
- });
417
- };
418
- NumericTextBoxComponent.prototype.ngAfterViewInit = function () {
419
- var _this = this;
420
- var stylingInputs = ['size', 'rounded', 'fillMode'];
421
- stylingInputs.forEach(function (input) {
422
- _this.handleClasses(_this[input], input);
423
- });
424
- };
425
- /**
426
- * @hidden
427
- */
428
- NumericTextBoxComponent.prototype.ngOnChanges = function (changes) {
429
- if (anyChanged(PARSABLE_OPTIONS, changes, false)) {
430
- this.parseOptions(PARSABLE_OPTIONS.filter(function (option) { return changes[option]; }));
431
- }
432
- this.verifySettings();
433
- if (anyChanged(['min', 'max', 'rangeValidation'], changes, false)) {
434
- this.minValidateFn = this.rangeValidation ? createMinValidator(this.min) : noop;
435
- this.maxValidateFn = this.rangeValidation ? createMaxValidator(this.max) : noop;
436
- this.ngValidatorChange();
437
- }
438
- if (anyChanged(['autoCorrect', 'decimals', 'min'], changes)) {
439
- delete this.numericRegex;
440
- }
441
- if (anyChanged(['value', 'format'], changes, false)) {
442
- this.verifyValue(this.value);
443
- this.value = this.restrictModelValue(this.value);
444
- if (!this.focused || (this.intl.parseNumber(this.elementValue) !== this.value)) {
445
- this.setInputValue();
446
- }
447
- }
448
- };
449
- /**
450
- * @hidden
451
- */
452
- NumericTextBoxComponent.prototype.ngOnDestroy = function () {
453
- if (this.subscriptions) {
454
- this.subscriptions.unsubscribe();
455
- }
456
- clearTimeout(this.spinTimeout);
457
- this.domEvents.forEach(function (unbindHandler) { return unbindHandler(); });
458
- };
459
- /**
460
- * @hidden
461
- */
462
- NumericTextBoxComponent.prototype.validate = function (control) {
463
- return this.minValidateFn(control) || this.maxValidateFn(control);
464
- };
465
- /**
466
- * @hidden
467
- */
468
- NumericTextBoxComponent.prototype.registerOnValidatorChange = function (fn) {
469
- this.ngValidatorChange = fn;
470
- };
471
- /**
472
- * @hidden
473
- */
474
- NumericTextBoxComponent.prototype.writeValue = function (value) {
475
- this.verifyValue(value);
476
- var restrictedValue = this.restrictModelValue(value);
477
- this.value = restrictedValue;
478
- this.setInputValue();
479
- };
480
- /**
481
- * @hidden
482
- */
483
- NumericTextBoxComponent.prototype.registerOnChange = function (fn) {
484
- this.ngChange = fn;
485
- };
486
- /**
487
- * @hidden
488
- */
489
- NumericTextBoxComponent.prototype.registerOnTouched = function (fn) {
490
- this.ngTouched = fn;
491
- };
492
- /**
493
- * @hidden
494
- * Called when the status of the component changes to or from `disabled`.
495
- * Depending on the value, it enables or disables the appropriate DOM element.
496
- *
497
- * @param isDisabled
498
- */
499
- NumericTextBoxComponent.prototype.setDisabledState = function (isDisabled) {
500
- this.changeDetector.markForCheck();
501
- this.disabled = isDisabled;
502
- };
503
- /**
504
- * Focuses the NumericTextBox.
505
- *
506
- * @example
507
- * ```ts-no-run
508
- * _@Component({
509
- * selector: 'my-app',
510
- * template: `
511
- * <button (click)="numerictextbox.focus()">Focus NumericTextBox</button>
512
- * <kendo-numerictextbox #numerictextbox></kendo-numerictextbox>
513
- * `
514
- * })
515
- * class AppComponent { }
516
- * ```
517
- */
518
- NumericTextBoxComponent.prototype.focus = function () {
519
- invokeElementMethod(this.numericInput, 'focus');
520
- };
521
- /**
522
- * Blurs the NumericTextBox.
523
- */
524
- NumericTextBoxComponent.prototype.blur = function () {
525
- invokeElementMethod(this.numericInput, 'blur');
526
- };
527
- /**
528
- * Notifies the `NumericTextBoxComponent` that the input value should be changed.
529
- * Can be used to update the input after setting the component properties directly.
530
- */
531
- NumericTextBoxComponent.prototype.notifyValueChange = function () {
532
- this.setInputValue();
533
- };
534
- Object.defineProperty(NumericTextBoxComponent.prototype, "incrementTitle", {
535
- /**
536
- * @hidden
537
- */
538
- get: function () {
539
- return this.localizationService.get('increment');
540
- },
541
- enumerable: true,
542
- configurable: true
543
- });
544
- Object.defineProperty(NumericTextBoxComponent.prototype, "decrementTitle", {
545
- /**
546
- * @hidden
547
- */
548
- get: function () {
549
- return this.localizationService.get('decrement');
550
- },
551
- enumerable: true,
552
- configurable: true
553
- });
554
- Object.defineProperty(NumericTextBoxComponent.prototype, "decimalSeparator", {
555
- get: function () {
556
- var numberSymbols = this.intl.numberSymbols();
557
- return numberSymbols.decimal;
558
- },
559
- enumerable: true,
560
- configurable: true
561
- });
562
- Object.defineProperty(NumericTextBoxComponent.prototype, "elementValue", {
563
- get: function () {
564
- return this.numericInput.nativeElement.value;
565
- },
566
- set: function (value) {
567
- this.renderer.setProperty(this.numericInput.nativeElement, 'value', value);
568
- },
569
- enumerable: true,
570
- configurable: true
571
- });
572
- Object.defineProperty(NumericTextBoxComponent.prototype, "focused", {
573
- get: function () {
574
- return this.isFocused;
575
- },
576
- set: function (value) {
577
- if (this.isFocused !== value && this.hostElement) {
578
- var wrap = this.hostElement.nativeElement;
579
- if (value) {
580
- this.renderer.addClass(wrap, FOCUSED);
581
- }
582
- else {
583
- this.renderer.removeClass(wrap, FOCUSED);
584
- }
585
- this.isFocused = value;
586
- }
587
- },
588
- enumerable: true,
589
- configurable: true
590
- });
591
- Object.defineProperty(NumericTextBoxComponent.prototype, "hasDecimals", {
592
- get: function () {
593
- return this.decimals !== null && this.decimals >= 0;
594
- },
595
- enumerable: true,
596
- configurable: true
597
- });
598
- Object.defineProperty(NumericTextBoxComponent.prototype, "isDisabled", {
599
- get: function () {
600
- return this.disabled || this.readonly;
601
- },
602
- enumerable: true,
603
- configurable: true
604
- });
605
- NumericTextBoxComponent.prototype.arrowPress = function (direction, e) {
606
- e.preventDefault();
607
- if (this.isDisabled || isRightClick(e)) {
608
- return;
609
- }
610
- if (!mobileOS) {
611
- this.focused = true;
612
- this.focus();
613
- }
614
- if (this.arrowDirection !== direction) {
615
- this.arrowDirection = direction;
616
- this.changeDetector.detectChanges();
617
- }
618
- if (this.step) {
619
- this.spin(direction, INITIAL_SPIN_DELAY);
620
- }
621
- else {
622
- this.setInputValue();
623
- }
624
- };
625
- NumericTextBoxComponent.prototype.updateValue = function (value) {
626
- var _this = this;
627
- if (!areSame(this.value, value)) {
628
- this.ngZone.run(function () {
629
- _this.value = value;
630
- _this.ngChange(value);
631
- _this.valueChange.emit(value);
632
- _this.changeDetector.markForCheck();
633
- });
634
- }
635
- };
636
- NumericTextBoxComponent.prototype.replaceNumpadDotValue = function () {
637
- var value = this.inputValue || "";
638
- if (this.previousSelection) {
639
- var input = this.numericInput.nativeElement;
640
- var selectionStart = input.selectionStart, selectionEnd = input.selectionEnd;
641
- var _a = this.previousSelection, start = _a.start, end = _a.end;
642
- input.value = value = value.substring(0, start) + this.decimalSeparator + value.substring(end);
643
- this.setSelection(selectionStart, selectionEnd);
644
- }
645
- return value;
646
- };
647
- NumericTextBoxComponent.prototype.isValid = function (value) {
648
- if (!this.numericRegex) {
649
- this.numericRegex = numericRegex({
650
- autoCorrect: this.autoCorrect,
651
- decimals: this.decimals,
652
- min: this.min,
653
- separator: this.decimalSeparator
654
- });
655
- }
656
- return this.numericRegex.test(value);
657
- };
658
- NumericTextBoxComponent.prototype.spin = function (step, timeout) {
659
- var _this = this;
660
- clearTimeout(this.spinTimeout);
661
- this.spinTimeout = window.setTimeout(function () {
662
- _this.spin(step, SPIN_DELAY);
663
- }, timeout);
664
- this.addStep(step);
665
- };
666
- NumericTextBoxComponent.prototype.addStep = function (step) {
667
- var value = add(this.value || 0, this.step * step);
668
- value = this.limitValue(value);
669
- value = this.restrictDecimals(value);
670
- this.setInputValue(value);
671
- this.updateValue(value);
672
- };
673
- NumericTextBoxComponent.prototype.setSelection = function (start, end) {
674
- if (this.focused) {
675
- invokeElementMethod(this.numericInput, 'setSelectionRange', start, end);
676
- }
677
- };
678
- NumericTextBoxComponent.prototype.limitValue = function (value) {
679
- var result = value;
680
- if (!this.isInRange(value)) {
681
- if (isNumber(this.max) && value > this.max) {
682
- result = this.max;
683
- }
684
- if (isNumber(this.min) && value < this.min) {
685
- result = this.min;
686
- }
687
- }
688
- return result;
689
- };
690
- NumericTextBoxComponent.prototype.limitInputValue = function (value) {
691
- var _a = this.numericInput.nativeElement, selectionStart = _a.selectionStart, selectionEnd = _a.selectionEnd, enteredValue = _a.value;
692
- var limitedValue = value;
693
- var selectToEnd = false;
694
- if (!this.isInRange(value)) {
695
- var lengthChange = enteredValue.length - String(this.inputValue).length;
696
- var _b = this, min = _b.min, max = _b.max;
697
- var hasMax = isNumber(max);
698
- var hasMin = isNumber(min);
699
- var padLimit = void 0, replaceNext = void 0;
700
- var correctedValue = value;
701
- if (selectionStart === 0 && this.inputValue.substr(1) === enteredValue) {
702
- return {
703
- selectionEnd: selectionEnd,
704
- selectionStart: selectionStart,
705
- value: null
706
- };
707
- }
708
- if (hasMax && value > max) {
709
- if (value > 0) {
710
- replaceNext = true;
711
- }
712
- else {
713
- padLimit = max;
714
- }
715
- }
716
- else if (hasMin && value < min) {
717
- if (value > 0) {
718
- padLimit = min;
719
- }
720
- else {
721
- replaceNext = true;
722
- }
723
- }
724
- if (padLimit) {
725
- var paddedValue = this.tryPadValue(value, padLimit);
726
- if (paddedValue && decimalPart(value) !== decimalPart(padLimit)) {
727
- correctedValue = paddedValue;
728
- selectToEnd = true;
729
- }
730
- }
731
- else if (replaceNext) {
732
- if (this.inputValue && selectionStart !== enteredValue.length) {
733
- correctedValue = parseFloat(enteredValue.substr(0, selectionStart) +
734
- enteredValue.substr(selectionStart + lengthChange));
735
- }
736
- }
737
- limitedValue = this.limitValue(correctedValue);
738
- selectToEnd = (selectToEnd || limitedValue !== correctedValue) && this.previousSelection &&
739
- (this.previousSelection.end - this.previousSelection.start + lengthChange) > 0;
740
- }
741
- return {
742
- selectionEnd: selectToEnd ? String(limitedValue).length : selectionEnd,
743
- selectionStart: selectionStart,
744
- value: limitedValue
745
- };
746
- };
747
- NumericTextBoxComponent.prototype.tryPadValue = function (value, limit) {
748
- var limitLength = String(Math.floor(limit)).length;
749
- var zeroPadded = pad(value, limitLength);
750
- var zeroPaddedNext = pad(value, limitLength + 1);
751
- var result;
752
- if (this.isInRange(zeroPadded)) {
753
- result = zeroPadded;
754
- }
755
- else if (this.isInRange(zeroPaddedNext)) {
756
- result = zeroPaddedNext;
757
- }
758
- return result;
759
- };
760
- NumericTextBoxComponent.prototype.isInRange = function (value) {
761
- return !isNumber(value) || ((!isNumber(this.min) || this.min <= value) && (!isNumber(this.max) || value <= this.max));
762
- };
763
- NumericTextBoxComponent.prototype.restrictModelValue = function (value) {
764
- var result = this.restrictDecimals(value, true);
765
- if (this.autoCorrect && this.limitValue(result) !== result) {
766
- result = null;
767
- }
768
- return result;
769
- };
770
- NumericTextBoxComponent.prototype.restrictDecimals = function (value, round) {
771
- var result = value;
772
- if (value && this.hasDecimals) {
773
- var decimals = this.decimals;
774
- var stringValue = String(value);
775
- if (round || EXPONENT_REGEX.test(stringValue)) {
776
- result = toFixedPrecision(value, decimals);
777
- }
778
- else {
779
- var parts = stringValue.split(POINT);
780
- var fraction = parts[1];
781
- if (fraction && fraction.length > decimals) {
782
- fraction = fraction.substr(0, decimals);
783
- result = parseFloat("" + parts[0] + POINT + fraction);
784
- }
785
- }
786
- }
787
- return result;
788
- };
789
- NumericTextBoxComponent.prototype.formatInputValue = function (value) {
790
- var stringValue = String(value);
791
- var exponentMatch = EXPONENT_REGEX.exec(stringValue);
792
- if (exponentMatch) {
793
- stringValue = value.toFixed(limitPrecision(parseInt(exponentMatch[1], 10)));
794
- }
795
- return stringValue.replace(POINT, this.decimalSeparator);
796
- };
797
- NumericTextBoxComponent.prototype.formatValue = function (value, focused) {
798
- var formattedValue;
799
- if (value === null || !defined(value) || value === '') {
800
- formattedValue = '';
801
- }
802
- else if (focused && !this.readonly) {
803
- formattedValue = this.formatInputValue(value);
804
- }
805
- else {
806
- formattedValue = this.intl.formatNumber(value, this.format);
807
- }
808
- return formattedValue;
809
- };
810
- NumericTextBoxComponent.prototype.setInputValue = function (value, focused) {
811
- if (value === void 0) { value = this.value; }
812
- if (focused === void 0) { focused = this.focused; }
813
- var formattedValue = this.formatValue(value, focused);
814
- this.elementValue = formattedValue;
815
- this.inputValue = formattedValue;
816
- };
817
- NumericTextBoxComponent.prototype.verifySettings = function () {
818
- if (!isDevMode()) {
819
- return;
820
- }
821
- if (this.min !== null && this.max !== null && this.min > this.max) {
822
- throw new Error("The max value should be bigger than the min. See " + MIN_DOC_LINK + " and " + MAX_DOC_LINK + ".");
823
- }
824
- };
825
- NumericTextBoxComponent.prototype.verifyValue = function (value) {
826
- if (isDevMode() && value && typeof value !== 'number') {
827
- throw new Error("The NumericTextBox component requires value of type Number and " + JSON.stringify(value) + " was set.");
828
- }
829
- };
830
- NumericTextBoxComponent.prototype.parseOptions = function (options) {
831
- for (var idx = 0; idx < options.length; idx++) {
832
- var name_1 = options[idx];
833
- var value = this[name_1];
834
- if (typeof value === 'string') {
835
- var parsed = parseFloat(value);
836
- var valid = !isNaN(parsed);
837
- if (isDevMode() && !valid && value !== '') {
838
- throw new Error('The NumericTextBox component requires value of type Number or a String representing ' +
839
- ("a number for the " + name_1 + " property and " + JSON.stringify(value) + " was set."));
840
- }
841
- this[name_1] = valid ? parsed : PARSABLE_DEFAULTS[name_1];
842
- }
843
- }
844
- };
845
- NumericTextBoxComponent.prototype.intlChange = function () {
846
- delete this.numericRegex;
847
- if (this.numericInput && (!this.focused || !this.isValid(this.elementValue))) {
848
- this.setInputValue();
849
- }
850
- };
851
- NumericTextBoxComponent.prototype.hasTrailingZeros = function (inputValue) {
852
- if (this.hasDecimals && this.focused) {
853
- var fraction = inputValue.split(this.decimalSeparator)[1];
854
- return fraction && fraction.length > this.decimals && fraction.lastIndexOf('0') === fraction.length - 1;
855
- }
856
- };
857
- NumericTextBoxComponent.prototype.selectAll = function () {
858
- this.setInputValue();
859
- this.setSelection(0, this.inputValue.length);
860
- };
861
- NumericTextBoxComponent.prototype.selectCaret = function () {
862
- var caretPosition = getCaretPosition(this.numericInput.nativeElement);
863
- var formattedValue = this.elementValue;
864
- var partialValue = formattedValue.substring(0, caretPosition);
865
- this.setInputValue();
866
- if (partialValue.length) {
867
- var significantCharsInFormattedValue = extractSignificantNumericChars(partialValue, this.decimalSeparator);
868
- var adjustedSignificantChars = this.adjustSignificantChars(formattedValue, significantCharsInFormattedValue);
869
- this.setSelection(adjustedSignificantChars, adjustedSignificantChars);
870
- }
871
- else {
872
- this.setSelection(0, 0);
873
- }
874
- };
875
- NumericTextBoxComponent.prototype.numberOfLeadingZeroes = function (formattedValue) {
876
- var separatorIndex = formattedValue.indexOf(this.decimalSeparator);
877
- var matchedLeadingZeroes = formattedValue.match(/^[^1-9]*?(0+)/);
878
- if (matchedLeadingZeroes) {
879
- var lengthOfMatch = matchedLeadingZeroes[0].length;
880
- var lengthOfLeadingZeroesMatch = matchedLeadingZeroes[1].length;
881
- return lengthOfMatch === separatorIndex ? lengthOfLeadingZeroesMatch - 1 : lengthOfLeadingZeroesMatch;
882
- }
883
- return 0;
884
- };
885
- NumericTextBoxComponent.prototype.adjustSignificantChars = function (formattedValue, significantChars) {
886
- var leadingZeroes = this.numberOfLeadingZeroes(formattedValue);
887
- if (leadingZeroes > 0) {
888
- return Math.max(0, significantChars - leadingZeroes);
889
- }
890
- return significantChars;
891
- };
892
- NumericTextBoxComponent.prototype.handleClasses = function (value, input) {
893
- var elem = this.hostElement.nativeElement;
894
- var classes = getStylingClasses('input', input, this[input], value);
895
- if (classes.toRemove) {
896
- this.renderer.removeClass(elem, classes.toRemove);
897
- }
898
- if (classes.toAdd) {
899
- this.renderer.addClass(elem, classes.toAdd);
900
- }
901
- };
902
- var NumericTextBoxComponent_1;
903
- tslib_1.__decorate([
904
- Input(),
905
- tslib_1.__metadata("design:type", String)
906
- ], NumericTextBoxComponent.prototype, "focusableId", void 0);
907
- tslib_1.__decorate([
908
- Input(),
909
- tslib_1.__metadata("design:type", Boolean)
910
- ], NumericTextBoxComponent.prototype, "disabled", void 0);
911
- tslib_1.__decorate([
912
- Input(),
913
- tslib_1.__metadata("design:type", Boolean)
914
- ], NumericTextBoxComponent.prototype, "readonly", void 0);
915
- tslib_1.__decorate([
916
- Input(),
917
- tslib_1.__metadata("design:type", String)
918
- ], NumericTextBoxComponent.prototype, "title", void 0);
919
- tslib_1.__decorate([
920
- Input(),
921
- tslib_1.__metadata("design:type", Boolean)
922
- ], NumericTextBoxComponent.prototype, "autoCorrect", void 0);
923
- tslib_1.__decorate([
924
- Input(),
925
- tslib_1.__metadata("design:type", Object),
926
- tslib_1.__metadata("design:paramtypes", [Object])
927
- ], NumericTextBoxComponent.prototype, "format", null);
928
- tslib_1.__decorate([
929
- Input(),
930
- tslib_1.__metadata("design:type", Number)
931
- ], NumericTextBoxComponent.prototype, "max", void 0);
932
- tslib_1.__decorate([
933
- Input(),
934
- tslib_1.__metadata("design:type", Number)
935
- ], NumericTextBoxComponent.prototype, "min", void 0);
936
- tslib_1.__decorate([
937
- Input(),
938
- tslib_1.__metadata("design:type", Number)
939
- ], NumericTextBoxComponent.prototype, "decimals", void 0);
940
- tslib_1.__decorate([
941
- Input(),
942
- tslib_1.__metadata("design:type", String)
943
- ], NumericTextBoxComponent.prototype, "placeholder", void 0);
944
- tslib_1.__decorate([
945
- Input(),
946
- tslib_1.__metadata("design:type", Number)
947
- ], NumericTextBoxComponent.prototype, "step", void 0);
948
- tslib_1.__decorate([
949
- Input(),
950
- tslib_1.__metadata("design:type", Boolean)
951
- ], NumericTextBoxComponent.prototype, "spinners", void 0);
952
- tslib_1.__decorate([
953
- Input(),
954
- tslib_1.__metadata("design:type", Boolean)
955
- ], NumericTextBoxComponent.prototype, "rangeValidation", void 0);
956
- tslib_1.__decorate([
957
- Input(),
958
- tslib_1.__metadata("design:type", Number)
959
- ], NumericTextBoxComponent.prototype, "tabindex", void 0);
960
- tslib_1.__decorate([
961
- Input(),
962
- tslib_1.__metadata("design:type", Number),
963
- tslib_1.__metadata("design:paramtypes", [Number])
964
- ], NumericTextBoxComponent.prototype, "tabIndex", null);
965
- tslib_1.__decorate([
966
- Input(),
967
- tslib_1.__metadata("design:type", Boolean)
968
- ], NumericTextBoxComponent.prototype, "changeValueOnScroll", void 0);
969
- tslib_1.__decorate([
970
- Input(),
971
- tslib_1.__metadata("design:type", Boolean)
972
- ], NumericTextBoxComponent.prototype, "selectOnFocus", void 0);
973
- tslib_1.__decorate([
974
- Input(),
975
- tslib_1.__metadata("design:type", Number)
976
- ], NumericTextBoxComponent.prototype, "value", void 0);
977
- tslib_1.__decorate([
978
- Input(),
979
- tslib_1.__metadata("design:type", Number)
980
- ], NumericTextBoxComponent.prototype, "maxlength", void 0);
981
- tslib_1.__decorate([
982
- Input(),
983
- tslib_1.__metadata("design:type", String),
984
- tslib_1.__metadata("design:paramtypes", [String])
985
- ], NumericTextBoxComponent.prototype, "size", null);
986
- tslib_1.__decorate([
987
- Input(),
988
- tslib_1.__metadata("design:type", String),
989
- tslib_1.__metadata("design:paramtypes", [String])
990
- ], NumericTextBoxComponent.prototype, "rounded", null);
991
- tslib_1.__decorate([
992
- Input(),
993
- tslib_1.__metadata("design:type", String),
994
- tslib_1.__metadata("design:paramtypes", [String])
995
- ], NumericTextBoxComponent.prototype, "fillMode", null);
996
- tslib_1.__decorate([
997
- Output(),
998
- tslib_1.__metadata("design:type", EventEmitter)
999
- ], NumericTextBoxComponent.prototype, "valueChange", void 0);
1000
- tslib_1.__decorate([
1001
- Output('focus'),
1002
- tslib_1.__metadata("design:type", EventEmitter)
1003
- ], NumericTextBoxComponent.prototype, "onFocus", void 0);
1004
- tslib_1.__decorate([
1005
- Output('blur'),
1006
- tslib_1.__metadata("design:type", EventEmitter)
1007
- ], NumericTextBoxComponent.prototype, "onBlur", void 0);
1008
- tslib_1.__decorate([
1009
- ViewChild('numericInput', { static: true }),
1010
- tslib_1.__metadata("design:type", ElementRef)
1011
- ], NumericTextBoxComponent.prototype, "numericInput", void 0);
1012
- tslib_1.__decorate([
1013
- HostBinding('attr.dir'),
1014
- tslib_1.__metadata("design:type", String)
1015
- ], NumericTextBoxComponent.prototype, "direction", void 0);
1016
- tslib_1.__decorate([
1017
- HostBinding('class.k-disabled'),
1018
- tslib_1.__metadata("design:type", Boolean),
1019
- tslib_1.__metadata("design:paramtypes", [])
1020
- ], NumericTextBoxComponent.prototype, "disableClass", null);
1021
- tslib_1.__decorate([
1022
- HostBinding('class.k-input'),
1023
- HostBinding('class.k-numerictextbox'),
1024
- tslib_1.__metadata("design:type", Boolean)
1025
- ], NumericTextBoxComponent.prototype, "hostClasses", void 0);
1026
- NumericTextBoxComponent = NumericTextBoxComponent_1 = tslib_1.__decorate([
1027
- Component({
1028
- exportAs: 'kendoNumericTextBox',
1029
- providers: [
1030
- LocalizationService,
1031
- { provide: L10N_PREFIX, useValue: 'kendo.numerictextbox' },
1032
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(function () { return NumericTextBoxComponent_1; }), multi: true },
1033
- { provide: NG_VALIDATORS, useExisting: forwardRef(function () { return NumericTextBoxComponent_1; }), multi: true },
1034
- { provide: KendoInput, useExisting: forwardRef(function () { return NumericTextBoxComponent_1; }) }
1035
- ],
1036
- selector: 'kendo-numerictextbox',
1037
- template: "\n <ng-container kendoNumericTextBoxLocalizedMessages\n i18n-increment=\"kendo.numerictextbox.increment|The title for the **Increment** button in the NumericTextBox\"\n increment=\"Increase value\"\n i18n-decrement=\"kendo.numerictextbox.decrement|The title for the **Decrement** button in the NumericTextBox\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <input\n role=\"spinbutton\"\n class=\"k-input-inner\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n [id]=\"focusableId\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"value\"\n [attr.title]=\"title\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxLength]=\"maxlength\"\n [tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: handleMouseDown,\n dragenter: handleDragEnter,\n keydown: handleKeyDown,\n input: handleInput,\n focus: handleFocus,\n blur: handleBlur,\n paste: handlePaste\n }\"\n #numericInput />\n <span\n class=\"k-input-spinner k-spin-button\" *ngIf=\"spinners\"\n [kendoEventsOutsideAngular]=\"{ mouseup: releaseArrow, mouseleave: releaseArrow }\"\n >\n <button\n type=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: increasePress }\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"incrementTitle\"\n [title]=\"incrementTitle\"\n [class.k-active]=\"arrowDirection === ArrowDirection.Up\"\n class=\"k-spinner-increase k-button k-icon-button k-button-solid k-button-solid-base\"\n tabindex=\"-1\"\n >\n <span class=\"k-button-icon k-icon k-i-arrow-n\"></span>\n </button>\n <button\n type=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: decreasePress }\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"decrementTitle\"\n [title]=\"decrementTitle\"\n [class.k-active]=\"arrowDirection === ArrowDirection.Down\"\n class=\"k-spinner-decrease k-button k-icon-button k-button-solid k-button-solid-base\"\n tabindex=\"-1\"\n >\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n </span>\n "
1038
- }),
1039
- tslib_1.__metadata("design:paramtypes", [IntlService,
1040
- Renderer2,
1041
- LocalizationService,
1042
- Injector,
1043
- NgZone,
1044
- ChangeDetectorRef,
1045
- ElementRef])
1046
- ], NumericTextBoxComponent);
1047
- return NumericTextBoxComponent;
1048
- }());
1049
- export { NumericTextBoxComponent };