@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,166 +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 core_1 = require("@angular/core");
9
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
10
- var chip_component_1 = require("./chip.component");
11
- var util_1 = require("../util");
12
- var ChipListComponent = /** @class */ (function () {
13
- function ChipListComponent(localizationService, renderer) {
14
- this.localizationService = localizationService;
15
- this.renderer = renderer;
16
- this.hostClass = true;
17
- /**
18
- * Sets the selection mode of the ChipList.
19
- *
20
- * The available values are:
21
- * * `none` (default)
22
- * * `single`
23
- * * `multiple`
24
- */
25
- this.selection = 'none';
26
- /**
27
- * Fires each time when the ChipList selection is changed.
28
- */
29
- this.selectedChange = new core_1.EventEmitter();
30
- /**
31
- * Fires each time the user clicks on the remove icon of the Chip.
32
- */
33
- this.remove = new core_1.EventEmitter();
34
- this.role = 'listbox';
35
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
36
- }
37
- Object.defineProperty(ChipListComponent.prototype, "single", {
38
- get: function () {
39
- return this.selection === 'single';
40
- },
41
- enumerable: true,
42
- configurable: true
43
- });
44
- Object.defineProperty(ChipListComponent.prototype, "multiple", {
45
- get: function () {
46
- return this.selection === 'multiple';
47
- },
48
- enumerable: true,
49
- configurable: true
50
- });
51
- /**
52
- * @hidden
53
- */
54
- ChipListComponent.prototype.onClick = function ($event) {
55
- var target = $event.target;
56
- var isRemoveClicked = util_1.closest(target, '.k-remove-icon');
57
- var clickedChip = util_1.closest(target, '.k-chip');
58
- var chip = this.chips.find(function (chip) { return clickedChip === chip.element.nativeElement; });
59
- if (isRemoveClicked && clickedChip) {
60
- var removeEventArgs = { sender: this, originalEvent: $event, removedChip: chip };
61
- this.remove.emit(removeEventArgs);
62
- }
63
- if (this.selection !== 'none' && clickedChip && !isRemoveClicked) {
64
- this.setSelection(chip);
65
- }
66
- };
67
- ChipListComponent.prototype.ngOnInit = function () {
68
- var _this = this;
69
- this.dynamicRTLSubscription = this.localizationService.changes
70
- .subscribe(function (_a) {
71
- var rtl = _a.rtl;
72
- return _this.direction = rtl ? 'rtl' : 'ltr';
73
- });
74
- };
75
- ChipListComponent.prototype.ngAfterContentInit = function () {
76
- var _this = this;
77
- this.chips.forEach(function (chip) {
78
- _this.renderer.setAttribute(chip.element.nativeElement, 'role', 'option');
79
- });
80
- };
81
- ChipListComponent.prototype.ngOnDestroy = function () {
82
- if (this.dynamicRTLSubscription) {
83
- this.dynamicRTLSubscription.unsubscribe();
84
- }
85
- };
86
- ChipListComponent.prototype.selectedChips = function () {
87
- return this.chips.reduce(function (acc, cur, idx) { return cur.selected ? acc.concat(idx) : acc; }, []);
88
- };
89
- /**
90
- * Updates the selection on click of a Chip. Emits events.
91
- */
92
- ChipListComponent.prototype.setSelection = function (chip) {
93
- if (this.selection === 'single') {
94
- this.clearSelection(chip);
95
- }
96
- chip.selected = !chip.selected;
97
- this.selectedChange.emit(this.selectedChips());
98
- };
99
- ChipListComponent.prototype.clearSelection = function (chip) {
100
- this.chips.forEach(function (c) {
101
- if (chip !== c) {
102
- c.selected = false;
103
- }
104
- });
105
- };
106
- tslib_1.__decorate([
107
- core_1.HostBinding('class.k-chip-list'),
108
- tslib_1.__metadata("design:type", Boolean)
109
- ], ChipListComponent.prototype, "hostClass", void 0);
110
- tslib_1.__decorate([
111
- core_1.HostBinding('attr.dir'),
112
- tslib_1.__metadata("design:type", String)
113
- ], ChipListComponent.prototype, "direction", void 0);
114
- tslib_1.__decorate([
115
- core_1.Input(),
116
- tslib_1.__metadata("design:type", String)
117
- ], ChipListComponent.prototype, "selection", void 0);
118
- tslib_1.__decorate([
119
- core_1.Output(),
120
- tslib_1.__metadata("design:type", core_1.EventEmitter)
121
- ], ChipListComponent.prototype, "selectedChange", void 0);
122
- tslib_1.__decorate([
123
- core_1.Output(),
124
- tslib_1.__metadata("design:type", core_1.EventEmitter)
125
- ], ChipListComponent.prototype, "remove", void 0);
126
- tslib_1.__decorate([
127
- core_1.ContentChildren(chip_component_1.ChipComponent),
128
- tslib_1.__metadata("design:type", core_1.QueryList)
129
- ], ChipListComponent.prototype, "chips", void 0);
130
- tslib_1.__decorate([
131
- core_1.HostBinding('class.k-selection-single'),
132
- tslib_1.__metadata("design:type", Boolean),
133
- tslib_1.__metadata("design:paramtypes", [])
134
- ], ChipListComponent.prototype, "single", null);
135
- tslib_1.__decorate([
136
- core_1.HostBinding('class.k-selection-multiple'),
137
- tslib_1.__metadata("design:type", Boolean),
138
- tslib_1.__metadata("design:paramtypes", [])
139
- ], ChipListComponent.prototype, "multiple", null);
140
- tslib_1.__decorate([
141
- core_1.HostBinding('attr.role'),
142
- tslib_1.__metadata("design:type", String)
143
- ], ChipListComponent.prototype, "role", void 0);
144
- tslib_1.__decorate([
145
- core_1.HostListener('click', ['$event']),
146
- tslib_1.__metadata("design:type", Function),
147
- tslib_1.__metadata("design:paramtypes", [Object]),
148
- tslib_1.__metadata("design:returntype", void 0)
149
- ], ChipListComponent.prototype, "onClick", null);
150
- ChipListComponent = tslib_1.__decorate([
151
- core_1.Component({
152
- selector: 'kendo-chip-list, kendo-chiplist',
153
- template: "\n <ng-content></ng-content>\n ",
154
- providers: [
155
- kendo_angular_l10n_1.LocalizationService,
156
- {
157
- provide: kendo_angular_l10n_1.L10N_PREFIX,
158
- useValue: 'kendo.chip-list'
159
- }
160
- ]
161
- }),
162
- tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService, core_1.Renderer2])
163
- ], ChipListComponent);
164
- return ChipListComponent;
165
- }());
166
- exports.ChipListComponent = ChipListComponent;
@@ -1,6 +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 });
@@ -1,362 +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 core_1 = require("@angular/core");
9
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
10
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
11
- var kendo_licensing_1 = require("@progress/kendo-licensing");
12
- var package_metadata_1 = require("../package-metadata");
13
- var util_1 = require("../util");
14
- /**
15
- * Displays a Chip that represents an input, attribute or an action.
16
- */
17
- var ChipComponent = /** @class */ (function () {
18
- function ChipComponent(element, renderer, ngZone, localizationService) {
19
- this.element = element;
20
- this.renderer = renderer;
21
- this.ngZone = ngZone;
22
- this.localizationService = localizationService;
23
- /**
24
- * Changes the visual appearance by using alternative styling options.
25
- *
26
- * The available values are:
27
- * * `solid`
28
- * * `outline`
29
- * * `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
30
- * * `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
31
- */
32
- this.look = 'solid';
33
- /**
34
- * Specifies the selected state of the Chip.
35
- */
36
- this.selected = false;
37
- /**
38
- * Specifies if the Chip will be removable or not.
39
- * If the property is set to `true`, the Chip renders a remove icon.
40
- */
41
- this.removable = false;
42
- /**
43
- * Specifies the Chip type.
44
- *
45
- * The possible values are:
46
- * - `none` (default)
47
- * - `success`
48
- * - `error`
49
- * - `warning`
50
- * - `info`
51
- */
52
- this.type = 'none';
53
- /**
54
- * If set to `true`, the Chip will be disabled.
55
- */
56
- this.disabled = false;
57
- /**
58
- * Fires each time the user clicks the remove icon of the Chip.
59
- */
60
- this.remove = new core_1.EventEmitter();
61
- /**
62
- * Fires each time the user clicks the content of the Chip.
63
- */
64
- this.contentClick = new core_1.EventEmitter();
65
- this.tabIndex = 0;
66
- this.hostClass = true;
67
- this.focused = false;
68
- kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
69
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
70
- }
71
- Object.defineProperty(ChipComponent.prototype, "ariaChecked", {
72
- get: function () {
73
- return this.selected;
74
- },
75
- enumerable: true,
76
- configurable: true
77
- });
78
- Object.defineProperty(ChipComponent.prototype, "outlineClass", {
79
- get: function () {
80
- return this.look === 'outline' || this.look === 'outlined';
81
- },
82
- enumerable: true,
83
- configurable: true
84
- });
85
- Object.defineProperty(ChipComponent.prototype, "solidClass", {
86
- get: function () {
87
- return this.look === 'solid' || this.look === 'filled';
88
- },
89
- enumerable: true,
90
- configurable: true
91
- });
92
- Object.defineProperty(ChipComponent.prototype, "hasIconClass", {
93
- get: function () {
94
- return this.icon || this.iconClass ? true : false;
95
- },
96
- enumerable: true,
97
- configurable: true
98
- });
99
- Object.defineProperty(ChipComponent.prototype, "disabledClass", {
100
- get: function () {
101
- return this.disabled;
102
- },
103
- enumerable: true,
104
- configurable: true
105
- });
106
- Object.defineProperty(ChipComponent.prototype, "selectedClass", {
107
- get: function () {
108
- return this.selected;
109
- },
110
- enumerable: true,
111
- configurable: true
112
- });
113
- Object.defineProperty(ChipComponent.prototype, "focusedClass", {
114
- get: function () {
115
- return this.focused;
116
- },
117
- enumerable: true,
118
- configurable: true
119
- });
120
- ChipComponent.prototype.ngOnInit = function () {
121
- var _this = this;
122
- this.dynamicRTLSubscription = this.localizationService.changes
123
- .subscribe(function (_a) {
124
- var rtl = _a.rtl;
125
- return _this.direction = rtl ? 'rtl' : 'ltr';
126
- });
127
- };
128
- ChipComponent.prototype.ngOnDestroy = function () {
129
- if (this.dynamicRTLSubscription) {
130
- this.dynamicRTLSubscription.unsubscribe();
131
- }
132
- if (this.detachDomEvents) {
133
- this.detachDomEvents();
134
- }
135
- };
136
- ChipComponent.prototype.ngAfterViewInit = function () {
137
- var chip = this.element.nativeElement;
138
- var typeClass = this.typeClass();
139
- if (this.type !== 'none') {
140
- this.renderer.addClass(chip, typeClass);
141
- }
142
- this.attachElementEventHandlers(chip);
143
- };
144
- Object.defineProperty(ChipComponent.prototype, "iconClasses", {
145
- /**
146
- * @hidden
147
- */
148
- get: function () {
149
- var classes = [];
150
- if (this.iconClass) {
151
- classes.push("" + this.iconClass);
152
- }
153
- if (this.icon) {
154
- classes.push("k-icon k-i-" + this.icon);
155
- }
156
- return classes;
157
- },
158
- enumerable: true,
159
- configurable: true
160
- });
161
- Object.defineProperty(ChipComponent.prototype, "selectedIconClasses", {
162
- /**
163
- * @hidden
164
- */
165
- get: function () {
166
- if (this.selectedIcon) {
167
- return "" + this.selectedIcon;
168
- }
169
- return "k-icon k-i-check";
170
- },
171
- enumerable: true,
172
- configurable: true
173
- });
174
- Object.defineProperty(ChipComponent.prototype, "removeIconClasses", {
175
- /**
176
- * @hidden
177
- */
178
- get: function () {
179
- if (this.removeIcon) {
180
- return "" + this.removeIcon;
181
- }
182
- return "k-icon k-i-close-circle";
183
- },
184
- enumerable: true,
185
- configurable: true
186
- });
187
- /**
188
- * @hidden
189
- */
190
- ChipComponent.prototype.typeClass = function () {
191
- return {
192
- 'none': '',
193
- 'success': 'k-chip-success',
194
- 'warning': 'k-chip-warning',
195
- 'error': 'k-chip-error',
196
- 'info': 'k-chip-info'
197
- }[this.type];
198
- };
199
- /**
200
- * Focuses the Chip component.
201
- */
202
- ChipComponent.prototype.focus = function () {
203
- if (kendo_angular_common_1.isDocumentAvailable()) {
204
- this.element.nativeElement.focus();
205
- }
206
- };
207
- /**
208
- * Blurs the Chip component.
209
- */
210
- ChipComponent.prototype.blur = function () {
211
- if (kendo_angular_common_1.isDocumentAvailable()) {
212
- this.element.nativeElement.blur();
213
- }
214
- };
215
- /**
216
- * @hidden
217
- */
218
- ChipComponent.prototype.onRemoveClick = function (e) {
219
- if (this.removable) {
220
- this.remove.emit({ sender: this, originalEvent: e });
221
- }
222
- };
223
- ChipComponent.prototype.attachElementEventHandlers = function (chip) {
224
- var _this = this;
225
- this.ngZone.runOutsideAngular(function () {
226
- var focusListener = _this.renderer.listen(chip, 'focus', function () {
227
- _this.renderer.addClass(chip, 'k-focus');
228
- });
229
- var blurListener = _this.renderer.listen(chip, 'blur', function () {
230
- _this.renderer.removeClass(chip, 'k-focus');
231
- });
232
- var contentClickListener = _this.renderer.listen(chip, 'click', function (e) {
233
- var isRemoveClicked = util_1.closest(e.target, '.k-remove-icon');
234
- if (!isRemoveClicked) {
235
- _this.ngZone.run(function () {
236
- _this.contentClick.emit({ sender: _this, originalEvent: e });
237
- });
238
- }
239
- });
240
- _this.detachDomEvents = function () {
241
- focusListener();
242
- blurListener();
243
- contentClickListener();
244
- };
245
- });
246
- };
247
- tslib_1.__decorate([
248
- core_1.Input(),
249
- tslib_1.__metadata("design:type", String)
250
- ], ChipComponent.prototype, "look", void 0);
251
- tslib_1.__decorate([
252
- core_1.Input(),
253
- tslib_1.__metadata("design:type", String)
254
- ], ChipComponent.prototype, "label", void 0);
255
- tslib_1.__decorate([
256
- core_1.Input(),
257
- tslib_1.__metadata("design:type", String)
258
- ], ChipComponent.prototype, "icon", void 0);
259
- tslib_1.__decorate([
260
- core_1.Input(),
261
- tslib_1.__metadata("design:type", String)
262
- ], ChipComponent.prototype, "iconClass", void 0);
263
- tslib_1.__decorate([
264
- core_1.Input(),
265
- tslib_1.__metadata("design:type", Boolean)
266
- ], ChipComponent.prototype, "selected", void 0);
267
- tslib_1.__decorate([
268
- core_1.Input(),
269
- tslib_1.__metadata("design:type", String)
270
- ], ChipComponent.prototype, "selectedIcon", void 0);
271
- tslib_1.__decorate([
272
- core_1.Input(),
273
- tslib_1.__metadata("design:type", Boolean)
274
- ], ChipComponent.prototype, "removable", void 0);
275
- tslib_1.__decorate([
276
- core_1.Input(),
277
- tslib_1.__metadata("design:type", String)
278
- ], ChipComponent.prototype, "removeIcon", void 0);
279
- tslib_1.__decorate([
280
- core_1.Input(),
281
- tslib_1.__metadata("design:type", String)
282
- ], ChipComponent.prototype, "type", void 0);
283
- tslib_1.__decorate([
284
- core_1.Input(),
285
- tslib_1.__metadata("design:type", Boolean)
286
- ], ChipComponent.prototype, "disabled", void 0);
287
- tslib_1.__decorate([
288
- core_1.Output(),
289
- tslib_1.__metadata("design:type", core_1.EventEmitter)
290
- ], ChipComponent.prototype, "remove", void 0);
291
- tslib_1.__decorate([
292
- core_1.Output(),
293
- tslib_1.__metadata("design:type", core_1.EventEmitter)
294
- ], ChipComponent.prototype, "contentClick", void 0);
295
- tslib_1.__decorate([
296
- core_1.HostBinding('attr.tabindex'),
297
- tslib_1.__metadata("design:type", Number)
298
- ], ChipComponent.prototype, "tabIndex", void 0);
299
- tslib_1.__decorate([
300
- core_1.HostBinding('attr.aria-checked'),
301
- tslib_1.__metadata("design:type", Boolean),
302
- tslib_1.__metadata("design:paramtypes", [])
303
- ], ChipComponent.prototype, "ariaChecked", null);
304
- tslib_1.__decorate([
305
- core_1.HostBinding('class.k-chip'),
306
- tslib_1.__metadata("design:type", Boolean)
307
- ], ChipComponent.prototype, "hostClass", void 0);
308
- tslib_1.__decorate([
309
- core_1.HostBinding('class.k-chip-outline'),
310
- tslib_1.__metadata("design:type", Boolean),
311
- tslib_1.__metadata("design:paramtypes", [])
312
- ], ChipComponent.prototype, "outlineClass", null);
313
- tslib_1.__decorate([
314
- core_1.HostBinding('class.k-chip-solid'),
315
- tslib_1.__metadata("design:type", Boolean),
316
- tslib_1.__metadata("design:paramtypes", [])
317
- ], ChipComponent.prototype, "solidClass", null);
318
- tslib_1.__decorate([
319
- core_1.HostBinding('class.k-chip-has-icon'),
320
- tslib_1.__metadata("design:type", Boolean),
321
- tslib_1.__metadata("design:paramtypes", [])
322
- ], ChipComponent.prototype, "hasIconClass", null);
323
- tslib_1.__decorate([
324
- core_1.HostBinding('attr.aria-disabled'),
325
- core_1.HostBinding('class.k-disabled'),
326
- tslib_1.__metadata("design:type", Boolean),
327
- tslib_1.__metadata("design:paramtypes", [])
328
- ], ChipComponent.prototype, "disabledClass", null);
329
- tslib_1.__decorate([
330
- core_1.HostBinding('class.k-selected'),
331
- tslib_1.__metadata("design:type", Boolean),
332
- tslib_1.__metadata("design:paramtypes", [])
333
- ], ChipComponent.prototype, "selectedClass", null);
334
- tslib_1.__decorate([
335
- core_1.HostBinding('class.k-focus'),
336
- tslib_1.__metadata("design:type", Boolean),
337
- tslib_1.__metadata("design:paramtypes", [])
338
- ], ChipComponent.prototype, "focusedClass", null);
339
- tslib_1.__decorate([
340
- core_1.HostBinding('attr.dir'),
341
- tslib_1.__metadata("design:type", String)
342
- ], ChipComponent.prototype, "direction", void 0);
343
- ChipComponent = tslib_1.__decorate([
344
- core_1.Component({
345
- selector: 'kendo-chip',
346
- template: "\n <span class=\"k-selected-icon-wrapper\">\n <span *ngIf=\"selected\"\n class=\"k-selected-icon\"\n [ngClass]=\"selectedIconClasses\"\n >\n </span>\n </span>\n\n <span *ngIf=\"icon || iconClass\"\n class=\"k-chip-icon\"\n [ngClass]=\"iconClasses\"\n >\n </span>\n\n <span class=\"k-chip-content\">\n <span class=\"k-chip-label\" *ngIf=\"label\">\n {{ label }}\n </span>\n <ng-content *ngIf=\"!label\"></ng-content>\n </span>\n\n <span *ngIf=\"removable\"\n class=\"k-remove-icon\"\n (click)=\"onRemoveClick($event)\"\n >\n <span [ngClass]=\"removeIconClasses\"></span>\n </span>\n ",
347
- providers: [
348
- kendo_angular_l10n_1.LocalizationService,
349
- {
350
- provide: kendo_angular_l10n_1.L10N_PREFIX,
351
- useValue: 'kendo.chip'
352
- }
353
- ]
354
- }),
355
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
356
- core_1.Renderer2,
357
- core_1.NgZone,
358
- kendo_angular_l10n_1.LocalizationService])
359
- ], ChipComponent);
360
- return ChipComponent;
361
- }());
362
- exports.ChipComponent = ChipComponent;
@@ -1,57 +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 core_1 = require("@angular/core");
9
- var common_1 = require("@angular/common");
10
- var chip_component_1 = require("../chip/chip.component");
11
- var chip_list_component_1 = require("./chip-list.component");
12
- var exportedModules = [
13
- chip_component_1.ChipComponent,
14
- chip_list_component_1.ChipListComponent
15
- ];
16
- var declarations = exportedModules.slice();
17
- /**
18
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
19
- * definition for the Chip and ChipList components.
20
- *
21
- * @example
22
- *
23
- * ```ts-no-run
24
- * // Import the Chip module
25
- * import { ChipModule } from '@progress/kendo-angular-buttons';
26
- *
27
- * // The browser platform with a compiler
28
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
29
- *
30
- * import { NgModule } from '@angular/core';
31
- *
32
- * // Import the app component
33
- * import { AppComponent } from './app.component';
34
- *
35
- * // Define the app module
36
- * _@NgModule({
37
- * declarations: [AppComponent], // declare app component
38
- * imports: [BrowserModule, ChipModule], // import Chip module
39
- * bootstrap: [AppComponent]
40
- * })
41
- * export class AppModule {}
42
- *
43
- * ```
44
- */
45
- var ChipModule = /** @class */ (function () {
46
- function ChipModule() {
47
- }
48
- ChipModule = tslib_1.__decorate([
49
- core_1.NgModule({
50
- declarations: [declarations],
51
- exports: [exportedModules],
52
- imports: [common_1.CommonModule]
53
- })
54
- ], ChipModule);
55
- return ChipModule;
56
- }());
57
- exports.ChipModule = ChipModule;
@@ -1,6 +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 });
@@ -1,6 +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 });
@@ -1,6 +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 });
@@ -1,6 +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 });
@@ -1,6 +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 });
@@ -1,6 +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 });
@@ -1,6 +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 });