@progress/kendo-angular-buttons 7.0.0-next.202111120840 → 7.0.0

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 (283) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-buttons.js +20 -0
  5. package/dist/cdn/main.js +5 -0
  6. package/dist/es/button/button.directive.js +771 -0
  7. package/{esm2015 → dist/es}/button/button.module.js +13 -13
  8. package/dist/es/button/button.service.js +24 -0
  9. package/{esm2015 → dist/es}/button/selection-settings.js +0 -1
  10. package/dist/es/buttongroup/buttongroup.component.js +353 -0
  11. package/dist/es/buttongroup/buttongroup.module.js +30 -0
  12. package/{esm2015 → dist/es}/buttons.module.js +12 -12
  13. package/{esm2015 → dist/es}/chip/chip-content-click-event-args.interface.js +0 -1
  14. package/{esm2015 → dist/es}/chip/chip-list-remove-event-args.interface.js +0 -1
  15. package/dist/es/chip/chip-list.component.js +214 -0
  16. package/{esm2015 → dist/es}/chip/chip-remove-event-args.interface.js +0 -1
  17. package/dist/es/chip/chip.component.js +449 -0
  18. package/dist/es/chip/chip.module.js +55 -0
  19. package/{esm2015 → dist/es}/chip/models/selection.js +0 -1
  20. package/dist/es/common/models/fillmode.js +4 -0
  21. package/dist/es/common/models/rounded.js +4 -0
  22. package/{esm2015 → dist/es}/common/models/shape.js +0 -1
  23. package/{esm2015 → dist/es}/common/models/size.js +0 -1
  24. package/dist/es/common/models/styling-classes.js +4 -0
  25. package/{esm2015 → dist/es}/common/models/theme-color.js +0 -1
  26. package/{esm2015/button-look.js → dist/es/common/models.js} +0 -1
  27. package/{esm2015 → dist/es}/direction.js +0 -1
  28. package/dist/es/dropdownbutton/dropdownbutton.component.js +705 -0
  29. package/dist/es/dropdownbutton/dropdownbutton.module.js +32 -0
  30. package/dist/es/floatingactionbutton/animations/animations.js +33 -0
  31. package/dist/es/floatingactionbutton/dial-item.component.js +143 -0
  32. package/dist/es/floatingactionbutton/dial-list.component.js +76 -0
  33. package/dist/es/floatingactionbutton/floatingactionbutton.component.js +903 -0
  34. package/dist/es/floatingactionbutton/floatingactionbutton.module.js +65 -0
  35. package/{esm2015 → dist/es}/floatingactionbutton/models/align.js +0 -1
  36. package/{esm2015 → dist/es}/floatingactionbutton/models/item-animation.interface.js +0 -1
  37. package/{esm2015 → dist/es}/floatingactionbutton/models/item-click.event.js +0 -1
  38. package/{esm2015 → dist/es}/floatingactionbutton/models/item.interface.js +0 -1
  39. package/{esm2015 → dist/es}/floatingactionbutton/models/offset.js +0 -1
  40. package/{esm2015 → dist/es}/floatingactionbutton/models/position-mode.js +0 -1
  41. package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +26 -0
  42. package/dist/es/floatingactionbutton/templates/fab-template.directive.js +26 -0
  43. package/dist/es/floatingactionbutton/utils.js +38 -0
  44. package/dist/es/focusable/focus.service.js +43 -0
  45. package/dist/es/focusable/focusable.directive.js +68 -0
  46. package/dist/es/index.js +22 -0
  47. package/dist/es/listbutton/button-item-template.directive.js +68 -0
  48. package/dist/es/listbutton/list-button.js +243 -0
  49. package/{esm2015 → dist/es}/listbutton/list-item-model.js +0 -1
  50. package/dist/es/listbutton/list.component.js +85 -0
  51. package/dist/es/listbutton/list.module.js +33 -0
  52. package/{esm2015 → dist/es}/listbutton/popup-settings.js +0 -1
  53. package/dist/es/listbutton/template-context.directive.js +40 -0
  54. package/{esm2015 → dist/es}/main.js +1 -5
  55. package/{esm2015 → dist/es}/navigation/key-events.js +0 -0
  56. package/{esm2015 → dist/es}/navigation/navigation-action.js +0 -0
  57. package/dist/es/navigation/navigation-config.js +9 -0
  58. package/dist/es/navigation/navigation.service.js +114 -0
  59. package/dist/es/package-metadata.js +15 -0
  60. package/dist/es/preventable-event.js +29 -0
  61. package/dist/es/splitbutton/localization/custom-messages.component.js +44 -0
  62. package/dist/es/splitbutton/localization/localized-messages.directive.js +35 -0
  63. package/dist/es/splitbutton/localization/messages.js +22 -0
  64. package/dist/es/splitbutton/splitbutton.component.js +831 -0
  65. package/dist/es/splitbutton/splitbutton.module.js +34 -0
  66. package/dist/es/util.js +97 -0
  67. package/{button → dist/es2015/button}/button.directive.d.ts +100 -46
  68. package/dist/es2015/button/button.directive.js +674 -0
  69. package/{button → dist/es2015/button}/button.module.d.ts +0 -5
  70. package/dist/es2015/button/button.module.js +47 -0
  71. package/{button → dist/es2015/button}/button.service.d.ts +1 -7
  72. package/dist/es2015/button/button.service.js +26 -0
  73. package/{button → dist/es2015/button}/selection-settings.d.ts +0 -0
  74. package/dist/es2015/button/selection-settings.js +4 -0
  75. package/{buttongroup → dist/es2015/buttongroup}/buttongroup.component.d.ts +9 -28
  76. package/{esm2015 → dist/es2015}/buttongroup/buttongroup.component.js +116 -121
  77. package/dist/es2015/buttongroup/buttongroup.module.d.ts +14 -0
  78. package/dist/es2015/buttongroup/buttongroup.module.js +27 -0
  79. package/{buttons.module.d.ts → dist/es2015/buttons.module.d.ts} +0 -10
  80. package/dist/es2015/buttons.module.js +51 -0
  81. package/{chip → dist/es2015/chip}/chip-content-click-event-args.interface.d.ts +0 -0
  82. package/dist/es2015/chip/chip-content-click-event-args.interface.js +4 -0
  83. package/{chip → dist/es2015/chip}/chip-list-remove-event-args.interface.d.ts +0 -0
  84. package/dist/es2015/chip/chip-list-remove-event-args.interface.js +4 -0
  85. package/{chip → dist/es2015/chip}/chip-list.component.d.ts +21 -8
  86. package/dist/es2015/chip/chip-list.component.js +197 -0
  87. package/{chip → dist/es2015/chip}/chip-remove-event-args.interface.d.ts +0 -0
  88. package/dist/es2015/chip/chip-remove-event-args.interface.js +4 -0
  89. package/{chip → dist/es2015/chip}/chip.component.d.ts +72 -38
  90. package/dist/es2015/chip/chip.component.js +431 -0
  91. package/{chip → dist/es2015/chip}/chip.module.d.ts +0 -7
  92. package/{esm2015 → dist/es2015}/chip/chip.module.js +11 -16
  93. package/{chip → dist/es2015/chip}/models/selection.d.ts +0 -0
  94. package/dist/es2015/chip/models/selection.js +4 -0
  95. package/{util.d.ts → dist/es2015/common/models/fillmode.d.ts} +4 -8
  96. package/dist/es2015/common/models/fillmode.js +4 -0
  97. package/dist/es2015/common/models/rounded.d.ts +12 -0
  98. package/dist/es2015/common/models/rounded.js +4 -0
  99. package/dist/es2015/common/models/shape.d.ts +9 -0
  100. package/dist/es2015/common/models/shape.js +4 -0
  101. package/dist/es2015/common/models/size.d.ts +17 -0
  102. package/dist/es2015/common/models/size.js +4 -0
  103. package/{esm2015/kendo-angular-buttons.js → dist/es2015/common/models/styling-classes.d.ts} +5 -2
  104. package/dist/es2015/common/models/styling-classes.js +4 -0
  105. package/{common → dist/es2015/common}/models/theme-color.d.ts +15 -4
  106. package/dist/es2015/common/models/theme-color.js +4 -0
  107. package/{common/models/size.d.ts → dist/es2015/common/models.d.ts} +6 -10
  108. package/dist/es2015/common/models.js +4 -0
  109. package/{direction.d.ts → dist/es2015/direction.d.ts} +0 -0
  110. package/dist/es2015/direction.js +4 -0
  111. package/{dropdownbutton → dist/es2015/dropdownbutton}/dropdownbutton.component.d.ts +74 -29
  112. package/{esm2015 → dist/es2015}/dropdownbutton/dropdownbutton.component.js +258 -179
  113. package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +14 -0
  114. package/dist/es2015/dropdownbutton/dropdownbutton.module.js +29 -0
  115. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/animations/animations.d.ts +0 -0
  116. package/{esm2015 → dist/es2015}/floatingactionbutton/animations/animations.js +0 -0
  117. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-item.component.d.ts +5 -8
  118. package/dist/es2015/floatingactionbutton/dial-item.component.js +133 -0
  119. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-list.component.d.ts +2 -5
  120. package/dist/es2015/floatingactionbutton/dial-list.component.js +81 -0
  121. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.component.d.ts +47 -49
  122. package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.component.js +212 -192
  123. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.module.d.ts +0 -13
  124. package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.module.js +11 -19
  125. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/align.d.ts +0 -0
  126. package/dist/es2015/floatingactionbutton/models/align.js +4 -0
  127. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
  128. package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +4 -0
  129. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-click.event.d.ts +0 -0
  130. package/dist/es2015/floatingactionbutton/models/item-click.event.js +4 -0
  131. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item.interface.d.ts +0 -0
  132. package/dist/es2015/floatingactionbutton/models/item.interface.js +4 -0
  133. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/offset.d.ts +0 -0
  134. package/dist/es2015/floatingactionbutton/models/offset.js +4 -0
  135. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/position-mode.d.ts +0 -0
  136. package/dist/es2015/floatingactionbutton/models/position-mode.js +4 -0
  137. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/dial-item-template.directive.d.ts +0 -3
  138. package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +25 -0
  139. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/fab-template.directive.d.ts +0 -3
  140. package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +25 -0
  141. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/utils.d.ts +0 -0
  142. package/{esm2015 → dist/es2015}/floatingactionbutton/utils.js +0 -0
  143. package/{focusable → dist/es2015/focusable}/focus.service.d.ts +1 -5
  144. package/{esm2015 → dist/es2015}/focusable/focus.service.js +10 -8
  145. package/{focusable → dist/es2015/focusable}/focusable.directive.d.ts +0 -3
  146. package/{esm2015 → dist/es2015}/focusable/focusable.directive.js +20 -19
  147. package/dist/es2015/index.d.ts +22 -0
  148. package/dist/es2015/index.js +22 -0
  149. package/dist/es2015/index.metadata.json +1 -0
  150. package/{listbutton → dist/es2015/listbutton}/button-item-template.directive.d.ts +0 -3
  151. package/{esm2015 → dist/es2015}/listbutton/button-item-template.directive.js +12 -13
  152. package/{listbutton → dist/es2015/listbutton}/list-button.d.ts +2 -6
  153. package/{esm2015 → dist/es2015}/listbutton/list-button.js +6 -16
  154. package/{listbutton → dist/es2015/listbutton}/list-item-model.d.ts +0 -0
  155. package/dist/es2015/listbutton/list-item-model.js +4 -0
  156. package/{listbutton → dist/es2015/listbutton}/list.component.d.ts +3 -3
  157. package/dist/es2015/listbutton/list.component.js +113 -0
  158. package/dist/es2015/listbutton/list.module.d.ts +9 -0
  159. package/dist/es2015/listbutton/list.module.js +30 -0
  160. package/{listbutton → dist/es2015/listbutton}/popup-settings.d.ts +0 -0
  161. package/dist/es2015/listbutton/popup-settings.js +4 -0
  162. package/{listbutton → dist/es2015/listbutton}/template-context.directive.d.ts +1 -4
  163. package/dist/es2015/listbutton/template-context.directive.js +35 -0
  164. package/{main.d.ts → dist/es2015/main.d.ts} +5 -9
  165. package/dist/es2015/main.js +22 -0
  166. package/{navigation → dist/es2015/navigation}/key-events.d.ts +0 -0
  167. package/dist/es2015/navigation/key-events.js +13 -0
  168. package/{navigation → dist/es2015/navigation}/navigation-action.d.ts +0 -0
  169. package/dist/es2015/navigation/navigation-action.js +19 -0
  170. package/{navigation → dist/es2015/navigation}/navigation-config.d.ts +0 -0
  171. package/{esm2015 → dist/es2015}/navigation/navigation-config.js +0 -0
  172. package/{navigation → dist/es2015/navigation}/navigation.service.d.ts +0 -3
  173. package/{esm2015 → dist/es2015}/navigation/navigation.service.js +9 -11
  174. package/{package-metadata.d.ts → dist/es2015/package-metadata.d.ts} +0 -0
  175. package/{esm2015 → dist/es2015}/package-metadata.js +1 -1
  176. package/{preventable-event.d.ts → dist/es2015/preventable-event.d.ts} +0 -0
  177. package/{esm2015 → dist/es2015}/preventable-event.js +0 -0
  178. package/dist/es2015/splitbutton/localization/custom-messages.component.d.ts +15 -0
  179. package/dist/es2015/splitbutton/localization/custom-messages.component.js +36 -0
  180. package/dist/es2015/splitbutton/localization/localized-messages.directive.d.ts +13 -0
  181. package/dist/es2015/splitbutton/localization/localized-messages.directive.js +31 -0
  182. package/dist/es2015/splitbutton/localization/messages.d.ts +32 -0
  183. package/dist/es2015/splitbutton/localization/messages.js +16 -0
  184. package/{splitbutton → dist/es2015/splitbutton}/splitbutton.component.d.ts +74 -34
  185. package/{esm2015 → dist/es2015}/splitbutton/splitbutton.component.js +289 -203
  186. package/dist/es2015/splitbutton/splitbutton.module.d.ts +14 -0
  187. package/dist/es2015/splitbutton/splitbutton.module.js +31 -0
  188. package/dist/es2015/util.d.ts +41 -0
  189. package/dist/es2015/util.js +95 -0
  190. package/{fesm2015/kendo-angular-buttons.js → dist/fesm2015/index.js} +2375 -1814
  191. package/dist/fesm5/index.js +5565 -0
  192. package/dist/npm/button/button.directive.js +773 -0
  193. package/dist/npm/button/button.module.js +52 -0
  194. package/dist/npm/button/button.service.js +26 -0
  195. package/dist/npm/button/selection-settings.js +6 -0
  196. package/dist/npm/buttongroup/buttongroup.component.js +355 -0
  197. package/dist/npm/buttongroup/buttongroup.module.js +32 -0
  198. package/dist/npm/buttons.module.js +56 -0
  199. package/dist/npm/chip/chip-content-click-event-args.interface.js +6 -0
  200. package/dist/npm/chip/chip-list-remove-event-args.interface.js +6 -0
  201. package/dist/npm/chip/chip-list.component.js +216 -0
  202. package/dist/npm/chip/chip-remove-event-args.interface.js +6 -0
  203. package/dist/npm/chip/chip.component.js +451 -0
  204. package/dist/npm/chip/chip.module.js +57 -0
  205. package/dist/npm/chip/models/selection.js +6 -0
  206. package/dist/npm/common/models/fillmode.js +6 -0
  207. package/dist/npm/common/models/rounded.js +6 -0
  208. package/dist/npm/common/models/shape.js +6 -0
  209. package/dist/npm/common/models/size.js +6 -0
  210. package/dist/npm/common/models/styling-classes.js +6 -0
  211. package/dist/npm/common/models/theme-color.js +6 -0
  212. package/dist/npm/common/models.js +6 -0
  213. package/dist/npm/direction.js +6 -0
  214. package/dist/npm/dropdownbutton/dropdownbutton.component.js +707 -0
  215. package/dist/npm/dropdownbutton/dropdownbutton.module.js +34 -0
  216. package/dist/npm/floatingactionbutton/animations/animations.js +37 -0
  217. package/dist/npm/floatingactionbutton/dial-item.component.js +145 -0
  218. package/dist/npm/floatingactionbutton/dial-list.component.js +78 -0
  219. package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +905 -0
  220. package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +67 -0
  221. package/dist/npm/floatingactionbutton/models/align.js +6 -0
  222. package/dist/npm/floatingactionbutton/models/item-animation.interface.js +6 -0
  223. package/dist/npm/floatingactionbutton/models/item-click.event.js +6 -0
  224. package/dist/npm/floatingactionbutton/models/item.interface.js +6 -0
  225. package/dist/npm/floatingactionbutton/models/offset.js +6 -0
  226. package/dist/npm/floatingactionbutton/models/position-mode.js +6 -0
  227. package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +28 -0
  228. package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +28 -0
  229. package/dist/npm/floatingactionbutton/utils.js +42 -0
  230. package/dist/npm/focusable/focus.service.js +45 -0
  231. package/dist/npm/focusable/focusable.directive.js +70 -0
  232. package/dist/npm/index.js +39 -0
  233. package/dist/npm/listbutton/button-item-template.directive.js +70 -0
  234. package/dist/npm/listbutton/list-button.js +245 -0
  235. package/dist/npm/listbutton/list-item-model.js +6 -0
  236. package/dist/npm/listbutton/list.component.js +87 -0
  237. package/dist/npm/listbutton/list.module.js +35 -0
  238. package/dist/npm/listbutton/popup-settings.js +6 -0
  239. package/dist/npm/listbutton/template-context.directive.js +42 -0
  240. package/dist/npm/main.js +45 -0
  241. package/dist/npm/navigation/key-events.js +15 -0
  242. package/dist/npm/navigation/navigation-action.js +21 -0
  243. package/dist/npm/navigation/navigation-config.js +11 -0
  244. package/dist/npm/navigation/navigation.service.js +116 -0
  245. package/dist/npm/package-metadata.js +17 -0
  246. package/dist/npm/preventable-event.js +31 -0
  247. package/dist/npm/splitbutton/localization/custom-messages.component.js +46 -0
  248. package/dist/npm/splitbutton/localization/localized-messages.directive.js +37 -0
  249. package/dist/npm/splitbutton/localization/messages.js +24 -0
  250. package/dist/npm/splitbutton/splitbutton.component.js +833 -0
  251. package/dist/npm/splitbutton/splitbutton.module.js +36 -0
  252. package/dist/npm/util.js +100 -0
  253. package/dist/systemjs/kendo-angular-buttons.js +5 -0
  254. package/package.json +110 -35
  255. package/schematics/ngAdd/index.js +2 -5
  256. package/schematics/ngAdd/index.js.map +1 -1
  257. package/bundles/kendo-angular-buttons.umd.js +0 -5
  258. package/button-look.d.ts +0 -21
  259. package/buttongroup/buttongroup.module.d.ts +0 -21
  260. package/chip/models/chip-look.d.ts +0 -18
  261. package/chip/models/type.d.ts +0 -21
  262. package/common/models/shape.d.ts +0 -16
  263. package/dropdownbutton/dropdownbutton.module.d.ts +0 -23
  264. package/esm2015/button/button.directive.js +0 -488
  265. package/esm2015/button/button.service.js +0 -28
  266. package/esm2015/buttongroup/buttongroup.module.js +0 -30
  267. package/esm2015/chip/chip-list.component.js +0 -145
  268. package/esm2015/chip/chip.component.js +0 -335
  269. package/esm2015/chip/models/chip-look.js +0 -5
  270. package/esm2015/chip/models/type.js +0 -5
  271. package/esm2015/dropdownbutton/dropdownbutton.module.js +0 -32
  272. package/esm2015/floatingactionbutton/dial-item.component.js +0 -126
  273. package/esm2015/floatingactionbutton/dial-list.component.js +0 -89
  274. package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -27
  275. package/esm2015/floatingactionbutton/templates/fab-template.directive.js +0 -27
  276. package/esm2015/listbutton/list.component.js +0 -120
  277. package/esm2015/listbutton/list.module.js +0 -39
  278. package/esm2015/listbutton/template-context.directive.js +0 -33
  279. package/esm2015/splitbutton/splitbutton.module.js +0 -32
  280. package/esm2015/util.js +0 -39
  281. package/kendo-angular-buttons.d.ts +0 -9
  282. package/listbutton/list.module.d.ts +0 -18
  283. package/splitbutton/splitbutton.module.d.ts +0 -23
@@ -0,0 +1,773 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var tslib_1 = require("tslib");
8
+ var core_1 = require("@angular/core");
9
+ var button_service_1 = require("./button.service");
10
+ var kendo_angular_common_1 = require("@progress/kendo-angular-common");
11
+ var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
12
+ var kendo_licensing_1 = require("@progress/kendo-licensing");
13
+ var package_metadata_1 = require("../package-metadata");
14
+ var util_1 = require("../util");
15
+ var SPAN_TAG_NAME = 'SPAN';
16
+ /**
17
+ * Represents the Kendo UI Button component for Angular.
18
+ */
19
+ var ButtonDirective = /** @class */ (function () {
20
+ function ButtonDirective(element, renderer, service, localization, ngZone) {
21
+ var _this = this;
22
+ this.service = service;
23
+ this.ngZone = ngZone;
24
+ /**
25
+ * Provides visual styling that indicates if the Button is active.
26
+ * By default, `toggleable` is set to `false`.
27
+ */
28
+ this.toggleable = false;
29
+ /**
30
+ * @hidden
31
+ */
32
+ this.role = 'button';
33
+ /**
34
+ * Fires each time the selected state of a toggleable button is changed.
35
+ *
36
+ * The event argument is the new selected state (boolean).
37
+ */
38
+ this.selectedChange = new core_1.EventEmitter();
39
+ /**
40
+ * Fires each time the user clicks the button.
41
+ */
42
+ this.click = new core_1.EventEmitter();
43
+ this.isDisabled = false;
44
+ this.isIcon = false;
45
+ this.isIconClass = false;
46
+ this._size = 'medium';
47
+ this._rounded = 'medium';
48
+ this._shape = 'rectangle';
49
+ this._fillMode = 'solid';
50
+ this._themeColor = 'base';
51
+ this._focused = false;
52
+ this.domEvents = [];
53
+ kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
54
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
55
+ this.localizationChangeSubscription = localization.changes.subscribe(function (_a) {
56
+ var rtl = _a.rtl;
57
+ return (_this.direction = rtl ? 'rtl' : 'ltr');
58
+ });
59
+ this.element = element.nativeElement;
60
+ this.renderer = renderer;
61
+ }
62
+ Object.defineProperty(ButtonDirective.prototype, "togglable", {
63
+ /**
64
+ * Backwards-compatible alias
65
+ *
66
+ * @hidden
67
+ */
68
+ get: function () {
69
+ return this.toggleable;
70
+ },
71
+ /**
72
+ * @hidden
73
+ */
74
+ set: function (value) {
75
+ this.toggleable = value;
76
+ },
77
+ enumerable: true,
78
+ configurable: true
79
+ });
80
+ Object.defineProperty(ButtonDirective.prototype, "selected", {
81
+ /**
82
+ * Sets the selected state of the Button.
83
+ */
84
+ get: function () {
85
+ return this._selected || false;
86
+ },
87
+ set: function (value) {
88
+ this._selected = value;
89
+ },
90
+ enumerable: true,
91
+ configurable: true
92
+ });
93
+ Object.defineProperty(ButtonDirective.prototype, "tabIndex", {
94
+ get: function () {
95
+ return this.element.tabIndex;
96
+ },
97
+ /**
98
+ * @hidden
99
+ */
100
+ set: function (index) {
101
+ this.element.tabIndex = index;
102
+ },
103
+ enumerable: true,
104
+ configurable: true
105
+ });
106
+ Object.defineProperty(ButtonDirective.prototype, "icon", {
107
+ /**
108
+ * Defines the name for an existing icon in a Kendo UI theme.
109
+ * The icon is rendered inside the Button by a `span.k-icon` element.
110
+ */
111
+ set: function (icon) {
112
+ var _this = this;
113
+ if (icon) {
114
+ this.iconSetter(icon, function () {
115
+ _this.isIcon = true;
116
+ var classes = 'k-button-icon k-icon k-i-' + icon;
117
+ _this.addIcon(classes);
118
+ });
119
+ }
120
+ else {
121
+ this.isIcon = false;
122
+ this.updateIconNode();
123
+ }
124
+ },
125
+ enumerable: true,
126
+ configurable: true
127
+ });
128
+ Object.defineProperty(ButtonDirective.prototype, "iconClass", {
129
+ /**
130
+ * Defines a CSS class—or multiple classes separated by spaces—
131
+ * which are applied to a `span` element inside the Button. Allows the usage of custom icons.
132
+ */
133
+ set: function (iconClassName) {
134
+ var _this = this;
135
+ if (iconClassName) {
136
+ this.iconSetter(iconClassName, function () {
137
+ _this.isIconClass = true;
138
+ var classes = 'k-button-icon k-icon ' + iconClassName;
139
+ _this.addIcon(classes);
140
+ });
141
+ }
142
+ else {
143
+ this.isIconClass = false;
144
+ this.updateIconNode();
145
+ }
146
+ },
147
+ enumerable: true,
148
+ configurable: true
149
+ });
150
+ Object.defineProperty(ButtonDirective.prototype, "imageUrl", {
151
+ /**
152
+ * Defines a URL which is used for an `img` element inside the Button.
153
+ * The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
154
+ */
155
+ set: function (imageUrl) {
156
+ if (imageUrl) {
157
+ this.iconSetter(imageUrl, this.addImgIcon.bind(this));
158
+ }
159
+ else {
160
+ this.removeImageNode();
161
+ }
162
+ },
163
+ enumerable: true,
164
+ configurable: true
165
+ });
166
+ Object.defineProperty(ButtonDirective.prototype, "disabled", {
167
+ get: function () {
168
+ return this.isDisabled;
169
+ },
170
+ /**
171
+ * If set to `true`, it disables the Button.
172
+ */
173
+ set: function (disabled) {
174
+ this.isDisabled = disabled;
175
+ this.renderer.setProperty(this.element, 'disabled', disabled);
176
+ },
177
+ enumerable: true,
178
+ configurable: true
179
+ });
180
+ Object.defineProperty(ButtonDirective.prototype, "size", {
181
+ get: function () {
182
+ return this._size;
183
+ },
184
+ /**
185
+ * The size property specifies the padding of the Button
186
+ * ([see example]({% slug appearance_buttondirective %}#toc-size)).
187
+ *
188
+ * The possible values are:
189
+ * * `'small'`
190
+ * * `'medium'` (default)
191
+ * * `'large'`
192
+ * * `null`
193
+ */
194
+ set: function (size) {
195
+ this.handleClasses(size, 'size');
196
+ this._size = size;
197
+ },
198
+ enumerable: true,
199
+ configurable: true
200
+ });
201
+ Object.defineProperty(ButtonDirective.prototype, "rounded", {
202
+ get: function () {
203
+ return this._rounded;
204
+ },
205
+ /**
206
+ * The rounded property specifies the border radius of the Button
207
+ * ([see example]({% slug appearance_buttondirective %}#toc-rounded)).
208
+ *
209
+ * The possible values are:
210
+ * * `'small'`
211
+ * * `'medium'` (default)
212
+ * * `'large'`
213
+ * * `'full'`
214
+ * * `null`
215
+ */
216
+ set: function (rounded) {
217
+ this.handleClasses(rounded, 'rounded');
218
+ this._rounded = rounded;
219
+ },
220
+ enumerable: true,
221
+ configurable: true
222
+ });
223
+ Object.defineProperty(ButtonDirective.prototype, "fillMode", {
224
+ get: function () {
225
+ return this._fillMode;
226
+ },
227
+ /**
228
+ * The fillMode property specifies the background and border styles of the Button
229
+ * ([see example]({% slug appearance_buttondirective %}#toc-fillMode)).
230
+ *
231
+ * The possible values are:
232
+ * * `'flat'`
233
+ * * `'solid'` (default)
234
+ * * `'outline'`
235
+ * * `'link'`
236
+ * * `null`
237
+ */
238
+ set: function (fillMode) {
239
+ this.handleClasses(fillMode, 'fillMode');
240
+ this._fillMode = fillMode;
241
+ },
242
+ enumerable: true,
243
+ configurable: true
244
+ });
245
+ Object.defineProperty(ButtonDirective.prototype, "themeColor", {
246
+ get: function () {
247
+ return this._themeColor;
248
+ },
249
+ /**
250
+ * The Button allows you to specify predefined theme colors.
251
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
252
+ * ([see example]({% slug appearance_buttondirective %}#toc-themeColor)).
253
+ *
254
+ * The possible values are:
255
+ * * `'base'` (default)
256
+ * * `'primary'`
257
+ * * `'secondary'`
258
+ * * `'tertiary'`
259
+ * * `'info'`
260
+ * * `'success'`
261
+ * * `'warning'`
262
+ * * `'error'`
263
+ * * `'dark'`
264
+ * * `'light`'
265
+ * * `'inverse'`
266
+ */
267
+ set: function (themeColor) {
268
+ this.handleThemeColor(themeColor);
269
+ this._themeColor = themeColor;
270
+ },
271
+ enumerable: true,
272
+ configurable: true
273
+ });
274
+ Object.defineProperty(ButtonDirective.prototype, "shape", {
275
+ get: function () {
276
+ return this._shape;
277
+ },
278
+ /**
279
+ * The shape property specifies if the Button will form a rectangle or square.
280
+ * ([see example]({% slug appearance_buttondirective %}#toc-shape)).
281
+ *
282
+ * The possible values are:
283
+ * * `'square'`
284
+ * * `'rectangle'` (default)
285
+ */
286
+ set: function (shape) {
287
+ this.handleClasses(shape, 'shape');
288
+ this._shape = shape;
289
+ },
290
+ enumerable: true,
291
+ configurable: true
292
+ });
293
+ Object.defineProperty(ButtonDirective.prototype, "isFocused", {
294
+ get: function () {
295
+ return this._focused;
296
+ },
297
+ set: function (isFocused) {
298
+ this.toggleClass('k-focus', isFocused);
299
+ this._focused = isFocused;
300
+ },
301
+ enumerable: true,
302
+ configurable: true
303
+ });
304
+ Object.defineProperty(ButtonDirective.prototype, "classButton", {
305
+ get: function () {
306
+ return true;
307
+ },
308
+ enumerable: true,
309
+ configurable: true
310
+ });
311
+ Object.defineProperty(ButtonDirective.prototype, "isToggleable", {
312
+ get: function () {
313
+ return this.toggleable;
314
+ },
315
+ enumerable: true,
316
+ configurable: true
317
+ });
318
+ Object.defineProperty(ButtonDirective.prototype, "roleSetter", {
319
+ get: function () {
320
+ return this.role;
321
+ },
322
+ enumerable: true,
323
+ configurable: true
324
+ });
325
+ Object.defineProperty(ButtonDirective.prototype, "classDisabled", {
326
+ get: function () {
327
+ return this.isDisabled;
328
+ },
329
+ enumerable: true,
330
+ configurable: true
331
+ });
332
+ Object.defineProperty(ButtonDirective.prototype, "classActive", {
333
+ get: function () {
334
+ return this.selected;
335
+ },
336
+ enumerable: true,
337
+ configurable: true
338
+ });
339
+ Object.defineProperty(ButtonDirective.prototype, "getDirection", {
340
+ get: function () {
341
+ return this.direction;
342
+ },
343
+ enumerable: true,
344
+ configurable: true
345
+ });
346
+ /**
347
+ * @hidden
348
+ */
349
+ ButtonDirective.prototype.onFocus = function () {
350
+ this.isFocused = true;
351
+ };
352
+ /**
353
+ * @hidden
354
+ */
355
+ ButtonDirective.prototype.onBlur = function () {
356
+ this.isFocused = false;
357
+ };
358
+ Object.defineProperty(ButtonDirective.prototype, "primary", {
359
+ /**
360
+ * @hidden
361
+ */
362
+ set: function (value) {
363
+ this.themeColor = value ? 'primary' : 'base';
364
+ },
365
+ enumerable: true,
366
+ configurable: true
367
+ });
368
+ Object.defineProperty(ButtonDirective.prototype, "look", {
369
+ /**
370
+ * @hidden
371
+ */
372
+ set: function (value) {
373
+ switch (value) {
374
+ case 'default':
375
+ this.fillMode = 'solid';
376
+ break;
377
+ default:
378
+ this.fillMode = value;
379
+ break;
380
+ }
381
+ },
382
+ enumerable: true,
383
+ configurable: true
384
+ });
385
+ ButtonDirective.prototype.ngOnInit = function () {
386
+ var _this = this;
387
+ var isSpan = this.element.tagName === SPAN_TAG_NAME;
388
+ this.addTextSpan();
389
+ if (!this.element.hasAttribute('role') && this.togglable) {
390
+ this.toggleAriaPressed(this.toggleable);
391
+ }
392
+ if (this.role) {
393
+ this.setAttribute('role', this.role);
394
+ }
395
+ this.ngZone.runOutsideAngular(function () {
396
+ _this.domEvents.push(_this.renderer.listen(_this.element, 'click', _this._onButtonClick.bind(_this)));
397
+ _this.domEvents.push(_this.renderer.listen(_this.element, 'keydown', function (event) {
398
+ var isSpaceOrEnter = event.keyCode === kendo_angular_common_1.Keys.Space || event.keyCode === kendo_angular_common_1.Keys.Enter;
399
+ if (isSpan && isSpaceOrEnter) {
400
+ _this.click.emit(event);
401
+ _this._onButtonClick();
402
+ }
403
+ }));
404
+ });
405
+ };
406
+ ButtonDirective.prototype.ngOnChanges = function (change) {
407
+ if (kendo_angular_common_1.isChanged('togglable', change) || kendo_angular_common_1.isChanged('toggleable', change)) {
408
+ this.toggleAriaPressed(this.toggleable);
409
+ }
410
+ };
411
+ ButtonDirective.prototype.ngAfterViewInit = function () {
412
+ var _this = this;
413
+ var stylingOptions = ['size', 'rounded', 'shape', 'fillMode'];
414
+ stylingOptions.forEach(function (input) {
415
+ _this.handleClasses(_this[input], input);
416
+ });
417
+ };
418
+ ButtonDirective.prototype.ngAfterViewChecked = function () {
419
+ this.setIconTextClasses();
420
+ };
421
+ ButtonDirective.prototype.ngOnDestroy = function () {
422
+ this.imageNode = null;
423
+ this.iconNode = null;
424
+ this.iconSpanNode = null;
425
+ this.renderer = null;
426
+ this.localizationChangeSubscription.unsubscribe();
427
+ clearTimeout(this.deferTimeout);
428
+ this.domEvents.forEach(function (unbindHandler) { return unbindHandler(); });
429
+ };
430
+ /**
431
+ * Focuses the Button component.
432
+ */
433
+ ButtonDirective.prototype.focus = function () {
434
+ if (kendo_angular_common_1.isDocumentAvailable()) {
435
+ this.element.focus();
436
+ this.isFocused = true;
437
+ }
438
+ };
439
+ /**
440
+ * Blurs the Button component.
441
+ */
442
+ ButtonDirective.prototype.blur = function () {
443
+ if (kendo_angular_common_1.isDocumentAvailable()) {
444
+ this.element.blur();
445
+ this.isFocused = false;
446
+ }
447
+ };
448
+ /**
449
+ * @hidden
450
+ */
451
+ ButtonDirective.prototype.setAttribute = function (attribute, value) {
452
+ this.renderer.setAttribute(this.element, attribute, value);
453
+ };
454
+ /**
455
+ * @hidden
456
+ */
457
+ ButtonDirective.prototype.removeAttribute = function (attribute) {
458
+ this.renderer.removeAttribute(this.element, attribute);
459
+ };
460
+ /**
461
+ * @hidden
462
+ *
463
+ * Internal setter that triggers selectedChange
464
+ */
465
+ ButtonDirective.prototype.setSelected = function (value) {
466
+ var _this = this;
467
+ var changed = this.selected !== value;
468
+ this.selected = value;
469
+ this.setAttribute('aria-pressed', this.selected.toString());
470
+ this.toggleClass('k-selected', this.selected);
471
+ if (changed && kendo_angular_common_1.hasObservers(this.selectedChange)) {
472
+ this.ngZone.run(function () {
473
+ _this.selectedChange.emit(value);
474
+ });
475
+ }
476
+ };
477
+ ButtonDirective.prototype.toggleAriaPressed = function (shouldSet) {
478
+ if (!kendo_angular_common_1.isDocumentAvailable()) {
479
+ return;
480
+ }
481
+ if (shouldSet) {
482
+ this.setAttribute('aria-pressed', this.selected.toString());
483
+ }
484
+ else {
485
+ this.removeAttribute('aria-pressed');
486
+ }
487
+ };
488
+ ButtonDirective.prototype.hasText = function () {
489
+ if (kendo_angular_common_1.isDocumentAvailable()) {
490
+ return this.element.textContent.trim().length > 0;
491
+ }
492
+ else {
493
+ return false;
494
+ }
495
+ };
496
+ ButtonDirective.prototype.addImgIcon = function (imageUrl) {
497
+ var renderer = this.renderer;
498
+ this.iconSpanNode = renderer.createElement('span');
499
+ renderer.setProperty(this.iconSpanNode, 'className', 'k-button-icon k-icon');
500
+ if (this.imageNode) {
501
+ renderer.setProperty(this.imageNode, 'src', imageUrl);
502
+ }
503
+ else if (kendo_angular_common_1.isDocumentAvailable()) {
504
+ this.imageNode = renderer.createElement('img');
505
+ renderer.setProperty(this.imageNode, 'src', imageUrl);
506
+ renderer.setProperty(this.imageNode, 'className', 'k-image');
507
+ renderer.setAttribute(this.imageNode, 'role', 'presentation');
508
+ }
509
+ this.iconSpanNode.appendChild(this.imageNode);
510
+ this.prependChild(this.iconSpanNode);
511
+ };
512
+ ButtonDirective.prototype.addIcon = function (classNames) {
513
+ var renderer = this.renderer;
514
+ if (this.iconNode) {
515
+ renderer.setProperty(this.iconNode, 'className', classNames);
516
+ }
517
+ else if (kendo_angular_common_1.isDocumentAvailable()) {
518
+ this.iconNode = renderer.createElement('span');
519
+ renderer.setProperty(this.iconNode, 'className', classNames);
520
+ renderer.setAttribute(this.iconNode, 'role', 'presentation');
521
+ this.prependChild(this.iconNode);
522
+ }
523
+ };
524
+ ButtonDirective.prototype.addTextSpan = function () {
525
+ if (kendo_angular_common_1.isDocumentAvailable() && this.hasText() && util_1.isPresent(this.element.append)) {
526
+ var span = this.renderer.createElement('span');
527
+ this.renderer.addClass(span, 'k-button-text');
528
+ span.append.apply(span, Array.from(this.element.childNodes));
529
+ this.element.append(span);
530
+ }
531
+ };
532
+ ButtonDirective.prototype.prependChild = function (node) {
533
+ var _this = this;
534
+ this.defer(function () {
535
+ if (_this.renderer && node !== _this.element.firstChild) {
536
+ _this.renderer.insertBefore(_this.element, node, _this.element.firstChild);
537
+ }
538
+ });
539
+ };
540
+ ButtonDirective.prototype.defer = function (callback) {
541
+ var _this = this;
542
+ this.ngZone.runOutsideAngular(function () {
543
+ _this.deferTimeout = setTimeout(callback, 0);
544
+ });
545
+ };
546
+ ButtonDirective.prototype.iconSetter = function (icon, insertIcon) {
547
+ if (icon) {
548
+ insertIcon(icon);
549
+ }
550
+ this.setIconTextClasses();
551
+ };
552
+ ButtonDirective.prototype.removeImageNode = function () {
553
+ if (this.imageNode && this.renderer.parentNode(this.imageNode)) {
554
+ this.renderer.removeChild(this.element, this.imageNode);
555
+ this.renderer.removeChild(this.element, this.iconSpanNode);
556
+ this.imageNode = null;
557
+ this.iconSpanNode = null;
558
+ }
559
+ };
560
+ ButtonDirective.prototype.removeIconNode = function () {
561
+ if (this.iconNode && this.renderer.parentNode(this.iconNode)) {
562
+ this.renderer.removeChild(this.element, this.iconNode);
563
+ this.iconNode = null;
564
+ }
565
+ if (this.iconSpanNode) {
566
+ this.renderer.removeChild(this.element, this.iconSpanNode);
567
+ this.iconSpanNode = null;
568
+ }
569
+ };
570
+ ButtonDirective.prototype.updateIconNode = function () {
571
+ if (!this.isIcon && !this.isIconClass) {
572
+ this.removeIconNode();
573
+ }
574
+ };
575
+ ButtonDirective.prototype.setIconTextClasses = function () {
576
+ var hasIcon = this.isIcon || this.isIconClass || this.imageNode;
577
+ this.toggleClass('k-icon-button', hasIcon && !this.hasText());
578
+ };
579
+ ButtonDirective.prototype.toggleClass = function (className, add) {
580
+ if (add) {
581
+ this.renderer.addClass(this.element, className);
582
+ }
583
+ else {
584
+ this.renderer.removeClass(this.element, className);
585
+ }
586
+ };
587
+ ButtonDirective.prototype._onButtonClick = function () {
588
+ var _this = this;
589
+ if (!this.disabled && this.service) {
590
+ this.ngZone.run(function () {
591
+ _this.service.click(_this);
592
+ });
593
+ }
594
+ if (this.togglable && !this.service) {
595
+ this.setSelected(!this.selected);
596
+ }
597
+ };
598
+ ButtonDirective.prototype.handleClasses = function (value, input) {
599
+ var elem = this.element;
600
+ var classes = util_1.getStylingClasses('button', input, this[input], value);
601
+ if (input === 'fillMode') {
602
+ this.handleThemeColor(this.themeColor, this[input], value);
603
+ }
604
+ if (classes.toRemove) {
605
+ this.renderer.removeClass(elem, classes.toRemove);
606
+ }
607
+ if (classes.toAdd) {
608
+ this.renderer.addClass(elem, classes.toAdd);
609
+ }
610
+ };
611
+ ButtonDirective.prototype.handleThemeColor = function (value, prevFillMode, fillMode) {
612
+ var elem = this.element;
613
+ var removeFillMode = prevFillMode ? prevFillMode : this.fillMode;
614
+ var addFillMode = fillMode ? fillMode : this.fillMode;
615
+ var themeColorClass = util_1.getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
616
+ this.renderer.removeClass(elem, themeColorClass.toRemove);
617
+ if (addFillMode !== null && fillMode !== null) {
618
+ if (themeColorClass.toAdd) {
619
+ this.renderer.addClass(elem, themeColorClass.toAdd);
620
+ }
621
+ }
622
+ };
623
+ tslib_1.__decorate([
624
+ core_1.Input(),
625
+ tslib_1.__metadata("design:type", Boolean)
626
+ ], ButtonDirective.prototype, "toggleable", void 0);
627
+ tslib_1.__decorate([
628
+ core_1.Input(),
629
+ tslib_1.__metadata("design:type", Boolean),
630
+ tslib_1.__metadata("design:paramtypes", [Boolean])
631
+ ], ButtonDirective.prototype, "togglable", null);
632
+ tslib_1.__decorate([
633
+ core_1.Input(),
634
+ tslib_1.__metadata("design:type", Boolean),
635
+ tslib_1.__metadata("design:paramtypes", [Boolean])
636
+ ], ButtonDirective.prototype, "selected", null);
637
+ tslib_1.__decorate([
638
+ core_1.Input(),
639
+ tslib_1.__metadata("design:type", Number),
640
+ tslib_1.__metadata("design:paramtypes", [Number])
641
+ ], ButtonDirective.prototype, "tabIndex", null);
642
+ tslib_1.__decorate([
643
+ core_1.Input(),
644
+ tslib_1.__metadata("design:type", String),
645
+ tslib_1.__metadata("design:paramtypes", [String])
646
+ ], ButtonDirective.prototype, "icon", null);
647
+ tslib_1.__decorate([
648
+ core_1.Input(),
649
+ tslib_1.__metadata("design:type", String),
650
+ tslib_1.__metadata("design:paramtypes", [String])
651
+ ], ButtonDirective.prototype, "iconClass", null);
652
+ tslib_1.__decorate([
653
+ core_1.Input(),
654
+ tslib_1.__metadata("design:type", String),
655
+ tslib_1.__metadata("design:paramtypes", [String])
656
+ ], ButtonDirective.prototype, "imageUrl", null);
657
+ tslib_1.__decorate([
658
+ core_1.Input(),
659
+ tslib_1.__metadata("design:type", Boolean),
660
+ tslib_1.__metadata("design:paramtypes", [Boolean])
661
+ ], ButtonDirective.prototype, "disabled", null);
662
+ tslib_1.__decorate([
663
+ core_1.Input(),
664
+ tslib_1.__metadata("design:type", String),
665
+ tslib_1.__metadata("design:paramtypes", [String])
666
+ ], ButtonDirective.prototype, "size", null);
667
+ tslib_1.__decorate([
668
+ core_1.Input(),
669
+ tslib_1.__metadata("design:type", String),
670
+ tslib_1.__metadata("design:paramtypes", [String])
671
+ ], ButtonDirective.prototype, "rounded", null);
672
+ tslib_1.__decorate([
673
+ core_1.Input(),
674
+ tslib_1.__metadata("design:type", String),
675
+ tslib_1.__metadata("design:paramtypes", [String])
676
+ ], ButtonDirective.prototype, "fillMode", null);
677
+ tslib_1.__decorate([
678
+ core_1.Input(),
679
+ tslib_1.__metadata("design:type", String),
680
+ tslib_1.__metadata("design:paramtypes", [String])
681
+ ], ButtonDirective.prototype, "themeColor", null);
682
+ tslib_1.__decorate([
683
+ core_1.Input(),
684
+ tslib_1.__metadata("design:type", String),
685
+ tslib_1.__metadata("design:paramtypes", [String])
686
+ ], ButtonDirective.prototype, "shape", null);
687
+ tslib_1.__decorate([
688
+ core_1.Input(),
689
+ tslib_1.__metadata("design:type", String)
690
+ ], ButtonDirective.prototype, "role", void 0);
691
+ tslib_1.__decorate([
692
+ core_1.Output(),
693
+ tslib_1.__metadata("design:type", core_1.EventEmitter)
694
+ ], ButtonDirective.prototype, "selectedChange", void 0);
695
+ tslib_1.__decorate([
696
+ core_1.Output(),
697
+ tslib_1.__metadata("design:type", core_1.EventEmitter)
698
+ ], ButtonDirective.prototype, "click", void 0);
699
+ tslib_1.__decorate([
700
+ core_1.HostBinding('class.k-button'),
701
+ tslib_1.__metadata("design:type", Boolean),
702
+ tslib_1.__metadata("design:paramtypes", [])
703
+ ], ButtonDirective.prototype, "classButton", null);
704
+ tslib_1.__decorate([
705
+ core_1.HostBinding('class.k-toggle-button'),
706
+ tslib_1.__metadata("design:type", Boolean),
707
+ tslib_1.__metadata("design:paramtypes", [])
708
+ ], ButtonDirective.prototype, "isToggleable", null);
709
+ tslib_1.__decorate([
710
+ core_1.HostBinding('attr.role'),
711
+ tslib_1.__metadata("design:type", String),
712
+ tslib_1.__metadata("design:paramtypes", [])
713
+ ], ButtonDirective.prototype, "roleSetter", null);
714
+ tslib_1.__decorate([
715
+ core_1.HostBinding('attr.aria-disabled'),
716
+ core_1.HostBinding('class.k-disabled'),
717
+ tslib_1.__metadata("design:type", Boolean),
718
+ tslib_1.__metadata("design:paramtypes", [])
719
+ ], ButtonDirective.prototype, "classDisabled", null);
720
+ tslib_1.__decorate([
721
+ core_1.HostBinding('class.k-selected'),
722
+ tslib_1.__metadata("design:type", Boolean),
723
+ tslib_1.__metadata("design:paramtypes", [])
724
+ ], ButtonDirective.prototype, "classActive", null);
725
+ tslib_1.__decorate([
726
+ core_1.HostBinding('attr.dir'),
727
+ tslib_1.__metadata("design:type", String),
728
+ tslib_1.__metadata("design:paramtypes", [])
729
+ ], ButtonDirective.prototype, "getDirection", null);
730
+ tslib_1.__decorate([
731
+ core_1.HostListener('focus'),
732
+ tslib_1.__metadata("design:type", Function),
733
+ tslib_1.__metadata("design:paramtypes", []),
734
+ tslib_1.__metadata("design:returntype", void 0)
735
+ ], ButtonDirective.prototype, "onFocus", null);
736
+ tslib_1.__decorate([
737
+ core_1.HostListener('blur'),
738
+ tslib_1.__metadata("design:type", Function),
739
+ tslib_1.__metadata("design:paramtypes", []),
740
+ tslib_1.__metadata("design:returntype", void 0)
741
+ ], ButtonDirective.prototype, "onBlur", null);
742
+ tslib_1.__decorate([
743
+ core_1.Input(),
744
+ tslib_1.__metadata("design:type", Boolean),
745
+ tslib_1.__metadata("design:paramtypes", [Boolean])
746
+ ], ButtonDirective.prototype, "primary", null);
747
+ tslib_1.__decorate([
748
+ core_1.Input(),
749
+ tslib_1.__metadata("design:type", String),
750
+ tslib_1.__metadata("design:paramtypes", [String])
751
+ ], ButtonDirective.prototype, "look", null);
752
+ ButtonDirective = tslib_1.__decorate([
753
+ core_1.Directive({
754
+ exportAs: 'kendoButton',
755
+ providers: [
756
+ kendo_angular_l10n_1.LocalizationService,
757
+ {
758
+ provide: kendo_angular_l10n_1.L10N_PREFIX,
759
+ useValue: 'kendo.button'
760
+ }
761
+ ],
762
+ selector: 'button[kendoButton], span[kendoButton]',
763
+ }),
764
+ tslib_1.__param(2, core_1.Optional()),
765
+ tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
766
+ core_1.Renderer2,
767
+ button_service_1.KendoButtonService,
768
+ kendo_angular_l10n_1.LocalizationService,
769
+ core_1.NgZone])
770
+ ], ButtonDirective);
771
+ return ButtonDirective;
772
+ }());
773
+ exports.ButtonDirective = ButtonDirective;