@progress/kendo-angular-dropdowns 6.0.2 → 7.0.0-next.202204011414

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 (347) hide show
  1. package/{dist/es2015/autocomplete → autocomplete}/autocomplete.component.d.ts +34 -22
  2. package/{dist/es2015/autocomplete → autocomplete}/autocomplete.module.d.ts +7 -0
  3. package/bundles/kendo-angular-dropdowns.umd.js +5 -0
  4. package/{dist/es2015/comboboxes → comboboxes}/combobox-column/column-cell-template.directive.d.ts +3 -0
  5. package/{dist/es2015/comboboxes → comboboxes}/combobox-column/column-header-template.directive.d.ts +3 -0
  6. package/{dist/es2015/comboboxes → comboboxes}/combobox-column/combobox-column.component.d.ts +3 -0
  7. package/{dist/es2015/comboboxes → comboboxes}/combobox-column/util.d.ts +0 -0
  8. package/{dist/es2015/comboboxes → comboboxes}/combobox.component.d.ts +40 -26
  9. package/comboboxes/combobox.module.d.ts +31 -0
  10. package/{dist/es2015/comboboxes → comboboxes}/multicolumncombobox.component.d.ts +8 -5
  11. package/{dist/es2015/common → common}/constants/error-messages.d.ts +27 -27
  12. package/{dist/es2015/common → common}/constants/touch-enabled.d.ts +0 -0
  13. package/{dist/es2015/common → common}/data.service.d.ts +6 -2
  14. package/{dist/es2015/common → common}/disabled-items/disabled-items.service.d.ts +3 -0
  15. package/{dist/es2015/common → common}/disabled-items/item-disabled.d.ts +0 -0
  16. package/{dist/es2015/common → common}/filter-input.directive.d.ts +3 -0
  17. package/{dist/es2015/common → common}/filtering/filter-settings.d.ts +0 -0
  18. package/{dist/es2015/common → common}/filtering/filter.directive.d.ts +6 -2
  19. package/{dist/es2015/common → common}/filtering/filterable-component.d.ts +0 -0
  20. package/{dist/es2015/common → common}/list-item.directive.d.ts +3 -0
  21. package/{dist/es2015/common → common}/list.component.d.ts +11 -6
  22. package/{dist/es2015/common → common}/localization/custom-messages.component.d.ts +4 -1
  23. package/{dist/es2015/common → common}/localization/localized-messages.directive.d.ts +3 -0
  24. package/{dist/es2015/common → common}/localization/messages.d.ts +3 -0
  25. package/{dist/es2015/common → common}/models/checkboxes-settings.d.ts +1 -1
  26. package/{dist/es2015/common → common}/models/direction.d.ts +0 -0
  27. package/{dist/es2015/common → common}/models/fillmode.d.ts +0 -0
  28. package/{dist/es2015/common → common}/models/list-type.d.ts +0 -0
  29. package/{dist/es2015/common → common}/models/page-change-event.d.ts +0 -0
  30. package/{dist/es2015/common → common}/models/popup-settings.d.ts +0 -0
  31. package/{dist/es2015/common → common}/models/preventable-event.d.ts +0 -0
  32. package/{dist/es2015/common → common}/models/remove-tag-event.d.ts +0 -0
  33. package/{dist/es2015/common → common}/models/rounded.d.ts +0 -0
  34. package/{dist/es2015/common → common}/models/size.d.ts +0 -0
  35. package/{dist/es2015/common → common}/models/virtualization-settings.d.ts +0 -0
  36. package/{dist/es2015/common → common}/navigation/navigation-action.d.ts +0 -0
  37. package/{dist/es2015/common → common}/navigation/navigation.service.d.ts +3 -0
  38. package/{dist/es2015/common → common}/searchbar.component.d.ts +9 -4
  39. package/{dist/es2015/common → common}/selection/selectable.directive.d.ts +5 -2
  40. package/{dist/es2015/common → common}/selection/selection.service.d.ts +6 -2
  41. package/common/shared-directives.module.d.ts +37 -0
  42. package/common/shared.module.d.ts +26 -0
  43. package/{dist/es2015/common → common}/taglist.component.d.ts +7 -3
  44. package/{dist/es2015/common → common}/templates/custom-item-template.directive.d.ts +3 -0
  45. package/{dist/es2015/common → common}/templates/fixed-group-template.directive.d.ts +3 -0
  46. package/{dist/es2015/common → common}/templates/footer-template.directive.d.ts +3 -0
  47. package/{dist/es2015/common → common}/templates/group-tag-template.directive.d.ts +3 -0
  48. package/{dist/es2015/common → common}/templates/group-template.directive.d.ts +3 -0
  49. package/{dist/es2015/common → common}/templates/header-template.directive.d.ts +3 -0
  50. package/{dist/es2015/common → common}/templates/item-template.directive.d.ts +3 -0
  51. package/{dist/es2015/common → common}/templates/no-data-template.directive.d.ts +3 -0
  52. package/{dist/es2015/common → common}/templates/tag-template.directive.d.ts +3 -0
  53. package/{dist/es2015/common → common}/templates/template-context.directive.d.ts +4 -1
  54. package/{dist/es2015/common → common}/templates/value-template.directive.d.ts +3 -0
  55. package/{dist/es2015/common → common}/util.d.ts +3 -2
  56. package/{dist/es2015/dropdownlist → dropdownlist}/dropdownlist.component.d.ts +48 -35
  57. package/{dist/es2015/dropdownlist → dropdownlist}/dropdownlist.module.d.ts +7 -0
  58. package/{dist/es2015/dropdowns.module.d.ts → dropdowns.module.d.ts} +9 -0
  59. package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/base-check.directive.d.ts +3 -0
  60. package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/check-all.directive.d.ts +5 -2
  61. package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/check.directive.d.ts +3 -0
  62. package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/checkable-settings.d.ts +0 -0
  63. package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/checked-item.d.ts +0 -0
  64. package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/dropdowntree/flat-binding.directive.d.ts +5 -5
  65. package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/dropdowntree/hierarchy-binding.directive.d.ts +4 -10
  66. package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/multiselecttree/flat-binding.directive.d.ts +5 -5
  67. package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/multiselecttree/hierarchy-binding.directive.d.ts +4 -10
  68. package/{dist/es2015/dropdowntrees → dropdowntrees}/dropdowntree.component.d.ts +49 -32
  69. package/dropdowntrees/dropdowntrees.module.d.ts +25 -0
  70. package/{dist/es2015/dropdowntrees → dropdowntrees}/expanded-state/expand.directive.d.ts +5 -1
  71. package/{dist/es2015/dropdowntrees → dropdowntrees}/multiselecttree.component.d.ts +57 -39
  72. package/{dist/es2015/dropdowntrees → dropdowntrees}/summary-tag/summary-tag.directive.d.ts +3 -0
  73. package/{dist/es2015/dropdowntrees → dropdowntrees}/templates/node-template.directive.d.ts +3 -0
  74. package/{dist/es2015 → esm2015}/autocomplete/autocomplete.component.js +264 -232
  75. package/esm2015/autocomplete/autocomplete.module.js +36 -0
  76. package/{dist/es2015 → esm2015}/comboboxes/combobox-column/column-cell-template.directive.js +12 -11
  77. package/esm2015/comboboxes/combobox-column/column-header-template.directive.js +26 -0
  78. package/esm2015/comboboxes/combobox-column/combobox-column.component.js +59 -0
  79. package/{dist/es2015 → esm2015}/comboboxes/combobox-column/util.js +0 -2
  80. package/{dist/es2015 → esm2015}/comboboxes/combobox.component.js +289 -255
  81. package/{dist/es2015 → esm2015}/comboboxes/combobox.module.js +23 -14
  82. package/esm2015/comboboxes/multicolumncombobox.component.js +653 -0
  83. package/{dist/es2015 → esm2015}/common/constants/error-messages.js +0 -1
  84. package/{dist/es2015 → esm2015}/common/constants/touch-enabled.js +0 -0
  85. package/{dist/es2015 → esm2015}/common/data.service.js +8 -10
  86. package/{dist/es2015 → esm2015}/common/disabled-items/disabled-items.service.js +9 -9
  87. package/{dist/es2015 → esm2015}/common/disabled-items/item-disabled.js +1 -0
  88. package/esm2015/common/filter-input.directive.js +34 -0
  89. package/{dist/es2015 → esm2015}/common/filtering/filter-settings.js +1 -0
  90. package/{dist/es2015 → esm2015}/common/filtering/filter.directive.js +19 -24
  91. package/{dist/es2015 → esm2015}/common/filtering/filterable-component.js +0 -0
  92. package/esm2015/common/list-item.directive.js +22 -0
  93. package/{dist/es2015 → esm2015}/common/list.component.js +194 -126
  94. package/esm2015/common/localization/custom-messages.component.js +41 -0
  95. package/esm2015/common/localization/localized-messages.directive.js +44 -0
  96. package/esm2015/common/localization/messages.js +25 -0
  97. package/{dist/es2015 → esm2015}/common/models/checkboxes-settings.js +0 -0
  98. package/{dist/es2015 → esm2015}/common/models/direction.js +1 -0
  99. package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
  100. package/{dist/es → esm2015}/common/models/list-type.js +1 -0
  101. package/{dist/es → esm2015}/common/models/page-change-event.js +1 -0
  102. package/{dist/es → esm2015}/common/models/popup-settings.js +1 -0
  103. package/{dist/es2015 → esm2015}/common/models/preventable-event.js +0 -0
  104. package/{dist/es2015 → esm2015}/common/models/remove-tag-event.js +0 -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/es2015 → esm2015}/common/models/virtualization-settings.js +0 -0
  108. package/{dist/es → esm2015}/common/navigation/navigation-action.js +1 -0
  109. package/{dist/es2015 → esm2015}/common/navigation/navigation.service.js +10 -11
  110. package/{dist/es2015 → esm2015}/common/searchbar.component.js +84 -97
  111. package/esm2015/common/selection/selectable.directive.js +76 -0
  112. package/{dist/es2015 → esm2015}/common/selection/selection.service.js +8 -10
  113. package/{dist/es2015 → esm2015}/common/shared-directives.module.js +37 -10
  114. package/esm2015/common/shared.module.js +59 -0
  115. package/{dist/es2015 → esm2015}/common/taglist.component.js +112 -87
  116. package/{dist/es2015 → esm2015}/common/templates/custom-item-template.directive.js +12 -12
  117. package/{dist/es2015 → esm2015}/common/templates/fixed-group-template.directive.js +12 -12
  118. package/{dist/es2015 → esm2015}/common/templates/footer-template.directive.js +12 -11
  119. package/{dist/es2015 → esm2015}/common/templates/group-tag-template.directive.js +12 -12
  120. package/{dist/es2015 → esm2015}/common/templates/group-template.directive.js +12 -12
  121. package/{dist/es2015 → esm2015}/common/templates/header-template.directive.js +12 -11
  122. package/{dist/es2015 → esm2015}/common/templates/item-template.directive.js +12 -11
  123. package/{dist/es2015 → esm2015}/common/templates/no-data-template.directive.js +12 -12
  124. package/{dist/es2015 → esm2015}/common/templates/tag-template.directive.js +12 -12
  125. package/esm2015/common/templates/template-context.directive.js +33 -0
  126. package/{dist/es2015 → esm2015}/common/templates/value-template.directive.js +12 -12
  127. package/{dist/es2015 → esm2015}/common/util.js +1 -3
  128. package/{dist/es2015 → esm2015}/dropdownlist/dropdownlist.component.js +362 -300
  129. package/esm2015/dropdownlist/dropdownlist.module.js +37 -0
  130. package/{dist/es → esm2015}/dropdowns.module.js +12 -12
  131. package/{dist/es2015 → esm2015}/dropdowntrees/checked-state/base-check.directive.js +13 -12
  132. package/{dist/es2015 → esm2015}/dropdowntrees/checked-state/check-all.directive.js +28 -42
  133. package/{dist/es2015 → esm2015}/dropdowntrees/checked-state/check.directive.js +20 -27
  134. package/{dist/es → esm2015}/dropdowntrees/checked-state/checkable-settings.js +1 -0
  135. package/{dist/es → esm2015}/dropdowntrees/checked-state/checked-item.js +1 -0
  136. package/esm2015/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +39 -0
  137. package/esm2015/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +35 -0
  138. package/esm2015/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +38 -0
  139. package/esm2015/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +35 -0
  140. package/{dist/es2015 → esm2015}/dropdowntrees/dropdowntree.component.js +373 -315
  141. package/esm2015/dropdowntrees/dropdowntrees.module.js +61 -0
  142. package/esm2015/dropdowntrees/expanded-state/expand.directive.js +38 -0
  143. package/{dist/es2015 → esm2015}/dropdowntrees/multiselecttree.component.js +427 -346
  144. package/{dist/es2015 → esm2015}/dropdowntrees/summary-tag/summary-tag.directive.js +15 -15
  145. package/esm2015/dropdowntrees/templates/node-template.directive.js +28 -0
  146. package/{dist/es2015/common/shared.module.d.ts → esm2015/kendo-angular-dropdowns.js} +2 -3
  147. package/{dist/es → esm2015}/main.js +11 -0
  148. package/{dist/es2015 → esm2015}/multiselect/multiselect.component.js +335 -288
  149. package/{dist/es2015 → esm2015}/multiselect/multiselect.module.js +19 -14
  150. package/{dist/es2015 → esm2015}/multiselect/summary-tag.directive.js +15 -15
  151. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  152. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dropdowns.js} +7873 -7141
  153. package/kendo-angular-dropdowns.d.ts +9 -0
  154. package/{dist/es2015/main.d.ts → main.d.ts} +12 -1
  155. package/{dist/es2015/multiselect → multiselect}/multiselect.component.d.ts +41 -26
  156. package/{dist/es2015/multiselect → multiselect}/multiselect.module.d.ts +9 -0
  157. package/{dist/es2015/multiselect → multiselect}/summary-tag.directive.d.ts +3 -0
  158. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  159. package/package.json +38 -114
  160. package/schematics/ngAdd/index.js +5 -2
  161. package/schematics/ngAdd/index.js.map +1 -1
  162. package/dist/cdn/js/kendo-angular-dropdowns.js +0 -20
  163. package/dist/cdn/main.js +0 -5
  164. package/dist/es/autocomplete/autocomplete.component.js +0 -1201
  165. package/dist/es/autocomplete/autocomplete.module.js +0 -36
  166. package/dist/es/comboboxes/combobox-column/column-cell-template.directive.js +0 -29
  167. package/dist/es/comboboxes/combobox-column/column-header-template.directive.js +0 -26
  168. package/dist/es/comboboxes/combobox-column/combobox-column.component.js +0 -78
  169. package/dist/es/comboboxes/combobox-column/util.js +0 -57
  170. package/dist/es/comboboxes/combobox.component.js +0 -1622
  171. package/dist/es/comboboxes/combobox.module.js +0 -52
  172. package/dist/es/comboboxes/multicolumncombobox.component.js +0 -230
  173. package/dist/es/common/constants/error-messages.js +0 -62
  174. package/dist/es/common/constants/touch-enabled.js +0 -9
  175. package/dist/es/common/data.service.js +0 -250
  176. package/dist/es/common/disabled-items/disabled-items.service.js +0 -45
  177. package/dist/es/common/disabled-items/item-disabled.js +0 -4
  178. package/dist/es/common/filter-input.directive.js +0 -37
  179. package/dist/es/common/filtering/filter-settings.js +0 -4
  180. package/dist/es/common/filtering/filter.directive.js +0 -141
  181. package/dist/es/common/filtering/filterable-component.js +0 -17
  182. package/dist/es/common/list-item.directive.js +0 -22
  183. package/dist/es/common/list.component.js +0 -503
  184. package/dist/es/common/localization/custom-messages.component.js +0 -44
  185. package/dist/es/common/localization/localized-messages.directive.js +0 -35
  186. package/dist/es/common/localization/messages.js +0 -34
  187. package/dist/es/common/models/checkboxes-settings.js +0 -15
  188. package/dist/es/common/models/direction.js +0 -4
  189. package/dist/es/common/models/preventable-event.js +0 -29
  190. package/dist/es/common/models/remove-tag-event.js +0 -24
  191. package/dist/es/common/models/virtualization-settings.js +0 -25
  192. package/dist/es/common/navigation/navigation.service.js +0 -147
  193. package/dist/es/common/searchbar.component.js +0 -253
  194. package/dist/es/common/selection/selectable.directive.js +0 -93
  195. package/dist/es/common/selection/selection.service.js +0 -107
  196. package/dist/es/common/shared-directives.module.js +0 -60
  197. package/dist/es/common/shared.module.js +0 -45
  198. package/dist/es/common/taglist.component.js +0 -179
  199. package/dist/es/common/templates/custom-item-template.directive.js +0 -47
  200. package/dist/es/common/templates/fixed-group-template.directive.js +0 -54
  201. package/dist/es/common/templates/footer-template.directive.js +0 -47
  202. package/dist/es/common/templates/group-tag-template.directive.js +0 -46
  203. package/dist/es/common/templates/group-template.directive.js +0 -54
  204. package/dist/es/common/templates/header-template.directive.js +0 -47
  205. package/dist/es/common/templates/item-template.directive.js +0 -46
  206. package/dist/es/common/templates/no-data-template.directive.js +0 -48
  207. package/dist/es/common/templates/tag-template.directive.js +0 -45
  208. package/dist/es/common/templates/template-context.directive.js +0 -40
  209. package/dist/es/common/templates/value-template.directive.js +0 -49
  210. package/dist/es/common/util.js +0 -337
  211. package/dist/es/dropdownlist/dropdownlist.component.js +0 -1649
  212. package/dist/es/dropdownlist/dropdownlist.module.js +0 -37
  213. package/dist/es/dropdowntrees/checked-state/base-check.directive.js +0 -68
  214. package/dist/es/dropdowntrees/checked-state/check-all.directive.js +0 -181
  215. package/dist/es/dropdowntrees/checked-state/check.directive.js +0 -169
  216. package/dist/es/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +0 -32
  217. package/dist/es/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +0 -42
  218. package/dist/es/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +0 -32
  219. package/dist/es/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +0 -42
  220. package/dist/es/dropdowntrees/dropdowntree.component.js +0 -1394
  221. package/dist/es/dropdowntrees/dropdowntrees.module.js +0 -45
  222. package/dist/es/dropdowntrees/expanded-state/expand.directive.js +0 -28
  223. package/dist/es/dropdowntrees/multiselecttree.component.js +0 -1683
  224. package/dist/es/dropdowntrees/summary-tag/summary-tag.directive.js +0 -63
  225. package/dist/es/dropdowntrees/templates/node-template.directive.js +0 -28
  226. package/dist/es/index.js +0 -30
  227. package/dist/es/multiselect/multiselect.component.js +0 -1734
  228. package/dist/es/multiselect/multiselect.module.js +0 -50
  229. package/dist/es/multiselect/summary-tag.directive.js +0 -65
  230. package/dist/es/package-metadata.js +0 -15
  231. package/dist/es2015/autocomplete/autocomplete.module.js +0 -33
  232. package/dist/es2015/comboboxes/combobox-column/column-header-template.directive.js +0 -25
  233. package/dist/es2015/comboboxes/combobox-column/combobox-column.component.js +0 -81
  234. package/dist/es2015/comboboxes/combobox.module.d.ts +0 -20
  235. package/dist/es2015/comboboxes/multicolumncombobox.component.js +0 -417
  236. package/dist/es2015/common/filter-input.directive.js +0 -35
  237. package/dist/es2015/common/list-item.directive.js +0 -21
  238. package/dist/es2015/common/localization/custom-messages.component.js +0 -36
  239. package/dist/es2015/common/localization/localized-messages.directive.js +0 -39
  240. package/dist/es2015/common/localization/messages.js +0 -28
  241. package/dist/es2015/common/models/fillmode.js +0 -4
  242. package/dist/es2015/common/models/list-type.js +0 -4
  243. package/dist/es2015/common/models/page-change-event.js +0 -4
  244. package/dist/es2015/common/models/popup-settings.js +0 -4
  245. package/dist/es2015/common/models/rounded.js +0 -4
  246. package/dist/es2015/common/models/size.js +0 -4
  247. package/dist/es2015/common/navigation/navigation-action.js +0 -24
  248. package/dist/es2015/common/selection/selectable.directive.js +0 -84
  249. package/dist/es2015/common/shared-directives.module.d.ts +0 -20
  250. package/dist/es2015/common/shared.module.js +0 -42
  251. package/dist/es2015/common/templates/template-context.directive.js +0 -35
  252. package/dist/es2015/dropdownlist/dropdownlist.module.js +0 -34
  253. package/dist/es2015/dropdowns.module.js +0 -50
  254. package/dist/es2015/dropdowntrees/checked-state/checkable-settings.js +0 -4
  255. package/dist/es2015/dropdowntrees/checked-state/checked-item.js +0 -4
  256. package/dist/es2015/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +0 -30
  257. package/dist/es2015/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +0 -35
  258. package/dist/es2015/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +0 -30
  259. package/dist/es2015/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +0 -35
  260. package/dist/es2015/dropdowntrees/dropdowntrees.module.d.ts +0 -9
  261. package/dist/es2015/dropdowntrees/dropdowntrees.module.js +0 -42
  262. package/dist/es2015/dropdowntrees/expanded-state/expand.directive.js +0 -26
  263. package/dist/es2015/dropdowntrees/templates/node-template.directive.js +0 -27
  264. package/dist/es2015/index.d.ts +0 -30
  265. package/dist/es2015/index.js +0 -30
  266. package/dist/es2015/index.metadata.json +0 -1
  267. package/dist/es2015/main.js +0 -44
  268. package/dist/fesm5/index.js +0 -13097
  269. package/dist/npm/autocomplete/autocomplete.component.js +0 -1203
  270. package/dist/npm/autocomplete/autocomplete.module.js +0 -38
  271. package/dist/npm/comboboxes/combobox-column/column-cell-template.directive.js +0 -31
  272. package/dist/npm/comboboxes/combobox-column/column-header-template.directive.js +0 -28
  273. package/dist/npm/comboboxes/combobox-column/combobox-column.component.js +0 -80
  274. package/dist/npm/comboboxes/combobox-column/util.js +0 -59
  275. package/dist/npm/comboboxes/combobox.component.js +0 -1624
  276. package/dist/npm/comboboxes/combobox.module.js +0 -54
  277. package/dist/npm/comboboxes/multicolumncombobox.component.js +0 -232
  278. package/dist/npm/common/constants/error-messages.js +0 -64
  279. package/dist/npm/common/constants/touch-enabled.js +0 -11
  280. package/dist/npm/common/data.service.js +0 -252
  281. package/dist/npm/common/disabled-items/disabled-items.service.js +0 -47
  282. package/dist/npm/common/disabled-items/item-disabled.js +0 -6
  283. package/dist/npm/common/filter-input.directive.js +0 -39
  284. package/dist/npm/common/filtering/filter-settings.js +0 -6
  285. package/dist/npm/common/filtering/filter.directive.js +0 -143
  286. package/dist/npm/common/filtering/filterable-component.js +0 -19
  287. package/dist/npm/common/list-item.directive.js +0 -24
  288. package/dist/npm/common/list.component.js +0 -505
  289. package/dist/npm/common/localization/custom-messages.component.js +0 -46
  290. package/dist/npm/common/localization/localized-messages.directive.js +0 -37
  291. package/dist/npm/common/localization/messages.js +0 -36
  292. package/dist/npm/common/models/checkboxes-settings.js +0 -17
  293. package/dist/npm/common/models/direction.js +0 -6
  294. package/dist/npm/common/models/fillmode.js +0 -6
  295. package/dist/npm/common/models/list-type.js +0 -6
  296. package/dist/npm/common/models/page-change-event.js +0 -6
  297. package/dist/npm/common/models/popup-settings.js +0 -6
  298. package/dist/npm/common/models/preventable-event.js +0 -31
  299. package/dist/npm/common/models/remove-tag-event.js +0 -26
  300. package/dist/npm/common/models/rounded.js +0 -6
  301. package/dist/npm/common/models/size.js +0 -6
  302. package/dist/npm/common/models/virtualization-settings.js +0 -27
  303. package/dist/npm/common/navigation/navigation-action.js +0 -26
  304. package/dist/npm/common/navigation/navigation.service.js +0 -149
  305. package/dist/npm/common/searchbar.component.js +0 -255
  306. package/dist/npm/common/selection/selectable.directive.js +0 -95
  307. package/dist/npm/common/selection/selection.service.js +0 -109
  308. package/dist/npm/common/shared-directives.module.js +0 -62
  309. package/dist/npm/common/shared.module.js +0 -47
  310. package/dist/npm/common/taglist.component.js +0 -181
  311. package/dist/npm/common/templates/custom-item-template.directive.js +0 -49
  312. package/dist/npm/common/templates/fixed-group-template.directive.js +0 -56
  313. package/dist/npm/common/templates/footer-template.directive.js +0 -49
  314. package/dist/npm/common/templates/group-tag-template.directive.js +0 -48
  315. package/dist/npm/common/templates/group-template.directive.js +0 -56
  316. package/dist/npm/common/templates/header-template.directive.js +0 -49
  317. package/dist/npm/common/templates/item-template.directive.js +0 -48
  318. package/dist/npm/common/templates/no-data-template.directive.js +0 -50
  319. package/dist/npm/common/templates/tag-template.directive.js +0 -47
  320. package/dist/npm/common/templates/template-context.directive.js +0 -42
  321. package/dist/npm/common/templates/value-template.directive.js +0 -51
  322. package/dist/npm/common/util.js +0 -339
  323. package/dist/npm/dropdownlist/dropdownlist.component.js +0 -1651
  324. package/dist/npm/dropdownlist/dropdownlist.module.js +0 -39
  325. package/dist/npm/dropdowns.module.js +0 -55
  326. package/dist/npm/dropdowntrees/checked-state/base-check.directive.js +0 -70
  327. package/dist/npm/dropdowntrees/checked-state/check-all.directive.js +0 -183
  328. package/dist/npm/dropdowntrees/checked-state/check.directive.js +0 -171
  329. package/dist/npm/dropdowntrees/checked-state/checkable-settings.js +0 -6
  330. package/dist/npm/dropdowntrees/checked-state/checked-item.js +0 -6
  331. package/dist/npm/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +0 -34
  332. package/dist/npm/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +0 -44
  333. package/dist/npm/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +0 -34
  334. package/dist/npm/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +0 -44
  335. package/dist/npm/dropdowntrees/dropdowntree.component.js +0 -1399
  336. package/dist/npm/dropdowntrees/dropdowntrees.module.js +0 -47
  337. package/dist/npm/dropdowntrees/expanded-state/expand.directive.js +0 -30
  338. package/dist/npm/dropdowntrees/multiselecttree.component.js +0 -1688
  339. package/dist/npm/dropdowntrees/summary-tag/summary-tag.directive.js +0 -65
  340. package/dist/npm/dropdowntrees/templates/node-template.directive.js +0 -30
  341. package/dist/npm/index.js +0 -55
  342. package/dist/npm/main.js +0 -86
  343. package/dist/npm/multiselect/multiselect.component.js +0 -1736
  344. package/dist/npm/multiselect/multiselect.module.js +0 -52
  345. package/dist/npm/multiselect/summary-tag.directive.js +0 -67
  346. package/dist/npm/package-metadata.js +0 -17
  347. package/dist/systemjs/kendo-angular-dropdowns.js +0 -5
@@ -1,1651 +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
- "use strict";
6
- /* tslint:disable:member-ordering */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- var tslib_1 = require("tslib");
9
- var core_1 = require("@angular/core");
10
- var forms_1 = require("@angular/forms");
11
- var kendo_licensing_1 = require("@progress/kendo-licensing");
12
- var package_metadata_1 = require("../package-metadata");
13
- var rxjs_1 = require("rxjs");
14
- var operators_1 = require("rxjs/operators");
15
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
16
- var kendo_angular_common_2 = require("@progress/kendo-angular-common");
17
- var util_1 = require("../common/util");
18
- var selection_service_1 = require("../common/selection/selection.service");
19
- var navigation_service_1 = require("../common/navigation/navigation.service");
20
- var item_template_directive_1 = require("../common/templates/item-template.directive");
21
- var group_template_directive_1 = require("../common/templates/group-template.directive");
22
- var fixed_group_template_directive_1 = require("../common/templates/fixed-group-template.directive");
23
- var value_template_directive_1 = require("../common/templates/value-template.directive");
24
- var header_template_directive_1 = require("../common/templates/header-template.directive");
25
- var footer_template_directive_1 = require("../common/templates/footer-template.directive");
26
- var no_data_template_directive_1 = require("../common/templates/no-data-template.directive");
27
- var navigation_action_1 = require("../common/navigation/navigation-action");
28
- var preventable_event_1 = require("../common/models/preventable-event");
29
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
30
- var kendo_angular_popup_1 = require("@progress/kendo-angular-popup");
31
- var touch_enabled_1 = require("../common/constants/touch-enabled");
32
- var error_messages_1 = require("../common/constants/error-messages");
33
- var disabled_items_service_1 = require("../common/disabled-items/disabled-items.service");
34
- var data_service_1 = require("../common/data.service");
35
- var filterable_component_1 = require("../common/filtering/filterable-component");
36
- var list_component_1 = require("../common/list.component");
37
- var virtualization_settings_1 = require("../common/models/virtualization-settings");
38
- /**
39
- * @hidden
40
- */
41
- exports.DROPDOWNLIST_VALUE_ACCESSOR = {
42
- multi: true,
43
- provide: forms_1.NG_VALUE_ACCESSOR,
44
- useExisting: core_1.forwardRef(function () { return DropDownListComponent; })
45
- };
46
- /**
47
- * Represents the [Kendo UI DropDownList component for Angular]({% slug overview_ddl %}).
48
- *
49
- * @example
50
- * ```ts
51
- * _@Component({
52
- * selector: 'my-app',
53
- * template: `
54
- * <kendo-dropdownlist [data]="listItems">
55
- * </kendo-dropdownlist>
56
- * `
57
- * })
58
- * class AppComponent {
59
- * public listItems: Array<string> = ["Item 1", "Item 2", "Item 3", "Item 4"];
60
- * }
61
- * ```
62
- */
63
- var DropDownListComponent = /** @class */ (function () {
64
- function DropDownListComponent(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled) {
65
- this.wrapper = wrapper;
66
- this.localization = localization;
67
- this.popupService = popupService;
68
- this.selectionService = selectionService;
69
- this.navigationService = navigationService;
70
- this.disabledItemsService = disabledItemsService;
71
- this.dataService = dataService;
72
- this._zone = _zone;
73
- this.renderer = renderer;
74
- this.cdr = cdr;
75
- this.touchEnabled = touchEnabled;
76
- /**
77
- * Sets the height of the options list. By default, `listHeight` is 200px.
78
- *
79
- * > The `listHeight` property affects only the list of options and not the whole popup container.
80
- * > To set the height of the popup container, use `popupSettings.height`.
81
- */
82
- this.listHeight = 200;
83
- /**
84
- * Sets the disabled state of the component.
85
- */
86
- this.disabled = false;
87
- /**
88
- * Sets the read-only state of the component.
89
- */
90
- this.readonly = false;
91
- /**
92
- * Enables the [filtering]({% slug filtering_ddl %}) functionality of the DropDownList.
93
- */
94
- this.filterable = false;
95
- /**
96
- * Enables a case-insensitive search. When filtration is disabled, use this option.
97
- */
98
- this.ignoreCase = true;
99
- /**
100
- * Sets the delay before an item search is performed. When filtration is disabled, use this option.
101
- */
102
- this.delay = 500;
103
- /**
104
- * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
105
- */
106
- this.tabindex = 0;
107
- /**
108
- * Fires each time the value is changed ([see example]({% slug overview_ddl %}#toc-events)).
109
- */
110
- this.valueChange = new core_1.EventEmitter();
111
- /**
112
- * Fires each time the user types in the input field
113
- * ([see example]({% slug overview_ddl %}#toc-events)).
114
- * You can filter the source based on the passed filtration value.
115
- * When the value of the component is programmatically changed to `ngModel` or `formControl`
116
- * through its API or form binding, the `valueChange` event is not triggered because it
117
- * might cause a mix-up with the built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
118
- */
119
- this.filterChange = new core_1.EventEmitter();
120
- /**
121
- * Fires each time the item selection is changed
122
- * ([see example]({% slug overview_ddl %}#toc-events)).
123
- */
124
- this.selectionChange = new core_1.EventEmitter();
125
- /**
126
- * Fires each time the popup is about to open
127
- * ([see example]({% slug openstate_ddl %}#toc-preventing-opening-and-closing)).
128
- * This event is preventable. If you cancel it, the popup will remain closed.
129
- */
130
- this.open = new core_1.EventEmitter();
131
- /**
132
- * Fires after the popup has been opened.
133
- */
134
- this.opened = new core_1.EventEmitter();
135
- /**
136
- * Fires each time the popup is about to close
137
- * ([see example]({% slug openstate_ddl %}#toc-preventing-opening-and-closing)).
138
- * This event is preventable. If you cancel it, the popup will remain open.
139
- */
140
- this.close = new core_1.EventEmitter();
141
- /**
142
- * Fires after the popup has been closed.
143
- */
144
- this.closed = new core_1.EventEmitter();
145
- /**
146
- * Fires each time the user focuses the DropDownList.
147
- */
148
- this.onFocus = new core_1.EventEmitter();
149
- /**
150
- * Fires each time the DropDownList gets blurred.
151
- */
152
- this.onBlur = new core_1.EventEmitter();
153
- this.hostClasses = true;
154
- /**
155
- * @hidden
156
- */
157
- this.focusableId = "k-" + util_1.guid();
158
- this.role = 'listbox';
159
- this.groupIndices = [];
160
- this.listBoxId = util_1.guid();
161
- this.optionPrefix = util_1.guid();
162
- this.filterText = "";
163
- this._isFocused = false;
164
- this.onTouchedCallback = function (_) { };
165
- this.onChangeCallback = function (_) { };
166
- this.word = "";
167
- this.last = "";
168
- this.filterFocused = new core_1.EventEmitter();
169
- this.filterBlurred = new core_1.EventEmitter();
170
- this.hostElementFocused = new core_1.EventEmitter();
171
- this.hostElementBlurred = new core_1.EventEmitter();
172
- this.selectionSubscription = new rxjs_1.Subscription();
173
- this._open = false;
174
- this._popupSettings = { animate: true };
175
- this._size = 'medium';
176
- this._rounded = 'medium';
177
- this._fillMode = 'solid';
178
- kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
179
- this.direction = localization.rtl ? 'rtl' : 'ltr';
180
- this.data = [];
181
- this.subscribeEvents();
182
- this.subscribeTouchEvents();
183
- this.subscribeFocusEvents();
184
- this.popupMouseDownHandler = this.onMouseDown.bind(this);
185
- }
186
- DropDownListComponent_1 = DropDownListComponent;
187
- Object.defineProperty(DropDownListComponent.prototype, "width", {
188
- get: function () {
189
- var wrapperWidth = kendo_angular_common_1.isDocumentAvailable() ? this.wrapper.nativeElement.offsetWidth : 0;
190
- var width = this.popupSettings.width || wrapperWidth;
191
- var minWidth = isNaN(wrapperWidth) ? wrapperWidth : wrapperWidth + "px";
192
- var maxWidth = isNaN(width) ? width : width + "px";
193
- return { min: minWidth, max: maxWidth };
194
- },
195
- enumerable: true,
196
- configurable: true
197
- });
198
- Object.defineProperty(DropDownListComponent.prototype, "height", {
199
- get: function () {
200
- var popupHeight = this.popupSettings.height;
201
- return util_1.isPresent(popupHeight) ? popupHeight + "px" : 'auto';
202
- },
203
- enumerable: true,
204
- configurable: true
205
- });
206
- Object.defineProperty(DropDownListComponent.prototype, "widgetTabIndex", {
207
- get: function () {
208
- if (this.disabled) {
209
- return undefined;
210
- }
211
- var providedTabIndex = Number(this.tabIndex);
212
- var defaultTabIndex = 0;
213
- return !isNaN(providedTabIndex) ? providedTabIndex : defaultTabIndex;
214
- },
215
- enumerable: true,
216
- configurable: true
217
- });
218
- Object.defineProperty(DropDownListComponent.prototype, "ariaExpanded", {
219
- get: function () {
220
- return this.isOpen;
221
- },
222
- enumerable: true,
223
- configurable: true
224
- });
225
- Object.defineProperty(DropDownListComponent.prototype, "ariaOwns", {
226
- get: function () {
227
- if (!this.isOpen) {
228
- return;
229
- }
230
- return this.listBoxId;
231
- },
232
- enumerable: true,
233
- configurable: true
234
- });
235
- Object.defineProperty(DropDownListComponent.prototype, "ariaActivedescendant", {
236
- get: function () {
237
- if (!util_1.isPresent(this.dataItem) || !this.isOpen) {
238
- return;
239
- }
240
- return this.optionPrefix + "-" + util_1.getter(this.dataItem, this.valueField);
241
- },
242
- enumerable: true,
243
- configurable: true
244
- });
245
- Object.defineProperty(DropDownListComponent.prototype, "noDataLabel", {
246
- get: function () {
247
- if (this.dataService.itemsCount === 0) {
248
- return this.messageFor('noDataText');
249
- }
250
- },
251
- enumerable: true,
252
- configurable: true
253
- });
254
- Object.defineProperty(DropDownListComponent.prototype, "appendTo", {
255
- get: function () {
256
- var appendTo = this.popupSettings.appendTo;
257
- if (!appendTo || appendTo === 'root') {
258
- return undefined;
259
- }
260
- return appendTo === 'component' ? this.container : appendTo;
261
- },
262
- enumerable: true,
263
- configurable: true
264
- });
265
- Object.defineProperty(DropDownListComponent.prototype, "data", {
266
- get: function () {
267
- var virtual = this.virtual;
268
- if (virtual) {
269
- var start = virtual.skip || 0;
270
- var end = start + virtual.pageSize;
271
- // Use length instead of itemsCount because of the grouping.
272
- virtual.total = this.dataService.data.length;
273
- return this.dataService.data.slice(start, end);
274
- }
275
- return this.dataService.data;
276
- },
277
- /**
278
- * Sets the data of the DropDownList.
279
- *
280
- * > The data has to be provided in an array-like list.
281
- */
282
- set: function (data) {
283
- this.dataService.data = data || [];
284
- if (this.virtual) {
285
- this.virtual.skip = 0;
286
- }
287
- this.setState();
288
- },
289
- enumerable: true,
290
- configurable: true
291
- });
292
- Object.defineProperty(DropDownListComponent.prototype, "value", {
293
- get: function () {
294
- return this._value;
295
- },
296
- /**
297
- * Sets the value of the DropDownList.
298
- * It can either be of the primitive (string, numbers) or of the complex (objects) type.
299
- * To define the type, use the `valuePrimitive` option.
300
- *
301
- * > All selected values which are not present in the source are ignored.
302
- */
303
- set: function (newValue) {
304
- if (!util_1.isPresent(newValue)) {
305
- this._previousDataItem = undefined;
306
- }
307
- this._value = newValue;
308
- this.setState();
309
- this.cdr.markForCheck();
310
- },
311
- enumerable: true,
312
- configurable: true
313
- });
314
- Object.defineProperty(DropDownListComponent.prototype, "popupSettings", {
315
- get: function () {
316
- return this._popupSettings;
317
- },
318
- /**
319
- * Configures the popup of the DropDownList.
320
- *
321
- * The available options are:
322
- * - `animate: Boolean`&mdash;Controls the popup animation. By default, the open and close animations are enabled.
323
- * - `width: Number | String`&mdash;Sets the width of the popup container. By default, the width of the host element is used. If set to `auto`, the component automatically adjusts the width of the popup and no item labels are wrapped. The `auto` mode is not supported when virtual scrolling is enabled.
324
- * - `height: Number`&mdash;Sets the height of the popup container.
325
- * - `popupClass: String`&mdash;Specifies a list of CSS classes that are used to style the popup.
326
- * - `appendTo: "root" | "component" | ViewContainerRef`&mdash;Specifies the component to which the popup will be appended.
327
- */
328
- set: function (settings) {
329
- this._popupSettings = Object.assign({ animate: true }, settings);
330
- },
331
- enumerable: true,
332
- configurable: true
333
- });
334
- Object.defineProperty(DropDownListComponent.prototype, "itemDisabled", {
335
- /**
336
- * Defines a Boolean function that is executed for each data item in the component
337
- * ([see examples]({% slug disableditems_ddl %})). Determines whether the item will be disabled.
338
- */
339
- set: function (fn) {
340
- if (typeof fn !== 'function') {
341
- throw new Error("itemDisabled must be a function, but received " + JSON.stringify(fn) + ".");
342
- }
343
- this.disabledItemsService.itemDisabled = fn;
344
- },
345
- enumerable: true,
346
- configurable: true
347
- });
348
- Object.defineProperty(DropDownListComponent.prototype, "virtual", {
349
- get: function () {
350
- return this._virtualSettings;
351
- },
352
- /**
353
- * Enables the [virtualization]({% slug virtualization_ddl %}) functionality.
354
- */
355
- set: function (settings) {
356
- this._virtualSettings = virtualization_settings_1.normalizeVirtualizationSettings(settings);
357
- },
358
- enumerable: true,
359
- configurable: true
360
- });
361
- Object.defineProperty(DropDownListComponent.prototype, "valuePrimitive", {
362
- get: function () {
363
- if (!util_1.isPresent(this._valuePrimitive)) {
364
- return !util_1.isPresent(this.valueField);
365
- }
366
- return this._valuePrimitive;
367
- },
368
- /**
369
- * Specifies the type of the selected value
370
- * ([more information and example]({% slug valuebinding_ddl %}#toc-primitive-values-from-object-fields)).
371
- * If set to `true`, the selected value has to be of a primitive value.
372
- */
373
- set: function (isPrimitive) {
374
- this._valuePrimitive = isPrimitive;
375
- },
376
- enumerable: true,
377
- configurable: true
378
- });
379
- Object.defineProperty(DropDownListComponent.prototype, "tabIndex", {
380
- get: function () {
381
- return this.tabindex;
382
- },
383
- /**
384
- * @hidden
385
- */
386
- set: function (tabIndex) {
387
- this.tabindex = tabIndex;
388
- },
389
- enumerable: true,
390
- configurable: true
391
- });
392
- Object.defineProperty(DropDownListComponent.prototype, "size", {
393
- get: function () {
394
- return this._size;
395
- },
396
- /**
397
- * Sets the size of the component.
398
- *
399
- * The possible values are:
400
- * * `'small'`
401
- * * `'medium'` (default)
402
- * * `'large'`
403
- * * `null`
404
- *
405
- */
406
- set: function (size) {
407
- this.renderer.removeClass(this.wrapper.nativeElement, util_1.getSizeClass('picker', this.size));
408
- if (size) {
409
- this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('picker', size));
410
- }
411
- this._size = size;
412
- },
413
- enumerable: true,
414
- configurable: true
415
- });
416
- Object.defineProperty(DropDownListComponent.prototype, "rounded", {
417
- get: function () {
418
- return this._rounded;
419
- },
420
- /**
421
- * Sets the border radius of the component.
422
- *
423
- * The possible values are:
424
- * * `'small'`
425
- * * `'medium'` (default)
426
- * * `'large'`
427
- * * `'full'`
428
- * * `null`
429
- *
430
- */
431
- set: function (rounded) {
432
- this.renderer.removeClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
433
- if (rounded) {
434
- this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(rounded));
435
- }
436
- this._rounded = rounded;
437
- },
438
- enumerable: true,
439
- configurable: true
440
- });
441
- Object.defineProperty(DropDownListComponent.prototype, "fillMode", {
442
- get: function () {
443
- return this._fillMode;
444
- },
445
- /**
446
- * Sets the fillMode of the component.
447
- *
448
- * The possible values are:
449
- * * `'flat'`
450
- * * `'solid'` (default)
451
- * * `'outline'`
452
- * * `null`
453
- *
454
- */
455
- set: function (fillMode) {
456
- this.renderer.removeClass(this.wrapper.nativeElement, util_1.getFillModeClass('picker', this.fillMode));
457
- if (fillMode) {
458
- this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('picker', fillMode));
459
- }
460
- this._fillMode = fillMode;
461
- },
462
- enumerable: true,
463
- configurable: true
464
- });
465
- /**
466
- * @hidden
467
- */
468
- DropDownListComponent.prototype.blurComponent = function (event) {
469
- if (event.target !== this.wrapper.nativeElement) {
470
- return;
471
- }
472
- event.stopImmediatePropagation();
473
- this.hostElementBlurred.emit();
474
- };
475
- /**
476
- * @hidden
477
- */
478
- DropDownListComponent.prototype.blurFilterInput = function () {
479
- this.filterBlurred.emit();
480
- };
481
- /**
482
- * @hidden
483
- */
484
- DropDownListComponent.prototype.focusComponent = function (event) {
485
- var _this = this;
486
- if (event.target !== this.wrapper.nativeElement) {
487
- return;
488
- }
489
- event.stopImmediatePropagation();
490
- this.hostElementFocused.emit();
491
- if (!this.isFocused) {
492
- this.isFocused = true;
493
- if (kendo_angular_common_1.hasObservers(this.onFocus)) {
494
- this._zone.run(function () {
495
- _this.onFocus.emit();
496
- });
497
- }
498
- }
499
- };
500
- /**
501
- * @hidden
502
- */
503
- DropDownListComponent.prototype.onResize = function () {
504
- if (this._open) {
505
- var popupWrapper = this.popupRef.popupElement;
506
- var _a = this.width, min = _a.min, max = _a.max;
507
- popupWrapper.style.minWidth = min;
508
- popupWrapper.style.width = max;
509
- }
510
- };
511
- Object.defineProperty(DropDownListComponent.prototype, "isDisabled", {
512
- get: function () {
513
- return this.disabled;
514
- },
515
- enumerable: true,
516
- configurable: true
517
- });
518
- Object.defineProperty(DropDownListComponent.prototype, "isLoading", {
519
- get: function () {
520
- return this.loading;
521
- },
522
- enumerable: true,
523
- configurable: true
524
- });
525
- Object.defineProperty(DropDownListComponent.prototype, "dir", {
526
- get: function () {
527
- return this.direction;
528
- },
529
- enumerable: true,
530
- configurable: true
531
- });
532
- Object.defineProperty(DropDownListComponent.prototype, "hostTabIndex", {
533
- get: function () {
534
- return this.widgetTabIndex;
535
- },
536
- enumerable: true,
537
- configurable: true
538
- });
539
- Object.defineProperty(DropDownListComponent.prototype, "isReadonly", {
540
- get: function () {
541
- return this.readonly;
542
- },
543
- enumerable: true,
544
- configurable: true
545
- });
546
- Object.defineProperty(DropDownListComponent.prototype, "isAriaExpanded", {
547
- get: function () {
548
- return this.ariaExpanded;
549
- },
550
- enumerable: true,
551
- configurable: true
552
- });
553
- Object.defineProperty(DropDownListComponent.prototype, "hostAriaOwns", {
554
- get: function () {
555
- return this.ariaOwns;
556
- },
557
- enumerable: true,
558
- configurable: true
559
- });
560
- Object.defineProperty(DropDownListComponent.prototype, "hostAriaActivedescendant", {
561
- get: function () {
562
- return this.ariaActivedescendant;
563
- },
564
- enumerable: true,
565
- configurable: true
566
- });
567
- Object.defineProperty(DropDownListComponent.prototype, "hostNoDataLabel", {
568
- get: function () {
569
- return this.noDataLabel;
570
- },
571
- enumerable: true,
572
- configurable: true
573
- });
574
- /**
575
- * @hidden
576
- */
577
- DropDownListComponent.prototype.keydown = function (event) {
578
- var firstIndex = util_1.isPresent(this.defaultItem) ? -1 : 0;
579
- var focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(firstIndex) : this.selectionService.focused;
580
- var offset = 0;
581
- if (this.disabled || this.readonly) {
582
- return;
583
- }
584
- var isHomeEnd = event.keyCode === kendo_angular_common_2.Keys.Home || event.keyCode === kendo_angular_common_2.Keys.End;
585
- var isFilterFocused = this.filterable && this.isFocused && this.isOpen;
586
- if (isFilterFocused && isHomeEnd) {
587
- return;
588
- }
589
- var hasSelected = util_1.isPresent(this.selectionService.selected[0]);
590
- var focusedItemNotSelected = util_1.isPresent(this.selectionService.focused) && !this.selectionService.isSelected(this.selectionService.focused);
591
- if (!hasSelected || focusedItemNotSelected) {
592
- if (event.keyCode === kendo_angular_common_2.Keys.ArrowDown || event.keyCode === kendo_angular_common_2.Keys.ArrowRight) {
593
- offset = -1;
594
- }
595
- else if (event.keyCode === kendo_angular_common_2.Keys.ArrowUp || event.keyCode === kendo_angular_common_2.Keys.ArrowLeft) {
596
- offset = 1;
597
- }
598
- }
599
- var eventData = event;
600
- var action = this.navigationService.process({
601
- current: focused + offset,
602
- max: this.dataService.itemsCount - 1,
603
- min: this.defaultItem ? -1 : 0,
604
- originalEvent: eventData
605
- });
606
- var leftRightKeys = (action === navigation_action_1.NavigationAction.Left) || (action === navigation_action_1.NavigationAction.Right);
607
- if (action !== navigation_action_1.NavigationAction.Undefined &&
608
- action !== navigation_action_1.NavigationAction.Tab &&
609
- action !== navigation_action_1.NavigationAction.Backspace &&
610
- action !== navigation_action_1.NavigationAction.Delete &&
611
- !(leftRightKeys && this.filterable) &&
612
- action !== navigation_action_1.NavigationAction.Enter //enter when popup is opened is handled before `handleEnter`
613
- ) {
614
- eventData.preventDefault();
615
- }
616
- };
617
- /**
618
- * @hidden
619
- */
620
- DropDownListComponent.prototype.keypress = function (event) {
621
- if (this.disabled || this.readonly || this.filterable) {
622
- return;
623
- }
624
- this.onKeyPress(event);
625
- };
626
- /**
627
- * @hidden
628
- */
629
- DropDownListComponent.prototype.click = function (event) {
630
- event.preventDefault();
631
- this.focus();
632
- this.togglePopup(!this.isOpen);
633
- };
634
- Object.defineProperty(DropDownListComponent.prototype, "isFocused", {
635
- get: function () {
636
- return this._isFocused;
637
- },
638
- set: function (isFocused) {
639
- this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
640
- this._isFocused = isFocused;
641
- },
642
- enumerable: true,
643
- configurable: true
644
- });
645
- DropDownListComponent.prototype.ngOnInit = function () {
646
- var _this = this;
647
- this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
648
- this.localizationChangesSubscription = this.localization
649
- .changes.subscribe(function (_a) {
650
- var rtl = _a.rtl;
651
- _this.direction = rtl ? 'rtl' : 'ltr';
652
- _this.cdr.detectChanges();
653
- });
654
- this.assignAriaDescribedBy();
655
- this.setComponentClasses();
656
- };
657
- /**
658
- * @hidden
659
- * Used by the TextBoxContainer to determine if the component is empty.
660
- */
661
- DropDownListComponent.prototype.isEmpty = function () {
662
- var value = this.value;
663
- return !(value === 0 || value === false || value || this.defaultItem);
664
- };
665
- /**
666
- * @hidden
667
- */
668
- DropDownListComponent.prototype.onFilterFocus = function () {
669
- this.filterFocused.emit();
670
- };
671
- /**
672
- * @hidden
673
- */
674
- DropDownListComponent.prototype.ngOnDestroy = function () {
675
- this.destroyPopup();
676
- this.unsubscribeEvents();
677
- if (this.localizationChangesSubscription) {
678
- this.localizationChangesSubscription.unsubscribe();
679
- }
680
- };
681
- /**
682
- * @hidden
683
- */
684
- DropDownListComponent.prototype.ngOnChanges = function (changes) {
685
- var virtual = this.virtual;
686
- var requestInitialData = virtual && changes.data && changes.data.isFirstChange();
687
- if (requestInitialData) {
688
- this.pageChange({ skip: 0, take: virtual.pageSize });
689
- }
690
- if (kendo_angular_common_1.isChanged('defaultItem', changes, false)) {
691
- this.disabledItemsService.defaultItem = this.defaultItem;
692
- }
693
- if (kendo_angular_common_1.anyChanged(['textField', 'valueField', 'valuePrimitive', 'defaultItem', 'itemDisabled'], changes, false)) {
694
- this.setState();
695
- }
696
- };
697
- /**
698
- * @hidden
699
- */
700
- DropDownListComponent.prototype.ngAfterContentChecked = function () {
701
- this.verifySettings();
702
- };
703
- /**
704
- * Focuses a specific item of the DropDownList based on a provided index.
705
- * If there is a default item it is positioned at index -1.
706
- * If null or invalid index is provided the focus will be removed.
707
- */
708
- DropDownListComponent.prototype.focusItemAt = function (index) {
709
- var minIndex = util_1.isPresent(this.defaultItem) ? -1 : 0;
710
- var isInRange = minIndex <= index && index < this.data.length;
711
- if (util_1.isPresent(index) && isInRange && !this.disabledItemsService.isIndexDisabled(index)) {
712
- this.selectionService.focus(index);
713
- }
714
- else {
715
- this.selectionService.focus(null);
716
- }
717
- };
718
- /**
719
- * Focuses the DropDownList.
720
- */
721
- DropDownListComponent.prototype.focus = function () {
722
- if (!this.disabled) {
723
- this.wrapper.nativeElement.focus();
724
- }
725
- };
726
- /**
727
- * Blurs the DropDownList.
728
- */
729
- DropDownListComponent.prototype.blur = function () {
730
- if (!this.disabled) {
731
- this.wrapper.nativeElement.blur();
732
- }
733
- };
734
- /**
735
- * Toggles the visibility of the popup
736
- * ([see example]({% slug openstate_ddl %}#toc-setting-the-initially-opened-component)).
737
- * If you use the `toggle` method to open or close the popup, the `open` and `close` events will not be fired.
738
- *
739
- * @param open - The state of the popup.
740
- */
741
- DropDownListComponent.prototype.toggle = function (open) {
742
- var _this = this;
743
- // The Promise is required to open the popup on load.
744
- // Otherwise, the "Expression has changed..." type error will be thrown.
745
- Promise.resolve(null).then(function () {
746
- var shouldOpen = util_1.isPresent(open) ? open : !_this._open;
747
- _this._toggle(shouldOpen);
748
- });
749
- };
750
- DropDownListComponent.prototype._toggle = function (open) {
751
- this._open = open;
752
- this.destroyPopup();
753
- if (this._open) {
754
- this.createPopup();
755
- }
756
- };
757
- DropDownListComponent.prototype.triggerPopupEvents = function (open) {
758
- var eventArgs = new preventable_event_1.PreventableEvent();
759
- if (open) {
760
- this.open.emit(eventArgs);
761
- }
762
- else {
763
- this.close.emit(eventArgs);
764
- }
765
- return eventArgs.isDefaultPrevented();
766
- };
767
- /**
768
- * @hidden
769
- */
770
- DropDownListComponent.prototype.togglePopup = function (open) {
771
- var isDisabled = this.disabled || this.readonly;
772
- var sameState = this.isOpen === open;
773
- if (isDisabled || sameState) {
774
- return;
775
- }
776
- var isDefaultPrevented = this.triggerPopupEvents(open);
777
- if (!isDefaultPrevented) {
778
- if (!open && this.filterable && this.isFocused) {
779
- this.focus();
780
- }
781
- this._toggle(open);
782
- }
783
- };
784
- Object.defineProperty(DropDownListComponent.prototype, "isOpen", {
785
- /**
786
- * Returns the current open state of the popup.
787
- */
788
- get: function () {
789
- return this._open;
790
- },
791
- enumerable: true,
792
- configurable: true
793
- });
794
- /**
795
- * Resets the value of the DropDownList.
796
- * If you use the `reset` method to clear the value of the component,
797
- * the model will not update automatically and the `selectionChange` and `valueChange` events will not be fired.
798
- */
799
- DropDownListComponent.prototype.reset = function () {
800
- this.value = undefined;
801
- };
802
- /**
803
- * @hidden
804
- */
805
- DropDownListComponent.prototype.messageFor = function (key) {
806
- return this.localization.get(key);
807
- };
808
- /**
809
- * @hidden
810
- */
811
- DropDownListComponent.prototype.writeValue = function (value) {
812
- this.value = value === null ? undefined : value;
813
- };
814
- /**
815
- * @hidden
816
- */
817
- DropDownListComponent.prototype.registerOnChange = function (fn) {
818
- this.onChangeCallback = fn;
819
- };
820
- /**
821
- * @hidden
822
- */
823
- DropDownListComponent.prototype.registerOnTouched = function (fn) {
824
- this.onTouchedCallback = fn;
825
- };
826
- /**
827
- * @hidden
828
- */
829
- DropDownListComponent.prototype.setDisabledState = function (isDisabled) {
830
- this.disabled = isDisabled;
831
- };
832
- Object.defineProperty(DropDownListComponent.prototype, "buttonClasses", {
833
- /**
834
- * @hidden
835
- */
836
- get: function () {
837
- return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
838
- },
839
- enumerable: true,
840
- configurable: true
841
- });
842
- Object.defineProperty(DropDownListComponent.prototype, "selectButtonClasses", {
843
- /**
844
- * @hidden
845
- */
846
- get: function () {
847
- return (this.size ? util_1.getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
848
- },
849
- enumerable: true,
850
- configurable: true
851
- });
852
- Object.defineProperty(DropDownListComponent.prototype, "filterInputClasses", {
853
- /**
854
- * @hidden
855
- */
856
- get: function () {
857
- return (this.size ? util_1.getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? util_1.getRoundedClass(this.rounded) : '');
858
- },
859
- enumerable: true,
860
- configurable: true
861
- });
862
- Object.defineProperty(DropDownListComponent.prototype, "optionLabelSizeClass", {
863
- /**
864
- * @hidden
865
- */
866
- get: function () {
867
- return "" + (this.size ? util_1.getSizeClass('list', this.size) : '');
868
- },
869
- enumerable: true,
870
- configurable: true
871
- });
872
- Object.defineProperty(DropDownListComponent.prototype, "listContainerClasses", {
873
- /**
874
- * @hidden
875
- */
876
- get: function () {
877
- var containerClasses = ['k-list-container', 'k-reset'];
878
- if (this.popupSettings.popupClass) {
879
- containerClasses.push(this.popupSettings.popupClass);
880
- }
881
- return containerClasses;
882
- },
883
- enumerable: true,
884
- configurable: true
885
- });
886
- Object.defineProperty(DropDownListComponent.prototype, "isDisabledDefaultItem", {
887
- /**
888
- * @hidden
889
- */
890
- get: function () {
891
- return this.disabledItemsService.isItemDisabled(this.defaultItem);
892
- },
893
- enumerable: true,
894
- configurable: true
895
- });
896
- /**
897
- * @hidden
898
- */
899
- DropDownListComponent.prototype.getText = function () {
900
- return this.text;
901
- };
902
- /**
903
- * @hidden
904
- */
905
- DropDownListComponent.prototype.getDefaultItemText = function () {
906
- return util_1.getter(this.defaultItem, this.textField);
907
- };
908
- DropDownListComponent.prototype.createPopup = function () {
909
- var _this = this;
910
- if (this.virtual) {
911
- this.virtual.skip = 0;
912
- }
913
- var horizontalAlign = this.direction === "rtl" ? "right" : "left";
914
- var anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
915
- var popupPosition = { horizontal: horizontalAlign, vertical: "top" };
916
- this.popupRef = this.popupService.open({
917
- anchor: this.wrapper,
918
- anchorAlign: anchorPosition,
919
- animate: this.popupSettings.animate,
920
- appendTo: this.appendTo,
921
- content: this.popupTemplate,
922
- popupAlign: popupPosition,
923
- popupClass: this.listContainerClasses,
924
- positionMode: 'absolute'
925
- });
926
- var popupWrapper = this.popupRef.popupElement;
927
- var _a = this.width, min = _a.min, max = _a.max;
928
- popupWrapper.addEventListener('mousedown', this.popupMouseDownHandler);
929
- popupWrapper.style.minWidth = min;
930
- popupWrapper.style.width = max;
931
- popupWrapper.style.height = this.height;
932
- popupWrapper.setAttribute("dir", this.direction);
933
- this.popupRef.popupOpen.subscribe(function () {
934
- _this.cdr.detectChanges();
935
- _this.optionsList.scrollToItem(_this.selectionService.focused);
936
- _this.opened.emit();
937
- });
938
- this.popupRef.popupClose.subscribe(function () {
939
- _this.closed.emit();
940
- });
941
- if (!this.filterable) {
942
- this.popupRef.popupAnchorViewportLeave.subscribe(function () { return _this.togglePopup(false); });
943
- }
944
- };
945
- DropDownListComponent.prototype.destroyPopup = function () {
946
- if (this.popupRef) {
947
- this.popupRef.popupElement
948
- .removeEventListener('mousedown', this.popupMouseDownHandler);
949
- this.popupRef.close();
950
- this.popupRef = null;
951
- }
952
- };
953
- DropDownListComponent.prototype.updateState = function (_a) {
954
- var dataItem = _a.dataItem, _b = _a.confirm, confirm = _b === void 0 ? false : _b;
955
- this.dataItem = dataItem;
956
- this.text = util_1.getter(dataItem, this.textField);
957
- if (confirm) {
958
- this._previousDataItem = dataItem;
959
- }
960
- };
961
- DropDownListComponent.prototype.clearState = function () {
962
- this.text = undefined;
963
- this.dataItem = undefined;
964
- };
965
- DropDownListComponent.prototype.resetSelection = function (index) {
966
- var clear = !util_1.isPresent(index);
967
- this.selectionService.resetSelection(clear ? [] : [index]);
968
- this.selectionService.focused = clear ? this.firstFocusableIndex(0) : index;
969
- };
970
- DropDownListComponent.prototype.onSelectionChange = function (_a) {
971
- var dataItem = _a.dataItem;
972
- this.updateState({ dataItem: dataItem });
973
- this.selectionChange.emit(dataItem);
974
- // reassigning the value label ID as aria-deascibedby forces firefox/nvda, forefox/jaws to read
975
- // the new value when the popup is closed and the value is changed with the arrow keys (up/down)
976
- this.assignAriaDescribedBy();
977
- };
978
- DropDownListComponent.prototype.subscribeEvents = function () {
979
- var _this = this;
980
- if (!kendo_angular_common_1.isDocumentAvailable()) {
981
- return;
982
- }
983
- // Item selection when the popup is open.
984
- this.selectionSubscription.add(this.selectionService.onSelect.pipe(operators_1.filter(function (_) { return _this.isOpen; }), operators_1.map(this.itemFromEvent.bind(this)))
985
- .subscribe(this.onSelectionChange.bind(this)));
986
- // Item selection when the popup is closed | clicked | enter, and so on.
987
- this.selectionSubscription.add(rxjs_1.merge(this.selectionService.onSelect.pipe(operators_1.filter(function (_) { return !_this.isOpen; })), this.selectionService.onChange).pipe(operators_1.map(this.itemFromEvent.bind(this)), operators_1.tap(function (_) { return _this.togglePopup(false); }))
988
- .subscribe(function (_a) {
989
- var dataItem = _a.dataItem, newValue = _a.value, newSelection = _a.newSelection;
990
- if (newSelection) {
991
- _this.onSelectionChange({ dataItem: dataItem });
992
- }
993
- var shouldUsePrevious = !util_1.isPresent(dataItem) && _this._previousDataItem;
994
- var shouldUseNewValue = newValue !== util_1.getter(_this.value, _this.valueField);
995
- if (shouldUsePrevious) {
996
- _this.updateState({ dataItem: _this._previousDataItem });
997
- _this.resetSelection();
998
- }
999
- else if (shouldUseNewValue) {
1000
- _this.value = _this.valuePrimitive ? newValue : dataItem;
1001
- _this._previousDataItem = dataItem;
1002
- _this.emitChange(_this.value);
1003
- }
1004
- _this.clearFilter();
1005
- }));
1006
- this.navigationSubscription = rxjs_1.merge(this.navigationService.up, this.navigationService.down, this.navigationService.left.pipe(operators_1.skipWhile(function () { return _this.filterable; })), this.navigationService.right.pipe(operators_1.skipWhile(function () { return _this.filterable; })), this.navigationService.home, this.navigationService.end)
1007
- .pipe(operators_1.filter(function (event) { return !isNaN(event.index); }))
1008
- .subscribe(function (event) { return _this.selectionService.select(event.index); });
1009
- this.openSubscription = this.navigationService.open.subscribe(function () { return _this.togglePopup(true); });
1010
- this.closeSubscription = this.navigationService.close.subscribe(function () {
1011
- _this.togglePopup(false);
1012
- _this.focus();
1013
- });
1014
- this.enterSubscription = this.navigationService.enter
1015
- .pipe(operators_1.tap(function (event) { return event.originalEvent.preventDefault(); }))
1016
- .subscribe(this.handleEnter.bind(this));
1017
- this.escSubscription = this.navigationService.esc
1018
- .subscribe(this.handleEscape.bind(this));
1019
- this.filterBlurredSubscription = this.filterBlurred.pipe(operators_1.concatMap(function () { return rxjs_1.interval(10).pipe(operators_1.take(1), operators_1.takeUntil(_this.hostElementFocused)); }))
1020
- .subscribe(function () {
1021
- _this.hostElementBlurred.emit();
1022
- });
1023
- this._zone.runOutsideAngular(function () {
1024
- _this.componentBlurredSubscription =
1025
- rxjs_1.merge(_this.hostElementBlurred.pipe(operators_1.concatMap(function () { return rxjs_1.interval(10).pipe(operators_1.take(1), operators_1.takeUntil(_this.filterFocused)); })), _this.navigationService.tab).pipe(operators_1.tap(function (event) { return event instanceof navigation_service_1.NavigationEvent && _this.focus(); }), operators_1.filter(function () { return _this.isFocused; }))
1026
- .subscribe(function () { return _this.componentBlur(); });
1027
- });
1028
- };
1029
- DropDownListComponent.prototype.subscribeTouchEvents = function () {
1030
- var _this = this;
1031
- if (!kendo_angular_common_1.isDocumentAvailable() || !this.touchEnabled) {
1032
- return;
1033
- }
1034
- this._zone.runOutsideAngular(function () {
1035
- // Roll up DropDownList on iOS when tapped outside
1036
- return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
1037
- var target = e.target;
1038
- if (_this.isFocused && !util_1.inDropDown(_this.wrapper, target, _this.popupRef)) {
1039
- _this._zone.run(function () {
1040
- if (_this.filterFocused) {
1041
- // Close popup if filter is focused
1042
- _this.togglePopup(false);
1043
- }
1044
- _this.blur();
1045
- });
1046
- }
1047
- });
1048
- });
1049
- };
1050
- DropDownListComponent.prototype.subscribeFocusEvents = function () {
1051
- var _this = this;
1052
- if (kendo_angular_common_1.isDocumentAvailable()) {
1053
- this.focusComponent = this.focusComponent.bind(this);
1054
- this.blurComponent = this.blurComponent.bind(this);
1055
- this._zone.runOutsideAngular(function () {
1056
- var useCapture = true;
1057
- document.addEventListener('focus', _this.focusComponent, useCapture);
1058
- document.addEventListener('blur', _this.blurComponent, useCapture);
1059
- });
1060
- }
1061
- };
1062
- DropDownListComponent.prototype.unSubscribeFocusEvents = function () {
1063
- if (kendo_angular_common_1.isDocumentAvailable()) {
1064
- var useCapture = true;
1065
- document.removeEventListener('focus', this.focusComponent, useCapture);
1066
- document.removeEventListener('blur', this.blurComponent, useCapture);
1067
- }
1068
- };
1069
- DropDownListComponent.prototype.unsubscribeEvents = function () {
1070
- if (!kendo_angular_common_1.isDocumentAvailable()) {
1071
- return;
1072
- }
1073
- this.navigationSubscription.unsubscribe();
1074
- this.openSubscription.unsubscribe();
1075
- this.closeSubscription.unsubscribe();
1076
- this.enterSubscription.unsubscribe();
1077
- this.escSubscription.unsubscribe();
1078
- this.componentBlurredSubscription.unsubscribe();
1079
- this.filterBlurredSubscription.unsubscribe();
1080
- this.unSubscribeFocusEvents();
1081
- if (this.touchstartDisposeHandler) {
1082
- this.touchstartDisposeHandler();
1083
- }
1084
- if (this.selectionSubscription) {
1085
- this.selectionSubscription.unsubscribe();
1086
- }
1087
- };
1088
- DropDownListComponent.prototype.itemFromEvent = function (event) {
1089
- var index = event.indices[0];
1090
- var dataItem = this.dataService.itemAt(index);
1091
- dataItem = util_1.isPresent(dataItem) ? dataItem : this.currentOrDefault(index);
1092
- var value = util_1.getter(dataItem, this.valueField);
1093
- var newSelection = event.newSelection;
1094
- return {
1095
- dataItem: dataItem,
1096
- index: index,
1097
- newSelection: newSelection,
1098
- value: value
1099
- };
1100
- };
1101
- DropDownListComponent.prototype.currentOrDefault = function (selectedIndex) {
1102
- var defaultItemIndex = -1;
1103
- if (util_1.isPresent(this.dataItem) && selectedIndex !== defaultItemIndex) {
1104
- return this.dataItem;
1105
- }
1106
- else {
1107
- return this.defaultItem;
1108
- }
1109
- };
1110
- DropDownListComponent.prototype.firstFocusableIndex = function (index) {
1111
- var maxIndex = this.dataService.itemsCount - 1;
1112
- if (this.disabledItemsService.isIndexDisabled(index)) {
1113
- return (index < maxIndex) ? this.firstFocusableIndex(index + 1) : undefined;
1114
- }
1115
- else {
1116
- return index;
1117
- }
1118
- };
1119
- DropDownListComponent.prototype.handleEnter = function () {
1120
- if (this.isOpen) {
1121
- this.selectionService.change(this.selectionService.focused);
1122
- this.focus();
1123
- }
1124
- else {
1125
- this.togglePopup(true);
1126
- }
1127
- };
1128
- DropDownListComponent.prototype.handleEscape = function () {
1129
- if (util_1.isPresent(this.selectionService.selected[0])) {
1130
- this.selectionService.change(this.selectionService.selected[0]);
1131
- }
1132
- else {
1133
- this.togglePopup(false);
1134
- this.clearFilter();
1135
- }
1136
- this.focus();
1137
- };
1138
- DropDownListComponent.prototype.clearFilter = function () {
1139
- if (!(this.filterable && this.filterText)) {
1140
- return;
1141
- }
1142
- this.filterText = "";
1143
- this.cdr.markForCheck();
1144
- this.filterChange.emit(this.filterText);
1145
- };
1146
- DropDownListComponent.prototype.verifySettings = function () {
1147
- if (!core_1.isDevMode()) {
1148
- return;
1149
- }
1150
- if (this.defaultItem && this.valueField && typeof this.defaultItem !== "object") {
1151
- throw new Error(error_messages_1.DropDownListMessages.defaultItem);
1152
- }
1153
- if (this.valuePrimitive === true && util_1.isPresent(this.value) && typeof this.value === "object") {
1154
- throw new Error(error_messages_1.DropDownListMessages.primitive);
1155
- }
1156
- if (this.valuePrimitive === false && util_1.isPresent(this.value) && typeof this.value !== "object") {
1157
- throw new Error(error_messages_1.DropDownListMessages.object);
1158
- }
1159
- var valueOrText = !util_1.isPresent(this.valueField) !== !util_1.isPresent(this.textField);
1160
- if (valueOrText) {
1161
- throw new Error(error_messages_1.DropDownListMessages.textAndValue);
1162
- }
1163
- };
1164
- DropDownListComponent.prototype.componentBlur = function () {
1165
- var _this = this;
1166
- this.isFocused = false;
1167
- var selectionPresent = util_1.isPresent(this.selectionService.selected[0]);
1168
- var valueHasChanged = selectionPresent && util_1.getter(this.value, this.valueField) !== util_1.getter(this.dataService.itemAt(this.selectionService.selected[0]), this.valueField);
1169
- if (valueHasChanged ||
1170
- kendo_angular_common_1.hasObservers(this.close) ||
1171
- kendo_angular_common_1.hasObservers(this.onBlur) ||
1172
- kendo_angular_common_1.hasObservers(this.filterChange) ||
1173
- util_1.isUntouched(this.wrapper.nativeElement)) {
1174
- this._zone.run(function () {
1175
- if (valueHasChanged) {
1176
- _this.selectionService.change(_this.selectionService.selected[0]);
1177
- }
1178
- _this.togglePopup(false);
1179
- _this.clearFilter();
1180
- _this.onBlur.emit();
1181
- _this.onTouchedCallback();
1182
- });
1183
- }
1184
- else {
1185
- this.togglePopup(false);
1186
- }
1187
- };
1188
- /**
1189
- * @hidden
1190
- */
1191
- DropDownListComponent.prototype.onMouseDown = function (event) {
1192
- var tagName = event.target.tagName.toLowerCase();
1193
- if (tagName !== "input") {
1194
- event.preventDefault();
1195
- }
1196
- };
1197
- DropDownListComponent.prototype.onKeyPress = function (event) {
1198
- if (event.which === 0 || event.keyCode === kendo_angular_common_2.Keys.Enter) {
1199
- return;
1200
- }
1201
- var character = String.fromCharCode(event.charCode || event.keyCode);
1202
- if (this.ignoreCase) {
1203
- character = character.toLowerCase();
1204
- }
1205
- if (character === " ") {
1206
- event.preventDefault();
1207
- }
1208
- this.word += character;
1209
- this.last = character;
1210
- this.search();
1211
- };
1212
- DropDownListComponent.prototype.search = function () {
1213
- var _this = this;
1214
- clearTimeout(this.typingTimeout);
1215
- if (!this.filterable) {
1216
- this.typingTimeout = setTimeout(function () { _this.word = ""; }, this.delay);
1217
- this.selectNext();
1218
- }
1219
- };
1220
- DropDownListComponent.prototype.selectNext = function () {
1221
- var _this = this;
1222
- var data = this.dataService
1223
- .filter(function (item) { return util_1.isPresent(item) && !item.header && !_this.disabledItemsService.isItemDisabled(item); })
1224
- .map(function (item) {
1225
- if (_this.dataService.grouped) {
1226
- return { item: item.value, itemIndex: item.offsetIndex };
1227
- }
1228
- return { item: item, itemIndex: _this.dataService.indexOf(item) };
1229
- });
1230
- var isInLoop = util_1.sameCharsOnly(this.word, this.last);
1231
- var dataLength = data.length;
1232
- var hasSelected = !isNaN(this.selectionService.selected[0]);
1233
- var startIndex = !hasSelected ? 0 : this.selectionService.selected[0];
1234
- var text, index, defaultItem;
1235
- if (this.defaultItem && !this.disabledItemsService.isItemDisabled(this.defaultItem)) {
1236
- defaultItem = { item: this.defaultItem, itemIndex: -1 };
1237
- dataLength += 1;
1238
- startIndex += 1;
1239
- }
1240
- startIndex += isInLoop && hasSelected ? 1 : 0;
1241
- data = util_1.shuffleData(data, startIndex, defaultItem);
1242
- index = 0;
1243
- for (; index < dataLength; index++) {
1244
- text = util_1.getter(data[index].item, this.textField);
1245
- var loopMatch = Boolean(isInLoop && util_1.matchText(text, this.last, this.ignoreCase));
1246
- var nextMatch = Boolean(util_1.matchText(text, this.word, this.ignoreCase));
1247
- if (loopMatch || nextMatch) {
1248
- index = data[index].itemIndex;
1249
- break;
1250
- }
1251
- }
1252
- if (index !== dataLength) {
1253
- this.navigate(index);
1254
- }
1255
- };
1256
- DropDownListComponent.prototype.emitChange = function (value) {
1257
- this.onChangeCallback(value);
1258
- this.valueChange.emit(value);
1259
- };
1260
- DropDownListComponent.prototype.navigate = function (index) {
1261
- this.selectionService.select(index);
1262
- };
1263
- DropDownListComponent.prototype.findDataItem = function (_a) {
1264
- var valueField = _a.valueField, value = _a.value;
1265
- var result = {
1266
- dataItem: null,
1267
- index: -1
1268
- };
1269
- var prop = function (dataItem) { return util_1.getter(dataItem, valueField); };
1270
- var comparer;
1271
- if (this.dataService.grouped) {
1272
- comparer = function (element) {
1273
- return prop(element.value) === prop(value);
1274
- };
1275
- }
1276
- else {
1277
- comparer = function (element) {
1278
- return prop(element) === prop(value);
1279
- };
1280
- }
1281
- var index = this.dataService.findIndex(comparer);
1282
- result.dataItem = this.dataService.itemAt(index);
1283
- result.index = index;
1284
- return result;
1285
- };
1286
- DropDownListComponent.prototype.setState = function () {
1287
- var value = this.value;
1288
- var valueField = this.valueField;
1289
- var textField = this.textField;
1290
- var primitive = this.valuePrimitive;
1291
- if (this.defaultItem) {
1292
- var defaultValue = util_1.getter(this.defaultItem, valueField);
1293
- var currentValue = util_1.getter(value, valueField);
1294
- if (!util_1.isPresent(value) || (currentValue === defaultValue)) {
1295
- this.updateState({ dataItem: this.defaultItem, confirm: true });
1296
- this.resetSelection(-1);
1297
- if (this.filterable && this.filterText && this.dataService.itemsCount) {
1298
- this.selectionService.focused = this.firstFocusableIndex(0);
1299
- }
1300
- return;
1301
- }
1302
- }
1303
- var resolved = this.findDataItem({ valueField: valueField, value: value });
1304
- // The data and value are of same shape,
1305
- // for example, value: 'foo', data: ['foo', 'bar']
1306
- // or value: { value: 1, text: 'foo' }, data: [{ value: 1, text: 'foo' }].
1307
- var ofSameType = !(primitive && textField);
1308
- if (resolved.dataItem) {
1309
- this.updateState({ dataItem: resolved.dataItem, confirm: true });
1310
- this.resetSelection(resolved.index);
1311
- }
1312
- else if (util_1.isPresent(value) && ofSameType) {
1313
- this.updateState({ dataItem: value });
1314
- this.resetSelection();
1315
- }
1316
- else if (this._previousDataItem) {
1317
- this.updateState({ dataItem: this._previousDataItem });
1318
- this.resetSelection();
1319
- }
1320
- else {
1321
- this.clearState();
1322
- this.resetSelection();
1323
- }
1324
- };
1325
- /**
1326
- * @hidden
1327
- */
1328
- DropDownListComponent.prototype.handleFilter = function (event) {
1329
- this.filterChange.emit(event.target.value);
1330
- };
1331
- /**
1332
- * @hidden
1333
- */
1334
- DropDownListComponent.prototype.pageChange = function (event) {
1335
- var virtual = this.virtual;
1336
- virtual.skip = event.skip;
1337
- };
1338
- DropDownListComponent.prototype.assignAriaDescribedBy = function () {
1339
- var currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
1340
- var trimmed = currentValue.replace(this.valueLabelId, '').trim();
1341
- // reset the value label ID to force readers to read the new value
1342
- this.valueLabelId = util_1.guid();
1343
- // add to the current value - don't replace it
1344
- var newValue = (this.valueLabelId + " " + trimmed).trim();
1345
- this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
1346
- };
1347
- DropDownListComponent.prototype.setComponentClasses = function () {
1348
- if (this.size) {
1349
- this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('picker', this.size));
1350
- }
1351
- if (this.rounded) {
1352
- this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
1353
- }
1354
- if (this.fillMode) {
1355
- this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('picker', this.fillMode));
1356
- }
1357
- };
1358
- var DropDownListComponent_1;
1359
- tslib_1.__decorate([
1360
- core_1.Input(),
1361
- tslib_1.__metadata("design:type", String)
1362
- ], DropDownListComponent.prototype, "iconClass", void 0);
1363
- tslib_1.__decorate([
1364
- core_1.Input(),
1365
- tslib_1.__metadata("design:type", Boolean)
1366
- ], DropDownListComponent.prototype, "loading", void 0);
1367
- tslib_1.__decorate([
1368
- core_1.Input(),
1369
- tslib_1.__metadata("design:type", Object),
1370
- tslib_1.__metadata("design:paramtypes", [Object])
1371
- ], DropDownListComponent.prototype, "data", null);
1372
- tslib_1.__decorate([
1373
- core_1.Input(),
1374
- tslib_1.__metadata("design:type", Object),
1375
- tslib_1.__metadata("design:paramtypes", [Object])
1376
- ], DropDownListComponent.prototype, "value", null);
1377
- tslib_1.__decorate([
1378
- core_1.Input(),
1379
- tslib_1.__metadata("design:type", String)
1380
- ], DropDownListComponent.prototype, "textField", void 0);
1381
- tslib_1.__decorate([
1382
- core_1.Input(),
1383
- tslib_1.__metadata("design:type", String)
1384
- ], DropDownListComponent.prototype, "valueField", void 0);
1385
- tslib_1.__decorate([
1386
- core_1.Input(),
1387
- tslib_1.__metadata("design:type", Object),
1388
- tslib_1.__metadata("design:paramtypes", [Object])
1389
- ], DropDownListComponent.prototype, "popupSettings", null);
1390
- tslib_1.__decorate([
1391
- core_1.Input(),
1392
- tslib_1.__metadata("design:type", Number)
1393
- ], DropDownListComponent.prototype, "listHeight", void 0);
1394
- tslib_1.__decorate([
1395
- core_1.Input(),
1396
- tslib_1.__metadata("design:type", Object)
1397
- ], DropDownListComponent.prototype, "defaultItem", void 0);
1398
- tslib_1.__decorate([
1399
- core_1.Input(),
1400
- tslib_1.__metadata("design:type", Boolean)
1401
- ], DropDownListComponent.prototype, "disabled", void 0);
1402
- tslib_1.__decorate([
1403
- core_1.Input(),
1404
- tslib_1.__metadata("design:type", Function),
1405
- tslib_1.__metadata("design:paramtypes", [Function])
1406
- ], DropDownListComponent.prototype, "itemDisabled", null);
1407
- tslib_1.__decorate([
1408
- core_1.Input(),
1409
- tslib_1.__metadata("design:type", Boolean)
1410
- ], DropDownListComponent.prototype, "readonly", void 0);
1411
- tslib_1.__decorate([
1412
- core_1.Input(),
1413
- tslib_1.__metadata("design:type", Boolean)
1414
- ], DropDownListComponent.prototype, "filterable", void 0);
1415
- tslib_1.__decorate([
1416
- core_1.Input(),
1417
- tslib_1.__metadata("design:type", Object),
1418
- tslib_1.__metadata("design:paramtypes", [Object])
1419
- ], DropDownListComponent.prototype, "virtual", null);
1420
- tslib_1.__decorate([
1421
- core_1.Input(),
1422
- tslib_1.__metadata("design:type", Boolean)
1423
- ], DropDownListComponent.prototype, "ignoreCase", void 0);
1424
- tslib_1.__decorate([
1425
- core_1.Input(),
1426
- tslib_1.__metadata("design:type", Number)
1427
- ], DropDownListComponent.prototype, "delay", void 0);
1428
- tslib_1.__decorate([
1429
- core_1.Input(),
1430
- tslib_1.__metadata("design:type", Boolean),
1431
- tslib_1.__metadata("design:paramtypes", [Boolean])
1432
- ], DropDownListComponent.prototype, "valuePrimitive", null);
1433
- tslib_1.__decorate([
1434
- core_1.Input(),
1435
- tslib_1.__metadata("design:type", Number)
1436
- ], DropDownListComponent.prototype, "tabindex", void 0);
1437
- tslib_1.__decorate([
1438
- core_1.Input("tabIndex"),
1439
- tslib_1.__metadata("design:type", Number),
1440
- tslib_1.__metadata("design:paramtypes", [Number])
1441
- ], DropDownListComponent.prototype, "tabIndex", null);
1442
- tslib_1.__decorate([
1443
- core_1.Input(),
1444
- tslib_1.__metadata("design:type", String),
1445
- tslib_1.__metadata("design:paramtypes", [String])
1446
- ], DropDownListComponent.prototype, "size", null);
1447
- tslib_1.__decorate([
1448
- core_1.Input(),
1449
- tslib_1.__metadata("design:type", String),
1450
- tslib_1.__metadata("design:paramtypes", [String])
1451
- ], DropDownListComponent.prototype, "rounded", null);
1452
- tslib_1.__decorate([
1453
- core_1.Input(),
1454
- tslib_1.__metadata("design:type", String),
1455
- tslib_1.__metadata("design:paramtypes", [String])
1456
- ], DropDownListComponent.prototype, "fillMode", null);
1457
- tslib_1.__decorate([
1458
- core_1.Output(),
1459
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1460
- ], DropDownListComponent.prototype, "valueChange", void 0);
1461
- tslib_1.__decorate([
1462
- core_1.Output(),
1463
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1464
- ], DropDownListComponent.prototype, "filterChange", void 0);
1465
- tslib_1.__decorate([
1466
- core_1.Output(),
1467
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1468
- ], DropDownListComponent.prototype, "selectionChange", void 0);
1469
- tslib_1.__decorate([
1470
- core_1.Output(),
1471
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1472
- ], DropDownListComponent.prototype, "open", void 0);
1473
- tslib_1.__decorate([
1474
- core_1.Output(),
1475
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1476
- ], DropDownListComponent.prototype, "opened", void 0);
1477
- tslib_1.__decorate([
1478
- core_1.Output(),
1479
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1480
- ], DropDownListComponent.prototype, "close", void 0);
1481
- tslib_1.__decorate([
1482
- core_1.Output(),
1483
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1484
- ], DropDownListComponent.prototype, "closed", void 0);
1485
- tslib_1.__decorate([
1486
- core_1.Output('focus'),
1487
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1488
- ], DropDownListComponent.prototype, "onFocus", void 0);
1489
- tslib_1.__decorate([
1490
- core_1.Output('blur'),
1491
- tslib_1.__metadata("design:type", core_1.EventEmitter)
1492
- ], DropDownListComponent.prototype, "onBlur", void 0);
1493
- tslib_1.__decorate([
1494
- core_1.ContentChild(item_template_directive_1.ItemTemplateDirective, { static: false }),
1495
- tslib_1.__metadata("design:type", item_template_directive_1.ItemTemplateDirective)
1496
- ], DropDownListComponent.prototype, "itemTemplate", void 0);
1497
- tslib_1.__decorate([
1498
- core_1.ContentChild(group_template_directive_1.GroupTemplateDirective, { static: false }),
1499
- tslib_1.__metadata("design:type", group_template_directive_1.GroupTemplateDirective)
1500
- ], DropDownListComponent.prototype, "groupTemplate", void 0);
1501
- tslib_1.__decorate([
1502
- core_1.ContentChild(fixed_group_template_directive_1.FixedGroupTemplateDirective, { static: false }),
1503
- tslib_1.__metadata("design:type", fixed_group_template_directive_1.FixedGroupTemplateDirective)
1504
- ], DropDownListComponent.prototype, "fixedGroupTemplate", void 0);
1505
- tslib_1.__decorate([
1506
- core_1.ContentChild(value_template_directive_1.ValueTemplateDirective, { static: false }),
1507
- tslib_1.__metadata("design:type", value_template_directive_1.ValueTemplateDirective)
1508
- ], DropDownListComponent.prototype, "valueTemplate", void 0);
1509
- tslib_1.__decorate([
1510
- core_1.ContentChild(header_template_directive_1.HeaderTemplateDirective, { static: false }),
1511
- tslib_1.__metadata("design:type", header_template_directive_1.HeaderTemplateDirective)
1512
- ], DropDownListComponent.prototype, "headerTemplate", void 0);
1513
- tslib_1.__decorate([
1514
- core_1.ContentChild(footer_template_directive_1.FooterTemplateDirective, { static: false }),
1515
- tslib_1.__metadata("design:type", footer_template_directive_1.FooterTemplateDirective)
1516
- ], DropDownListComponent.prototype, "footerTemplate", void 0);
1517
- tslib_1.__decorate([
1518
- core_1.ContentChild(no_data_template_directive_1.NoDataTemplateDirective, { static: false }),
1519
- tslib_1.__metadata("design:type", no_data_template_directive_1.NoDataTemplateDirective)
1520
- ], DropDownListComponent.prototype, "noDataTemplate", void 0);
1521
- tslib_1.__decorate([
1522
- core_1.ViewChild('container', { read: core_1.ViewContainerRef, static: true }),
1523
- tslib_1.__metadata("design:type", core_1.ViewContainerRef)
1524
- ], DropDownListComponent.prototype, "container", void 0);
1525
- tslib_1.__decorate([
1526
- core_1.ViewChild('popupTemplate', { static: true }),
1527
- tslib_1.__metadata("design:type", core_1.TemplateRef)
1528
- ], DropDownListComponent.prototype, "popupTemplate", void 0);
1529
- tslib_1.__decorate([
1530
- core_1.ViewChild('optionsList', { static: false }),
1531
- tslib_1.__metadata("design:type", list_component_1.ListComponent)
1532
- ], DropDownListComponent.prototype, "optionsList", void 0);
1533
- tslib_1.__decorate([
1534
- core_1.HostBinding('class.k-dropdownlist'),
1535
- core_1.HostBinding('class.k-picker'),
1536
- tslib_1.__metadata("design:type", Boolean)
1537
- ], DropDownListComponent.prototype, "hostClasses", void 0);
1538
- tslib_1.__decorate([
1539
- core_1.HostBinding('class.k-disabled'),
1540
- core_1.HostBinding('attr.aria-disabled'),
1541
- tslib_1.__metadata("design:type", Boolean),
1542
- tslib_1.__metadata("design:paramtypes", [])
1543
- ], DropDownListComponent.prototype, "isDisabled", null);
1544
- tslib_1.__decorate([
1545
- core_1.HostBinding('class.k-loading'),
1546
- tslib_1.__metadata("design:type", Boolean),
1547
- tslib_1.__metadata("design:paramtypes", [])
1548
- ], DropDownListComponent.prototype, "isLoading", null);
1549
- tslib_1.__decorate([
1550
- core_1.Input('id'),
1551
- core_1.HostBinding('attr.id'),
1552
- tslib_1.__metadata("design:type", String)
1553
- ], DropDownListComponent.prototype, "focusableId", void 0);
1554
- tslib_1.__decorate([
1555
- core_1.HostBinding('attr.dir'),
1556
- tslib_1.__metadata("design:type", String),
1557
- tslib_1.__metadata("design:paramtypes", [])
1558
- ], DropDownListComponent.prototype, "dir", null);
1559
- tslib_1.__decorate([
1560
- core_1.HostBinding('attr.tabindex'),
1561
- tslib_1.__metadata("design:type", Number),
1562
- tslib_1.__metadata("design:paramtypes", [])
1563
- ], DropDownListComponent.prototype, "hostTabIndex", null);
1564
- tslib_1.__decorate([
1565
- core_1.HostBinding('attr.readonly'),
1566
- core_1.HostBinding('attr.aria-readonly'),
1567
- tslib_1.__metadata("design:type", Boolean),
1568
- tslib_1.__metadata("design:paramtypes", [])
1569
- ], DropDownListComponent.prototype, "isReadonly", null);
1570
- tslib_1.__decorate([
1571
- core_1.HostBinding('attr.role'),
1572
- core_1.HostBinding('attr.aria-haspopup'),
1573
- tslib_1.__metadata("design:type", String)
1574
- ], DropDownListComponent.prototype, "role", void 0);
1575
- tslib_1.__decorate([
1576
- core_1.HostBinding('attr.aria-expanded'),
1577
- tslib_1.__metadata("design:type", Boolean),
1578
- tslib_1.__metadata("design:paramtypes", [])
1579
- ], DropDownListComponent.prototype, "isAriaExpanded", null);
1580
- tslib_1.__decorate([
1581
- core_1.HostBinding('attr.aria-owns'),
1582
- tslib_1.__metadata("design:type", String),
1583
- tslib_1.__metadata("design:paramtypes", [])
1584
- ], DropDownListComponent.prototype, "hostAriaOwns", null);
1585
- tslib_1.__decorate([
1586
- core_1.HostBinding('attr.aria-activedescendant'),
1587
- tslib_1.__metadata("design:type", String),
1588
- tslib_1.__metadata("design:paramtypes", [])
1589
- ], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
1590
- tslib_1.__decorate([
1591
- core_1.HostBinding('attr.aria-label'),
1592
- tslib_1.__metadata("design:type", String),
1593
- tslib_1.__metadata("design:paramtypes", [])
1594
- ], DropDownListComponent.prototype, "hostNoDataLabel", null);
1595
- tslib_1.__decorate([
1596
- core_1.HostListener('keydown', ['$event']),
1597
- tslib_1.__metadata("design:type", Function),
1598
- tslib_1.__metadata("design:paramtypes", [Object]),
1599
- tslib_1.__metadata("design:returntype", void 0)
1600
- ], DropDownListComponent.prototype, "keydown", null);
1601
- tslib_1.__decorate([
1602
- core_1.HostListener('keypress', ['$event']),
1603
- tslib_1.__metadata("design:type", Function),
1604
- tslib_1.__metadata("design:paramtypes", [Object]),
1605
- tslib_1.__metadata("design:returntype", void 0)
1606
- ], DropDownListComponent.prototype, "keypress", null);
1607
- tslib_1.__decorate([
1608
- core_1.HostListener('click', ['$event']),
1609
- tslib_1.__metadata("design:type", Function),
1610
- tslib_1.__metadata("design:paramtypes", [Object]),
1611
- tslib_1.__metadata("design:returntype", void 0)
1612
- ], DropDownListComponent.prototype, "click", null);
1613
- DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
1614
- core_1.Component({
1615
- exportAs: 'kendoDropDownList',
1616
- providers: [
1617
- exports.DROPDOWNLIST_VALUE_ACCESSOR,
1618
- data_service_1.DataService,
1619
- selection_service_1.SelectionService,
1620
- navigation_service_1.NavigationService,
1621
- disabled_items_service_1.DisabledItemsService,
1622
- kendo_angular_l10n_1.LocalizationService,
1623
- {
1624
- provide: kendo_angular_l10n_1.L10N_PREFIX,
1625
- useValue: 'kendo.dropdownlist'
1626
- },
1627
- {
1628
- provide: filterable_component_1.FilterableComponent, useExisting: core_1.forwardRef(function () { return DropDownListComponent_1; })
1629
- },
1630
- {
1631
- provide: kendo_angular_common_1.KendoInput, useExisting: core_1.forwardRef(function () { return DropDownListComponent_1; })
1632
- }
1633
- ],
1634
- selector: 'kendo-dropdownlist',
1635
- template: "\n <ng-container kendoDropDownListLocalizedMessages\n i18n-noDataText=\"kendo.dropdownlist.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-selectButtonText=\"kendo.dropdownlist.selectButtonText|The text set as aria-label on the select button\"\n selectButtonText=\"Select\"\n >\n </ng-container>\n <span class=\"k-input-inner\" unselectable=\"on\" role=\"option\" [id]=\"valueLabelId\">\n <span class=\"k-input-value-text\">\n <ng-template *ngIf=\"valueTemplate\"\n [templateContext]=\"{\n templateRef: valueTemplate.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!valueTemplate\">{{ getText() }}</ng-template>\n </span>\n </span>\n <button\n tabindex=\"-1\"\n unselectable=\"on\"\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [ngClass]=\"selectButtonClasses\"\n [attr.aria-label]=\"messageFor('selectButtonText')\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: onMouseDown\n }\"\n >\n <span\n class=\"k-button-icon k-icon\"\n unselectable=\"on\"\n [ngClass]=\"buttonClasses\"\n ></span>\n </button>\n <ng-template #popupTemplate>\n <!--filterable-->\n\n <ng-template [ngIf]=\"filterable\">\n <div class=\"k-list-filter\" (click)=\"$event.stopImmediatePropagation()\">\n <span\n class=\"k-searchbox k-input\"\n [ngClass]=\"filterInputClasses\"\n >\n <span class=\"k-input-icon k-icon k-i-search\" unselectable=\"on\"></span>\n <input\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-activedescendant]=\"ariaActivedescendant\"\n [attr.aria-label]=\"noDataLabel\"\n tabindex=\"-1\"\n [filterInput]=\"isFocused && !touchEnabled\"\n [dir]=\"direction\"\n [(ngModel)]=\"filterText\"\n class=\"k-input-inner\"\n (keydown)=\"keydown($event)\"\n (input)=\"handleFilter($event)\"\n (focus)=\"onFilterFocus()\"\n (blur)=\"blurFilterInput()\" />\n </span>\n </div>\n </ng-template>\n <!--default item-->\n <ng-template [ngIf]=\"defaultItem && !itemTemplate\">\n <div\n class=\"k-list\"\n [ngClass]=\"optionLabelSizeClass\"\n >\n <div class=\"k-list-optionlabel\" [ngClass]=\"{ 'k-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n {{ getDefaultItemText() }}\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"defaultItem && itemTemplate\">\n <div\n class=\"k-list\"\n [ngClass]=\"optionLabelSizeClass\"\n >\n <div class=\"k-list-optionlabel\" [ngClass]=\"{ 'k-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n <ng-template\n [templateContext]=\"{\n templateRef: itemTemplate.templateRef,\n $implicit: defaultItem\n }\">\n </ng-template>\n </div>\n </div>\n </ng-template>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [template]=\"itemTemplate\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n >\n </kendo-list>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ messageFor('noDataText') }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
1636
- }),
1637
- tslib_1.__param(10, core_1.Optional()), tslib_1.__param(10, core_1.Inject(touch_enabled_1.TOUCH_ENABLED)),
1638
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
1639
- kendo_angular_l10n_1.LocalizationService,
1640
- kendo_angular_popup_1.PopupService,
1641
- selection_service_1.SelectionService,
1642
- navigation_service_1.NavigationService,
1643
- disabled_items_service_1.DisabledItemsService,
1644
- data_service_1.DataService,
1645
- core_1.NgZone,
1646
- core_1.Renderer2,
1647
- core_1.ChangeDetectorRef, Boolean])
1648
- ], DropDownListComponent);
1649
- return DropDownListComponent;
1650
- }());
1651
- exports.DropDownListComponent = DropDownListComponent;