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

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 (265) hide show
  1. package/bundles/kendo-angular-buttons.umd.js +5 -0
  2. package/{dist/es2015/button → button}/button.directive.d.ts +29 -21
  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/button-look.d.ts → button-look.d.ts} +0 -0
  7. package/{dist/es2015/buttongroup → buttongroup}/buttongroup.component.d.ts +16 -12
  8. package/buttongroup/buttongroup.module.d.ts +21 -0
  9. package/{dist/es2015/buttons.module.d.ts → buttons.module.d.ts} +10 -0
  10. package/{dist/es2015/chip → chip}/chip-content-click-event-args.interface.d.ts +0 -0
  11. package/{dist/es2015/chip → chip}/chip-list-remove-event-args.interface.d.ts +0 -0
  12. package/{dist/es2015/chip → chip}/chip-list.component.d.ts +5 -2
  13. package/{dist/es2015/chip → chip}/chip-remove-event-args.interface.d.ts +0 -0
  14. package/{dist/es2015/chip → chip}/chip.component.d.ts +15 -14
  15. package/{dist/es2015/chip → chip}/chip.module.d.ts +7 -0
  16. package/{dist/es2015/buttongroup/buttongroup.module.d.ts → chip/models/chip-look.d.ts} +10 -6
  17. package/{dist/es2015/chip → chip}/models/selection.d.ts +0 -0
  18. package/{dist/es2015/chip → chip}/models/type.d.ts +0 -0
  19. package/{dist/es2015/common → common}/models/shape.d.ts +0 -0
  20. package/{dist/es2015/common → common}/models/size.d.ts +0 -0
  21. package/{dist/es2015/common → common}/models/theme-color.d.ts +0 -0
  22. package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
  23. package/{dist/es2015/dropdownbutton → dropdownbutton}/dropdownbutton.component.d.ts +24 -17
  24. package/dropdownbutton/dropdownbutton.module.d.ts +23 -0
  25. package/{dist/es2015 → esm2015}/button/button.directive.js +97 -151
  26. package/{dist/es → esm2015}/button/button.module.js +13 -13
  27. package/{dist/es2015 → esm2015}/button/button.service.js +8 -10
  28. package/{dist/es → esm2015}/button/selection-settings.js +1 -0
  29. package/{dist/es2015 → esm2015}/button-look.js +1 -0
  30. package/{dist/es2015 → esm2015}/buttongroup/buttongroup.component.js +93 -125
  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 +56 -63
  36. package/{dist/es → esm2015}/chip/chip-remove-event-args.interface.js +1 -0
  37. package/{dist/es2015 → esm2015}/chip/chip.component.js +121 -128
  38. package/{dist/es2015 → esm2015}/chip/chip.module.js +16 -11
  39. package/{dist/es → esm2015}/chip/models/chip-look.js +1 -0
  40. package/{dist/es → esm2015}/chip/models/selection.js +1 -0
  41. package/{dist/es → esm2015}/chip/models/type.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/theme-color.js +1 -0
  45. package/{dist/es → esm2015}/direction.js +1 -0
  46. package/{dist/es2015 → esm2015}/dropdownbutton/dropdownbutton.component.js +162 -180
  47. package/esm2015/dropdownbutton/dropdownbutton.module.js +32 -0
  48. package/{dist/es2015 → esm2015}/floatingactionbutton/animations/animations.js +0 -0
  49. package/esm2015/floatingactionbutton/dial-item.component.js +126 -0
  50. package/esm2015/floatingactionbutton/dial-list.component.js +89 -0
  51. package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.component.js +150 -150
  52. package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.module.js +19 -11
  53. package/{dist/es → esm2015}/floatingactionbutton/models/align.js +1 -0
  54. package/{dist/es → esm2015}/floatingactionbutton/models/item-animation.interface.js +1 -0
  55. package/{dist/es → esm2015}/floatingactionbutton/models/item-click.event.js +1 -0
  56. package/{dist/es → esm2015}/floatingactionbutton/models/item.interface.js +1 -0
  57. package/{dist/es → esm2015}/floatingactionbutton/models/offset.js +1 -0
  58. package/{dist/es → esm2015}/floatingactionbutton/models/position-mode.js +1 -0
  59. package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +27 -0
  60. package/esm2015/floatingactionbutton/templates/fab-template.directive.js +27 -0
  61. package/{dist/es2015 → esm2015}/floatingactionbutton/utils.js +0 -0
  62. package/{dist/es2015 → esm2015}/focusable/focus.service.js +8 -10
  63. package/{dist/es2015 → esm2015}/focusable/focusable.directive.js +15 -16
  64. package/{dist/es2015/listbutton/list.module.d.ts → esm2015/kendo-angular-buttons.js} +2 -3
  65. package/{dist/es2015 → esm2015}/listbutton/button-item-template.directive.js +13 -12
  66. package/{dist/es2015 → esm2015}/listbutton/list-button.js +15 -2
  67. package/{dist/es → esm2015}/listbutton/list-item-model.js +1 -0
  68. package/esm2015/listbutton/list.component.js +120 -0
  69. package/esm2015/listbutton/list.module.js +39 -0
  70. package/{dist/es → esm2015}/listbutton/popup-settings.js +1 -0
  71. package/esm2015/listbutton/template-context.directive.js +33 -0
  72. package/{dist/es2015 → esm2015}/main.js +5 -1
  73. package/{dist/es → esm2015}/navigation/key-events.js +0 -0
  74. package/{dist/es → esm2015}/navigation/navigation-action.js +0 -0
  75. package/{dist/es2015 → esm2015}/navigation/navigation-config.js +0 -0
  76. package/{dist/es2015 → esm2015}/navigation/navigation.service.js +11 -9
  77. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  78. package/{dist/es2015 → esm2015}/preventable-event.js +0 -0
  79. package/{dist/es2015 → esm2015}/splitbutton/splitbutton.component.js +186 -192
  80. package/esm2015/splitbutton/splitbutton.module.js +32 -0
  81. package/{dist/es2015 → esm2015}/util.js +2 -6
  82. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-buttons.js} +1613 -1723
  83. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/animations/animations.d.ts +0 -0
  84. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/dial-item.component.d.ts +8 -5
  85. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/dial-list.component.d.ts +5 -2
  86. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/floatingactionbutton.component.d.ts +28 -19
  87. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/floatingactionbutton.module.d.ts +13 -0
  88. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/align.d.ts +0 -0
  89. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
  90. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item-click.event.d.ts +0 -0
  91. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item.interface.d.ts +0 -0
  92. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/offset.d.ts +0 -0
  93. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/position-mode.d.ts +0 -0
  94. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/templates/dial-item-template.directive.d.ts +3 -0
  95. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/templates/fab-template.directive.d.ts +3 -0
  96. package/{dist/es2015/floatingactionbutton → floatingactionbutton}/utils.d.ts +0 -0
  97. package/{dist/es2015/focusable → focusable}/focus.service.d.ts +5 -1
  98. package/{dist/es2015/focusable → focusable}/focusable.directive.d.ts +3 -0
  99. package/kendo-angular-buttons.d.ts +9 -0
  100. package/{dist/es2015/listbutton → listbutton}/button-item-template.directive.d.ts +3 -0
  101. package/{dist/es2015/listbutton → listbutton}/list-button.d.ts +6 -2
  102. package/{dist/es2015/listbutton → listbutton}/list-item-model.d.ts +0 -0
  103. package/{dist/es2015/listbutton → listbutton}/list.component.d.ts +3 -0
  104. package/listbutton/list.module.d.ts +18 -0
  105. package/{dist/es2015/listbutton → listbutton}/popup-settings.d.ts +0 -0
  106. package/{dist/es2015/listbutton → listbutton}/template-context.directive.d.ts +4 -1
  107. package/{dist/es2015/main.d.ts → main.d.ts} +5 -1
  108. package/{dist/es2015/navigation → navigation}/key-events.d.ts +0 -0
  109. package/{dist/es2015/navigation → navigation}/navigation-action.d.ts +0 -0
  110. package/{dist/es2015/navigation → navigation}/navigation-config.d.ts +0 -0
  111. package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +3 -0
  112. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  113. package/package.json +34 -105
  114. package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
  115. package/schematics/ngAdd/index.js +5 -2
  116. package/schematics/ngAdd/index.js.map +1 -1
  117. package/{dist/es2015/splitbutton → splitbutton}/splitbutton.component.d.ts +26 -19
  118. package/splitbutton/splitbutton.module.d.ts +23 -0
  119. package/{dist/es2015/util.d.ts → util.d.ts} +0 -4
  120. package/dist/cdn/js/kendo-angular-buttons.js +0 -20
  121. package/dist/cdn/main.js +0 -5
  122. package/dist/es/button/button.directive.js +0 -630
  123. package/dist/es/button/button.service.js +0 -28
  124. package/dist/es/button-look.js +0 -4
  125. package/dist/es/buttongroup/buttongroup.component.js +0 -402
  126. package/dist/es/buttongroup/buttongroup.module.js +0 -30
  127. package/dist/es/chip/chip-content-click-event-args.interface.js +0 -4
  128. package/dist/es/chip/chip-list-remove-event-args.interface.js +0 -4
  129. package/dist/es/chip/chip-list.component.js +0 -164
  130. package/dist/es/chip/chip.component.js +0 -360
  131. package/dist/es/chip/chip.module.js +0 -55
  132. package/dist/es/dropdownbutton/dropdownbutton.component.js +0 -652
  133. package/dist/es/dropdownbutton/dropdownbutton.module.js +0 -32
  134. package/dist/es/floatingactionbutton/animations/animations.js +0 -33
  135. package/dist/es/floatingactionbutton/dial-item.component.js +0 -143
  136. package/dist/es/floatingactionbutton/dial-list.component.js +0 -76
  137. package/dist/es/floatingactionbutton/floatingactionbutton.component.js +0 -878
  138. package/dist/es/floatingactionbutton/floatingactionbutton.module.js +0 -65
  139. package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +0 -26
  140. package/dist/es/floatingactionbutton/templates/fab-template.directive.js +0 -26
  141. package/dist/es/floatingactionbutton/utils.js +0 -38
  142. package/dist/es/focusable/focus.service.js +0 -43
  143. package/dist/es/focusable/focusable.directive.js +0 -68
  144. package/dist/es/index.js +0 -22
  145. package/dist/es/listbutton/button-item-template.directive.js +0 -68
  146. package/dist/es/listbutton/list-button.js +0 -240
  147. package/dist/es/listbutton/list.component.js +0 -66
  148. package/dist/es/listbutton/list.module.js +0 -33
  149. package/dist/es/listbutton/template-context.directive.js +0 -40
  150. package/dist/es/main.js +0 -22
  151. package/dist/es/navigation/navigation-config.js +0 -9
  152. package/dist/es/navigation/navigation.service.js +0 -114
  153. package/dist/es/package-metadata.js +0 -15
  154. package/dist/es/preventable-event.js +0 -29
  155. package/dist/es/splitbutton/localization/custom-messages.component.js +0 -44
  156. package/dist/es/splitbutton/localization/localized-messages.directive.js +0 -35
  157. package/dist/es/splitbutton/localization/messages.js +0 -22
  158. package/dist/es/splitbutton/splitbutton.component.js +0 -761
  159. package/dist/es/splitbutton/splitbutton.module.js +0 -34
  160. package/dist/es/util.js +0 -45
  161. package/dist/es2015/button/button.module.js +0 -47
  162. package/dist/es2015/button/selection-settings.js +0 -4
  163. package/dist/es2015/buttongroup/buttongroup.module.js +0 -27
  164. package/dist/es2015/buttons.module.js +0 -51
  165. package/dist/es2015/chip/chip-remove-event-args.interface.js +0 -4
  166. package/dist/es2015/chip/models/chip-look.d.ts +0 -20
  167. package/dist/es2015/chip/models/chip-look.js +0 -4
  168. package/dist/es2015/chip/models/selection.js +0 -4
  169. package/dist/es2015/chip/models/type.js +0 -4
  170. package/dist/es2015/common/models/shape.js +0 -4
  171. package/dist/es2015/common/models/size.js +0 -4
  172. package/dist/es2015/common/models/theme-color.js +0 -4
  173. package/dist/es2015/direction.js +0 -4
  174. package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +0 -14
  175. package/dist/es2015/dropdownbutton/dropdownbutton.module.js +0 -29
  176. package/dist/es2015/floatingactionbutton/dial-item.component.js +0 -133
  177. package/dist/es2015/floatingactionbutton/dial-list.component.js +0 -81
  178. package/dist/es2015/floatingactionbutton/models/align.js +0 -4
  179. package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +0 -4
  180. package/dist/es2015/floatingactionbutton/models/item-click.event.js +0 -4
  181. package/dist/es2015/floatingactionbutton/models/item.interface.js +0 -4
  182. package/dist/es2015/floatingactionbutton/models/offset.js +0 -4
  183. package/dist/es2015/floatingactionbutton/models/position-mode.js +0 -4
  184. package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -25
  185. package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +0 -25
  186. package/dist/es2015/index.d.ts +0 -22
  187. package/dist/es2015/index.js +0 -22
  188. package/dist/es2015/index.metadata.json +0 -1
  189. package/dist/es2015/listbutton/list-item-model.js +0 -4
  190. package/dist/es2015/listbutton/list.component.js +0 -96
  191. package/dist/es2015/listbutton/list.module.js +0 -30
  192. package/dist/es2015/listbutton/popup-settings.js +0 -4
  193. package/dist/es2015/listbutton/template-context.directive.js +0 -35
  194. package/dist/es2015/navigation/key-events.js +0 -13
  195. package/dist/es2015/navigation/navigation-action.js +0 -19
  196. package/dist/es2015/splitbutton/localization/custom-messages.component.d.ts +0 -15
  197. package/dist/es2015/splitbutton/localization/custom-messages.component.js +0 -36
  198. package/dist/es2015/splitbutton/localization/localized-messages.directive.d.ts +0 -13
  199. package/dist/es2015/splitbutton/localization/localized-messages.directive.js +0 -31
  200. package/dist/es2015/splitbutton/localization/messages.d.ts +0 -32
  201. package/dist/es2015/splitbutton/localization/messages.js +0 -16
  202. package/dist/es2015/splitbutton/splitbutton.module.d.ts +0 -14
  203. package/dist/es2015/splitbutton/splitbutton.module.js +0 -31
  204. package/dist/fesm5/index.js +0 -5123
  205. package/dist/npm/button/button.directive.js +0 -632
  206. package/dist/npm/button/button.module.js +0 -52
  207. package/dist/npm/button/button.service.js +0 -30
  208. package/dist/npm/button/selection-settings.js +0 -6
  209. package/dist/npm/button-look.js +0 -6
  210. package/dist/npm/buttongroup/buttongroup.component.js +0 -404
  211. package/dist/npm/buttongroup/buttongroup.module.js +0 -32
  212. package/dist/npm/buttons.module.js +0 -56
  213. package/dist/npm/chip/chip-content-click-event-args.interface.js +0 -6
  214. package/dist/npm/chip/chip-list-remove-event-args.interface.js +0 -6
  215. package/dist/npm/chip/chip-list.component.js +0 -166
  216. package/dist/npm/chip/chip-remove-event-args.interface.js +0 -6
  217. package/dist/npm/chip/chip.component.js +0 -362
  218. package/dist/npm/chip/chip.module.js +0 -57
  219. package/dist/npm/chip/models/chip-look.js +0 -6
  220. package/dist/npm/chip/models/selection.js +0 -6
  221. package/dist/npm/chip/models/type.js +0 -6
  222. package/dist/npm/common/models/shape.js +0 -6
  223. package/dist/npm/common/models/size.js +0 -6
  224. package/dist/npm/common/models/theme-color.js +0 -6
  225. package/dist/npm/direction.js +0 -6
  226. package/dist/npm/dropdownbutton/dropdownbutton.component.js +0 -654
  227. package/dist/npm/dropdownbutton/dropdownbutton.module.js +0 -34
  228. package/dist/npm/floatingactionbutton/animations/animations.js +0 -37
  229. package/dist/npm/floatingactionbutton/dial-item.component.js +0 -145
  230. package/dist/npm/floatingactionbutton/dial-list.component.js +0 -78
  231. package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +0 -880
  232. package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +0 -67
  233. package/dist/npm/floatingactionbutton/models/align.js +0 -6
  234. package/dist/npm/floatingactionbutton/models/item-animation.interface.js +0 -6
  235. package/dist/npm/floatingactionbutton/models/item-click.event.js +0 -6
  236. package/dist/npm/floatingactionbutton/models/item.interface.js +0 -6
  237. package/dist/npm/floatingactionbutton/models/offset.js +0 -6
  238. package/dist/npm/floatingactionbutton/models/position-mode.js +0 -6
  239. package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +0 -28
  240. package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +0 -28
  241. package/dist/npm/floatingactionbutton/utils.js +0 -42
  242. package/dist/npm/focusable/focus.service.js +0 -45
  243. package/dist/npm/focusable/focusable.directive.js +0 -70
  244. package/dist/npm/index.js +0 -39
  245. package/dist/npm/listbutton/button-item-template.directive.js +0 -70
  246. package/dist/npm/listbutton/list-button.js +0 -242
  247. package/dist/npm/listbutton/list-item-model.js +0 -6
  248. package/dist/npm/listbutton/list.component.js +0 -68
  249. package/dist/npm/listbutton/list.module.js +0 -35
  250. package/dist/npm/listbutton/popup-settings.js +0 -6
  251. package/dist/npm/listbutton/template-context.directive.js +0 -42
  252. package/dist/npm/main.js +0 -45
  253. package/dist/npm/navigation/key-events.js +0 -15
  254. package/dist/npm/navigation/navigation-action.js +0 -21
  255. package/dist/npm/navigation/navigation-config.js +0 -11
  256. package/dist/npm/navigation/navigation.service.js +0 -116
  257. package/dist/npm/package-metadata.js +0 -17
  258. package/dist/npm/preventable-event.js +0 -31
  259. package/dist/npm/splitbutton/localization/custom-messages.component.js +0 -46
  260. package/dist/npm/splitbutton/localization/localized-messages.directive.js +0 -37
  261. package/dist/npm/splitbutton/localization/messages.js +0 -24
  262. package/dist/npm/splitbutton/splitbutton.component.js +0 -763
  263. package/dist/npm/splitbutton/splitbutton.module.js +0 -36
  264. package/dist/npm/util.js +0 -48
  265. package/dist/systemjs/kendo-angular-buttons.js +0 -5
@@ -1,880 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var animations_1 = require("@angular/animations");
9
- var core_1 = require("@angular/core");
10
- var rxjs_1 = require("rxjs");
11
- var operators_1 = require("rxjs/operators");
12
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
13
- var kendo_licensing_1 = require("@progress/kendo-licensing");
14
- var package_metadata_1 = require("../package-metadata");
15
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
16
- var kendo_angular_popup_1 = require("@progress/kendo-angular-popup");
17
- var focus_service_1 = require("../focusable/focus.service");
18
- var navigation_action_1 = require("../navigation/navigation-action");
19
- var navigation_config_1 = require("../navigation/navigation-config");
20
- var navigation_service_1 = require("../navigation/navigation.service");
21
- var util_1 = require("../util");
22
- var utils_1 = require("./utils");
23
- var animations_2 = require("./animations/animations");
24
- var preventable_event_1 = require("../preventable-event");
25
- var dial_item_template_directive_1 = require("./templates/dial-item-template.directive");
26
- var fab_template_directive_1 = require("./templates/fab-template.directive");
27
- var NAVIGATION_SETTINGS = {
28
- useLeftRightArrows: false
29
- };
30
- var ɵ0 = NAVIGATION_SETTINGS;
31
- exports.ɵ0 = ɵ0;
32
- var NAVIGATION_SETTINGS_PROVIDER = {
33
- provide: navigation_config_1.NAVIGATION_CONFIG,
34
- useValue: ɵ0
35
- };
36
- var SIZE_CLASSES = {
37
- small: 'k-fab-sm',
38
- medium: 'k-fab-md',
39
- large: 'k-fab-lg'
40
- };
41
- var SHAPE_CLASSES = {
42
- pill: 'k-fab-pill',
43
- circle: 'k-fab-circle',
44
- rectangle: 'k-fab-rectangle',
45
- square: 'k-fab-square',
46
- rounded: 'k-fab-rounded'
47
- };
48
- var DEFAULT_DURATION = 180;
49
- var DEFAULT_ITEM_GAP = 90;
50
- var DEFAULT_OFFSET = '16px';
51
- /**
52
- *
53
- * Represents the [Kendo UI FloatingActionButton component for Angular]({% slug overview_floatingactionbutton %}).
54
- * Used to specify the primary or the most common action in an application.
55
- *
56
- */
57
- var FloatingActionButtonComponent = /** @class */ (function () {
58
- function FloatingActionButtonComponent(renderer, element, focusService, navigationService, ngZone, popupService, builder, localizationService) {
59
- var _this = this;
60
- this.renderer = renderer;
61
- this.element = element;
62
- this.focusService = focusService;
63
- this.navigationService = navigationService;
64
- this.ngZone = ngZone;
65
- this.popupService = popupService;
66
- this.builder = builder;
67
- this.localizationService = localizationService;
68
- /**
69
- * Specifies the positionMode of the FloatingActionButton
70
- * ([see example]({% slug positioning_floatingactionbutton %}#toc-positionMode)).
71
- *
72
- * * The possible values are:
73
- * * `absolute`—Positions the FloatingActionButton absolutely to its first positioned parent element.
74
- * * `fixed` (Default)—Positions the FloatingActionButton relative to the viewport. It always stays in the same place even if the page is scrolled.
75
- */
76
- this.positionMode = 'fixed';
77
- /**
78
- * Specifies the animation settings of the FloatingActionButton dial items.
79
- * ([see example]({% slug dialitems_floatingactionbutton %}#toc-animation)).
80
- *
81
- * The possible values are:
82
- * * Boolean
83
- * * (Default) `true`—Applies the default [`DialItemAnimation`]({% slug api_buttons_dialitemanimation %}) settings.
84
- * * `false`
85
- * * `DialItemAnimation`
86
- * * `duration`—Specifies the animation duration in milliseconds for each dial item. Defaults to `180ms`.
87
- * * `gap`—Specifies the animation duration gap in milliseconds after each dial item is animated. Defaults to `90ms`.
88
- */
89
- this.dialItemAnimation = true;
90
- /**
91
- * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the FloatingActionButton.
92
- */
93
- this.tabIndex = 0;
94
- /**
95
- * Specifies the collection of the dial items that will be rendered in the FloatingActionButton popup.
96
- */
97
- this.dialItems = [];
98
- /**
99
- * Fires each time the FloatingActionButton gets blurred.
100
- */
101
- this.onBlur = new core_1.EventEmitter();
102
- /**
103
- * Fires each time the FloatingActionButton gets focused.
104
- */
105
- this.onFocus = new core_1.EventEmitter();
106
- /**
107
- * Fires each time a dial item is clicked.
108
- */
109
- this.dialItemClick = new core_1.EventEmitter();
110
- /**
111
- * Fires each time the popup is about to open.
112
- * This event is preventable. If you cancel the event, the popup will remain closed
113
- * ([more information and example]({% slug overview_floatingactionbutton %}#toc-events)).
114
- */
115
- this.open = new core_1.EventEmitter();
116
- /**
117
- * Fires each time the popup is about to close.
118
- * This event is preventable. If you cancel the event, the popup will remain open
119
- * ([more information and example]({% slug overview_floatingactionbutton %}#toc-events)).
120
- */
121
- this.close = new core_1.EventEmitter();
122
- /**
123
- * @hidden
124
- */
125
- this.id = "k-" + kendo_angular_common_1.guid();
126
- this._themeColor = 'primary';
127
- this._size = 'medium';
128
- this._shape = 'pill';
129
- this._disabled = false;
130
- this._align = { horizontal: 'end', vertical: 'bottom' };
131
- this._offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
132
- this.subscriptions = new rxjs_1.Subscription();
133
- this.rtl = false;
134
- this.animationEnd = new core_1.EventEmitter();
135
- kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
136
- this.subscribeNavigationEvents();
137
- this.subscriptions.add(this.localizationService.changes.subscribe(function (_a) {
138
- var rtl = _a.rtl;
139
- _this.rtl = rtl;
140
- _this.direction = _this.rtl ? 'rtl' : 'ltr';
141
- }));
142
- }
143
- Object.defineProperty(FloatingActionButtonComponent.prototype, "fixedClass", {
144
- get: function () {
145
- return this.positionMode === 'fixed';
146
- },
147
- enumerable: true,
148
- configurable: true
149
- });
150
- Object.defineProperty(FloatingActionButtonComponent.prototype, "absoluteClass", {
151
- get: function () {
152
- return this.positionMode === 'absolute';
153
- },
154
- enumerable: true,
155
- configurable: true
156
- });
157
- Object.defineProperty(FloatingActionButtonComponent.prototype, "themeColor", {
158
- get: function () {
159
- return this._themeColor;
160
- },
161
- /**
162
- * Specifies the theme color of the FloatingActionButton
163
- * ([see example]({% slug appearance_floatingactionbutton %}#toc-themeColor)).
164
- * The theme color will be applied as background color of the component.
165
- *
166
- * The possible values are:
167
- * * `primary` (Default)—Applies coloring based on the `primary` theme color.
168
- * * `secondary`—Applies coloring based on the `secondary` theme color.
169
- * * `tertiary`— Applies coloring based on the `tertiary` theme color.
170
- * * `inherit`— Applies inherited coloring value.
171
- * * `info`—Applies coloring based on the `info` theme color.
172
- * * `success`— Applies coloring based on the `success` theme color.
173
- * * `warning`— Applies coloring based on the `warning` theme color.
174
- * * `error`— Applies coloring based on the `error` theme color.
175
- * * `dark`— Applies coloring based on the `dark` theme color.
176
- * * `light`— Applies coloring based on the `light` theme color.
177
- * * `inverse`— Applies coloring based on the `inverse` theme color.
178
- *
179
- */
180
- set: function (themeColor) {
181
- this.handleClasses(themeColor, 'themeColor');
182
- this._themeColor = themeColor;
183
- },
184
- enumerable: true,
185
- configurable: true
186
- });
187
- Object.defineProperty(FloatingActionButtonComponent.prototype, "size", {
188
- get: function () {
189
- return this._size;
190
- },
191
- /**
192
- * Specifies the size of the FloatingActionButton
193
- * ([see example]({% slug appearance_floatingactionbutton %}#toc-size)).
194
- *
195
- * The possible values are:
196
- * * `small`
197
- * * `medium` (Default)
198
- * * `large`
199
- *
200
- */
201
- set: function (size) {
202
- this.handleClasses(size, 'size');
203
- this._size = size;
204
- },
205
- enumerable: true,
206
- configurable: true
207
- });
208
- Object.defineProperty(FloatingActionButtonComponent.prototype, "shape", {
209
- get: function () {
210
- return this._shape;
211
- },
212
- /**
213
- * Specifies the shape of the FloatingActionButton
214
- * ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)).
215
- *
216
- * The possible values are:
217
- * * `pill` (Default)—Applies border radius equal to half of the height of the FloatingActionButton.
218
- * * `circle`—Applies circle shape on the FloatingActionButton.
219
- * * `rectangle`—Applies rectangular shape on the FloatingActionButton.
220
- * * `rounded`—Applies rounded shape on the FloatingActionButton.
221
- * * `square`—Applies square shape on the FloatingActionButton.
222
- *
223
- */
224
- set: function (shape) {
225
- this.handleClasses(shape, 'shape');
226
- this._shape = shape;
227
- },
228
- enumerable: true,
229
- configurable: true
230
- });
231
- Object.defineProperty(FloatingActionButtonComponent.prototype, "disabled", {
232
- get: function () {
233
- return this._disabled;
234
- },
235
- /**
236
- * Specifies whether the FloatingActionButton is disabled.
237
- */
238
- set: function (disabled) {
239
- this._disabled = disabled;
240
- },
241
- enumerable: true,
242
- configurable: true
243
- });
244
- Object.defineProperty(FloatingActionButtonComponent.prototype, "align", {
245
- get: function () {
246
- return this._align;
247
- },
248
- /**
249
- * Specifies the horizontal and vertical alignment of the FloatingActionButton
250
- * ([see example]({% slug positioning_floatingactionbutton %}#toc-align)).
251
- *
252
- * The possible values are:
253
- * * `{ horizontal: 'start'|'center'|'end', vertical: 'top'|'middle'|'bottom' }`
254
- *
255
- * The default value is:
256
- * * `{ horizontal: 'end', vertical: 'bottom' }`
257
- *
258
- */
259
- set: function (align) {
260
- this._align = Object.assign(this._align, align);
261
- },
262
- enumerable: true,
263
- configurable: true
264
- });
265
- Object.defineProperty(FloatingActionButtonComponent.prototype, "offset", {
266
- get: function () {
267
- return this._offset;
268
- },
269
- /**
270
- * Specifies the horizontal and vertical offset position of the FloatingActionButton
271
- * ([see example]({% slug positioning_floatingactionbutton %}#toc-offset)).
272
- *
273
- * * The default value is:
274
- * * `{ x: '16px', y: '16px' }`
275
- */
276
- set: function (offset) {
277
- this._offset = Object.assign(this._offset, offset);
278
- this.offsetStyles();
279
- },
280
- enumerable: true,
281
- configurable: true
282
- });
283
- Object.defineProperty(FloatingActionButtonComponent.prototype, "componentTabIndex", {
284
- /**
285
- * @hidden
286
- */
287
- get: function () {
288
- return this.disabled ? (-1) : this.tabIndex;
289
- },
290
- enumerable: true,
291
- configurable: true
292
- });
293
- FloatingActionButtonComponent.prototype.ngAfterViewInit = function () {
294
- this.applyClasses();
295
- this.offsetStyles();
296
- };
297
- FloatingActionButtonComponent.prototype.ngOnDestroy = function () {
298
- this.subscriptions.unsubscribe();
299
- };
300
- Object.defineProperty(FloatingActionButtonComponent.prototype, "isOpen", {
301
- /**
302
- * Indicates whether the FloatingActionButton is currently open.
303
- */
304
- get: function () { return util_1.isPresent(this.popupRef); },
305
- enumerable: true,
306
- configurable: true
307
- });
308
- /**
309
- * Focuses the FloatingActionButton.
310
- */
311
- FloatingActionButtonComponent.prototype.focus = function () {
312
- if (kendo_angular_common_1.isDocumentAvailable()) {
313
- this.button.nativeElement.focus();
314
- }
315
- };
316
- /**
317
- * Blurs the FloatingActionButton.
318
- */
319
- FloatingActionButtonComponent.prototype.blur = function () {
320
- if (kendo_angular_common_1.isDocumentAvailable()) {
321
- this.button.nativeElement.blur();
322
- }
323
- };
324
- /**
325
- * Toggles the visibility of the FloatingActionButton dial items popup.
326
- *
327
- * If you use the `toggleDial` method to open or close the dial items,
328
- * the `open` and `close` events do not fire ([more information and examples]({% slug openstate_floatingactionbutton %}#toc-events)).
329
- *
330
- * @param open - The state of dial items popup.
331
- */
332
- FloatingActionButtonComponent.prototype.toggleDial = function (open) {
333
- var _this = this;
334
- if (this.disabled || !this.hasDialItems) {
335
- return;
336
- }
337
- var shouldOpen = util_1.isPresent(open) ? open : !this.isOpen;
338
- if (this.disabled || shouldOpen === this.isOpen) {
339
- return;
340
- }
341
- shouldOpen ? setTimeout(function () { return _this.openDial(); }) : this.closeDial();
342
- };
343
- Object.defineProperty(FloatingActionButtonComponent.prototype, "role", {
344
- /**
345
- * @hidden
346
- */
347
- get: function () {
348
- return (this.dialItems && this.dialItems.length) ? 'menubutton' : 'button';
349
- },
350
- enumerable: true,
351
- configurable: true
352
- });
353
- Object.defineProperty(FloatingActionButtonComponent.prototype, "ariaExpanded", {
354
- /**
355
- * @hidden
356
- */
357
- get: function () {
358
- return util_1.isPresent(this.isOpen);
359
- },
360
- enumerable: true,
361
- configurable: true
362
- });
363
- Object.defineProperty(FloatingActionButtonComponent.prototype, "ariaHasPopup", {
364
- /**
365
- * @hidden
366
- */
367
- get: function () {
368
- return util_1.isPresent(this.isOpen);
369
- },
370
- enumerable: true,
371
- configurable: true
372
- });
373
- Object.defineProperty(FloatingActionButtonComponent.prototype, "iconClasses", {
374
- /**
375
- * @hidden
376
- */
377
- get: function () {
378
- var classes = [];
379
- if (this.iconClass) {
380
- classes.push("" + this.iconClass);
381
- }
382
- if (this.icon) {
383
- classes.push("k-fab-icon k-icon k-i-" + this.icon);
384
- }
385
- return classes;
386
- },
387
- enumerable: true,
388
- configurable: true
389
- });
390
- /**
391
- * @hidden
392
- */
393
- FloatingActionButtonComponent.prototype.clickHandler = function () {
394
- var _this = this;
395
- if (this.disabled || !this.hasDialItems) {
396
- return;
397
- }
398
- this.ngZone.run(function () {
399
- var shouldOpen = !_this.isOpen;
400
- _this.toggleDialWithEvents(shouldOpen);
401
- });
402
- };
403
- /**
404
- * @hidden
405
- */
406
- FloatingActionButtonComponent.prototype.keyDownHandler = function (event) {
407
- this.keyHandler(event);
408
- };
409
- /**
410
- * @hidden
411
- */
412
- FloatingActionButtonComponent.prototype.keyHandler = function (event, keyEvent) {
413
- if (this.disabled) {
414
- return;
415
- }
416
- var focused = this.focusService.focused || 0;
417
- var keyCode = event.keyCode;
418
- var action = this.navigationService.process({
419
- altKey: event.altKey,
420
- current: focused,
421
- keyCode: keyCode,
422
- keyEvent: keyEvent,
423
- max: this.dialItems ? this.dialItems.length - 1 : 0,
424
- min: 0,
425
- flipNavigation: this.align.vertical === 'bottom'
426
- });
427
- if (action !== navigation_action_1.NavigationAction.Undefined &&
428
- action !== navigation_action_1.NavigationAction.Tab) {
429
- event.preventDefault();
430
- }
431
- };
432
- /**
433
- * @hidden
434
- */
435
- FloatingActionButtonComponent.prototype.onItemClick = function (event) {
436
- var item = util_1.closest(event.target, '.k-fab-item');
437
- if (!item) {
438
- return;
439
- }
440
- var index = item.getAttribute('data-fab-item-index');
441
- this.emitItemClick(index);
442
- };
443
- /**
444
- * @hidden
445
- */
446
- FloatingActionButtonComponent.prototype.focusHandler = function () {
447
- if (!this.disabled) {
448
- this.onFocus.emit();
449
- }
450
- };
451
- /**
452
- * @hidden
453
- */
454
- FloatingActionButtonComponent.prototype.blurHandler = function () {
455
- this.onBlur.emit();
456
- this.toggleDialWithEvents(false);
457
- };
458
- FloatingActionButtonComponent.prototype.handleClasses = function (inputValue, input) {
459
- if (util_1.isPresent(this.button) && (this[input] !== inputValue)) {
460
- var button = this.button.nativeElement;
461
- var classesToRemove = {
462
- themeColor: "k-fab-" + this.themeColor,
463
- size: SIZE_CLASSES[this.size],
464
- shape: SHAPE_CLASSES[this.shape]
465
- };
466
- var classesToAdd = {
467
- themeColor: "k-fab-" + inputValue,
468
- size: SIZE_CLASSES[inputValue],
469
- shape: SHAPE_CLASSES[inputValue]
470
- };
471
- this.renderer.removeClass(button, classesToRemove[input]);
472
- this.renderer.addClass(button, classesToAdd[input]);
473
- }
474
- };
475
- FloatingActionButtonComponent.prototype.onEnterPressed = function () {
476
- var index = this.focusService.focused;
477
- this.emitItemClick(index);
478
- };
479
- FloatingActionButtonComponent.prototype.emitItemClick = function (index) {
480
- var item = this.dialItems[index];
481
- if (item && !item.disabled) {
482
- var clickEventArgs = { item: item, index: index };
483
- this.dialItemClick.emit(clickEventArgs);
484
- this.toggleDialWithEvents(false);
485
- }
486
- };
487
- FloatingActionButtonComponent.prototype.subscribeNavigationEvents = function () {
488
- this.subscriptions.add(this.navigationService.navigate.subscribe(this.onArrowKeyNavigate.bind(this)));
489
- this.subscriptions.add(this.navigationService.enter.subscribe(this.onNavigationEnterPress.bind(this)));
490
- this.subscriptions.add(rxjs_1.merge(this.navigationService.close, this.navigationService.esc).subscribe(this.onNavigationClose.bind(this)));
491
- };
492
- FloatingActionButtonComponent.prototype.onArrowKeyNavigate = function (index) {
493
- this.focusService.focus(index);
494
- };
495
- FloatingActionButtonComponent.prototype.onNavigationEnterPress = function () {
496
- var _this = this;
497
- this.ngZone.run(function () {
498
- if (_this.isOpen) {
499
- var focusedIndex = _this.focusService.focused;
500
- var focusedItem = _this.dialItems[focusedIndex];
501
- if (focusedItem && focusedItem.disabled) {
502
- return;
503
- }
504
- if (util_1.isPresent(focusedIndex) && focusedIndex !== -1) {
505
- _this.onEnterPressed();
506
- return;
507
- }
508
- }
509
- if (!_this.isOpen && kendo_angular_common_1.isDocumentAvailable()) {
510
- _this.toggleDialWithEvents(true);
511
- _this.button.nativeElement.focus();
512
- }
513
- });
514
- };
515
- FloatingActionButtonComponent.prototype.onNavigationClose = function () {
516
- var _this = this;
517
- if (this.isOpen) {
518
- this.ngZone.run(function () {
519
- _this.toggleDialWithEvents(false);
520
- if (kendo_angular_common_1.isDocumentAvailable()) {
521
- _this.button.nativeElement.focus();
522
- }
523
- });
524
- }
525
- };
526
- FloatingActionButtonComponent.prototype.alignClass = function () {
527
- return "k-pos-" + this.align.vertical + "-" + this.align.horizontal;
528
- };
529
- FloatingActionButtonComponent.prototype.applyClasses = function () {
530
- var hostElement = this.element.nativeElement;
531
- var button = this.button.nativeElement;
532
- this.renderer.addClass(button, SHAPE_CLASSES[this.shape]);
533
- this.renderer.addClass(button, "k-fab-" + this.themeColor);
534
- this.renderer.addClass(button, SIZE_CLASSES[this.size]);
535
- this.renderer.addClass(hostElement, this.alignClass());
536
- };
537
- FloatingActionButtonComponent.prototype.toggleDialWithEvents = function (open) {
538
- if (open === this.isOpen) {
539
- return;
540
- }
541
- var event = new preventable_event_1.PreventableEvent();
542
- open ? this.open.emit(event) : this.close.emit(event);
543
- if (event.isDefaultPrevented()) {
544
- return;
545
- }
546
- open ? this.openDial() : this.closeDial();
547
- };
548
- FloatingActionButtonComponent.prototype.openPopup = function () {
549
- var _this = this;
550
- if (this.isOpen) {
551
- return;
552
- }
553
- var isIconFab = this.icon && !this.text;
554
- var rtl = this.rtl;
555
- var align = this.align;
556
- this.popupRef = this.popupService.open({
557
- anchor: this.element.nativeElement,
558
- animate: false,
559
- content: this.popupTemplate,
560
- anchorAlign: utils_1.getAnchorAlign(align, rtl),
561
- popupAlign: utils_1.getPopupAlign(align, rtl),
562
- popupClass: 'k-fab-popup k-popup-transparent'
563
- });
564
- var popupElement = this.popupRef.popupElement;
565
- this.renderer.setStyle(popupElement, 'box-shadow', 'none');
566
- if (isIconFab) {
567
- this.subscriptions.add(this.popupRef.popupOpen.subscribe(function () { return _this.positionPopup(); }));
568
- }
569
- this.ngZone.runOutsideAngular(function () {
570
- _this.popupMouseDownListener = _this.renderer.listen(popupElement, 'mousedown', function (event) {
571
- event.preventDefault();
572
- });
573
- });
574
- this.popupRef.popupAnchorViewportLeave.subscribe(function () { return _this.toggleDialWithEvents(false); });
575
- };
576
- FloatingActionButtonComponent.prototype.closePopup = function () {
577
- if (this.isOpen) {
578
- if (this.popupMouseDownListener) {
579
- this.popupMouseDownListener();
580
- }
581
- this.popupRef.close();
582
- this.popupRef = null;
583
- }
584
- };
585
- FloatingActionButtonComponent.prototype.openDial = function () {
586
- this.openPopup();
587
- this.focusService.focus(0);
588
- if (this.dialItemAnimation && this.isValidAnimation()) {
589
- this.playAnimation(true);
590
- }
591
- };
592
- FloatingActionButtonComponent.prototype.closeDial = function () {
593
- var _this = this;
594
- if (this.dialItemAnimation && this.isValidAnimation()) {
595
- this.playAnimation(false);
596
- this.animationEnd.pipe(operators_1.take(1)).subscribe(function () { return _this.closePopup(); });
597
- }
598
- else {
599
- this.closePopup();
600
- }
601
- };
602
- FloatingActionButtonComponent.prototype.isValidAnimation = function () {
603
- var animation = this.dialItemAnimation;
604
- if (typeof animation !== 'boolean') {
605
- return animation.duration !== 0;
606
- }
607
- return true;
608
- };
609
- FloatingActionButtonComponent.prototype.positionPopup = function () {
610
- if (this.dialItemTemplate) {
611
- return;
612
- }
613
- var fab = this.element.nativeElement;
614
- var fabWidth = fab.getBoundingClientRect().width;
615
- var popupEl = this.popupRef.popupElement;
616
- var icon = popupEl.querySelector('.k-fab-item-icon');
617
- if (!icon) {
618
- return;
619
- }
620
- var iconWidth = icon.getBoundingClientRect().width;
621
- var left = (fabWidth / 2) - (iconWidth / 2);
622
- var popupLeft = popupEl.getBoundingClientRect().left;
623
- var isEndAlign = this.align.horizontal === 'end';
624
- var leftValue = isEndAlign ? (popupLeft - left) : (left + popupLeft);
625
- var rtlLeftValue = isEndAlign ? (left + popupLeft) : (popupLeft - left);
626
- popupEl.style.left = this.rtl ? rtlLeftValue + "px" : leftValue + "px";
627
- };
628
- FloatingActionButtonComponent.prototype.offsetStyles = function () {
629
- var hostElement = this.element.nativeElement;
630
- this.renderer.setStyle(hostElement, this.horizontalPosition, this.horizontalOffset);
631
- this.renderer.setStyle(hostElement, this.verticalPosition, this.verticalOffset);
632
- };
633
- Object.defineProperty(FloatingActionButtonComponent.prototype, "hasDialItems", {
634
- get: function () {
635
- return util_1.isPresent(this.dialItems) && this.dialItems.length !== 0;
636
- },
637
- enumerable: true,
638
- configurable: true
639
- });
640
- Object.defineProperty(FloatingActionButtonComponent.prototype, "verticalPosition", {
641
- /**
642
- * Gets the CSS prop name of the selected vertical position (`top`/`bottom`);
643
- */
644
- get: function () {
645
- return {
646
- top: 'top',
647
- middle: 'top',
648
- bottom: 'bottom'
649
- }[this.align.vertical];
650
- },
651
- enumerable: true,
652
- configurable: true
653
- });
654
- Object.defineProperty(FloatingActionButtonComponent.prototype, "verticalOffset", {
655
- /**
656
- * Gets the offset according to the selected vertical position.
657
- */
658
- get: function () {
659
- if (this.align.vertical === 'middle') {
660
- return this.offset.y === DEFAULT_OFFSET ? '50%' : "calc(50% + " + this.offset.y + ")";
661
- }
662
- return this.offset.y;
663
- },
664
- enumerable: true,
665
- configurable: true
666
- });
667
- Object.defineProperty(FloatingActionButtonComponent.prototype, "horizontalPosition", {
668
- /**
669
- * Gets the CSS prop name of the selected horizontal position (`left`/`right`);
670
- */
671
- get: function () {
672
- var horizontal = this.align.horizontal;
673
- return {
674
- end: this.rtl ? 'left' : 'right',
675
- center: 'left',
676
- start: this.rtl ? 'right' : 'left'
677
- }[horizontal];
678
- },
679
- enumerable: true,
680
- configurable: true
681
- });
682
- Object.defineProperty(FloatingActionButtonComponent.prototype, "horizontalOffset", {
683
- /**
684
- * Gets the offset according to the selected horizontal position.
685
- */
686
- get: function () {
687
- if (this.align.horizontal === 'center') {
688
- return this.offset.x === DEFAULT_OFFSET ? '50%' : "calc(50% + " + this.offset.x + ")";
689
- }
690
- return this.offset.x;
691
- },
692
- enumerable: true,
693
- configurable: true
694
- });
695
- FloatingActionButtonComponent.prototype.playerFor = function (element, animation) {
696
- var factory = this.builder.build(animation);
697
- return factory.create(element);
698
- };
699
- FloatingActionButtonComponent.prototype.playAnimation = function (open) {
700
- var _this = this;
701
- var durationSettings = this.durationSettings();
702
- var animationSettings = {
703
- duration: durationSettings.duration,
704
- gap: durationSettings.gap,
705
- align: this.align
706
- };
707
- var animation = open ? animations_2.openAnimation(animationSettings) : animations_2.closeAnimation(animationSettings);
708
- var player = this.playerFor(this.popupRef.popupElement, animation);
709
- player.play();
710
- player.onDone(function () {
711
- if (player) {
712
- _this.animationEnd.emit();
713
- player.destroy();
714
- player = null;
715
- }
716
- });
717
- };
718
- FloatingActionButtonComponent.prototype.durationSettings = function () {
719
- return {
720
- duration: this.animationDuration(),
721
- gap: this.animationGap()
722
- };
723
- };
724
- FloatingActionButtonComponent.prototype.animationGap = function () {
725
- var animation = this.dialItemAnimation;
726
- if (typeof animation !== 'boolean' && util_1.isPresent(animation.gap)) {
727
- return animation.gap;
728
- }
729
- return DEFAULT_ITEM_GAP;
730
- };
731
- FloatingActionButtonComponent.prototype.animationDuration = function () {
732
- var animation = this.dialItemAnimation;
733
- if (typeof animation !== 'boolean' && util_1.isPresent(animation.duration)) {
734
- return animation.duration;
735
- }
736
- return DEFAULT_DURATION;
737
- };
738
- tslib_1.__decorate([
739
- core_1.HostBinding('class.k-pos-fixed'),
740
- tslib_1.__metadata("design:type", Boolean),
741
- tslib_1.__metadata("design:paramtypes", [])
742
- ], FloatingActionButtonComponent.prototype, "fixedClass", null);
743
- tslib_1.__decorate([
744
- core_1.HostBinding('class.k-pos-absolute'),
745
- tslib_1.__metadata("design:type", Boolean),
746
- tslib_1.__metadata("design:paramtypes", [])
747
- ], FloatingActionButtonComponent.prototype, "absoluteClass", null);
748
- tslib_1.__decorate([
749
- core_1.HostBinding('attr.dir'),
750
- tslib_1.__metadata("design:type", String)
751
- ], FloatingActionButtonComponent.prototype, "direction", void 0);
752
- tslib_1.__decorate([
753
- core_1.ViewChild('button', { static: true }),
754
- tslib_1.__metadata("design:type", core_1.ElementRef)
755
- ], FloatingActionButtonComponent.prototype, "button", void 0);
756
- tslib_1.__decorate([
757
- core_1.ViewChild('popupTemplate', { static: true }),
758
- tslib_1.__metadata("design:type", core_1.TemplateRef)
759
- ], FloatingActionButtonComponent.prototype, "popupTemplate", void 0);
760
- tslib_1.__decorate([
761
- core_1.ContentChild(dial_item_template_directive_1.DialItemTemplateDirective, { static: true }),
762
- tslib_1.__metadata("design:type", dial_item_template_directive_1.DialItemTemplateDirective)
763
- ], FloatingActionButtonComponent.prototype, "dialItemTemplate", void 0);
764
- tslib_1.__decorate([
765
- core_1.ContentChild(fab_template_directive_1.FloatingActionButtonTemplateDirective, { static: true }),
766
- tslib_1.__metadata("design:type", fab_template_directive_1.FloatingActionButtonTemplateDirective)
767
- ], FloatingActionButtonComponent.prototype, "fabTemplate", void 0);
768
- tslib_1.__decorate([
769
- core_1.Input(),
770
- tslib_1.__metadata("design:type", String),
771
- tslib_1.__metadata("design:paramtypes", [String])
772
- ], FloatingActionButtonComponent.prototype, "themeColor", null);
773
- tslib_1.__decorate([
774
- core_1.Input(),
775
- tslib_1.__metadata("design:type", String),
776
- tslib_1.__metadata("design:paramtypes", [String])
777
- ], FloatingActionButtonComponent.prototype, "size", null);
778
- tslib_1.__decorate([
779
- core_1.Input(),
780
- tslib_1.__metadata("design:type", String),
781
- tslib_1.__metadata("design:paramtypes", [String])
782
- ], FloatingActionButtonComponent.prototype, "shape", null);
783
- tslib_1.__decorate([
784
- core_1.Input(),
785
- tslib_1.__metadata("design:type", Boolean),
786
- tslib_1.__metadata("design:paramtypes", [Boolean])
787
- ], FloatingActionButtonComponent.prototype, "disabled", null);
788
- tslib_1.__decorate([
789
- core_1.Input(),
790
- tslib_1.__metadata("design:type", Object),
791
- tslib_1.__metadata("design:paramtypes", [Object])
792
- ], FloatingActionButtonComponent.prototype, "align", null);
793
- tslib_1.__decorate([
794
- core_1.Input(),
795
- tslib_1.__metadata("design:type", Object),
796
- tslib_1.__metadata("design:paramtypes", [Object])
797
- ], FloatingActionButtonComponent.prototype, "offset", null);
798
- tslib_1.__decorate([
799
- core_1.Input(),
800
- tslib_1.__metadata("design:type", String)
801
- ], FloatingActionButtonComponent.prototype, "positionMode", void 0);
802
- tslib_1.__decorate([
803
- core_1.Input(),
804
- tslib_1.__metadata("design:type", String)
805
- ], FloatingActionButtonComponent.prototype, "icon", void 0);
806
- tslib_1.__decorate([
807
- core_1.Input(),
808
- tslib_1.__metadata("design:type", String)
809
- ], FloatingActionButtonComponent.prototype, "iconClass", void 0);
810
- tslib_1.__decorate([
811
- core_1.Input(),
812
- tslib_1.__metadata("design:type", Object)
813
- ], FloatingActionButtonComponent.prototype, "buttonClass", void 0);
814
- tslib_1.__decorate([
815
- core_1.Input(),
816
- tslib_1.__metadata("design:type", Object)
817
- ], FloatingActionButtonComponent.prototype, "dialClass", void 0);
818
- tslib_1.__decorate([
819
- core_1.Input(),
820
- tslib_1.__metadata("design:type", String)
821
- ], FloatingActionButtonComponent.prototype, "text", void 0);
822
- tslib_1.__decorate([
823
- core_1.Input(),
824
- tslib_1.__metadata("design:type", Object)
825
- ], FloatingActionButtonComponent.prototype, "dialItemAnimation", void 0);
826
- tslib_1.__decorate([
827
- core_1.Input(),
828
- tslib_1.__metadata("design:type", Number)
829
- ], FloatingActionButtonComponent.prototype, "tabIndex", void 0);
830
- tslib_1.__decorate([
831
- core_1.Input(),
832
- tslib_1.__metadata("design:type", Array)
833
- ], FloatingActionButtonComponent.prototype, "dialItems", void 0);
834
- tslib_1.__decorate([
835
- core_1.Output('blur'),
836
- tslib_1.__metadata("design:type", core_1.EventEmitter)
837
- ], FloatingActionButtonComponent.prototype, "onBlur", void 0);
838
- tslib_1.__decorate([
839
- core_1.Output('focus'),
840
- tslib_1.__metadata("design:type", core_1.EventEmitter)
841
- ], FloatingActionButtonComponent.prototype, "onFocus", void 0);
842
- tslib_1.__decorate([
843
- core_1.Output('dialItemClick'),
844
- tslib_1.__metadata("design:type", core_1.EventEmitter)
845
- ], FloatingActionButtonComponent.prototype, "dialItemClick", void 0);
846
- tslib_1.__decorate([
847
- core_1.Output(),
848
- tslib_1.__metadata("design:type", core_1.EventEmitter)
849
- ], FloatingActionButtonComponent.prototype, "open", void 0);
850
- tslib_1.__decorate([
851
- core_1.Output(),
852
- tslib_1.__metadata("design:type", core_1.EventEmitter)
853
- ], FloatingActionButtonComponent.prototype, "close", void 0);
854
- FloatingActionButtonComponent = tslib_1.__decorate([
855
- core_1.Component({
856
- selector: 'kendo-floatingactionbutton',
857
- providers: [
858
- focus_service_1.FocusService,
859
- navigation_service_1.NavigationService,
860
- NAVIGATION_SETTINGS_PROVIDER,
861
- kendo_angular_l10n_1.LocalizationService,
862
- {
863
- provide: kendo_angular_l10n_1.L10N_PREFIX,
864
- useValue: 'kendo.floatingactionbutton'
865
- }
866
- ],
867
- template: "\n <button\n #button\n [attr.id]=\"id\"\n [attr.role]=\"role\"\n [tabIndex]=\"componentTabIndex\"\n type=\"button\"\n [class.k-fab]=\"true\"\n [class.k-state-disabled]=\"disabled\"\n [ngClass]=\"buttonClass\"\n [disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-haspopup]=\"ariaHasPopup\"\n (focus)=\"focusHandler()\"\n (blur)=\"blurHandler()\"\n [kendoEventsOutsideAngular]=\"{\n keydown: keyDownHandler,\n click: clickHandler\n }\"\n [scope]=\"this\"\n >\n <ng-template *ngIf=\"fabTemplate\"\n [ngTemplateOutlet]=\"fabTemplate?.templateRef\"\n >\n </ng-template>\n\n <ng-container *ngIf=\"!fabTemplate\">\n <span *ngIf=\"icon || iconClass\" [ngClass]=\"iconClasses\"></span>\n <span *ngIf=\"text\" class=\"k-fab-text\">{{ text }}</span>\n </ng-container>\n </button>\n\n <ng-template #popupTemplate>\n <ul\n kendoDialList\n [ngClass]=\"dialClass\"\n [dialItems]=\"dialItems\"\n [dialItemTemplate]='dialItemTemplate?.templateRef'\n [align]=\"align\"\n [attr.aria-labelledby]=\"id\"\n (click)=\"onItemClick($event)\"\n >\n </ul>\n </ng-template>\n "
868
- }),
869
- tslib_1.__metadata("design:paramtypes", [core_1.Renderer2,
870
- core_1.ElementRef,
871
- focus_service_1.FocusService,
872
- navigation_service_1.NavigationService,
873
- core_1.NgZone,
874
- kendo_angular_popup_1.PopupService,
875
- animations_1.AnimationBuilder,
876
- kendo_angular_l10n_1.LocalizationService])
877
- ], FloatingActionButtonComponent);
878
- return FloatingActionButtonComponent;
879
- }());
880
- exports.FloatingActionButtonComponent = FloatingActionButtonComponent;