@progress/kendo-angular-dropdowns 6.0.3-dev.202203091003 → 7.0.0-dev.202204191042

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