@progress/kendo-angular-dropdowns 6.0.2-dev.202202251358 → 7.0.0-dev.202204150727

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