@progress/kendo-angular-buttons 7.0.0-next.202111120840 → 7.0.2-dev.202201201235
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.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-buttons.js +20 -0
- package/dist/cdn/main.js +5 -0
- package/dist/es/button/button.directive.js +769 -0
- package/{esm2015 → dist/es}/button/button.module.js +13 -13
- package/dist/es/button/button.service.js +24 -0
- package/{esm2015 → dist/es}/button/selection-settings.js +0 -1
- package/dist/es/buttongroup/buttongroup.component.js +353 -0
- package/dist/es/buttongroup/buttongroup.module.js +30 -0
- package/{esm2015 → dist/es}/buttons.module.js +12 -12
- package/{esm2015 → dist/es}/chip/chip-content-click-event-args.interface.js +0 -1
- package/{esm2015 → dist/es}/chip/chip-list-remove-event-args.interface.js +0 -1
- package/dist/es/chip/chip-list.component.js +214 -0
- package/{esm2015 → dist/es}/chip/chip-remove-event-args.interface.js +0 -1
- package/dist/es/chip/chip.component.js +449 -0
- package/dist/es/chip/chip.module.js +55 -0
- package/{esm2015 → dist/es}/chip/models/selection.js +0 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/{esm2015 → dist/es}/common/models/shape.js +0 -1
- package/{esm2015 → dist/es}/common/models/size.js +0 -1
- package/dist/es/common/models/styling-classes.js +4 -0
- package/{esm2015 → dist/es}/common/models/theme-color.js +0 -1
- package/{esm2015/button-look.js → dist/es/common/models.js} +0 -1
- package/{esm2015 → dist/es}/direction.js +0 -1
- package/dist/es/dropdownbutton/dropdownbutton.component.js +704 -0
- package/dist/es/dropdownbutton/dropdownbutton.module.js +32 -0
- package/dist/es/floatingactionbutton/animations/animations.js +33 -0
- package/dist/es/floatingactionbutton/dial-item.component.js +143 -0
- package/dist/es/floatingactionbutton/dial-list.component.js +76 -0
- package/dist/es/floatingactionbutton/floatingactionbutton.component.js +903 -0
- package/dist/es/floatingactionbutton/floatingactionbutton.module.js +65 -0
- package/{esm2015 → dist/es}/floatingactionbutton/models/align.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/item-animation.interface.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/item-click.event.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/item.interface.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/offset.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/position-mode.js +0 -1
- package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +26 -0
- package/dist/es/floatingactionbutton/templates/fab-template.directive.js +26 -0
- package/dist/es/floatingactionbutton/utils.js +38 -0
- package/dist/es/focusable/focus.service.js +43 -0
- package/dist/es/focusable/focusable.directive.js +68 -0
- package/dist/es/index.js +22 -0
- package/dist/es/listbutton/button-item-template.directive.js +68 -0
- package/dist/es/listbutton/list-button.js +243 -0
- package/{esm2015 → dist/es}/listbutton/list-item-model.js +0 -1
- package/dist/es/listbutton/list.component.js +85 -0
- package/dist/es/listbutton/list.module.js +33 -0
- package/{esm2015 → dist/es}/listbutton/popup-settings.js +0 -1
- package/dist/es/listbutton/template-context.directive.js +40 -0
- package/{esm2015 → dist/es}/main.js +1 -5
- package/{esm2015 → dist/es}/navigation/key-events.js +0 -0
- package/{esm2015 → dist/es}/navigation/navigation-action.js +0 -0
- package/dist/es/navigation/navigation-config.js +9 -0
- package/dist/es/navigation/navigation.service.js +114 -0
- package/dist/es/package-metadata.js +15 -0
- package/dist/es/preventable-event.js +29 -0
- package/dist/es/splitbutton/localization/custom-messages.component.js +44 -0
- package/dist/es/splitbutton/localization/localized-messages.directive.js +35 -0
- package/dist/es/splitbutton/localization/messages.js +22 -0
- package/dist/es/splitbutton/splitbutton.component.js +830 -0
- package/dist/es/splitbutton/splitbutton.module.js +34 -0
- package/dist/es/util.js +97 -0
- package/{button → dist/es2015/button}/button.directive.d.ts +101 -46
- package/dist/es2015/button/button.directive.js +671 -0
- package/{button → dist/es2015/button}/button.module.d.ts +0 -5
- package/dist/es2015/button/button.module.js +47 -0
- package/{button → dist/es2015/button}/button.service.d.ts +1 -7
- package/dist/es2015/button/button.service.js +26 -0
- package/{button → dist/es2015/button}/selection-settings.d.ts +0 -0
- package/dist/es2015/button/selection-settings.js +4 -0
- package/{buttongroup → dist/es2015/buttongroup}/buttongroup.component.d.ts +9 -28
- package/{esm2015 → dist/es2015}/buttongroup/buttongroup.component.js +116 -121
- package/dist/es2015/buttongroup/buttongroup.module.d.ts +14 -0
- package/dist/es2015/buttongroup/buttongroup.module.js +27 -0
- package/{buttons.module.d.ts → dist/es2015/buttons.module.d.ts} +0 -10
- package/dist/es2015/buttons.module.js +51 -0
- package/{chip → dist/es2015/chip}/chip-content-click-event-args.interface.d.ts +0 -0
- package/dist/es2015/chip/chip-content-click-event-args.interface.js +4 -0
- package/{chip → dist/es2015/chip}/chip-list-remove-event-args.interface.d.ts +0 -0
- package/dist/es2015/chip/chip-list-remove-event-args.interface.js +4 -0
- package/{chip → dist/es2015/chip}/chip-list.component.d.ts +21 -8
- package/dist/es2015/chip/chip-list.component.js +197 -0
- package/{chip → dist/es2015/chip}/chip-remove-event-args.interface.d.ts +0 -0
- package/dist/es2015/chip/chip-remove-event-args.interface.js +4 -0
- package/{chip → dist/es2015/chip}/chip.component.d.ts +72 -38
- package/dist/es2015/chip/chip.component.js +431 -0
- package/{chip → dist/es2015/chip}/chip.module.d.ts +0 -7
- package/{esm2015 → dist/es2015}/chip/chip.module.js +11 -16
- package/{chip → dist/es2015/chip}/models/selection.d.ts +0 -0
- package/dist/es2015/chip/models/selection.js +4 -0
- package/{util.d.ts → dist/es2015/common/models/fillmode.d.ts} +4 -8
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +12 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/shape.d.ts +9 -0
- package/dist/es2015/common/models/shape.js +4 -0
- package/dist/es2015/common/models/size.d.ts +17 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/{esm2015/kendo-angular-buttons.js → dist/es2015/common/models/styling-classes.d.ts} +5 -2
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/{common → dist/es2015/common}/models/theme-color.d.ts +15 -4
- package/dist/es2015/common/models/theme-color.js +4 -0
- package/{common/models/size.d.ts → dist/es2015/common/models.d.ts} +6 -10
- package/dist/es2015/common/models.js +4 -0
- package/{direction.d.ts → dist/es2015/direction.d.ts} +0 -0
- package/dist/es2015/direction.js +4 -0
- package/{dropdownbutton → dist/es2015/dropdownbutton}/dropdownbutton.component.d.ts +74 -29
- package/{esm2015 → dist/es2015}/dropdownbutton/dropdownbutton.component.js +257 -179
- package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +14 -0
- package/dist/es2015/dropdownbutton/dropdownbutton.module.js +29 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/animations/animations.d.ts +0 -0
- package/{esm2015 → dist/es2015}/floatingactionbutton/animations/animations.js +0 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-item.component.d.ts +5 -8
- package/dist/es2015/floatingactionbutton/dial-item.component.js +133 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-list.component.d.ts +2 -5
- package/dist/es2015/floatingactionbutton/dial-list.component.js +81 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.component.d.ts +47 -49
- package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.component.js +212 -192
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.module.d.ts +0 -13
- package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.module.js +11 -19
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/align.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/align.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-click.event.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/item-click.event.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item.interface.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/item.interface.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/offset.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/offset.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/position-mode.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/position-mode.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/dial-item-template.directive.d.ts +0 -3
- package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +25 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/fab-template.directive.d.ts +0 -3
- package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +25 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/utils.d.ts +0 -0
- package/{esm2015 → dist/es2015}/floatingactionbutton/utils.js +0 -0
- package/{focusable → dist/es2015/focusable}/focus.service.d.ts +1 -5
- package/{esm2015 → dist/es2015}/focusable/focus.service.js +10 -8
- package/{focusable → dist/es2015/focusable}/focusable.directive.d.ts +0 -3
- package/{esm2015 → dist/es2015}/focusable/focusable.directive.js +20 -19
- package/dist/es2015/index.d.ts +22 -0
- package/dist/es2015/index.js +22 -0
- package/dist/es2015/index.metadata.json +1 -0
- package/{listbutton → dist/es2015/listbutton}/button-item-template.directive.d.ts +0 -3
- package/{esm2015 → dist/es2015}/listbutton/button-item-template.directive.js +12 -13
- package/{listbutton → dist/es2015/listbutton}/list-button.d.ts +2 -6
- package/{esm2015 → dist/es2015}/listbutton/list-button.js +6 -16
- package/{listbutton → dist/es2015/listbutton}/list-item-model.d.ts +0 -0
- package/dist/es2015/listbutton/list-item-model.js +4 -0
- package/{listbutton → dist/es2015/listbutton}/list.component.d.ts +3 -3
- package/dist/es2015/listbutton/list.component.js +113 -0
- package/dist/es2015/listbutton/list.module.d.ts +9 -0
- package/dist/es2015/listbutton/list.module.js +30 -0
- package/{listbutton → dist/es2015/listbutton}/popup-settings.d.ts +0 -0
- package/dist/es2015/listbutton/popup-settings.js +4 -0
- package/{listbutton → dist/es2015/listbutton}/template-context.directive.d.ts +1 -4
- package/dist/es2015/listbutton/template-context.directive.js +35 -0
- package/{main.d.ts → dist/es2015/main.d.ts} +5 -9
- package/dist/es2015/main.js +22 -0
- package/{navigation → dist/es2015/navigation}/key-events.d.ts +0 -0
- package/dist/es2015/navigation/key-events.js +13 -0
- package/{navigation → dist/es2015/navigation}/navigation-action.d.ts +0 -0
- package/dist/es2015/navigation/navigation-action.js +19 -0
- package/{navigation → dist/es2015/navigation}/navigation-config.d.ts +0 -0
- package/{esm2015 → dist/es2015}/navigation/navigation-config.js +0 -0
- package/{navigation → dist/es2015/navigation}/navigation.service.d.ts +0 -3
- package/{esm2015 → dist/es2015}/navigation/navigation.service.js +9 -11
- package/{package-metadata.d.ts → dist/es2015/package-metadata.d.ts} +0 -0
- package/{esm2015 → dist/es2015}/package-metadata.js +1 -1
- package/{preventable-event.d.ts → dist/es2015/preventable-event.d.ts} +0 -0
- package/{esm2015 → dist/es2015}/preventable-event.js +0 -0
- package/dist/es2015/splitbutton/localization/custom-messages.component.d.ts +15 -0
- package/dist/es2015/splitbutton/localization/custom-messages.component.js +36 -0
- package/dist/es2015/splitbutton/localization/localized-messages.directive.d.ts +13 -0
- package/dist/es2015/splitbutton/localization/localized-messages.directive.js +31 -0
- package/dist/es2015/splitbutton/localization/messages.d.ts +32 -0
- package/dist/es2015/splitbutton/localization/messages.js +16 -0
- package/{splitbutton → dist/es2015/splitbutton}/splitbutton.component.d.ts +74 -34
- package/{esm2015 → dist/es2015}/splitbutton/splitbutton.component.js +288 -203
- package/dist/es2015/splitbutton/splitbutton.module.d.ts +14 -0
- package/dist/es2015/splitbutton/splitbutton.module.js +31 -0
- package/dist/es2015/util.d.ts +41 -0
- package/dist/es2015/util.js +95 -0
- package/{fesm2015/kendo-angular-buttons.js → dist/fesm2015/index.js} +2394 -1838
- package/dist/fesm5/index.js +5561 -0
- package/dist/npm/button/button.directive.js +771 -0
- package/dist/npm/button/button.module.js +52 -0
- package/dist/npm/button/button.service.js +26 -0
- package/dist/npm/button/selection-settings.js +6 -0
- package/dist/npm/buttongroup/buttongroup.component.js +355 -0
- package/dist/npm/buttongroup/buttongroup.module.js +32 -0
- package/dist/npm/buttons.module.js +56 -0
- package/dist/npm/chip/chip-content-click-event-args.interface.js +6 -0
- package/dist/npm/chip/chip-list-remove-event-args.interface.js +6 -0
- package/dist/npm/chip/chip-list.component.js +216 -0
- package/dist/npm/chip/chip-remove-event-args.interface.js +6 -0
- package/dist/npm/chip/chip.component.js +451 -0
- package/dist/npm/chip/chip.module.js +57 -0
- package/dist/npm/chip/models/selection.js +6 -0
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/shape.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/models/styling-classes.js +6 -0
- package/dist/npm/common/models/theme-color.js +6 -0
- package/dist/npm/common/models.js +6 -0
- package/dist/npm/direction.js +6 -0
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +706 -0
- package/dist/npm/dropdownbutton/dropdownbutton.module.js +34 -0
- package/dist/npm/floatingactionbutton/animations/animations.js +37 -0
- package/dist/npm/floatingactionbutton/dial-item.component.js +145 -0
- package/dist/npm/floatingactionbutton/dial-list.component.js +78 -0
- package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +905 -0
- package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +67 -0
- package/dist/npm/floatingactionbutton/models/align.js +6 -0
- package/dist/npm/floatingactionbutton/models/item-animation.interface.js +6 -0
- package/dist/npm/floatingactionbutton/models/item-click.event.js +6 -0
- package/dist/npm/floatingactionbutton/models/item.interface.js +6 -0
- package/dist/npm/floatingactionbutton/models/offset.js +6 -0
- package/dist/npm/floatingactionbutton/models/position-mode.js +6 -0
- package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +28 -0
- package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +28 -0
- package/dist/npm/floatingactionbutton/utils.js +42 -0
- package/dist/npm/focusable/focus.service.js +45 -0
- package/dist/npm/focusable/focusable.directive.js +70 -0
- package/dist/npm/index.js +39 -0
- package/dist/npm/listbutton/button-item-template.directive.js +70 -0
- package/dist/npm/listbutton/list-button.js +245 -0
- package/dist/npm/listbutton/list-item-model.js +6 -0
- package/dist/npm/listbutton/list.component.js +87 -0
- package/dist/npm/listbutton/list.module.js +35 -0
- package/dist/npm/listbutton/popup-settings.js +6 -0
- package/dist/npm/listbutton/template-context.directive.js +42 -0
- package/dist/npm/main.js +45 -0
- package/dist/npm/navigation/key-events.js +15 -0
- package/dist/npm/navigation/navigation-action.js +21 -0
- package/dist/npm/navigation/navigation-config.js +11 -0
- package/dist/npm/navigation/navigation.service.js +116 -0
- package/dist/npm/package-metadata.js +17 -0
- package/dist/npm/preventable-event.js +31 -0
- package/dist/npm/splitbutton/localization/custom-messages.component.js +46 -0
- package/dist/npm/splitbutton/localization/localized-messages.directive.js +37 -0
- package/dist/npm/splitbutton/localization/messages.js +24 -0
- package/dist/npm/splitbutton/splitbutton.component.js +832 -0
- package/dist/npm/splitbutton/splitbutton.module.js +36 -0
- package/dist/npm/util.js +100 -0
- package/dist/systemjs/kendo-angular-buttons.js +5 -0
- package/package.json +110 -35
- package/schematics/ngAdd/index.js +2 -5
- package/schematics/ngAdd/index.js.map +1 -1
- package/bundles/kendo-angular-buttons.umd.js +0 -5
- package/button-look.d.ts +0 -21
- package/buttongroup/buttongroup.module.d.ts +0 -21
- package/chip/models/chip-look.d.ts +0 -18
- package/chip/models/type.d.ts +0 -21
- package/common/models/shape.d.ts +0 -16
- package/dropdownbutton/dropdownbutton.module.d.ts +0 -23
- package/esm2015/button/button.directive.js +0 -488
- package/esm2015/button/button.service.js +0 -28
- package/esm2015/buttongroup/buttongroup.module.js +0 -30
- package/esm2015/chip/chip-list.component.js +0 -145
- package/esm2015/chip/chip.component.js +0 -335
- package/esm2015/chip/models/chip-look.js +0 -5
- package/esm2015/chip/models/type.js +0 -5
- package/esm2015/dropdownbutton/dropdownbutton.module.js +0 -32
- package/esm2015/floatingactionbutton/dial-item.component.js +0 -126
- package/esm2015/floatingactionbutton/dial-list.component.js +0 -89
- package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -27
- package/esm2015/floatingactionbutton/templates/fab-template.directive.js +0 -27
- package/esm2015/listbutton/list.component.js +0 -120
- package/esm2015/listbutton/list.module.js +0 -39
- package/esm2015/listbutton/template-context.directive.js +0 -33
- package/esm2015/splitbutton/splitbutton.module.js +0 -32
- package/esm2015/util.js +0 -39
- package/kendo-angular-buttons.d.ts +0 -9
- package/listbutton/list.module.d.ts +0 -18
- package/splitbutton/splitbutton.module.d.ts +0 -23
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { QueryList, EventEmitter, OnDestroy, OnInit, Renderer2, AfterContentInit } from '@angular/core';
|
|
5
|
+
import { QueryList, EventEmitter, OnDestroy, OnInit, Renderer2, AfterContentInit, AfterViewInit, ElementRef } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { ChipComponent } from './chip.component';
|
|
8
8
|
import { ChipListSelection } from './models/selection';
|
|
9
9
|
import { ChipListRemoveEvent } from './chip-list-remove-event-args.interface';
|
|
10
|
-
import
|
|
11
|
-
export declare class ChipListComponent implements OnInit, AfterContentInit, OnDestroy {
|
|
10
|
+
import { ChipListSize } from '../common/models';
|
|
11
|
+
export declare class ChipListComponent implements OnInit, AfterViewInit, AfterContentInit, OnDestroy {
|
|
12
12
|
private localizationService;
|
|
13
13
|
private renderer;
|
|
14
|
+
private element;
|
|
14
15
|
hostClass: boolean;
|
|
15
16
|
/**
|
|
16
17
|
* @hidden
|
|
@@ -25,6 +26,17 @@ export declare class ChipListComponent implements OnInit, AfterContentInit, OnDe
|
|
|
25
26
|
* * `multiple`
|
|
26
27
|
*/
|
|
27
28
|
selection: ChipListSelection;
|
|
29
|
+
/**
|
|
30
|
+
* The size property specifies the gap between the Chips in the ChipList
|
|
31
|
+
* ([see example]({% slug appearance_chiplist %}#toc-size)).
|
|
32
|
+
*
|
|
33
|
+
* The possible values are:
|
|
34
|
+
* * `'small'`
|
|
35
|
+
* * `'medium'` (default)
|
|
36
|
+
* * `'large'`
|
|
37
|
+
* * `null`
|
|
38
|
+
*/
|
|
39
|
+
size: ChipListSize;
|
|
28
40
|
/**
|
|
29
41
|
* Fires each time when the ChipList selection is changed.
|
|
30
42
|
*/
|
|
@@ -34,16 +46,18 @@ export declare class ChipListComponent implements OnInit, AfterContentInit, OnDe
|
|
|
34
46
|
*/
|
|
35
47
|
remove: EventEmitter<ChipListRemoveEvent>;
|
|
36
48
|
chips: QueryList<ChipComponent>;
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
readonly single: boolean;
|
|
50
|
+
readonly multiple: boolean;
|
|
39
51
|
role: string;
|
|
40
52
|
private dynamicRTLSubscription;
|
|
53
|
+
private _size;
|
|
41
54
|
/**
|
|
42
55
|
* @hidden
|
|
43
56
|
*/
|
|
44
57
|
onClick($event: any): void;
|
|
45
|
-
constructor(localizationService: LocalizationService, renderer: Renderer2);
|
|
58
|
+
constructor(localizationService: LocalizationService, renderer: Renderer2, element: ElementRef);
|
|
46
59
|
ngOnInit(): void;
|
|
60
|
+
ngAfterViewInit(): void;
|
|
47
61
|
ngAfterContentInit(): void;
|
|
48
62
|
ngOnDestroy(): void;
|
|
49
63
|
private selectedChips;
|
|
@@ -52,6 +66,5 @@ export declare class ChipListComponent implements OnInit, AfterContentInit, OnDe
|
|
|
52
66
|
*/
|
|
53
67
|
private setSelection;
|
|
54
68
|
private clearSelection;
|
|
55
|
-
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChipListComponent, "kendo-chip-list, kendo-chiplist", never, { "selection": "selection"; }, { "selectedChange": "selectedChange"; "remove": "remove"; }, ["chips"], ["*"]>;
|
|
69
|
+
private handleClasses;
|
|
57
70
|
}
|
|
@@ -0,0 +1,197 @@
|
|
|
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, ElementRef } from '@angular/core';
|
|
7
|
+
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { ChipComponent } from './chip.component';
|
|
9
|
+
import { closest, getStylingClasses } from '../util';
|
|
10
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
+
import { packageMetadata } from '../package-metadata';
|
|
12
|
+
let ChipListComponent = class ChipListComponent {
|
|
13
|
+
constructor(localizationService, renderer, element) {
|
|
14
|
+
this.localizationService = localizationService;
|
|
15
|
+
this.renderer = renderer;
|
|
16
|
+
this.element = element;
|
|
17
|
+
this.hostClass = true;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the selection mode of the ChipList.
|
|
20
|
+
*
|
|
21
|
+
* The available values are:
|
|
22
|
+
* * `none` (default)
|
|
23
|
+
* * `single`
|
|
24
|
+
* * `multiple`
|
|
25
|
+
*/
|
|
26
|
+
this.selection = 'none';
|
|
27
|
+
/**
|
|
28
|
+
* Fires each time when the ChipList selection is changed.
|
|
29
|
+
*/
|
|
30
|
+
this.selectedChange = new EventEmitter();
|
|
31
|
+
/**
|
|
32
|
+
* Fires each time the user clicks on the remove icon of the Chip.
|
|
33
|
+
*/
|
|
34
|
+
this.remove = new EventEmitter();
|
|
35
|
+
this.role = 'listbox';
|
|
36
|
+
this._size = 'medium';
|
|
37
|
+
validatePackage(packageMetadata);
|
|
38
|
+
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The size property specifies the gap between the Chips in the ChipList
|
|
42
|
+
* ([see example]({% slug appearance_chiplist %}#toc-size)).
|
|
43
|
+
*
|
|
44
|
+
* The possible values are:
|
|
45
|
+
* * `'small'`
|
|
46
|
+
* * `'medium'` (default)
|
|
47
|
+
* * `'large'`
|
|
48
|
+
* * `null`
|
|
49
|
+
*/
|
|
50
|
+
set size(size) {
|
|
51
|
+
this.handleClasses(size, 'size');
|
|
52
|
+
this._size = size;
|
|
53
|
+
}
|
|
54
|
+
get size() {
|
|
55
|
+
return this._size;
|
|
56
|
+
}
|
|
57
|
+
get single() {
|
|
58
|
+
return this.selection === 'single';
|
|
59
|
+
}
|
|
60
|
+
get multiple() {
|
|
61
|
+
return this.selection === 'multiple';
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @hidden
|
|
65
|
+
*/
|
|
66
|
+
onClick($event) {
|
|
67
|
+
const target = $event.target;
|
|
68
|
+
const isRemoveClicked = closest(target, '.k-chip-remove-action');
|
|
69
|
+
const clickedChip = closest(target, '.k-chip');
|
|
70
|
+
const chip = this.chips.find((chip) => clickedChip === chip.element.nativeElement);
|
|
71
|
+
if (isRemoveClicked && clickedChip) {
|
|
72
|
+
const removeEventArgs = { sender: this, originalEvent: $event, removedChip: chip };
|
|
73
|
+
this.remove.emit(removeEventArgs);
|
|
74
|
+
}
|
|
75
|
+
if (this.selection !== 'none' && clickedChip && !isRemoveClicked) {
|
|
76
|
+
this.setSelection(chip);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
ngOnInit() {
|
|
80
|
+
this.dynamicRTLSubscription = this.localizationService.changes
|
|
81
|
+
.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
|
|
82
|
+
}
|
|
83
|
+
ngAfterViewInit() {
|
|
84
|
+
const stylingInputs = ['size'];
|
|
85
|
+
stylingInputs.forEach(input => {
|
|
86
|
+
this.handleClasses(this[input], input);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
ngAfterContentInit() {
|
|
90
|
+
this.chips.forEach((chip) => {
|
|
91
|
+
this.renderer.setAttribute(chip.element.nativeElement, 'role', 'option');
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
ngOnDestroy() {
|
|
95
|
+
if (this.dynamicRTLSubscription) {
|
|
96
|
+
this.dynamicRTLSubscription.unsubscribe();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
selectedChips() {
|
|
100
|
+
return this.chips.reduce((acc, cur, idx) => { return cur.selected ? acc.concat(idx) : acc; }, []);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Updates the selection on click of a Chip. Emits events.
|
|
104
|
+
*/
|
|
105
|
+
setSelection(chip) {
|
|
106
|
+
if (this.selection === 'single') {
|
|
107
|
+
this.clearSelection(chip);
|
|
108
|
+
}
|
|
109
|
+
chip.selected = !chip.selected;
|
|
110
|
+
this.selectedChange.emit(this.selectedChips());
|
|
111
|
+
}
|
|
112
|
+
clearSelection(chip) {
|
|
113
|
+
this.chips.forEach((c) => {
|
|
114
|
+
if (chip !== c) {
|
|
115
|
+
c.selected = false;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
handleClasses(value, input) {
|
|
120
|
+
const elem = this.element.nativeElement;
|
|
121
|
+
const classes = getStylingClasses('chip-list', input, this[input], value);
|
|
122
|
+
if (classes.toRemove) {
|
|
123
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
124
|
+
}
|
|
125
|
+
if (classes.toAdd) {
|
|
126
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
tslib_1.__decorate([
|
|
131
|
+
HostBinding('class.k-chip-list'),
|
|
132
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
133
|
+
], ChipListComponent.prototype, "hostClass", void 0);
|
|
134
|
+
tslib_1.__decorate([
|
|
135
|
+
HostBinding('attr.dir'),
|
|
136
|
+
tslib_1.__metadata("design:type", String)
|
|
137
|
+
], ChipListComponent.prototype, "direction", void 0);
|
|
138
|
+
tslib_1.__decorate([
|
|
139
|
+
Input(),
|
|
140
|
+
tslib_1.__metadata("design:type", String)
|
|
141
|
+
], ChipListComponent.prototype, "selection", void 0);
|
|
142
|
+
tslib_1.__decorate([
|
|
143
|
+
Input(),
|
|
144
|
+
tslib_1.__metadata("design:type", String),
|
|
145
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
146
|
+
], ChipListComponent.prototype, "size", null);
|
|
147
|
+
tslib_1.__decorate([
|
|
148
|
+
Output(),
|
|
149
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
150
|
+
], ChipListComponent.prototype, "selectedChange", void 0);
|
|
151
|
+
tslib_1.__decorate([
|
|
152
|
+
Output(),
|
|
153
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
154
|
+
], ChipListComponent.prototype, "remove", void 0);
|
|
155
|
+
tslib_1.__decorate([
|
|
156
|
+
ContentChildren(ChipComponent),
|
|
157
|
+
tslib_1.__metadata("design:type", QueryList)
|
|
158
|
+
], ChipListComponent.prototype, "chips", void 0);
|
|
159
|
+
tslib_1.__decorate([
|
|
160
|
+
HostBinding('class.k-selection-single'),
|
|
161
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
162
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
163
|
+
], ChipListComponent.prototype, "single", null);
|
|
164
|
+
tslib_1.__decorate([
|
|
165
|
+
HostBinding('class.k-selection-multiple'),
|
|
166
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
167
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
168
|
+
], ChipListComponent.prototype, "multiple", null);
|
|
169
|
+
tslib_1.__decorate([
|
|
170
|
+
HostBinding('attr.role'),
|
|
171
|
+
tslib_1.__metadata("design:type", String)
|
|
172
|
+
], ChipListComponent.prototype, "role", void 0);
|
|
173
|
+
tslib_1.__decorate([
|
|
174
|
+
HostListener('click', ['$event']),
|
|
175
|
+
tslib_1.__metadata("design:type", Function),
|
|
176
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
177
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
178
|
+
], ChipListComponent.prototype, "onClick", null);
|
|
179
|
+
ChipListComponent = tslib_1.__decorate([
|
|
180
|
+
Component({
|
|
181
|
+
selector: 'kendo-chiplist, kendo-chip-list',
|
|
182
|
+
template: `
|
|
183
|
+
<ng-content></ng-content>
|
|
184
|
+
`,
|
|
185
|
+
providers: [
|
|
186
|
+
LocalizationService,
|
|
187
|
+
{
|
|
188
|
+
provide: L10N_PREFIX,
|
|
189
|
+
useValue: 'kendo.chiplist'
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}),
|
|
193
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService,
|
|
194
|
+
Renderer2,
|
|
195
|
+
ElementRef])
|
|
196
|
+
], ChipListComponent);
|
|
197
|
+
export { ChipListComponent };
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
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,10 +5,8 @@
|
|
|
5
5
|
import { EventEmitter, ElementRef, Renderer2, AfterViewInit, OnInit, NgZone } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { ChipRemoveEvent } from './chip-remove-event-args.interface';
|
|
8
|
-
import { ChipLook } from './models/chip-look';
|
|
9
|
-
import { ChipType } from './models/type';
|
|
10
8
|
import { ChipContentClickEvent } from './chip-content-click-event-args.interface';
|
|
11
|
-
import
|
|
9
|
+
import { ChipFillMode, ChipRounded, ChipSize, ChipThemeColor } from '../common/models';
|
|
12
10
|
/**
|
|
13
11
|
* Displays a Chip that represents an input, attribute or an action.
|
|
14
12
|
*/
|
|
@@ -17,14 +15,6 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
17
15
|
private renderer;
|
|
18
16
|
private ngZone;
|
|
19
17
|
private localizationService;
|
|
20
|
-
/**
|
|
21
|
-
* Changes the visual appearance by using alternative styling options.
|
|
22
|
-
*
|
|
23
|
-
* The available values are:
|
|
24
|
-
* * `filled`
|
|
25
|
-
* * `outlined`
|
|
26
|
-
*/
|
|
27
|
-
look: ChipLook;
|
|
28
18
|
/**
|
|
29
19
|
* Sets the label text of the Chip.
|
|
30
20
|
*/
|
|
@@ -41,17 +31,18 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
41
31
|
*/
|
|
42
32
|
iconClass: string;
|
|
43
33
|
/**
|
|
44
|
-
*
|
|
34
|
+
* The avatarClass allows the usage of avatar icons rendered in the Chip.
|
|
45
35
|
*/
|
|
46
|
-
|
|
36
|
+
avatarClass: string;
|
|
47
37
|
/**
|
|
48
|
-
* Specifies
|
|
49
|
-
*
|
|
38
|
+
* Specifies the selected state of the Chip.
|
|
39
|
+
* @default false
|
|
50
40
|
*/
|
|
51
|
-
|
|
41
|
+
selected: boolean;
|
|
52
42
|
/**
|
|
53
43
|
* Specifies if the Chip will be removable or not.
|
|
54
44
|
* If the property is set to `true`, the Chip renders a remove icon.
|
|
45
|
+
* @default false
|
|
55
46
|
*/
|
|
56
47
|
removable: boolean;
|
|
57
48
|
/**
|
|
@@ -60,20 +51,57 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
60
51
|
*/
|
|
61
52
|
removeIcon: string;
|
|
62
53
|
/**
|
|
63
|
-
*
|
|
54
|
+
* If set to `true`, the Chip will be disabled.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The size property specifies the padding of the Chip
|
|
60
|
+
* ([see example]({% slug appearance_chip %}#toc-size)).
|
|
64
61
|
*
|
|
65
62
|
* The possible values are:
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* - `info`
|
|
63
|
+
* * `'small'`
|
|
64
|
+
* * `'medium'` (default)
|
|
65
|
+
* * `'large'`
|
|
66
|
+
* * `null`
|
|
71
67
|
*/
|
|
72
|
-
|
|
68
|
+
size: ChipSize;
|
|
73
69
|
/**
|
|
74
|
-
*
|
|
70
|
+
* The rounded property specifies the border radius of the Chip
|
|
71
|
+
* ([see example]({% slug appearance_chip %}#toc-rounded)).
|
|
72
|
+
*
|
|
73
|
+
* The possible values are:
|
|
74
|
+
* * `'small'`
|
|
75
|
+
* * `'medium'` (default)
|
|
76
|
+
* * `'large'`
|
|
77
|
+
* * `'full'`
|
|
78
|
+
* * `null`
|
|
75
79
|
*/
|
|
76
|
-
|
|
80
|
+
rounded: ChipRounded;
|
|
81
|
+
/**
|
|
82
|
+
* The fillMode property specifies the background and border styles of the Chip
|
|
83
|
+
* ([see example]({% slug appearance_chip %}#toc-fillMode)).
|
|
84
|
+
*
|
|
85
|
+
* The possible values are:
|
|
86
|
+
* * `'solid'` (default)
|
|
87
|
+
* * `'outline'`
|
|
88
|
+
* * `null`
|
|
89
|
+
*/
|
|
90
|
+
fillMode: ChipFillMode;
|
|
91
|
+
/**
|
|
92
|
+
* The Chip allows you to specify predefined theme colors.
|
|
93
|
+
* The theme color will be applied as a background and border color while also amending the text color accordingly
|
|
94
|
+
* ([see example]({% slug appearance_chip %}#toc-themeColor)).
|
|
95
|
+
*
|
|
96
|
+
* The possible values are:
|
|
97
|
+
* * `'base'` (default)
|
|
98
|
+
* * `'info'`
|
|
99
|
+
* * `'success'`
|
|
100
|
+
* * `'warning'`
|
|
101
|
+
* * `'error'`
|
|
102
|
+
* * `null`
|
|
103
|
+
*/
|
|
104
|
+
themeColor: ChipThemeColor;
|
|
77
105
|
/**
|
|
78
106
|
* Fires each time the user clicks the remove icon of the Chip.
|
|
79
107
|
*/
|
|
@@ -83,18 +111,20 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
83
111
|
*/
|
|
84
112
|
contentClick: EventEmitter<ChipContentClickEvent>;
|
|
85
113
|
tabIndex: number;
|
|
86
|
-
|
|
114
|
+
readonly ariaChecked: boolean;
|
|
87
115
|
hostClass: boolean;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
get selectedClass(): boolean;
|
|
93
|
-
get focusedClass(): boolean;
|
|
116
|
+
readonly hasIconClass: boolean;
|
|
117
|
+
readonly disabledClass: boolean;
|
|
118
|
+
readonly selectedClass: boolean;
|
|
119
|
+
readonly focusedClass: boolean;
|
|
94
120
|
/**
|
|
95
121
|
* @hidden
|
|
96
122
|
*/
|
|
97
123
|
direction: string;
|
|
124
|
+
private _size;
|
|
125
|
+
private _rounded;
|
|
126
|
+
private _fillMode;
|
|
127
|
+
private _themeColor;
|
|
98
128
|
private focused;
|
|
99
129
|
private dynamicRTLSubscription;
|
|
100
130
|
private detachDomEvents;
|
|
@@ -105,19 +135,19 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
105
135
|
/**
|
|
106
136
|
* @hidden
|
|
107
137
|
*/
|
|
108
|
-
|
|
138
|
+
readonly kendoIconClass: string;
|
|
109
139
|
/**
|
|
110
140
|
* @hidden
|
|
111
141
|
*/
|
|
112
|
-
|
|
142
|
+
readonly customIconClass: string;
|
|
113
143
|
/**
|
|
114
144
|
* @hidden
|
|
115
145
|
*/
|
|
116
|
-
|
|
146
|
+
readonly chipAvatarClass: string;
|
|
117
147
|
/**
|
|
118
148
|
* @hidden
|
|
119
149
|
*/
|
|
120
|
-
|
|
150
|
+
readonly removeIconClass: string;
|
|
121
151
|
/**
|
|
122
152
|
* Focuses the Chip component.
|
|
123
153
|
*/
|
|
@@ -131,6 +161,10 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
131
161
|
*/
|
|
132
162
|
onRemoveClick(e: any): void;
|
|
133
163
|
private attachElementEventHandlers;
|
|
134
|
-
|
|
135
|
-
|
|
164
|
+
/**
|
|
165
|
+
* @hidden
|
|
166
|
+
*/
|
|
167
|
+
private verifyIconSettings;
|
|
168
|
+
private handleClasses;
|
|
169
|
+
private handleThemeColor;
|
|
136
170
|
}
|