@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,402 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { ButtonDirective } from '../button/button.directive';
7
- import { Component, EventEmitter, Output, Input, ContentChildren, QueryList, HostBinding, HostListener, isDevMode, ElementRef } from '@angular/core';
8
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
- import { isChanged, Keys } from '@progress/kendo-angular-common';
10
- import { KendoButtonService } from '../button/button.service';
11
- import { isPresent } from '../util';
12
- import { PreventableEvent } from '../preventable-event';
13
- /**
14
- * @hidden
15
- */
16
- var tabindex = 'tabindex';
17
- /**
18
- * Represents the Kendo UI ButtonGroup component for Angular.
19
- */
20
- var ButtonGroupComponent = /** @class */ (function () {
21
- function ButtonGroupComponent(service, localization, element) {
22
- var _this = this;
23
- this.service = service;
24
- this.element = element;
25
- /**
26
- * By default, the selection mode of the ButtonGroup is set to `multiple`.
27
- */
28
- this.selection = 'multiple';
29
- /**
30
- * Changes the visual appearance by using alternative styling options
31
- * ([more information and examples]({% slug styling_buttongroup %})).
32
- * The `look` property of the ButtonGroup takes precedence over the `look` property
33
- * of the individual buttons that are part of the group.
34
- *
35
- * The available values are:
36
- * * `flat`
37
- * * `outline`
38
- */
39
- this.look = 'default';
40
- /**
41
- * Fires every time keyboard navigation occurs.
42
- */
43
- this.navigate = new EventEmitter();
44
- this._tabIndex = 0;
45
- this.currentTabIndex = 0;
46
- this.localizationChangeSubscription = localization.changes.subscribe(function (_a) {
47
- var rtl = _a.rtl;
48
- return _this.direction = rtl ? 'rtl' : 'ltr';
49
- });
50
- }
51
- Object.defineProperty(ButtonGroupComponent.prototype, "tabIndex", {
52
- get: function () {
53
- return this._tabIndex;
54
- },
55
- /**
56
- * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
57
- */
58
- set: function (value) {
59
- this._tabIndex = value;
60
- this.currentTabIndex = value;
61
- },
62
- enumerable: true,
63
- configurable: true
64
- });
65
- Object.defineProperty(ButtonGroupComponent.prototype, "wrapperClass", {
66
- get: function () {
67
- return true;
68
- },
69
- enumerable: true,
70
- configurable: true
71
- });
72
- Object.defineProperty(ButtonGroupComponent.prototype, "disabledClass", {
73
- get: function () {
74
- return this.disabled;
75
- },
76
- enumerable: true,
77
- configurable: true
78
- });
79
- Object.defineProperty(ButtonGroupComponent.prototype, "stretchedClass", {
80
- get: function () {
81
- return !!this.width;
82
- },
83
- enumerable: true,
84
- configurable: true
85
- });
86
- Object.defineProperty(ButtonGroupComponent.prototype, "isFlat", {
87
- get: function () {
88
- return this.look === 'flat';
89
- },
90
- enumerable: true,
91
- configurable: true
92
- });
93
- Object.defineProperty(ButtonGroupComponent.prototype, "isBare", {
94
- get: function () {
95
- return this.look === 'bare';
96
- },
97
- enumerable: true,
98
- configurable: true
99
- });
100
- Object.defineProperty(ButtonGroupComponent.prototype, "isOutline", {
101
- get: function () {
102
- return this.look === 'outline';
103
- },
104
- enumerable: true,
105
- configurable: true
106
- });
107
- Object.defineProperty(ButtonGroupComponent.prototype, "getRole", {
108
- get: function () {
109
- return this.isSelectionSingle() ? 'radiogroup' : 'group';
110
- },
111
- enumerable: true,
112
- configurable: true
113
- });
114
- Object.defineProperty(ButtonGroupComponent.prototype, "dir", {
115
- get: function () {
116
- return this.direction;
117
- },
118
- enumerable: true,
119
- configurable: true
120
- });
121
- Object.defineProperty(ButtonGroupComponent.prototype, "ariaDisabled", {
122
- get: function () {
123
- return this.disabled;
124
- },
125
- enumerable: true,
126
- configurable: true
127
- });
128
- Object.defineProperty(ButtonGroupComponent.prototype, "wrapperWidth", {
129
- get: function () {
130
- return this.width;
131
- },
132
- enumerable: true,
133
- configurable: true
134
- });
135
- Object.defineProperty(ButtonGroupComponent.prototype, "wrapperTabIndex", {
136
- get: function () {
137
- return this.disabled ? undefined : this.currentTabIndex;
138
- },
139
- enumerable: true,
140
- configurable: true
141
- });
142
- /**
143
- * @hidden
144
- */
145
- ButtonGroupComponent.prototype.keydown = function (event) {
146
- if (!this.disabled) {
147
- this.navigateFocus(event);
148
- }
149
- };
150
- /**
151
- * @hidden
152
- */
153
- ButtonGroupComponent.prototype.onFocus = function () {
154
- this.currentTabIndex = -1;
155
- var focusedIndex = this.buttons.toArray().findIndex(function (current) { return current.element.tabIndex !== -1; });
156
- var index = focusedIndex === -1 ? 0 : focusedIndex;
157
- this.focus(this.buttons.filter(function (_current, i) {
158
- return i === index;
159
- }));
160
- };
161
- /**
162
- * @hidden
163
- */
164
- ButtonGroupComponent.prototype.focusout = function (event) {
165
- if (event.relatedTarget && event.relatedTarget.parentNode !== this.element.nativeElement) {
166
- this.defocus(this.buttons.toArray());
167
- this.currentTabIndex = this.tabIndex;
168
- }
169
- };
170
- ButtonGroupComponent.prototype.ngOnInit = function () {
171
- var _this = this;
172
- this.service.setButtonLook(this.look);
173
- this.subscription = this.service.buttonClicked$.subscribe(function (button) {
174
- var newSelectionValue;
175
- if (_this.isSelectionSingle()) {
176
- newSelectionValue = true;
177
- _this.deactivate(_this.buttons.filter(function (current) { return current !== button; }));
178
- }
179
- else {
180
- _this.defocus(_this.buttons.toArray());
181
- newSelectionValue = !button.selected;
182
- }
183
- if (button.togglable) {
184
- button.setSelected(newSelectionValue);
185
- }
186
- button.setAttribute(tabindex, "0");
187
- });
188
- };
189
- ButtonGroupComponent.prototype.ngOnChanges = function (change) {
190
- var _this = this;
191
- if (isChanged('disabled', change)) {
192
- this.buttons.forEach(function (button) {
193
- if (isPresent(_this.disabled)) {
194
- button.disabled = _this.disabled;
195
- }
196
- });
197
- }
198
- };
199
- ButtonGroupComponent.prototype.ngAfterContentInit = function () {
200
- this.buttons.forEach(function (button) {
201
- if (button.selected) {
202
- button.setAttribute(tabindex, "0");
203
- }
204
- else {
205
- button.setAttribute(tabindex, "-1");
206
- }
207
- });
208
- };
209
- ButtonGroupComponent.prototype.ngAfterViewChecked = function () {
210
- if (this.buttons.length) {
211
- this.buttons.first.renderer.addClass(this.buttons.first.element, 'k-group-start');
212
- this.buttons.last.renderer.addClass(this.buttons.last.element, 'k-group-end');
213
- }
214
- };
215
- ButtonGroupComponent.prototype.ngOnDestroy = function () {
216
- this.subscription.unsubscribe();
217
- this.localizationChangeSubscription.unsubscribe();
218
- };
219
- ButtonGroupComponent.prototype.ngAfterContentChecked = function () {
220
- this.verifySettings();
221
- };
222
- ButtonGroupComponent.prototype.navigateFocus = function (event) {
223
- var focusedIndex = this.buttons.toArray().findIndex(function (current) { return current.element.tabIndex !== -1; });
224
- var firstIndex = 0;
225
- var lastIndex = this.buttons.length - 1;
226
- var eventArgs = new PreventableEvent();
227
- if (event.keyCode === Keys.ArrowRight && focusedIndex < lastIndex) {
228
- this.navigate.emit(eventArgs);
229
- if (!eventArgs.isDefaultPrevented()) {
230
- this.defocus(this.buttons.toArray());
231
- this.focus(this.buttons.filter(function (_current, index) {
232
- return index === focusedIndex + 1;
233
- }));
234
- }
235
- }
236
- if (event.keyCode === Keys.ArrowLeft && focusedIndex > firstIndex) {
237
- this.navigate.emit(eventArgs);
238
- if (!eventArgs.isDefaultPrevented()) {
239
- this.defocus(this.buttons.toArray());
240
- this.focus(this.buttons.filter(function (_current, index) {
241
- return index === focusedIndex - 1;
242
- }));
243
- }
244
- }
245
- };
246
- ButtonGroupComponent.prototype.deactivate = function (buttons) {
247
- buttons.forEach(function (button) {
248
- button.setSelected(false);
249
- button.setAttribute(tabindex, "-1");
250
- });
251
- };
252
- ButtonGroupComponent.prototype.activate = function (buttons) {
253
- buttons.forEach(function (button) {
254
- button.setSelected(true);
255
- button.setAttribute(tabindex, "0");
256
- button.focus();
257
- });
258
- };
259
- ButtonGroupComponent.prototype.defocus = function (buttons) {
260
- buttons.forEach(function (button) {
261
- button.setAttribute(tabindex, "-1");
262
- });
263
- };
264
- ButtonGroupComponent.prototype.focus = function (buttons) {
265
- buttons.forEach(function (button) {
266
- button.setAttribute(tabindex, "0");
267
- button.focus();
268
- });
269
- };
270
- ButtonGroupComponent.prototype.verifySettings = function () {
271
- if (isDevMode()) {
272
- if (this.isSelectionSingle() && this.buttons.filter(function (button) { return button.selected; }).length > 1) {
273
- throw new Error('Having multiple selected buttons with single selection mode is not supported');
274
- }
275
- }
276
- };
277
- ButtonGroupComponent.prototype.isSelectionSingle = function () {
278
- return this.selection === 'single';
279
- };
280
- tslib_1.__decorate([
281
- Input('disabled'),
282
- tslib_1.__metadata("design:type", Boolean)
283
- ], ButtonGroupComponent.prototype, "disabled", void 0);
284
- tslib_1.__decorate([
285
- Input('selection'),
286
- tslib_1.__metadata("design:type", String)
287
- ], ButtonGroupComponent.prototype, "selection", void 0);
288
- tslib_1.__decorate([
289
- Input('width'),
290
- tslib_1.__metadata("design:type", String)
291
- ], ButtonGroupComponent.prototype, "width", void 0);
292
- tslib_1.__decorate([
293
- Input(),
294
- tslib_1.__metadata("design:type", String)
295
- ], ButtonGroupComponent.prototype, "look", void 0);
296
- tslib_1.__decorate([
297
- Input(),
298
- tslib_1.__metadata("design:type", Number),
299
- tslib_1.__metadata("design:paramtypes", [Number])
300
- ], ButtonGroupComponent.prototype, "tabIndex", null);
301
- tslib_1.__decorate([
302
- Output(),
303
- tslib_1.__metadata("design:type", EventEmitter)
304
- ], ButtonGroupComponent.prototype, "navigate", void 0);
305
- tslib_1.__decorate([
306
- ContentChildren(ButtonDirective),
307
- tslib_1.__metadata("design:type", QueryList)
308
- ], ButtonGroupComponent.prototype, "buttons", void 0);
309
- tslib_1.__decorate([
310
- HostBinding('class.k-button-group'),
311
- tslib_1.__metadata("design:type", Boolean),
312
- tslib_1.__metadata("design:paramtypes", [])
313
- ], ButtonGroupComponent.prototype, "wrapperClass", null);
314
- tslib_1.__decorate([
315
- HostBinding('class.k-state-disabled'),
316
- tslib_1.__metadata("design:type", Boolean),
317
- tslib_1.__metadata("design:paramtypes", [])
318
- ], ButtonGroupComponent.prototype, "disabledClass", null);
319
- tslib_1.__decorate([
320
- HostBinding('class.k-button-group-stretched'),
321
- tslib_1.__metadata("design:type", Boolean),
322
- tslib_1.__metadata("design:paramtypes", [])
323
- ], ButtonGroupComponent.prototype, "stretchedClass", null);
324
- tslib_1.__decorate([
325
- HostBinding('class.k-button-group-flat'),
326
- tslib_1.__metadata("design:type", Boolean),
327
- tslib_1.__metadata("design:paramtypes", [])
328
- ], ButtonGroupComponent.prototype, "isFlat", null);
329
- tslib_1.__decorate([
330
- HostBinding('class.k-button-group-bare'),
331
- tslib_1.__metadata("design:type", Boolean),
332
- tslib_1.__metadata("design:paramtypes", [])
333
- ], ButtonGroupComponent.prototype, "isBare", null);
334
- tslib_1.__decorate([
335
- HostBinding('class.k-button-group-outline'),
336
- tslib_1.__metadata("design:type", Boolean),
337
- tslib_1.__metadata("design:paramtypes", [])
338
- ], ButtonGroupComponent.prototype, "isOutline", null);
339
- tslib_1.__decorate([
340
- HostBinding('attr.role'),
341
- tslib_1.__metadata("design:type", String),
342
- tslib_1.__metadata("design:paramtypes", [])
343
- ], ButtonGroupComponent.prototype, "getRole", null);
344
- tslib_1.__decorate([
345
- HostBinding('attr.dir'),
346
- tslib_1.__metadata("design:type", String),
347
- tslib_1.__metadata("design:paramtypes", [])
348
- ], ButtonGroupComponent.prototype, "dir", null);
349
- tslib_1.__decorate([
350
- HostBinding('attr.aria-disabled'),
351
- tslib_1.__metadata("design:type", Boolean),
352
- tslib_1.__metadata("design:paramtypes", [])
353
- ], ButtonGroupComponent.prototype, "ariaDisabled", null);
354
- tslib_1.__decorate([
355
- HostBinding('style.width'),
356
- tslib_1.__metadata("design:type", String),
357
- tslib_1.__metadata("design:paramtypes", [])
358
- ], ButtonGroupComponent.prototype, "wrapperWidth", null);
359
- tslib_1.__decorate([
360
- HostBinding('attr.tabindex'),
361
- tslib_1.__metadata("design:type", Number),
362
- tslib_1.__metadata("design:paramtypes", [])
363
- ], ButtonGroupComponent.prototype, "wrapperTabIndex", null);
364
- tslib_1.__decorate([
365
- HostListener('keydown', ['$event']),
366
- tslib_1.__metadata("design:type", Function),
367
- tslib_1.__metadata("design:paramtypes", [Object]),
368
- tslib_1.__metadata("design:returntype", void 0)
369
- ], ButtonGroupComponent.prototype, "keydown", null);
370
- tslib_1.__decorate([
371
- HostListener('focus'),
372
- tslib_1.__metadata("design:type", Function),
373
- tslib_1.__metadata("design:paramtypes", []),
374
- tslib_1.__metadata("design:returntype", void 0)
375
- ], ButtonGroupComponent.prototype, "onFocus", null);
376
- tslib_1.__decorate([
377
- HostListener('focusout', ['$event']),
378
- tslib_1.__metadata("design:type", Function),
379
- tslib_1.__metadata("design:paramtypes", [Object]),
380
- tslib_1.__metadata("design:returntype", void 0)
381
- ], ButtonGroupComponent.prototype, "focusout", null);
382
- ButtonGroupComponent = tslib_1.__decorate([
383
- Component({
384
- exportAs: 'kendoButtonGroup',
385
- providers: [
386
- KendoButtonService,
387
- LocalizationService,
388
- {
389
- provide: L10N_PREFIX,
390
- useValue: 'kendo.buttongroup'
391
- }
392
- ],
393
- selector: 'kendo-buttongroup',
394
- template: "\n <ng-content select=\"[kendoButton]\"></ng-content>\n "
395
- }),
396
- tslib_1.__metadata("design:paramtypes", [KendoButtonService,
397
- LocalizationService,
398
- ElementRef])
399
- ], ButtonGroupComponent);
400
- return ButtonGroupComponent;
401
- }());
402
- export { ButtonGroupComponent };
@@ -1,30 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { NgModule } from '@angular/core';
7
- import { CommonModule } from '@angular/common';
8
- import { ButtonModule } from '../button/button.module';
9
- import { ButtonGroupComponent } from './buttongroup.component';
10
- /**
11
- * @hidden
12
- *
13
- * The exported package module.
14
- *
15
- * The package exports:
16
- * - `ButtonGroupComponent`&mdash;The ButtonGroupComponent component class.
17
- */
18
- var ButtonGroupModule = /** @class */ (function () {
19
- function ButtonGroupModule() {
20
- }
21
- ButtonGroupModule = tslib_1.__decorate([
22
- NgModule({
23
- declarations: [ButtonGroupComponent],
24
- exports: [ButtonGroupComponent],
25
- imports: [CommonModule, ButtonModule]
26
- })
27
- ], ButtonGroupModule);
28
- return ButtonGroupModule;
29
- }());
30
- export { ButtonGroupModule };
@@ -1,4 +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
- *-------------------------------------------------------------------------------------------*/
@@ -1,4 +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
- *-------------------------------------------------------------------------------------------*/
@@ -1,164 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Component, Input, HostBinding, ContentChildren, QueryList, EventEmitter, Output, HostListener, Renderer2 } from '@angular/core';
7
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
- import { ChipComponent } from './chip.component';
9
- import { closest } from '../util';
10
- var ChipListComponent = /** @class */ (function () {
11
- function ChipListComponent(localizationService, renderer) {
12
- this.localizationService = localizationService;
13
- this.renderer = renderer;
14
- this.hostClass = true;
15
- /**
16
- * Sets the selection mode of the ChipList.
17
- *
18
- * The available values are:
19
- * * `none` (default)
20
- * * `single`
21
- * * `multiple`
22
- */
23
- this.selection = 'none';
24
- /**
25
- * Fires each time when the ChipList selection is changed.
26
- */
27
- this.selectedChange = new EventEmitter();
28
- /**
29
- * Fires each time the user clicks on the remove icon of the Chip.
30
- */
31
- this.remove = new EventEmitter();
32
- this.role = 'listbox';
33
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
34
- }
35
- Object.defineProperty(ChipListComponent.prototype, "single", {
36
- get: function () {
37
- return this.selection === 'single';
38
- },
39
- enumerable: true,
40
- configurable: true
41
- });
42
- Object.defineProperty(ChipListComponent.prototype, "multiple", {
43
- get: function () {
44
- return this.selection === 'multiple';
45
- },
46
- enumerable: true,
47
- configurable: true
48
- });
49
- /**
50
- * @hidden
51
- */
52
- ChipListComponent.prototype.onClick = function ($event) {
53
- var target = $event.target;
54
- var isRemoveClicked = closest(target, '.k-remove-icon');
55
- var clickedChip = closest(target, '.k-chip');
56
- var chip = this.chips.find(function (chip) { return clickedChip === chip.element.nativeElement; });
57
- if (isRemoveClicked && clickedChip) {
58
- var removeEventArgs = { sender: this, originalEvent: $event, removedChip: chip };
59
- this.remove.emit(removeEventArgs);
60
- }
61
- if (this.selection !== 'none' && clickedChip && !isRemoveClicked) {
62
- this.setSelection(chip);
63
- }
64
- };
65
- ChipListComponent.prototype.ngOnInit = function () {
66
- var _this = this;
67
- this.dynamicRTLSubscription = this.localizationService.changes
68
- .subscribe(function (_a) {
69
- var rtl = _a.rtl;
70
- return _this.direction = rtl ? 'rtl' : 'ltr';
71
- });
72
- };
73
- ChipListComponent.prototype.ngAfterContentInit = function () {
74
- var _this = this;
75
- this.chips.forEach(function (chip) {
76
- _this.renderer.setAttribute(chip.element.nativeElement, 'role', 'option');
77
- });
78
- };
79
- ChipListComponent.prototype.ngOnDestroy = function () {
80
- if (this.dynamicRTLSubscription) {
81
- this.dynamicRTLSubscription.unsubscribe();
82
- }
83
- };
84
- ChipListComponent.prototype.selectedChips = function () {
85
- return this.chips.reduce(function (acc, cur, idx) { return cur.selected ? acc.concat(idx) : acc; }, []);
86
- };
87
- /**
88
- * Updates the selection on click of a Chip. Emits events.
89
- */
90
- ChipListComponent.prototype.setSelection = function (chip) {
91
- if (this.selection === 'single') {
92
- this.clearSelection(chip);
93
- }
94
- chip.selected = !chip.selected;
95
- this.selectedChange.emit(this.selectedChips());
96
- };
97
- ChipListComponent.prototype.clearSelection = function (chip) {
98
- this.chips.forEach(function (c) {
99
- if (chip !== c) {
100
- c.selected = false;
101
- }
102
- });
103
- };
104
- tslib_1.__decorate([
105
- HostBinding('class.k-chip-list'),
106
- tslib_1.__metadata("design:type", Boolean)
107
- ], ChipListComponent.prototype, "hostClass", void 0);
108
- tslib_1.__decorate([
109
- HostBinding('attr.dir'),
110
- tslib_1.__metadata("design:type", String)
111
- ], ChipListComponent.prototype, "direction", void 0);
112
- tslib_1.__decorate([
113
- Input(),
114
- tslib_1.__metadata("design:type", String)
115
- ], ChipListComponent.prototype, "selection", void 0);
116
- tslib_1.__decorate([
117
- Output(),
118
- tslib_1.__metadata("design:type", EventEmitter)
119
- ], ChipListComponent.prototype, "selectedChange", void 0);
120
- tslib_1.__decorate([
121
- Output(),
122
- tslib_1.__metadata("design:type", EventEmitter)
123
- ], ChipListComponent.prototype, "remove", void 0);
124
- tslib_1.__decorate([
125
- ContentChildren(ChipComponent),
126
- tslib_1.__metadata("design:type", QueryList)
127
- ], ChipListComponent.prototype, "chips", void 0);
128
- tslib_1.__decorate([
129
- HostBinding('class.k-selection-single'),
130
- tslib_1.__metadata("design:type", Boolean),
131
- tslib_1.__metadata("design:paramtypes", [])
132
- ], ChipListComponent.prototype, "single", null);
133
- tslib_1.__decorate([
134
- HostBinding('class.k-selection-multiple'),
135
- tslib_1.__metadata("design:type", Boolean),
136
- tslib_1.__metadata("design:paramtypes", [])
137
- ], ChipListComponent.prototype, "multiple", null);
138
- tslib_1.__decorate([
139
- HostBinding('attr.role'),
140
- tslib_1.__metadata("design:type", String)
141
- ], ChipListComponent.prototype, "role", void 0);
142
- tslib_1.__decorate([
143
- HostListener('click', ['$event']),
144
- tslib_1.__metadata("design:type", Function),
145
- tslib_1.__metadata("design:paramtypes", [Object]),
146
- tslib_1.__metadata("design:returntype", void 0)
147
- ], ChipListComponent.prototype, "onClick", null);
148
- ChipListComponent = tslib_1.__decorate([
149
- Component({
150
- selector: 'kendo-chip-list, kendo-chiplist',
151
- template: "\n <ng-content></ng-content>\n ",
152
- providers: [
153
- LocalizationService,
154
- {
155
- provide: L10N_PREFIX,
156
- useValue: 'kendo.chip-list'
157
- }
158
- ]
159
- }),
160
- tslib_1.__metadata("design:paramtypes", [LocalizationService, Renderer2])
161
- ], ChipListComponent);
162
- return ChipListComponent;
163
- }());
164
- export { ChipListComponent };