@progress/kendo-angular-buttons 7.0.1-dev.202201191229 → 8.0.0-next.202202081332

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 (271) hide show
  1. package/bundles/kendo-angular-buttons.umd.js +5 -0
  2. package/{dist/es2015/button → button}/button.directive.d.ts +42 -28
  3. package/{dist/es2015/button → button}/button.module.d.ts +5 -0
  4. package/{dist/es2015/button → button}/button.service.d.ts +3 -0
  5. package/{dist/es2015/button → button}/selection-settings.d.ts +0 -0
  6. package/{dist/es2015/buttongroup → buttongroup}/buttongroup.component.d.ts +13 -9
  7. package/{dist/es2015/buttongroup → buttongroup}/buttongroup.module.d.ts +7 -0
  8. package/{dist/es2015/buttons.module.d.ts → buttons.module.d.ts} +10 -0
  9. package/{dist/es2015/chip → chip}/chip-content-click-event-args.interface.d.ts +0 -0
  10. package/{dist/es2015/chip → chip}/chip-list-remove-event-args.interface.d.ts +0 -0
  11. package/{dist/es2015/chip → chip}/chip-list.component.d.ts +7 -3
  12. package/{dist/es2015/chip → chip}/chip-remove-event-args.interface.d.ts +0 -0
  13. package/{dist/es2015/chip → chip}/chip.component.d.ts +20 -13
  14. package/{dist/es2015/chip → chip}/chip.module.d.ts +7 -0
  15. package/{dist/es2015/chip → chip}/models/selection.d.ts +0 -0
  16. package/{dist/es2015/common → common}/models/fillmode.d.ts +0 -0
  17. package/{dist/es2015/common → common}/models/rounded.d.ts +0 -0
  18. package/{dist/es2015/common → common}/models/shape.d.ts +0 -0
  19. package/{dist/es2015/common → common}/models/size.d.ts +0 -0
  20. package/{dist/es2015/common → common}/models/styling-classes.d.ts +0 -0
  21. package/{dist/es2015/common → common}/models/theme-color.d.ts +0 -0
  22. package/{dist/es2015/common → common}/models.d.ts +0 -0
  23. package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
  24. package/{dist/es2015/dropdownbutton → dropdownbutton}/dropdownbutton.component.d.ts +24 -16
  25. package/dropdownbutton/dropdownbutton.module.d.ts +23 -0
  26. package/{dist/es2015 → esm2015}/button/button.directive.js +98 -158
  27. package/{dist/es2015 → esm2015}/button/button.module.js +13 -10
  28. package/{dist/es2015 → esm2015}/button/button.service.js +8 -10
  29. package/{dist/es → esm2015}/button/selection-settings.js +1 -0
  30. package/{dist/es2015 → esm2015}/buttongroup/buttongroup.component.js +82 -106
  31. package/esm2015/buttongroup/buttongroup.module.js +30 -0
  32. package/{dist/es → esm2015}/buttons.module.js +12 -12
  33. package/{dist/es2015 → esm2015}/chip/chip-content-click-event-args.interface.js +1 -0
  34. package/{dist/es2015 → esm2015}/chip/chip-list-remove-event-args.interface.js +1 -0
  35. package/{dist/es2015 → esm2015}/chip/chip-list.component.js +58 -70
  36. package/{dist/es2015 → esm2015}/chip/chip-remove-event-args.interface.js +1 -0
  37. package/{dist/es2015 → esm2015}/chip/chip.component.js +124 -120
  38. package/{dist/es2015 → esm2015}/chip/chip.module.js +16 -11
  39. package/{dist/es → esm2015}/chip/models/selection.js +1 -0
  40. package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
  41. package/{dist/es → esm2015}/common/models/rounded.js +1 -0
  42. package/{dist/es → esm2015}/common/models/shape.js +1 -0
  43. package/{dist/es → esm2015}/common/models/size.js +1 -0
  44. package/{dist/es → esm2015}/common/models/styling-classes.js +1 -0
  45. package/{dist/es → esm2015}/common/models/theme-color.js +1 -0
  46. package/{dist/es → esm2015}/common/models.js +6 -0
  47. package/{dist/es → esm2015}/direction.js +1 -0
  48. package/{dist/es2015 → esm2015}/dropdownbutton/dropdownbutton.component.js +166 -184
  49. package/esm2015/dropdownbutton/dropdownbutton.module.js +32 -0
  50. package/{dist/es2015 → esm2015}/floatingactionbutton/animations/animations.js +0 -0
  51. package/esm2015/floatingactionbutton/dial-item.component.js +126 -0
  52. package/esm2015/floatingactionbutton/dial-list.component.js +89 -0
  53. package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.component.js +152 -155
  54. package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.module.js +19 -11
  55. package/{dist/es → esm2015}/floatingactionbutton/models/align.js +1 -0
  56. package/{dist/es → esm2015}/floatingactionbutton/models/item-animation.interface.js +1 -0
  57. package/{dist/es → esm2015}/floatingactionbutton/models/item-click.event.js +1 -0
  58. package/{dist/es → esm2015}/floatingactionbutton/models/item.interface.js +1 -0
  59. package/{dist/es → esm2015}/floatingactionbutton/models/offset.js +1 -0
  60. package/{dist/es → esm2015}/floatingactionbutton/models/position-mode.js +1 -0
  61. package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +27 -0
  62. package/esm2015/floatingactionbutton/templates/fab-template.directive.js +27 -0
  63. package/{dist/es2015 → esm2015}/floatingactionbutton/utils.js +0 -0
  64. package/{dist/es2015 → esm2015}/focusable/focus.service.js +8 -10
  65. package/{dist/es2015 → esm2015}/focusable/focusable.directive.js +15 -16
  66. package/{dist/es2015/listbutton/list.module.d.ts → esm2015/kendo-angular-buttons.js} +2 -3
  67. package/{dist/es2015 → esm2015}/listbutton/button-item-template.directive.js +13 -12
  68. package/{dist/es2015 → esm2015}/listbutton/list-button.js +15 -2
  69. package/{dist/es → esm2015}/listbutton/list-item-model.js +1 -0
  70. package/esm2015/listbutton/list.component.js +136 -0
  71. package/esm2015/listbutton/list.module.js +39 -0
  72. package/{dist/es → esm2015}/listbutton/popup-settings.js +1 -0
  73. package/esm2015/listbutton/template-context.directive.js +33 -0
  74. package/{dist/es → esm2015}/main.js +6 -0
  75. package/{dist/es → esm2015}/navigation/key-events.js +0 -0
  76. package/{dist/es → esm2015}/navigation/navigation-action.js +0 -0
  77. package/{dist/es2015 → esm2015}/navigation/navigation-config.js +0 -0
  78. package/{dist/es2015 → esm2015}/navigation/navigation.service.js +11 -9
  79. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  80. package/{dist/es2015 → esm2015}/preventable-event.js +0 -0
  81. package/esm2015/splitbutton/localization/custom-messages.component.js +37 -0
  82. package/esm2015/splitbutton/localization/localized-messages.directive.js +36 -0
  83. package/esm2015/splitbutton/localization/messages.js +22 -0
  84. package/{dist/es2015 → esm2015}/splitbutton/splitbutton.component.js +198 -190
  85. package/esm2015/splitbutton/splitbutton.module.js +34 -0
  86. package/{dist/es2015 → esm2015}/util.js +2 -2
  87. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-buttons.js} +1679 -1694
  88. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/animations/animations.d.ts +0 -0
  89. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/dial-item.component.d.ts +8 -5
  90. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/dial-list.component.d.ts +5 -2
  91. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/floatingactionbutton.component.d.ts +30 -20
  92. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/floatingactionbutton.module.d.ts +13 -0
  93. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/align.d.ts +0 -0
  94. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
  95. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item-click.event.d.ts +0 -0
  96. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item.interface.d.ts +0 -0
  97. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/offset.d.ts +0 -0
  98. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/position-mode.d.ts +0 -0
  99. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/templates/dial-item-template.directive.d.ts +3 -0
  100. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/templates/fab-template.directive.d.ts +3 -0
  101. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/utils.d.ts +0 -0
  102. package/{dist/es2015/focusable → focusable}/focus.service.d.ts +5 -1
  103. package/{dist/es2015/focusable → focusable}/focusable.directive.d.ts +3 -0
  104. package/kendo-angular-buttons.d.ts +9 -0
  105. package/{dist/es2015/listbutton → listbutton}/button-item-template.directive.d.ts +3 -0
  106. package/{dist/es2015/listbutton → listbutton}/list-button.d.ts +6 -2
  107. package/{dist/es2015/listbutton → listbutton}/list-item-model.d.ts +0 -0
  108. package/{dist/es2015/listbutton → listbutton}/list.component.d.ts +4 -1
  109. package/listbutton/list.module.d.ts +18 -0
  110. package/{dist/es2015/listbutton → listbutton}/popup-settings.d.ts +0 -0
  111. package/{dist/es2015/listbutton → listbutton}/template-context.directive.d.ts +4 -1
  112. package/{dist/es2015/main.d.ts → main.d.ts} +6 -0
  113. package/{dist/es2015/navigation → navigation}/key-events.d.ts +0 -0
  114. package/{dist/es2015/navigation → navigation}/navigation-action.d.ts +0 -0
  115. package/{dist/es2015/navigation → navigation}/navigation-config.d.ts +0 -0
  116. package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +3 -0
  117. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  118. package/package.json +35 -110
  119. package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
  120. package/schematics/ngAdd/index.js +5 -2
  121. package/schematics/ngAdd/index.js.map +1 -1
  122. package/{dist/es2015/splitbutton → splitbutton}/localization/custom-messages.component.d.ts +4 -1
  123. package/{dist/es2015/splitbutton → splitbutton}/localization/localized-messages.directive.d.ts +3 -0
  124. package/{dist/es2015/splitbutton → splitbutton}/localization/messages.d.ts +3 -0
  125. package/{dist/es2015/splitbutton → splitbutton}/splitbutton.component.d.ts +28 -18
  126. package/splitbutton/splitbutton.module.d.ts +25 -0
  127. package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
  128. package/dist/cdn/js/kendo-angular-buttons.js +0 -20
  129. package/dist/cdn/main.js +0 -5
  130. package/dist/es/button/button.directive.js +0 -768
  131. package/dist/es/button/button.module.js +0 -50
  132. package/dist/es/button/button.service.js +0 -24
  133. package/dist/es/buttongroup/buttongroup.component.js +0 -353
  134. package/dist/es/buttongroup/buttongroup.module.js +0 -30
  135. package/dist/es/chip/chip-content-click-event-args.interface.js +0 -4
  136. package/dist/es/chip/chip-list-remove-event-args.interface.js +0 -4
  137. package/dist/es/chip/chip-list.component.js +0 -214
  138. package/dist/es/chip/chip-remove-event-args.interface.js +0 -4
  139. package/dist/es/chip/chip.component.js +0 -449
  140. package/dist/es/chip/chip.module.js +0 -55
  141. package/dist/es/dropdownbutton/dropdownbutton.component.js +0 -705
  142. package/dist/es/dropdownbutton/dropdownbutton.module.js +0 -32
  143. package/dist/es/floatingactionbutton/animations/animations.js +0 -33
  144. package/dist/es/floatingactionbutton/dial-item.component.js +0 -143
  145. package/dist/es/floatingactionbutton/dial-list.component.js +0 -76
  146. package/dist/es/floatingactionbutton/floatingactionbutton.component.js +0 -903
  147. package/dist/es/floatingactionbutton/floatingactionbutton.module.js +0 -65
  148. package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +0 -26
  149. package/dist/es/floatingactionbutton/templates/fab-template.directive.js +0 -26
  150. package/dist/es/floatingactionbutton/utils.js +0 -38
  151. package/dist/es/focusable/focus.service.js +0 -43
  152. package/dist/es/focusable/focusable.directive.js +0 -68
  153. package/dist/es/index.js +0 -22
  154. package/dist/es/listbutton/button-item-template.directive.js +0 -68
  155. package/dist/es/listbutton/list-button.js +0 -243
  156. package/dist/es/listbutton/list.component.js +0 -85
  157. package/dist/es/listbutton/list.module.js +0 -33
  158. package/dist/es/listbutton/template-context.directive.js +0 -40
  159. package/dist/es/navigation/navigation-config.js +0 -9
  160. package/dist/es/navigation/navigation.service.js +0 -114
  161. package/dist/es/package-metadata.js +0 -15
  162. package/dist/es/preventable-event.js +0 -29
  163. package/dist/es/splitbutton/localization/custom-messages.component.js +0 -44
  164. package/dist/es/splitbutton/localization/localized-messages.directive.js +0 -35
  165. package/dist/es/splitbutton/localization/messages.js +0 -22
  166. package/dist/es/splitbutton/splitbutton.component.js +0 -831
  167. package/dist/es/splitbutton/splitbutton.module.js +0 -34
  168. package/dist/es/util.js +0 -97
  169. package/dist/es2015/button/selection-settings.js +0 -4
  170. package/dist/es2015/buttongroup/buttongroup.module.js +0 -27
  171. package/dist/es2015/buttons.module.js +0 -51
  172. package/dist/es2015/chip/models/selection.js +0 -4
  173. package/dist/es2015/common/models/fillmode.js +0 -4
  174. package/dist/es2015/common/models/rounded.js +0 -4
  175. package/dist/es2015/common/models/shape.js +0 -4
  176. package/dist/es2015/common/models/size.js +0 -4
  177. package/dist/es2015/common/models/styling-classes.js +0 -4
  178. package/dist/es2015/common/models/theme-color.js +0 -4
  179. package/dist/es2015/common/models.js +0 -4
  180. package/dist/es2015/direction.js +0 -4
  181. package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +0 -14
  182. package/dist/es2015/dropdownbutton/dropdownbutton.module.js +0 -29
  183. package/dist/es2015/floatingactionbutton/dial-item.component.js +0 -133
  184. package/dist/es2015/floatingactionbutton/dial-list.component.js +0 -81
  185. package/dist/es2015/floatingactionbutton/models/align.js +0 -4
  186. package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +0 -4
  187. package/dist/es2015/floatingactionbutton/models/item-click.event.js +0 -4
  188. package/dist/es2015/floatingactionbutton/models/item.interface.js +0 -4
  189. package/dist/es2015/floatingactionbutton/models/offset.js +0 -4
  190. package/dist/es2015/floatingactionbutton/models/position-mode.js +0 -4
  191. package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -25
  192. package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +0 -25
  193. package/dist/es2015/index.d.ts +0 -22
  194. package/dist/es2015/index.js +0 -22
  195. package/dist/es2015/index.metadata.json +0 -1
  196. package/dist/es2015/listbutton/list-item-model.js +0 -4
  197. package/dist/es2015/listbutton/list.component.js +0 -113
  198. package/dist/es2015/listbutton/list.module.js +0 -30
  199. package/dist/es2015/listbutton/popup-settings.js +0 -4
  200. package/dist/es2015/listbutton/template-context.directive.js +0 -35
  201. package/dist/es2015/main.js +0 -22
  202. package/dist/es2015/navigation/key-events.js +0 -13
  203. package/dist/es2015/navigation/navigation-action.js +0 -19
  204. package/dist/es2015/splitbutton/localization/custom-messages.component.js +0 -36
  205. package/dist/es2015/splitbutton/localization/localized-messages.directive.js +0 -31
  206. package/dist/es2015/splitbutton/localization/messages.js +0 -16
  207. package/dist/es2015/splitbutton/splitbutton.module.d.ts +0 -14
  208. package/dist/es2015/splitbutton/splitbutton.module.js +0 -31
  209. package/dist/fesm5/index.js +0 -5562
  210. package/dist/npm/button/button.directive.js +0 -770
  211. package/dist/npm/button/button.module.js +0 -52
  212. package/dist/npm/button/button.service.js +0 -26
  213. package/dist/npm/button/selection-settings.js +0 -6
  214. package/dist/npm/buttongroup/buttongroup.component.js +0 -355
  215. package/dist/npm/buttongroup/buttongroup.module.js +0 -32
  216. package/dist/npm/buttons.module.js +0 -56
  217. package/dist/npm/chip/chip-content-click-event-args.interface.js +0 -6
  218. package/dist/npm/chip/chip-list-remove-event-args.interface.js +0 -6
  219. package/dist/npm/chip/chip-list.component.js +0 -216
  220. package/dist/npm/chip/chip-remove-event-args.interface.js +0 -6
  221. package/dist/npm/chip/chip.component.js +0 -451
  222. package/dist/npm/chip/chip.module.js +0 -57
  223. package/dist/npm/chip/models/selection.js +0 -6
  224. package/dist/npm/common/models/fillmode.js +0 -6
  225. package/dist/npm/common/models/rounded.js +0 -6
  226. package/dist/npm/common/models/shape.js +0 -6
  227. package/dist/npm/common/models/size.js +0 -6
  228. package/dist/npm/common/models/styling-classes.js +0 -6
  229. package/dist/npm/common/models/theme-color.js +0 -6
  230. package/dist/npm/common/models.js +0 -6
  231. package/dist/npm/direction.js +0 -6
  232. package/dist/npm/dropdownbutton/dropdownbutton.component.js +0 -707
  233. package/dist/npm/dropdownbutton/dropdownbutton.module.js +0 -34
  234. package/dist/npm/floatingactionbutton/animations/animations.js +0 -37
  235. package/dist/npm/floatingactionbutton/dial-item.component.js +0 -145
  236. package/dist/npm/floatingactionbutton/dial-list.component.js +0 -78
  237. package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +0 -905
  238. package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +0 -67
  239. package/dist/npm/floatingactionbutton/models/align.js +0 -6
  240. package/dist/npm/floatingactionbutton/models/item-animation.interface.js +0 -6
  241. package/dist/npm/floatingactionbutton/models/item-click.event.js +0 -6
  242. package/dist/npm/floatingactionbutton/models/item.interface.js +0 -6
  243. package/dist/npm/floatingactionbutton/models/offset.js +0 -6
  244. package/dist/npm/floatingactionbutton/models/position-mode.js +0 -6
  245. package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +0 -28
  246. package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +0 -28
  247. package/dist/npm/floatingactionbutton/utils.js +0 -42
  248. package/dist/npm/focusable/focus.service.js +0 -45
  249. package/dist/npm/focusable/focusable.directive.js +0 -70
  250. package/dist/npm/index.js +0 -39
  251. package/dist/npm/listbutton/button-item-template.directive.js +0 -70
  252. package/dist/npm/listbutton/list-button.js +0 -245
  253. package/dist/npm/listbutton/list-item-model.js +0 -6
  254. package/dist/npm/listbutton/list.component.js +0 -87
  255. package/dist/npm/listbutton/list.module.js +0 -35
  256. package/dist/npm/listbutton/popup-settings.js +0 -6
  257. package/dist/npm/listbutton/template-context.directive.js +0 -42
  258. package/dist/npm/main.js +0 -45
  259. package/dist/npm/navigation/key-events.js +0 -15
  260. package/dist/npm/navigation/navigation-action.js +0 -21
  261. package/dist/npm/navigation/navigation-config.js +0 -11
  262. package/dist/npm/navigation/navigation.service.js +0 -116
  263. package/dist/npm/package-metadata.js +0 -17
  264. package/dist/npm/preventable-event.js +0 -31
  265. package/dist/npm/splitbutton/localization/custom-messages.component.js +0 -46
  266. package/dist/npm/splitbutton/localization/localized-messages.directive.js +0 -37
  267. package/dist/npm/splitbutton/localization/messages.js +0 -24
  268. package/dist/npm/splitbutton/splitbutton.component.js +0 -833
  269. package/dist/npm/splitbutton/splitbutton.module.js +0 -36
  270. package/dist/npm/util.js +0 -100
  271. package/dist/systemjs/kendo-angular-buttons.js +0 -5
@@ -1,831 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- /* tslint:disable:no-access-missing-member */
7
- import { Component, ElementRef, TemplateRef, Input, Output, HostBinding, HostListener, EventEmitter, ContentChild, ViewChild, ViewContainerRef, NgZone, ChangeDetectorRef, Renderer2 } from '@angular/core';
8
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
- import { PopupService } from '@progress/kendo-angular-popup';
10
- import { ListButton } from './../listbutton/list-button';
11
- import { ButtonItemTemplateDirective } from './../listbutton/button-item-template.directive';
12
- import { FocusService } from './../focusable/focus.service';
13
- import { NavigationService } from './../navigation/navigation.service';
14
- import { NAVIGATION_CONFIG } from './../navigation/navigation-config';
15
- import { isDocumentAvailable, guid, isChanged } from '@progress/kendo-angular-common';
16
- import { isPresent, tick } from './../util';
17
- import { PreventableEvent } from '../preventable-event';
18
- import { Keys } from '@progress/kendo-angular-common';
19
- import { replaceMessagePlaceholder, getStylingClasses } from '../util';
20
- var NAVIGATION_SETTINGS = {
21
- useLeftRightArrows: true
22
- };
23
- var ɵ0 = NAVIGATION_SETTINGS;
24
- var NAVIGATION_SETTINGS_PROVIDER = {
25
- provide: NAVIGATION_CONFIG,
26
- useValue: ɵ0
27
- };
28
- /**
29
- * Represents the Kendo UI SplitButton component for Angular.
30
- *
31
- * @example
32
- * ```ts
33
- * _@Component({
34
- * selector: 'my-app',
35
- * template: `
36
- * <kendo-splitbutton [data]="data" icon="paste"
37
- * (itemClick)="onSplitButtonItemClick($event)"
38
- * (buttonClick)="onSplitButtonClick()">Paste</kendo-splitbutton>
39
- * `
40
- * })
41
- *
42
- * class AppComponent {
43
- * public data: Array<any> = [{
44
- * text: 'Keep Text Only',
45
- * icon: 'paste-plain-text',
46
- * click: () => { console.log('Keep Text Only click handler'); }
47
- * }, {
48
- * text: 'Paste as HTML',
49
- * icon: 'paste-as-html'
50
- * }, {
51
- * text: 'Paste Markdown',
52
- * icon: 'paste-markdown'
53
- * }, {
54
- * text: 'Set Default Paste'
55
- * }];
56
- *
57
- * public onSplitButtonClick(dataItem: any): void {
58
- * console.log('Paste');
59
- * }
60
- *
61
- * public onSplitButtonItemClick(dataItem: any): void {
62
- * if (dataItem) {
63
- * console.log(dataItem.text);
64
- * }
65
- * }
66
- * }
67
- * ```
68
- */
69
- var SplitButtonComponent = /** @class */ (function (_super) {
70
- tslib_1.__extends(SplitButtonComponent, _super);
71
- function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
72
- var _this = _super.call(this, focusService, navigationService, wrapperRef, zone, localization, cdr) || this;
73
- _this.popupService = popupService;
74
- _this.elRef = elRef;
75
- _this.localization = localization;
76
- _this.renderer = renderer;
77
- /**
78
- * Sets the text of the SplitButton.
79
- */
80
- _this.text = '';
81
- /**
82
- * Defines an icon to be rendered next to the button text
83
- * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
84
- */
85
- _this.icon = '';
86
- /**
87
- * Defines an icon with a custom CSS class to be rendered next to the button text
88
- * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
89
- */
90
- _this.iconClass = '';
91
- /**
92
- * Defines the type attribute of the main button
93
- */
94
- _this.type = 'button';
95
- /**
96
- * Defines the location of an image to be displayed next to the button text
97
- * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
98
- */
99
- _this.imageUrl = '';
100
- /**
101
- * The size property specifies the padding of the SplitButton
102
- * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-size)).
103
- *
104
- * The possible values are:
105
- * * `'small'`
106
- * * `'medium'` (default)
107
- * * `'large'`
108
- * * `null`
109
- */
110
- _this.size = 'medium';
111
- /**
112
- * The SplitButton allows you to specify predefined theme colors.
113
- * The theme color will be applied as a background and border color while also amending the text color accordingly
114
- * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-themeColor)).
115
- *
116
- * The possible values are:
117
- * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
118
- * * `primary` &mdash;Applies coloring based on the `primary` theme color.
119
- * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
120
- * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
121
- * * `info`&mdash;Applies coloring based on the `info` theme color.
122
- * * `success`&mdash; Applies coloring based on the `success` theme color.
123
- * * `warning`&mdash; Applies coloring based on the `warning` theme color.
124
- * * `error`&mdash; Applies coloring based on the `error` theme color.
125
- * * `dark`&mdash; Applies coloring based on the `dark` theme color.
126
- * * `light`&mdash; Applies coloring based on the `light` theme color.
127
- * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
128
- */
129
- _this.themeColor = 'base';
130
- /**
131
- * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
132
- */
133
- _this.tabIndex = 0;
134
- /**
135
- * Specifies the name of the [font icon]({% slug icons %}#toc-list-of-font-icons) that will
136
- * be rendered for the button which opens the popup.
137
- */
138
- _this.arrowButtonIcon = 'arrow-s';
139
- /**
140
- * Fires each time the user clicks the main button.
141
- *
142
- * @example
143
- * ```ts
144
- * _@Component({
145
- * selector: 'my-app',
146
- * template: `
147
- * <kendo-splitbutton (buttonClick)="onSplitButtonClick()" [data]="data">
148
- * Reply
149
- * </kendo-splitbutton>
150
- * `
151
- * })
152
- * class AppComponent {
153
- * public data: Array<any> = ['Reply All', 'Forward', 'Reply & Delete'];
154
- *
155
- * public onSplitButtonClick(): void {
156
- * console.log('SplitButton click');
157
- * }
158
- * }
159
- * ```
160
- *
161
- */
162
- _this.buttonClick = new EventEmitter();
163
- /**
164
- * Fires each time the user clicks on the drop-down list. The event data contains the data item bound to the clicked list item.
165
- *
166
- * @example
167
- * ```ts
168
- * _@Component({
169
- * selector: 'my-app',
170
- * template: `
171
- * <kendo-splitbutton (itemClick)="onSplitButtonItemClick($event)" [data]="data">
172
- * Reply
173
- * </kendo-splitbutton>
174
- * `
175
- * })
176
- * class AppComponent {
177
- * public data: Array<any> = ['Reply All', 'Forward', 'Reply & Delete'];
178
- *
179
- * public onSplitButtonItemClick(dataItem?: string): void {
180
- * if (dataItem) {
181
- * console.log(dataItem);
182
- * }
183
- * }
184
- * }
185
- * ```
186
- *
187
- */
188
- _this.itemClick = new EventEmitter();
189
- /**
190
- * Fires each time the SplitButton gets focused.
191
- */
192
- _this.onFocus = new EventEmitter(); //tslint:disable-line:no-output-rename
193
- /**
194
- * Fires each time the SplitButton gets blurred.
195
- */
196
- _this.onBlur = new EventEmitter(); //tslint:disable-line:no-output-rename
197
- /**
198
- * Fires each time the popup is about to open.
199
- * This event is preventable. If you cancel the event, the popup will remain closed.
200
- */
201
- _this.open = new EventEmitter();
202
- /**
203
- * Fires each time the popup is about to close.
204
- * This event is preventable. If you cancel the event, the popup will remain open.
205
- */
206
- _this.close = new EventEmitter();
207
- /**
208
- * @hidden
209
- */
210
- _this.activeArrow = false;
211
- _this.listId = guid();
212
- _this.buttonText = '';
213
- _this.lockFocus = false;
214
- _this._rounded = 'medium';
215
- _this._fillMode = "solid";
216
- _this._itemClick = _this.itemClick;
217
- _this._blur = _this.onBlur;
218
- return _this;
219
- }
220
- Object.defineProperty(SplitButtonComponent.prototype, "rounded", {
221
- get: function () {
222
- return this._rounded;
223
- },
224
- /**
225
- * The rounded property specifies the border radius of the SplitButton
226
- * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
227
- *
228
- * The possible values are:
229
- * * `'small'`
230
- * * `'medium'` (default)
231
- * * `'large'`
232
- * * `'full'`
233
- * * `null`
234
- */
235
- set: function (rounded) {
236
- this.handleClasses(rounded, 'rounded');
237
- this._rounded = rounded;
238
- },
239
- enumerable: true,
240
- configurable: true
241
- });
242
- Object.defineProperty(SplitButtonComponent.prototype, "fillMode", {
243
- get: function () {
244
- return this._fillMode;
245
- },
246
- /**
247
- * The fillMode property specifies the background and border styles of the SplitButton
248
- * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
249
- *
250
- * The available values are:
251
- * * `solid` (default)
252
- * * `flat`
253
- * * `outline`
254
- * * `link`
255
- */
256
- set: function (fillMode) {
257
- // Temporary workaround for missing 'clear' styles
258
- this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
259
- },
260
- enumerable: true,
261
- configurable: true
262
- });
263
- Object.defineProperty(SplitButtonComponent.prototype, "disabled", {
264
- get: function () {
265
- return this._disabled;
266
- },
267
- /**
268
- * When set to `true`, disables a SplitButton item
269
- * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
270
- */
271
- set: function (value) {
272
- if (this.isOpen) {
273
- this.toggle(false);
274
- }
275
- this._disabled = value;
276
- },
277
- enumerable: true,
278
- configurable: true
279
- });
280
- Object.defineProperty(SplitButtonComponent.prototype, "popupSettings", {
281
- get: function () {
282
- return this._popupSettings;
283
- },
284
- /**
285
- * Configures the popup of the SplitButton.
286
- *
287
- * The available options are:
288
- * - `animate: Boolean`&mdash;Controls the popup animation. By default, the open and close animations are enabled.
289
- * - `popupClass: String`&mdash;Specifies a list of CSS classes that are used to style the popup.
290
- * - `appendTo: "root" | "component" | ViewContainerRef`&mdash;Specifies the component to which the popup will be appended.
291
- * - `align: "left" | "center" | "right"`&mdash;Specifies the alignment of the popup.
292
- */
293
- set: function (settings) {
294
- this._popupSettings = Object.assign({ animate: true, popupClass: '' }, settings);
295
- },
296
- enumerable: true,
297
- configurable: true
298
- });
299
- Object.defineProperty(SplitButtonComponent.prototype, "data", {
300
- get: function () {
301
- if (!this._data) {
302
- this.data = [];
303
- }
304
- return this._data;
305
- },
306
- /**
307
- * Sets the data of the SplitButton.
308
- *
309
- * > The data has to be provided in an array-like list.
310
- */
311
- set: function (data) {
312
- this._data = data || [];
313
- },
314
- enumerable: true,
315
- configurable: true
316
- });
317
- Object.defineProperty(SplitButtonComponent.prototype, "openState", {
318
- /**
319
- * @hidden
320
- */
321
- get: function () {
322
- return this._open;
323
- },
324
- /**
325
- * @hidden
326
- */
327
- set: function (open) {
328
- if (this.disabled) {
329
- return;
330
- }
331
- var eventArgs = new PreventableEvent();
332
- if (open) {
333
- this.open.emit(eventArgs);
334
- }
335
- else {
336
- this.close.emit(eventArgs);
337
- }
338
- if (eventArgs.isDefaultPrevented()) {
339
- return;
340
- }
341
- this._toggle(open);
342
- },
343
- enumerable: true,
344
- configurable: true
345
- });
346
- Object.defineProperty(SplitButtonComponent.prototype, "active", {
347
- /**
348
- * @hidden
349
- */
350
- get: function () {
351
- return this._active;
352
- },
353
- enumerable: true,
354
- configurable: true
355
- });
356
- Object.defineProperty(SplitButtonComponent.prototype, "componentTabIndex", {
357
- /**
358
- * @hidden
359
- */
360
- get: function () {
361
- return this.disabled ? -1 : this.tabIndex;
362
- },
363
- enumerable: true,
364
- configurable: true
365
- });
366
- Object.defineProperty(SplitButtonComponent.prototype, "isFocused", {
367
- get: function () {
368
- return this._isFocused && !this._disabled;
369
- },
370
- set: function (value) {
371
- this._isFocused = value;
372
- },
373
- enumerable: true,
374
- configurable: true
375
- });
376
- Object.defineProperty(SplitButtonComponent.prototype, "widgetClasses", {
377
- get: function () {
378
- return true;
379
- },
380
- enumerable: true,
381
- configurable: true
382
- });
383
- Object.defineProperty(SplitButtonComponent.prototype, "dir", {
384
- get: function () {
385
- return this.direction;
386
- },
387
- enumerable: true,
388
- configurable: true
389
- });
390
- Object.defineProperty(SplitButtonComponent.prototype, "ariaLabel", {
391
- /**
392
- * @hidden
393
- */
394
- get: function () {
395
- var localizationMsg = this.localization.get('splitButtonLabel') || '';
396
- return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
397
- },
398
- enumerable: true,
399
- configurable: true
400
- });
401
- /**
402
- * @hidden
403
- */
404
- SplitButtonComponent.prototype.onButtonFocus = function () {
405
- if (!this.isFocused) {
406
- this._isFocused = true;
407
- this.onFocus.emit();
408
- }
409
- };
410
- /**
411
- * @hidden
412
- */
413
- SplitButtonComponent.prototype.onArrowButtonClick = function () {
414
- this.lockFocus = true;
415
- this.togglePopupVisibility();
416
- };
417
- /**
418
- * @hidden
419
- */
420
- SplitButtonComponent.prototype.toggleButtonActiveState = function (enable) {
421
- this._active = enable;
422
- };
423
- /**
424
- * @hidden
425
- */
426
- SplitButtonComponent.prototype.toggleArrowButtonActiveState = function (enable) {
427
- this.activeArrow = enable;
428
- };
429
- /**
430
- * @hidden
431
- */
432
- SplitButtonComponent.prototype.onButtonClick = function () {
433
- this.lockFocus = true;
434
- this.buttonClick.emit();
435
- };
436
- /**
437
- * @hidden
438
- */
439
- SplitButtonComponent.prototype.onButtonBlur = function () {
440
- if (!this.isOpen && !this.lockFocus) {
441
- this.blurWrapper();
442
- }
443
- this.lockFocus = false;
444
- };
445
- /**
446
- * @hidden
447
- */
448
- SplitButtonComponent.prototype.keydown = function (event) {
449
- this.keyDownHandler(event);
450
- if (event.keyCode === Keys.Space) {
451
- this._active = true;
452
- }
453
- };
454
- /**
455
- * @hidden
456
- */
457
- SplitButtonComponent.prototype.keypress = function (event) {
458
- this.keyPressHandler(event);
459
- };
460
- /**
461
- * @hidden
462
- */
463
- SplitButtonComponent.prototype.keyup = function (event) {
464
- this._active = false;
465
- if (event.keyCode !== Keys.Space) {
466
- this.keyUpHandler(event);
467
- }
468
- };
469
- /**
470
- * @hidden
471
- */
472
- SplitButtonComponent.prototype.ngAfterViewInit = function () {
473
- this.updateButtonText();
474
- this.handleClasses(this.rounded, 'rounded');
475
- };
476
- /**
477
- * @hidden
478
- */
479
- SplitButtonComponent.prototype.ngOnChanges = function (changes) {
480
- if (changes.hasOwnProperty('text')) {
481
- this.updateButtonText();
482
- }
483
- if (isChanged("popupSettings", changes) && isPresent(this.popupRef)) {
484
- var popup = this.popupRef.popup.instance;
485
- var newSettings = changes.popupSettings.currentValue;
486
- popup.popupClass = newSettings.popupClass;
487
- popup.animate = newSettings.animate;
488
- popup.popupAlign = this.popupAlign;
489
- }
490
- };
491
- /**
492
- * @hidden
493
- */
494
- SplitButtonComponent.prototype.togglePopupVisibility = function () {
495
- _super.prototype.togglePopupVisibility.call(this);
496
- if (isDocumentAvailable() && this.lockFocus) {
497
- this.button.nativeElement.focus();
498
- }
499
- };
500
- /**
501
- * @hidden
502
- */
503
- SplitButtonComponent.prototype.wrapperContains = function (element) {
504
- return (this.wrapper === element || this.wrapper.contains(element) || (this.popupRef && this.popupRef.popupElement.contains(element)));
505
- };
506
- Object.defineProperty(SplitButtonComponent.prototype, "anchorAlign", {
507
- /**
508
- * @hidden
509
- */
510
- get: function () {
511
- var align = { horizontal: this.popupSettings.align || 'left', vertical: 'bottom' };
512
- if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
513
- align.horizontal = 'right';
514
- }
515
- return align;
516
- },
517
- enumerable: true,
518
- configurable: true
519
- });
520
- Object.defineProperty(SplitButtonComponent.prototype, "popupAlign", {
521
- /**
522
- * @hidden
523
- */
524
- get: function () {
525
- var align = { horizontal: this.popupSettings.align || 'left', vertical: 'top' };
526
- if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
527
- align.horizontal = 'right';
528
- }
529
- return align;
530
- },
531
- enumerable: true,
532
- configurable: true
533
- });
534
- /**
535
- * Focuses the SplitButton component.
536
- */
537
- SplitButtonComponent.prototype.focus = function () {
538
- if (isDocumentAvailable()) {
539
- this.button.nativeElement.focus();
540
- }
541
- };
542
- /**
543
- * Blurs the SplitButton component.
544
- */
545
- SplitButtonComponent.prototype.blur = function () {
546
- if (isDocumentAvailable()) {
547
- this.button.nativeElement.blur();
548
- this.blurWrapper();
549
- }
550
- };
551
- SplitButtonComponent.prototype.ngOnDestroy = function () {
552
- _super.prototype.ngOnDestroy.call(this);
553
- this.destroyPopup();
554
- };
555
- /**
556
- * Toggles the visibility of the popup.
557
- * If the `toggle` method is used to open or close the popup, the `open` and `close` events will not be fired.
558
- *
559
- * @param open - The state of the popup.
560
- */
561
- SplitButtonComponent.prototype.toggle = function (open) {
562
- var _this = this;
563
- if (this.disabled) {
564
- return;
565
- }
566
- tick(function () { return _this._toggle(open === undefined ? !_this._open : open); });
567
- };
568
- Object.defineProperty(SplitButtonComponent.prototype, "isOpen", {
569
- /**
570
- * Returns the current open state of the popup.
571
- */
572
- get: function () {
573
- return this.openState;
574
- },
575
- enumerable: true,
576
- configurable: true
577
- });
578
- SplitButtonComponent.prototype.enterHandler = function () {
579
- if (this.disabled) {
580
- return;
581
- }
582
- if (this.openState) {
583
- var focused = this.focusService.focused;
584
- if (isPresent(focused) && focused !== -1) {
585
- this.emitItemClickHandler(focused);
586
- }
587
- }
588
- else {
589
- this.buttonClick.emit();
590
- }
591
- };
592
- SplitButtonComponent.prototype.updateButtonText = function () {
593
- var _this = this;
594
- if (isDocumentAvailable()) {
595
- var innerText_1 = this.wrapper.innerText
596
- .split('\n')
597
- .join('')
598
- .trim();
599
- //setTimout is needed because of `Expression has changed after it was checked.` error;
600
- setTimeout(function () { return (_this.buttonText = innerText_1); }, 0);
601
- }
602
- };
603
- Object.defineProperty(SplitButtonComponent.prototype, "appendTo", {
604
- get: function () {
605
- var appendTo = this.popupSettings.appendTo;
606
- if (!appendTo || appendTo === 'root') {
607
- return undefined;
608
- }
609
- return appendTo === 'component' ? this.containerRef : appendTo;
610
- },
611
- enumerable: true,
612
- configurable: true
613
- });
614
- SplitButtonComponent.prototype._toggle = function (open) {
615
- this._open = open;
616
- this.destroyPopup();
617
- if (this._open) {
618
- this.createPopup();
619
- }
620
- };
621
- SplitButtonComponent.prototype.createPopup = function () {
622
- var _this = this;
623
- this.popupRef = this.popupService.open({
624
- anchor: this.elRef,
625
- anchorAlign: this.anchorAlign,
626
- animate: this.popupSettings.animate,
627
- appendTo: this.appendTo,
628
- content: this.popupTemplate,
629
- popupAlign: this.popupAlign,
630
- popupClass: this.popupClasses
631
- });
632
- this.popupRef.popupAnchorViewportLeave.subscribe(function () { return (_this.openState = false); });
633
- this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
634
- };
635
- SplitButtonComponent.prototype.destroyPopup = function () {
636
- if (this.popupRef) {
637
- this.popupRef.close();
638
- this.popupRef = null;
639
- }
640
- };
641
- SplitButtonComponent.prototype.handleClasses = function (value, input) {
642
- var elem = this.wrapperRef.nativeElement;
643
- var classes = getStylingClasses('button', input, this[input], value);
644
- if (classes.toRemove) {
645
- this.renderer.removeClass(elem, classes.toRemove);
646
- }
647
- if (classes.toAdd) {
648
- this.renderer.addClass(elem, classes.toAdd);
649
- }
650
- };
651
- tslib_1.__decorate([
652
- Input(),
653
- tslib_1.__metadata("design:type", String)
654
- ], SplitButtonComponent.prototype, "text", void 0);
655
- tslib_1.__decorate([
656
- Input(),
657
- tslib_1.__metadata("design:type", String)
658
- ], SplitButtonComponent.prototype, "icon", void 0);
659
- tslib_1.__decorate([
660
- Input(),
661
- tslib_1.__metadata("design:type", String)
662
- ], SplitButtonComponent.prototype, "iconClass", void 0);
663
- tslib_1.__decorate([
664
- Input(),
665
- tslib_1.__metadata("design:type", String)
666
- ], SplitButtonComponent.prototype, "type", void 0);
667
- tslib_1.__decorate([
668
- Input(),
669
- tslib_1.__metadata("design:type", String)
670
- ], SplitButtonComponent.prototype, "imageUrl", void 0);
671
- tslib_1.__decorate([
672
- Input(),
673
- tslib_1.__metadata("design:type", String)
674
- ], SplitButtonComponent.prototype, "size", void 0);
675
- tslib_1.__decorate([
676
- Input(),
677
- tslib_1.__metadata("design:type", String),
678
- tslib_1.__metadata("design:paramtypes", [String])
679
- ], SplitButtonComponent.prototype, "rounded", null);
680
- tslib_1.__decorate([
681
- Input(),
682
- tslib_1.__metadata("design:type", String),
683
- tslib_1.__metadata("design:paramtypes", [String])
684
- ], SplitButtonComponent.prototype, "fillMode", null);
685
- tslib_1.__decorate([
686
- Input(),
687
- tslib_1.__metadata("design:type", String)
688
- ], SplitButtonComponent.prototype, "themeColor", void 0);
689
- tslib_1.__decorate([
690
- Input(),
691
- tslib_1.__metadata("design:type", Boolean),
692
- tslib_1.__metadata("design:paramtypes", [Boolean])
693
- ], SplitButtonComponent.prototype, "disabled", null);
694
- tslib_1.__decorate([
695
- Input(),
696
- tslib_1.__metadata("design:type", Object),
697
- tslib_1.__metadata("design:paramtypes", [Object])
698
- ], SplitButtonComponent.prototype, "popupSettings", null);
699
- tslib_1.__decorate([
700
- Input(),
701
- tslib_1.__metadata("design:type", Number)
702
- ], SplitButtonComponent.prototype, "tabIndex", void 0);
703
- tslib_1.__decorate([
704
- Input(),
705
- tslib_1.__metadata("design:type", String)
706
- ], SplitButtonComponent.prototype, "textField", void 0);
707
- tslib_1.__decorate([
708
- Input(),
709
- tslib_1.__metadata("design:type", Object),
710
- tslib_1.__metadata("design:paramtypes", [Object])
711
- ], SplitButtonComponent.prototype, "data", null);
712
- tslib_1.__decorate([
713
- Input(),
714
- tslib_1.__metadata("design:type", Object)
715
- ], SplitButtonComponent.prototype, "buttonClass", void 0);
716
- tslib_1.__decorate([
717
- Input(),
718
- tslib_1.__metadata("design:type", Object)
719
- ], SplitButtonComponent.prototype, "arrowButtonClass", void 0);
720
- tslib_1.__decorate([
721
- Input(),
722
- tslib_1.__metadata("design:type", String)
723
- ], SplitButtonComponent.prototype, "arrowButtonIcon", void 0);
724
- tslib_1.__decorate([
725
- Output(),
726
- tslib_1.__metadata("design:type", EventEmitter)
727
- ], SplitButtonComponent.prototype, "buttonClick", void 0);
728
- tslib_1.__decorate([
729
- Output(),
730
- tslib_1.__metadata("design:type", EventEmitter)
731
- ], SplitButtonComponent.prototype, "itemClick", void 0);
732
- tslib_1.__decorate([
733
- Output('focus'),
734
- tslib_1.__metadata("design:type", EventEmitter)
735
- ], SplitButtonComponent.prototype, "onFocus", void 0);
736
- tslib_1.__decorate([
737
- Output('blur'),
738
- tslib_1.__metadata("design:type", EventEmitter)
739
- ], SplitButtonComponent.prototype, "onBlur", void 0);
740
- tslib_1.__decorate([
741
- Output(),
742
- tslib_1.__metadata("design:type", EventEmitter)
743
- ], SplitButtonComponent.prototype, "open", void 0);
744
- tslib_1.__decorate([
745
- Output(),
746
- tslib_1.__metadata("design:type", EventEmitter)
747
- ], SplitButtonComponent.prototype, "close", void 0);
748
- tslib_1.__decorate([
749
- ContentChild(ButtonItemTemplateDirective, { static: false }),
750
- tslib_1.__metadata("design:type", ButtonItemTemplateDirective)
751
- ], SplitButtonComponent.prototype, "itemTemplate", void 0);
752
- tslib_1.__decorate([
753
- ViewChild('button', { static: true }),
754
- tslib_1.__metadata("design:type", ElementRef)
755
- ], SplitButtonComponent.prototype, "button", void 0);
756
- tslib_1.__decorate([
757
- ViewChild('arrowButton', { static: true, read: ElementRef }),
758
- tslib_1.__metadata("design:type", ElementRef)
759
- ], SplitButtonComponent.prototype, "arrowButton", void 0);
760
- tslib_1.__decorate([
761
- ViewChild('popupTemplate', { static: true }),
762
- tslib_1.__metadata("design:type", TemplateRef)
763
- ], SplitButtonComponent.prototype, "popupTemplate", void 0);
764
- tslib_1.__decorate([
765
- ViewChild('container', { read: ViewContainerRef, static: true }),
766
- tslib_1.__metadata("design:type", ViewContainerRef)
767
- ], SplitButtonComponent.prototype, "containerRef", void 0);
768
- tslib_1.__decorate([
769
- HostBinding('class.k-focus'),
770
- tslib_1.__metadata("design:type", Boolean),
771
- tslib_1.__metadata("design:paramtypes", [Boolean])
772
- ], SplitButtonComponent.prototype, "isFocused", null);
773
- tslib_1.__decorate([
774
- HostBinding('class.k-split-button'),
775
- HostBinding('class.k-button-group'),
776
- tslib_1.__metadata("design:type", Boolean),
777
- tslib_1.__metadata("design:paramtypes", [])
778
- ], SplitButtonComponent.prototype, "widgetClasses", null);
779
- tslib_1.__decorate([
780
- HostBinding('attr.dir'),
781
- tslib_1.__metadata("design:type", String),
782
- tslib_1.__metadata("design:paramtypes", [])
783
- ], SplitButtonComponent.prototype, "dir", null);
784
- tslib_1.__decorate([
785
- HostListener('keydown', ['$event']),
786
- tslib_1.__metadata("design:type", Function),
787
- tslib_1.__metadata("design:paramtypes", [Object]),
788
- tslib_1.__metadata("design:returntype", void 0)
789
- ], SplitButtonComponent.prototype, "keydown", null);
790
- tslib_1.__decorate([
791
- HostListener('keypress', ['$event']),
792
- tslib_1.__metadata("design:type", Function),
793
- tslib_1.__metadata("design:paramtypes", [Object]),
794
- tslib_1.__metadata("design:returntype", void 0)
795
- ], SplitButtonComponent.prototype, "keypress", null);
796
- tslib_1.__decorate([
797
- HostListener('keyup', ['$event']),
798
- tslib_1.__metadata("design:type", Function),
799
- tslib_1.__metadata("design:paramtypes", [Object]),
800
- tslib_1.__metadata("design:returntype", void 0)
801
- ], SplitButtonComponent.prototype, "keyup", null);
802
- SplitButtonComponent = tslib_1.__decorate([
803
- Component({
804
- exportAs: 'kendoSplitButton',
805
- providers: [
806
- FocusService,
807
- NavigationService,
808
- NAVIGATION_SETTINGS_PROVIDER,
809
- LocalizationService,
810
- {
811
- provide: L10N_PREFIX,
812
- useValue: 'kendo.splitbutton'
813
- }
814
- ],
815
- selector: 'kendo-splitbutton',
816
- template: "\n <ng-container kendoSplitButtonLocalizedMessages\n i18n-splitButtonLabel=\"kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label\"\n splitButtonLabel=\"{{ '{buttonText} splitbutton' }}\">\n </ng-container>\n <button\n kendoButton\n #button\n [type]=\"type\"\n [tabindex]=\"componentTabIndex\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"themeColor\"\n [icon]=\"icon\"\n [class.k-active]=\"active\"\n [class.k-icon-button]=\"!text && icon\"\n [iconClass]=\"iconClass\"\n [imageUrl]=\"imageUrl\"\n [ngClass]=\"buttonClass\"\n (focus)=\"onButtonFocus()\"\n (click)=\"onButtonClick()\"\n (blur)=\"onButtonBlur()\"\n (mousedown)=\"toggleButtonActiveState(true)\"\n (mouseup)=\"toggleButtonActiveState(false)\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-owns]=\"listId\"\n [attr.aria-label]=\"ariaLabel\"\n >\n <span *ngIf=\"text\" class=\"k-button-text\">\n {{ text }}\n </span><ng-content></ng-content>\n </button>\n <button\n kendoButton\n #arrowButton\n type=\"button\"\n [class.k-active]=\"activeArrow\"\n [disabled]=\"disabled\"\n [icon]=\"arrowButtonIcon\"\n [size]=\"size\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n [tabindex]=\"-1\"\n [ngClass]=\"arrowButtonClass\"\n (click)=\"onArrowButtonClick()\"\n (mousedown)=\"toggleArrowButtonActiveState(true)\"\n (mouseup)=\"toggleArrowButtonActiveState(false)\"\n ></button>\n <ng-template #popupTemplate>\n <kendo-button-list\n [id]=\"listId\"\n [data]=\"data\"\n [textField]=\"textField\"\n [itemTemplate]=\"itemTemplate\"\n (onItemClick)=\"onItemClick($event)\"\n (keydown)=\"keyDownHandler($event)\"\n (keypress)=\"keyPressHandler($event)\"\n (keyup)=\"keyUpHandler($event)\"\n [attr.dir]=\"dir\"\n [size]=\"size\"\n >\n </kendo-button-list>\n </ng-template>\n <ng-container #container></ng-container>\n "
817
- }),
818
- tslib_1.__metadata("design:paramtypes", [FocusService,
819
- NavigationService,
820
- ElementRef,
821
- NgZone,
822
- PopupService,
823
- ElementRef,
824
- LocalizationService,
825
- ChangeDetectorRef,
826
- Renderer2])
827
- ], SplitButtonComponent);
828
- return SplitButtonComponent;
829
- }(ListButton));
830
- export { SplitButtonComponent };
831
- export { ɵ0 };