@progress/kendo-angular-buttons 7.0.6 → 8.0.0-dev.202204190655
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/bundles/kendo-angular-buttons.umd.js +5 -0
- package/{dist/es2015/button → button}/button.directive.d.ts +64 -62
- package/{dist/es2015/button → button}/button.module.d.ts +5 -0
- package/{dist/es2015/button → button}/button.service.d.ts +3 -0
- package/{dist/es2015/button → button}/selection-settings.d.ts +0 -0
- package/{dist/es2015/buttongroup → buttongroup}/buttongroup.component.d.ts +14 -11
- package/{dist/es2015/buttongroup → buttongroup}/buttongroup.module.d.ts +7 -0
- package/{dist/es2015/buttons.module.d.ts → buttons.module.d.ts} +10 -0
- package/{dist/es2015/chip → chip}/chip-content-click-event-args.interface.d.ts +0 -0
- package/{dist/es2015/chip → chip}/chip-list-remove-event-args.interface.d.ts +0 -0
- package/{dist/es2015/chip → chip}/chip-list.component.d.ts +8 -4
- package/{dist/es2015/chip → chip}/chip-remove-event-args.interface.d.ts +0 -0
- package/{dist/es2015/chip → chip}/chip.component.d.ts +39 -33
- package/{dist/es2015/chip → chip}/chip.module.d.ts +7 -0
- package/{dist/es2015/chip → chip}/models/selection.d.ts +0 -0
- package/{dist/es2015/common → common}/models/fillmode.d.ts +2 -2
- package/{dist/es2015/common → common}/models/rounded.d.ts +2 -2
- package/{dist/es2015/common → common}/models/size.d.ts +3 -3
- package/{dist/es2015/common → common}/models/styling-classes.d.ts +0 -0
- package/{dist/es2015/common → common}/models/theme-color.d.ts +3 -3
- package/{dist/es2015/common → common}/models.d.ts +0 -1
- package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
- package/{dist/es2015/dropdownbutton → dropdownbutton}/dropdownbutton.component.d.ts +37 -38
- package/dropdownbutton/dropdownbutton.module.d.ts +23 -0
- package/{dist/es2015 → esm2015}/button/button.directive.js +145 -215
- package/{dist/es2015 → esm2015}/button/button.module.js +13 -10
- package/{dist/es2015 → esm2015}/button/button.service.js +8 -10
- package/{dist/es → esm2015}/button/selection-settings.js +1 -0
- package/{dist/es2015 → esm2015}/buttongroup/buttongroup.component.js +88 -111
- package/esm2015/buttongroup/buttongroup.module.js +30 -0
- package/{dist/es → esm2015}/buttons.module.js +12 -12
- package/{dist/es2015 → esm2015}/chip/chip-content-click-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/chip/chip-list-remove-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/chip/chip-list.component.js +62 -73
- package/{dist/es2015 → esm2015}/chip/chip-remove-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/chip/chip.component.js +171 -167
- package/{dist/es2015 → esm2015}/chip/chip.module.js +16 -11
- package/{dist/es → esm2015}/chip/models/selection.js +1 -0
- package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
- package/{dist/es → esm2015}/common/models/rounded.js +1 -0
- package/{dist/es → esm2015}/common/models/size.js +1 -0
- package/{dist/es → esm2015}/common/models/styling-classes.js +1 -0
- package/{dist/es → esm2015}/common/models/theme-color.js +1 -0
- package/{dist/es → esm2015}/common/models.js +5 -0
- package/{dist/es → esm2015}/direction.js +1 -0
- package/{dist/es2015 → esm2015}/dropdownbutton/dropdownbutton.component.js +185 -214
- package/esm2015/dropdownbutton/dropdownbutton.module.js +32 -0
- package/{dist/es2015 → esm2015}/floatingactionbutton/animations/animations.js +0 -0
- package/esm2015/floatingactionbutton/dial-item.component.js +127 -0
- package/esm2015/floatingactionbutton/dial-list.component.js +90 -0
- package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.component.js +205 -210
- package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.module.js +19 -11
- package/{dist/es → esm2015}/floatingactionbutton/models/align.js +1 -0
- package/{dist/es → esm2015}/floatingactionbutton/models/item-animation.interface.js +1 -0
- package/{dist/es → esm2015}/floatingactionbutton/models/item-click.event.js +1 -0
- package/{dist/es → esm2015}/floatingactionbutton/models/item.interface.js +1 -0
- package/{dist/es → esm2015}/floatingactionbutton/models/offset.js +1 -0
- package/{dist/es → esm2015}/floatingactionbutton/models/position-mode.js +1 -0
- package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +27 -0
- package/esm2015/floatingactionbutton/templates/fab-template.directive.js +27 -0
- package/{dist/es2015 → esm2015}/floatingactionbutton/utils.js +0 -0
- package/{dist/es2015 → esm2015}/focusable/focus.service.js +8 -10
- package/{dist/es2015 → esm2015}/focusable/focusable.directive.js +20 -27
- package/{dist/es2015/listbutton/list.module.d.ts → esm2015/kendo-angular-buttons.js} +2 -3
- package/{dist/es2015 → esm2015}/listbutton/button-item-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/listbutton/list-button.js +30 -37
- package/{dist/es → esm2015}/listbutton/list-item-model.js +1 -0
- package/esm2015/listbutton/list.component.js +140 -0
- package/esm2015/listbutton/list.module.js +39 -0
- package/{dist/es → esm2015}/listbutton/popup-settings.js +1 -0
- package/esm2015/listbutton/template-context.directive.js +34 -0
- package/{dist/es2015 → esm2015}/main.js +7 -0
- package/{dist/es → esm2015}/navigation/key-events.js +0 -0
- package/{dist/es2015 → esm2015}/navigation/navigation-action.js +1 -0
- package/{dist/es2015 → esm2015}/navigation/navigation-config.js +0 -0
- package/{dist/es2015 → esm2015}/navigation/navigation.service.js +11 -9
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/preventable-event.js +0 -0
- package/esm2015/splitbutton/localization/custom-messages.component.js +37 -0
- package/esm2015/splitbutton/localization/localized-messages.directive.js +36 -0
- package/esm2015/splitbutton/localization/messages.js +23 -0
- package/{dist/es2015 → esm2015}/splitbutton/splitbutton.component.js +221 -209
- package/esm2015/splitbutton/splitbutton.module.js +34 -0
- package/{dist/es2015 → esm2015}/util.js +7 -7
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-buttons.js} +1885 -1941
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/animations/animations.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/dial-item.component.d.ts +8 -5
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/dial-list.component.d.ts +5 -2
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/floatingactionbutton.component.d.ts +50 -51
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/floatingactionbutton.module.d.ts +13 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/align.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item-click.event.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/item.interface.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/offset.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/models/position-mode.d.ts +0 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/templates/dial-item-template.directive.d.ts +3 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/templates/fab-template.directive.d.ts +3 -0
- package/{dist/es2015/floatingactionbutton → floatingactionbutton}/utils.d.ts +0 -0
- package/{dist/es2015/focusable → focusable}/focus.service.d.ts +5 -1
- package/{dist/es2015/focusable → focusable}/focusable.directive.d.ts +4 -2
- package/{dist/es2015/common/models/shape.d.ts → kendo-angular-buttons.d.ts} +3 -3
- package/{dist/es2015/listbutton → listbutton}/button-item-template.directive.d.ts +3 -0
- package/{dist/es2015/listbutton → listbutton}/list-button.d.ts +7 -13
- package/{dist/es2015/listbutton → listbutton}/list-item-model.d.ts +0 -0
- package/{dist/es2015/listbutton → listbutton}/list.component.d.ts +4 -1
- package/listbutton/list.module.d.ts +18 -0
- package/{dist/es2015/listbutton → listbutton}/popup-settings.d.ts +0 -0
- package/{dist/es2015/listbutton → listbutton}/template-context.directive.d.ts +4 -1
- package/{dist/es2015/main.d.ts → main.d.ts} +7 -1
- package/{dist/es2015/navigation → navigation}/key-events.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/navigation-action.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/navigation-config.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +3 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +38 -113
- package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/splitbutton → splitbutton}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/splitbutton → splitbutton}/localization/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/splitbutton → splitbutton}/localization/messages.d.ts +3 -0
- package/{dist/es2015/splitbutton → splitbutton}/splitbutton.component.d.ts +39 -27
- package/splitbutton/splitbutton.module.d.ts +25 -0
- package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-buttons.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/button/button.directive.js +0 -775
- package/dist/es/button/button.module.js +0 -50
- package/dist/es/button/button.service.js +0 -24
- package/dist/es/buttongroup/buttongroup.component.js +0 -353
- package/dist/es/buttongroup/buttongroup.module.js +0 -30
- package/dist/es/chip/chip-content-click-event-args.interface.js +0 -4
- package/dist/es/chip/chip-list-remove-event-args.interface.js +0 -4
- package/dist/es/chip/chip-list.component.js +0 -214
- package/dist/es/chip/chip-remove-event-args.interface.js +0 -4
- package/dist/es/chip/chip.component.js +0 -449
- package/dist/es/chip/chip.module.js +0 -55
- package/dist/es/common/models/shape.js +0 -4
- package/dist/es/dropdownbutton/dropdownbutton.component.js +0 -704
- package/dist/es/dropdownbutton/dropdownbutton.module.js +0 -32
- package/dist/es/floatingactionbutton/animations/animations.js +0 -33
- package/dist/es/floatingactionbutton/dial-item.component.js +0 -143
- package/dist/es/floatingactionbutton/dial-list.component.js +0 -76
- package/dist/es/floatingactionbutton/floatingactionbutton.component.js +0 -903
- package/dist/es/floatingactionbutton/floatingactionbutton.module.js +0 -65
- package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +0 -26
- package/dist/es/floatingactionbutton/templates/fab-template.directive.js +0 -26
- package/dist/es/floatingactionbutton/utils.js +0 -38
- package/dist/es/focusable/focus.service.js +0 -43
- package/dist/es/focusable/focusable.directive.js +0 -68
- package/dist/es/index.js +0 -22
- package/dist/es/listbutton/button-item-template.directive.js +0 -68
- package/dist/es/listbutton/list-button.js +0 -243
- package/dist/es/listbutton/list.component.js +0 -85
- package/dist/es/listbutton/list.module.js +0 -33
- package/dist/es/listbutton/template-context.directive.js +0 -40
- package/dist/es/main.js +0 -22
- package/dist/es/navigation/navigation-action.js +0 -19
- package/dist/es/navigation/navigation-config.js +0 -9
- package/dist/es/navigation/navigation.service.js +0 -114
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/preventable-event.js +0 -29
- package/dist/es/splitbutton/localization/custom-messages.component.js +0 -44
- package/dist/es/splitbutton/localization/localized-messages.directive.js +0 -35
- package/dist/es/splitbutton/localization/messages.js +0 -22
- package/dist/es/splitbutton/splitbutton.component.js +0 -830
- package/dist/es/splitbutton/splitbutton.module.js +0 -34
- package/dist/es/util.js +0 -108
- package/dist/es2015/button/selection-settings.js +0 -4
- package/dist/es2015/buttongroup/buttongroup.module.js +0 -27
- package/dist/es2015/buttons.module.js +0 -51
- package/dist/es2015/chip/models/selection.js +0 -4
- package/dist/es2015/common/models/fillmode.js +0 -4
- package/dist/es2015/common/models/rounded.js +0 -4
- package/dist/es2015/common/models/shape.js +0 -4
- package/dist/es2015/common/models/size.js +0 -4
- package/dist/es2015/common/models/styling-classes.js +0 -4
- package/dist/es2015/common/models/theme-color.js +0 -4
- package/dist/es2015/common/models.js +0 -4
- package/dist/es2015/direction.js +0 -4
- package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +0 -14
- package/dist/es2015/dropdownbutton/dropdownbutton.module.js +0 -29
- package/dist/es2015/floatingactionbutton/dial-item.component.js +0 -133
- package/dist/es2015/floatingactionbutton/dial-list.component.js +0 -81
- package/dist/es2015/floatingactionbutton/models/align.js +0 -4
- package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +0 -4
- package/dist/es2015/floatingactionbutton/models/item-click.event.js +0 -4
- package/dist/es2015/floatingactionbutton/models/item.interface.js +0 -4
- package/dist/es2015/floatingactionbutton/models/offset.js +0 -4
- package/dist/es2015/floatingactionbutton/models/position-mode.js +0 -4
- package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -25
- package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +0 -25
- package/dist/es2015/index.d.ts +0 -22
- package/dist/es2015/index.js +0 -22
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/listbutton/list-item-model.js +0 -4
- package/dist/es2015/listbutton/list.component.js +0 -115
- package/dist/es2015/listbutton/list.module.js +0 -30
- package/dist/es2015/listbutton/popup-settings.js +0 -4
- package/dist/es2015/listbutton/template-context.directive.js +0 -35
- package/dist/es2015/navigation/key-events.js +0 -13
- package/dist/es2015/splitbutton/localization/custom-messages.component.js +0 -36
- package/dist/es2015/splitbutton/localization/localized-messages.directive.js +0 -31
- package/dist/es2015/splitbutton/localization/messages.js +0 -16
- package/dist/es2015/splitbutton/splitbutton.module.d.ts +0 -14
- package/dist/es2015/splitbutton/splitbutton.module.js +0 -31
- package/dist/fesm5/index.js +0 -5577
- package/dist/npm/button/button.directive.js +0 -777
- package/dist/npm/button/button.module.js +0 -52
- package/dist/npm/button/button.service.js +0 -26
- package/dist/npm/button/selection-settings.js +0 -6
- package/dist/npm/buttongroup/buttongroup.component.js +0 -355
- package/dist/npm/buttongroup/buttongroup.module.js +0 -32
- package/dist/npm/buttons.module.js +0 -56
- package/dist/npm/chip/chip-content-click-event-args.interface.js +0 -6
- package/dist/npm/chip/chip-list-remove-event-args.interface.js +0 -6
- package/dist/npm/chip/chip-list.component.js +0 -216
- package/dist/npm/chip/chip-remove-event-args.interface.js +0 -6
- package/dist/npm/chip/chip.component.js +0 -451
- package/dist/npm/chip/chip.module.js +0 -57
- package/dist/npm/chip/models/selection.js +0 -6
- package/dist/npm/common/models/fillmode.js +0 -6
- package/dist/npm/common/models/rounded.js +0 -6
- package/dist/npm/common/models/shape.js +0 -6
- package/dist/npm/common/models/size.js +0 -6
- package/dist/npm/common/models/styling-classes.js +0 -6
- package/dist/npm/common/models/theme-color.js +0 -6
- package/dist/npm/common/models.js +0 -6
- package/dist/npm/direction.js +0 -6
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +0 -706
- package/dist/npm/dropdownbutton/dropdownbutton.module.js +0 -34
- package/dist/npm/floatingactionbutton/animations/animations.js +0 -37
- package/dist/npm/floatingactionbutton/dial-item.component.js +0 -145
- package/dist/npm/floatingactionbutton/dial-list.component.js +0 -78
- package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +0 -905
- package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +0 -67
- package/dist/npm/floatingactionbutton/models/align.js +0 -6
- package/dist/npm/floatingactionbutton/models/item-animation.interface.js +0 -6
- package/dist/npm/floatingactionbutton/models/item-click.event.js +0 -6
- package/dist/npm/floatingactionbutton/models/item.interface.js +0 -6
- package/dist/npm/floatingactionbutton/models/offset.js +0 -6
- package/dist/npm/floatingactionbutton/models/position-mode.js +0 -6
- package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +0 -28
- package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +0 -28
- package/dist/npm/floatingactionbutton/utils.js +0 -42
- package/dist/npm/focusable/focus.service.js +0 -45
- package/dist/npm/focusable/focusable.directive.js +0 -70
- package/dist/npm/index.js +0 -39
- package/dist/npm/listbutton/button-item-template.directive.js +0 -70
- package/dist/npm/listbutton/list-button.js +0 -245
- package/dist/npm/listbutton/list-item-model.js +0 -6
- package/dist/npm/listbutton/list.component.js +0 -87
- package/dist/npm/listbutton/list.module.js +0 -35
- package/dist/npm/listbutton/popup-settings.js +0 -6
- package/dist/npm/listbutton/template-context.directive.js +0 -42
- package/dist/npm/main.js +0 -45
- package/dist/npm/navigation/key-events.js +0 -15
- package/dist/npm/navigation/navigation-action.js +0 -21
- package/dist/npm/navigation/navigation-config.js +0 -11
- package/dist/npm/navigation/navigation.service.js +0 -116
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/preventable-event.js +0 -31
- package/dist/npm/splitbutton/localization/custom-messages.component.js +0 -46
- package/dist/npm/splitbutton/localization/localized-messages.directive.js +0 -37
- package/dist/npm/splitbutton/localization/messages.js +0 -24
- package/dist/npm/splitbutton/splitbutton.component.js +0 -832
- package/dist/npm/splitbutton/splitbutton.module.js +0 -36
- package/dist/npm/util.js +0 -111
- package/dist/systemjs/kendo-angular-buttons.js +0 -5
|
@@ -2,36 +2,22 @@
|
|
|
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
|
|
6
|
-
import { Injectable, EventEmitter, Input, Output, HostBinding, HostListener,
|
|
7
|
-
import
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Injectable, EventEmitter, Directive, Optional, Input, Output, HostBinding, HostListener, isDevMode, Component, ContentChildren, NgModule, InjectionToken, Inject, forwardRef, ElementRef, ViewContainerRef, ContentChild, ViewChild } from '@angular/core';
|
|
7
|
+
import * as i8 from '@progress/kendo-angular-common';
|
|
8
8
|
import { isDocumentAvailable, Keys, isChanged, hasObservers, guid, EventsModule } from '@progress/kendo-angular-common';
|
|
9
|
+
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
10
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
11
|
+
import { Subject, Subscription, fromEvent, merge } from 'rxjs';
|
|
10
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
13
|
import { detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
14
|
+
import * as i2 from '@angular/common';
|
|
12
15
|
import { CommonModule } from '@angular/common';
|
|
13
|
-
import
|
|
16
|
+
import * as i3 from '@progress/kendo-angular-popup';
|
|
17
|
+
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
14
18
|
import { filter, take } from 'rxjs/operators';
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
let KendoButtonService = class KendoButtonService {
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
constructor() {
|
|
25
|
-
this.buttonClicked = new Subject();
|
|
26
|
-
this.buttonClicked$ = this.buttonClicked.asObservable();
|
|
27
|
-
}
|
|
28
|
-
click(button) {
|
|
29
|
-
this.buttonClicked.next(button);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
KendoButtonService = __decorate([
|
|
33
|
-
Injectable()
|
|
34
|
-
], KendoButtonService);
|
|
19
|
+
import * as i4 from '@angular/animations';
|
|
20
|
+
import { sequence, query, style, stagger, animate } from '@angular/animations';
|
|
35
21
|
|
|
36
22
|
/**
|
|
37
23
|
* @hidden
|
|
@@ -40,12 +26,14 @@ const packageMetadata = {
|
|
|
40
26
|
name: '@progress/kendo-angular-buttons',
|
|
41
27
|
productName: 'Kendo UI for Angular',
|
|
42
28
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
43
|
-
publishDate:
|
|
29
|
+
publishDate: 1650351322,
|
|
44
30
|
version: '',
|
|
45
31
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
46
32
|
};
|
|
47
33
|
|
|
48
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
49
37
|
const resolvedPromise = Promise.resolve(null);
|
|
50
38
|
/**
|
|
51
39
|
* @hidden
|
|
@@ -107,18 +95,17 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
107
95
|
case 'size':
|
|
108
96
|
return {
|
|
109
97
|
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
110
|
-
toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` :
|
|
98
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
|
|
111
99
|
};
|
|
112
100
|
case 'rounded':
|
|
113
101
|
return {
|
|
114
102
|
toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
|
|
115
|
-
toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` :
|
|
103
|
+
toAdd: newValue !== 'none' ? `k-rounded-${ROUNDNESS[newValue]}` : ''
|
|
116
104
|
};
|
|
117
105
|
case 'fillMode':
|
|
118
|
-
case 'shape':
|
|
119
106
|
return {
|
|
120
107
|
toRemove: `k-${componentType}-${previousValue}`,
|
|
121
|
-
toAdd: newValue ? `k-${componentType}-${newValue}` :
|
|
108
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${newValue}` : ''
|
|
122
109
|
};
|
|
123
110
|
default:
|
|
124
111
|
break;
|
|
@@ -132,7 +119,7 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
132
119
|
const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousValue, newValue) => {
|
|
133
120
|
return {
|
|
134
121
|
toRemove: `k-${componentType}-${prevFillMode}-${previousValue}`,
|
|
135
|
-
toAdd: newValue ? `k-${componentType}-${fillMode}-${newValue}` :
|
|
122
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${fillMode}-${newValue}` : ''
|
|
136
123
|
};
|
|
137
124
|
};
|
|
138
125
|
/**
|
|
@@ -146,11 +133,33 @@ const isFirefox = (userAgent) => {
|
|
|
146
133
|
return (desktopBrowser && desktopBrowser.mozilla) || (mobileOS && mobileOS.browser === 'firefox');
|
|
147
134
|
};
|
|
148
135
|
|
|
136
|
+
/**
|
|
137
|
+
* @hidden
|
|
138
|
+
*/
|
|
139
|
+
class KendoButtonService {
|
|
140
|
+
constructor() {
|
|
141
|
+
this.buttonClicked = new Subject();
|
|
142
|
+
this.buttonClicked$ = this.buttonClicked.asObservable();
|
|
143
|
+
}
|
|
144
|
+
click(button) {
|
|
145
|
+
this.buttonClicked.next(button);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
KendoButtonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KendoButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
149
|
+
KendoButtonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KendoButtonService });
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KendoButtonService, decorators: [{
|
|
151
|
+
type: Injectable
|
|
152
|
+
}] });
|
|
153
|
+
|
|
149
154
|
const SPAN_TAG_NAME = 'SPAN';
|
|
155
|
+
const DEFAULT_ROUNDED$2 = 'medium';
|
|
156
|
+
const DEFAULT_SIZE$1 = 'medium';
|
|
157
|
+
const DEFAULT_THEME_COLOR$1 = 'base';
|
|
158
|
+
const DEFAULT_FILL_MODE$2 = 'solid';
|
|
150
159
|
/**
|
|
151
160
|
* Represents the Kendo UI Button component for Angular.
|
|
152
161
|
*/
|
|
153
|
-
|
|
162
|
+
class ButtonDirective {
|
|
154
163
|
constructor(element, renderer, service, localization, ngZone) {
|
|
155
164
|
this.service = service;
|
|
156
165
|
this.ngZone = ngZone;
|
|
@@ -176,16 +185,15 @@ let ButtonDirective = class ButtonDirective {
|
|
|
176
185
|
this.isDisabled = false;
|
|
177
186
|
this.isIcon = false;
|
|
178
187
|
this.isIconClass = false;
|
|
179
|
-
this._size =
|
|
180
|
-
this._rounded =
|
|
181
|
-
this.
|
|
182
|
-
this.
|
|
183
|
-
this._themeColor = 'base';
|
|
188
|
+
this._size = DEFAULT_SIZE$1;
|
|
189
|
+
this._rounded = DEFAULT_ROUNDED$2;
|
|
190
|
+
this._fillMode = DEFAULT_FILL_MODE$2;
|
|
191
|
+
this._themeColor = DEFAULT_THEME_COLOR$1;
|
|
184
192
|
this._focused = false;
|
|
185
|
-
this.
|
|
193
|
+
this.subs = new Subscription();
|
|
186
194
|
validatePackage(packageMetadata);
|
|
187
195
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
188
|
-
this.
|
|
196
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
189
197
|
this.element = element.nativeElement;
|
|
190
198
|
this.renderer = renderer;
|
|
191
199
|
}
|
|
@@ -286,14 +294,15 @@ let ButtonDirective = class ButtonDirective {
|
|
|
286
294
|
* ([see example]({% slug appearance_button %}#toc-size)).
|
|
287
295
|
*
|
|
288
296
|
* The possible values are:
|
|
289
|
-
* * `
|
|
290
|
-
* * `
|
|
291
|
-
* * `
|
|
292
|
-
* * `
|
|
297
|
+
* * `small`
|
|
298
|
+
* * `medium` (default)
|
|
299
|
+
* * `large`
|
|
300
|
+
* * `none`
|
|
293
301
|
*/
|
|
294
302
|
set size(size) {
|
|
295
|
-
|
|
296
|
-
this.
|
|
303
|
+
const newSize = size ? size : DEFAULT_SIZE$1;
|
|
304
|
+
this.handleClasses(newSize, 'size');
|
|
305
|
+
this._size = newSize;
|
|
297
306
|
}
|
|
298
307
|
get size() {
|
|
299
308
|
return this._size;
|
|
@@ -303,15 +312,16 @@ let ButtonDirective = class ButtonDirective {
|
|
|
303
312
|
* ([see example]({% slug appearance_button %}#toc-rounded)).
|
|
304
313
|
*
|
|
305
314
|
* The possible values are:
|
|
306
|
-
* * `
|
|
307
|
-
* * `
|
|
308
|
-
* * `
|
|
309
|
-
* * `
|
|
310
|
-
* * `
|
|
315
|
+
* * `small`
|
|
316
|
+
* * `medium` (default)
|
|
317
|
+
* * `large`
|
|
318
|
+
* * `full`
|
|
319
|
+
* * `none`
|
|
311
320
|
*/
|
|
312
321
|
set rounded(rounded) {
|
|
313
|
-
|
|
314
|
-
this.
|
|
322
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED$2;
|
|
323
|
+
this.handleClasses(newRounded, 'rounded');
|
|
324
|
+
this._rounded = newRounded;
|
|
315
325
|
}
|
|
316
326
|
get rounded() {
|
|
317
327
|
return this._rounded;
|
|
@@ -321,16 +331,17 @@ let ButtonDirective = class ButtonDirective {
|
|
|
321
331
|
* ([see example]({% slug appearance_button %}#toc-fillMode)).
|
|
322
332
|
*
|
|
323
333
|
* The possible values are:
|
|
324
|
-
* * `
|
|
325
|
-
* * `
|
|
326
|
-
* * `
|
|
327
|
-
* * `
|
|
328
|
-
* * `
|
|
329
|
-
* * `
|
|
334
|
+
* * `flat`
|
|
335
|
+
* * `solid` (default)
|
|
336
|
+
* * `outline`
|
|
337
|
+
* * `clear`
|
|
338
|
+
* * `link`
|
|
339
|
+
* * `none`
|
|
330
340
|
*/
|
|
331
341
|
set fillMode(fillMode) {
|
|
332
|
-
|
|
333
|
-
this.
|
|
342
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE$2;
|
|
343
|
+
this.handleClasses(newFillMode, 'fillMode');
|
|
344
|
+
this._fillMode = newFillMode;
|
|
334
345
|
}
|
|
335
346
|
get fillMode() {
|
|
336
347
|
return this._fillMode;
|
|
@@ -341,40 +352,27 @@ let ButtonDirective = class ButtonDirective {
|
|
|
341
352
|
* ([see example]({% slug appearance_button %}#toc-themeColor)).
|
|
342
353
|
*
|
|
343
354
|
* The possible values are:
|
|
344
|
-
* * `
|
|
345
|
-
* * `
|
|
346
|
-
* * `
|
|
347
|
-
* * `
|
|
348
|
-
* * `
|
|
349
|
-
* * `
|
|
350
|
-
* * `
|
|
351
|
-
* * `
|
|
352
|
-
* * `
|
|
353
|
-
* * `
|
|
354
|
-
* * `
|
|
355
|
+
* * `base` (default)
|
|
356
|
+
* * `primary`
|
|
357
|
+
* * `secondary`
|
|
358
|
+
* * `tertiary`
|
|
359
|
+
* * `info`
|
|
360
|
+
* * `success`
|
|
361
|
+
* * `warning`
|
|
362
|
+
* * `error`
|
|
363
|
+
* * `dark`
|
|
364
|
+
* * `light`
|
|
365
|
+
* * `inverse`
|
|
366
|
+
* * `none`
|
|
355
367
|
*/
|
|
356
368
|
set themeColor(themeColor) {
|
|
357
|
-
|
|
358
|
-
this.
|
|
369
|
+
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR$1;
|
|
370
|
+
this.handleThemeColor(newThemeColor);
|
|
371
|
+
this._themeColor = newThemeColor;
|
|
359
372
|
}
|
|
360
373
|
get themeColor() {
|
|
361
374
|
return this._themeColor;
|
|
362
375
|
}
|
|
363
|
-
/**
|
|
364
|
-
* The shape property specifies if the Button will form a rectangle or square.
|
|
365
|
-
* ([see example]({% slug appearance_button %}#toc-shape)).
|
|
366
|
-
*
|
|
367
|
-
* The possible values are:
|
|
368
|
-
* * `'square'`
|
|
369
|
-
* * `'rectangle'` (default)
|
|
370
|
-
*/
|
|
371
|
-
set shape(shape) {
|
|
372
|
-
this.handleClasses(shape, 'shape');
|
|
373
|
-
this._shape = shape;
|
|
374
|
-
}
|
|
375
|
-
get shape() {
|
|
376
|
-
return this._shape;
|
|
377
|
-
}
|
|
378
376
|
set isFocused(isFocused) {
|
|
379
377
|
this.toggleClass('k-focus', isFocused);
|
|
380
378
|
this._focused = isFocused;
|
|
@@ -441,8 +439,8 @@ let ButtonDirective = class ButtonDirective {
|
|
|
441
439
|
this.setAttribute('role', this.role);
|
|
442
440
|
}
|
|
443
441
|
this.ngZone.runOutsideAngular(() => {
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
442
|
+
this.subs.add(this.renderer.listen(this.element, 'click', this._onButtonClick.bind(this)));
|
|
443
|
+
this.subs.add(this.renderer.listen(this.element, 'keydown', (event) => {
|
|
446
444
|
const isSpaceOrEnter = event.keyCode === Keys.Space || event.keyCode === Keys.Enter;
|
|
447
445
|
if (isSpan && isSpaceOrEnter) {
|
|
448
446
|
this.click.emit(event);
|
|
@@ -457,7 +455,7 @@ let ButtonDirective = class ButtonDirective {
|
|
|
457
455
|
}
|
|
458
456
|
}
|
|
459
457
|
ngAfterViewInit() {
|
|
460
|
-
const stylingOptions = ['size', 'rounded', '
|
|
458
|
+
const stylingOptions = ['size', 'rounded', 'fillMode'];
|
|
461
459
|
stylingOptions.forEach(input => {
|
|
462
460
|
this.handleClasses(this[input], input);
|
|
463
461
|
});
|
|
@@ -470,9 +468,8 @@ let ButtonDirective = class ButtonDirective {
|
|
|
470
468
|
this.iconNode = null;
|
|
471
469
|
this.iconSpanNode = null;
|
|
472
470
|
this.renderer = null;
|
|
473
|
-
this.
|
|
471
|
+
this.subs.unsubscribe();
|
|
474
472
|
clearTimeout(this.deferTimeout);
|
|
475
|
-
this.domEvents.forEach(unbindHandler => unbindHandler());
|
|
476
473
|
}
|
|
477
474
|
/**
|
|
478
475
|
* Focuses the Button component.
|
|
@@ -655,161 +652,98 @@ let ButtonDirective = class ButtonDirective {
|
|
|
655
652
|
const addFillMode = fillMode ? fillMode : this.fillMode;
|
|
656
653
|
const themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
|
|
657
654
|
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
658
|
-
if (addFillMode !==
|
|
655
|
+
if (addFillMode !== 'none' && fillMode !== 'none') {
|
|
659
656
|
if (themeColorClass.toAdd) {
|
|
660
657
|
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
661
658
|
}
|
|
662
659
|
}
|
|
663
660
|
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
__metadata("design:type", Boolean)
|
|
668
|
-
], ButtonDirective.prototype, "toggleable", void 0);
|
|
669
|
-
__decorate([
|
|
670
|
-
Input(),
|
|
671
|
-
__metadata("design:type", Boolean),
|
|
672
|
-
__metadata("design:paramtypes", [Boolean])
|
|
673
|
-
], ButtonDirective.prototype, "togglable", null);
|
|
674
|
-
__decorate([
|
|
675
|
-
Input(),
|
|
676
|
-
__metadata("design:type", Boolean),
|
|
677
|
-
__metadata("design:paramtypes", [Boolean])
|
|
678
|
-
], ButtonDirective.prototype, "selected", null);
|
|
679
|
-
__decorate([
|
|
680
|
-
Input(),
|
|
681
|
-
__metadata("design:type", Number),
|
|
682
|
-
__metadata("design:paramtypes", [Number])
|
|
683
|
-
], ButtonDirective.prototype, "tabIndex", null);
|
|
684
|
-
__decorate([
|
|
685
|
-
Input(),
|
|
686
|
-
__metadata("design:type", String),
|
|
687
|
-
__metadata("design:paramtypes", [String])
|
|
688
|
-
], ButtonDirective.prototype, "icon", null);
|
|
689
|
-
__decorate([
|
|
690
|
-
Input(),
|
|
691
|
-
__metadata("design:type", String),
|
|
692
|
-
__metadata("design:paramtypes", [String])
|
|
693
|
-
], ButtonDirective.prototype, "iconClass", null);
|
|
694
|
-
__decorate([
|
|
695
|
-
Input(),
|
|
696
|
-
__metadata("design:type", String),
|
|
697
|
-
__metadata("design:paramtypes", [String])
|
|
698
|
-
], ButtonDirective.prototype, "imageUrl", null);
|
|
699
|
-
__decorate([
|
|
700
|
-
Input(),
|
|
701
|
-
__metadata("design:type", Boolean),
|
|
702
|
-
__metadata("design:paramtypes", [Boolean])
|
|
703
|
-
], ButtonDirective.prototype, "disabled", null);
|
|
704
|
-
__decorate([
|
|
705
|
-
Input(),
|
|
706
|
-
__metadata("design:type", String),
|
|
707
|
-
__metadata("design:paramtypes", [String])
|
|
708
|
-
], ButtonDirective.prototype, "size", null);
|
|
709
|
-
__decorate([
|
|
710
|
-
Input(),
|
|
711
|
-
__metadata("design:type", String),
|
|
712
|
-
__metadata("design:paramtypes", [String])
|
|
713
|
-
], ButtonDirective.prototype, "rounded", null);
|
|
714
|
-
__decorate([
|
|
715
|
-
Input(),
|
|
716
|
-
__metadata("design:type", String),
|
|
717
|
-
__metadata("design:paramtypes", [String])
|
|
718
|
-
], ButtonDirective.prototype, "fillMode", null);
|
|
719
|
-
__decorate([
|
|
720
|
-
Input(),
|
|
721
|
-
__metadata("design:type", String),
|
|
722
|
-
__metadata("design:paramtypes", [String])
|
|
723
|
-
], ButtonDirective.prototype, "themeColor", null);
|
|
724
|
-
__decorate([
|
|
725
|
-
Input(),
|
|
726
|
-
__metadata("design:type", String),
|
|
727
|
-
__metadata("design:paramtypes", [String])
|
|
728
|
-
], ButtonDirective.prototype, "shape", null);
|
|
729
|
-
__decorate([
|
|
730
|
-
Input(),
|
|
731
|
-
__metadata("design:type", String)
|
|
732
|
-
], ButtonDirective.prototype, "role", void 0);
|
|
733
|
-
__decorate([
|
|
734
|
-
Output(),
|
|
735
|
-
__metadata("design:type", EventEmitter)
|
|
736
|
-
], ButtonDirective.prototype, "selectedChange", void 0);
|
|
737
|
-
__decorate([
|
|
738
|
-
Output(),
|
|
739
|
-
__metadata("design:type", EventEmitter)
|
|
740
|
-
], ButtonDirective.prototype, "click", void 0);
|
|
741
|
-
__decorate([
|
|
742
|
-
HostBinding('class.k-button'),
|
|
743
|
-
__metadata("design:type", Boolean),
|
|
744
|
-
__metadata("design:paramtypes", [])
|
|
745
|
-
], ButtonDirective.prototype, "classButton", null);
|
|
746
|
-
__decorate([
|
|
747
|
-
HostBinding('class.k-toggle-button'),
|
|
748
|
-
__metadata("design:type", Boolean),
|
|
749
|
-
__metadata("design:paramtypes", [])
|
|
750
|
-
], ButtonDirective.prototype, "isToggleable", null);
|
|
751
|
-
__decorate([
|
|
752
|
-
HostBinding('attr.role'),
|
|
753
|
-
__metadata("design:type", String),
|
|
754
|
-
__metadata("design:paramtypes", [])
|
|
755
|
-
], ButtonDirective.prototype, "roleSetter", null);
|
|
756
|
-
__decorate([
|
|
757
|
-
HostBinding('attr.aria-disabled'),
|
|
758
|
-
HostBinding('class.k-disabled'),
|
|
759
|
-
__metadata("design:type", Boolean),
|
|
760
|
-
__metadata("design:paramtypes", [])
|
|
761
|
-
], ButtonDirective.prototype, "classDisabled", null);
|
|
762
|
-
__decorate([
|
|
763
|
-
HostBinding('class.k-selected'),
|
|
764
|
-
__metadata("design:type", Boolean),
|
|
765
|
-
__metadata("design:paramtypes", [])
|
|
766
|
-
], ButtonDirective.prototype, "classActive", null);
|
|
767
|
-
__decorate([
|
|
768
|
-
HostBinding('attr.dir'),
|
|
769
|
-
__metadata("design:type", String),
|
|
770
|
-
__metadata("design:paramtypes", [])
|
|
771
|
-
], ButtonDirective.prototype, "getDirection", null);
|
|
772
|
-
__decorate([
|
|
773
|
-
HostListener('focus'),
|
|
774
|
-
__metadata("design:type", Function),
|
|
775
|
-
__metadata("design:paramtypes", []),
|
|
776
|
-
__metadata("design:returntype", void 0)
|
|
777
|
-
], ButtonDirective.prototype, "onFocus", null);
|
|
778
|
-
__decorate([
|
|
779
|
-
HostListener('blur'),
|
|
780
|
-
__metadata("design:type", Function),
|
|
781
|
-
__metadata("design:paramtypes", []),
|
|
782
|
-
__metadata("design:returntype", void 0)
|
|
783
|
-
], ButtonDirective.prototype, "onBlur", null);
|
|
784
|
-
__decorate([
|
|
785
|
-
Input(),
|
|
786
|
-
__metadata("design:type", Boolean),
|
|
787
|
-
__metadata("design:paramtypes", [Boolean])
|
|
788
|
-
], ButtonDirective.prototype, "primary", null);
|
|
789
|
-
__decorate([
|
|
790
|
-
Input(),
|
|
791
|
-
__metadata("design:type", String),
|
|
792
|
-
__metadata("design:paramtypes", [String])
|
|
793
|
-
], ButtonDirective.prototype, "look", null);
|
|
794
|
-
ButtonDirective = __decorate([
|
|
795
|
-
Directive({
|
|
796
|
-
exportAs: 'kendoButton',
|
|
797
|
-
providers: [
|
|
798
|
-
LocalizationService,
|
|
799
|
-
{
|
|
800
|
-
provide: L10N_PREFIX,
|
|
801
|
-
useValue: 'kendo.button'
|
|
802
|
-
}
|
|
803
|
-
],
|
|
804
|
-
selector: 'button[kendoButton], span[kendoButton]',
|
|
805
|
-
}),
|
|
806
|
-
__param(2, Optional()),
|
|
807
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
808
|
-
Renderer2,
|
|
809
|
-
KendoButtonService,
|
|
661
|
+
}
|
|
662
|
+
ButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: KendoButtonService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
663
|
+
ButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: { toggleable: "toggleable", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", role: "role", primary: "primary", look: "look" }, outputs: { selectedChange: "selectedChange", click: "click" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-button": "this.classButton", "class.k-toggle-button": "this.isToggleable", "attr.role": "this.roleSetter", "attr.aria-disabled": "this.classDisabled", "class.k-disabled": "this.classDisabled", "class.k-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
|
|
810
664
|
LocalizationService,
|
|
811
|
-
|
|
812
|
-
|
|
665
|
+
{
|
|
666
|
+
provide: L10N_PREFIX,
|
|
667
|
+
useValue: 'kendo.button'
|
|
668
|
+
}
|
|
669
|
+
], exportAs: ["kendoButton"], usesOnChanges: true, ngImport: i0 });
|
|
670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
671
|
+
type: Directive,
|
|
672
|
+
args: [{
|
|
673
|
+
exportAs: 'kendoButton',
|
|
674
|
+
providers: [
|
|
675
|
+
LocalizationService,
|
|
676
|
+
{
|
|
677
|
+
provide: L10N_PREFIX,
|
|
678
|
+
useValue: 'kendo.button'
|
|
679
|
+
}
|
|
680
|
+
],
|
|
681
|
+
selector: 'button[kendoButton], span[kendoButton]' // eslint-disable-line
|
|
682
|
+
}]
|
|
683
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: KendoButtonService, decorators: [{
|
|
684
|
+
type: Optional
|
|
685
|
+
}] }, { type: i1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { toggleable: [{
|
|
686
|
+
type: Input
|
|
687
|
+
}], togglable: [{
|
|
688
|
+
type: Input
|
|
689
|
+
}], selected: [{
|
|
690
|
+
type: Input
|
|
691
|
+
}], tabIndex: [{
|
|
692
|
+
type: Input
|
|
693
|
+
}], icon: [{
|
|
694
|
+
type: Input
|
|
695
|
+
}], iconClass: [{
|
|
696
|
+
type: Input
|
|
697
|
+
}], imageUrl: [{
|
|
698
|
+
type: Input
|
|
699
|
+
}], disabled: [{
|
|
700
|
+
type: Input
|
|
701
|
+
}], size: [{
|
|
702
|
+
type: Input
|
|
703
|
+
}], rounded: [{
|
|
704
|
+
type: Input
|
|
705
|
+
}], fillMode: [{
|
|
706
|
+
type: Input
|
|
707
|
+
}], themeColor: [{
|
|
708
|
+
type: Input
|
|
709
|
+
}], role: [{
|
|
710
|
+
type: Input
|
|
711
|
+
}], selectedChange: [{
|
|
712
|
+
type: Output
|
|
713
|
+
}], click: [{
|
|
714
|
+
type: Output
|
|
715
|
+
}], classButton: [{
|
|
716
|
+
type: HostBinding,
|
|
717
|
+
args: ['class.k-button']
|
|
718
|
+
}], isToggleable: [{
|
|
719
|
+
type: HostBinding,
|
|
720
|
+
args: ['class.k-toggle-button']
|
|
721
|
+
}], roleSetter: [{
|
|
722
|
+
type: HostBinding,
|
|
723
|
+
args: ['attr.role']
|
|
724
|
+
}], classDisabled: [{
|
|
725
|
+
type: HostBinding,
|
|
726
|
+
args: ['attr.aria-disabled']
|
|
727
|
+
}, {
|
|
728
|
+
type: HostBinding,
|
|
729
|
+
args: ['class.k-disabled']
|
|
730
|
+
}], classActive: [{
|
|
731
|
+
type: HostBinding,
|
|
732
|
+
args: ['class.k-selected']
|
|
733
|
+
}], getDirection: [{
|
|
734
|
+
type: HostBinding,
|
|
735
|
+
args: ['attr.dir']
|
|
736
|
+
}], onFocus: [{
|
|
737
|
+
type: HostListener,
|
|
738
|
+
args: ['focus']
|
|
739
|
+
}], onBlur: [{
|
|
740
|
+
type: HostListener,
|
|
741
|
+
args: ['blur']
|
|
742
|
+
}], primary: [{
|
|
743
|
+
type: Input
|
|
744
|
+
}], look: [{
|
|
745
|
+
type: Input
|
|
746
|
+
}] } });
|
|
813
747
|
|
|
814
748
|
/**
|
|
815
749
|
* @hidden
|
|
@@ -842,7 +776,7 @@ const tabindex = 'tabindex';
|
|
|
842
776
|
/**
|
|
843
777
|
* Represents the Kendo UI ButtonGroup component for Angular.
|
|
844
778
|
*/
|
|
845
|
-
|
|
779
|
+
class ButtonGroupComponent {
|
|
846
780
|
constructor(service, localization, element) {
|
|
847
781
|
this.service = service;
|
|
848
782
|
this.element = element;
|
|
@@ -856,8 +790,9 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
856
790
|
this.navigate = new EventEmitter();
|
|
857
791
|
this._tabIndex = 0;
|
|
858
792
|
this.currentTabIndex = 0;
|
|
793
|
+
this.subs = new Subscription();
|
|
859
794
|
validatePackage(packageMetadata);
|
|
860
|
-
this.
|
|
795
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
|
861
796
|
}
|
|
862
797
|
/**
|
|
863
798
|
* Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
@@ -922,7 +857,7 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
922
857
|
}
|
|
923
858
|
}
|
|
924
859
|
ngOnInit() {
|
|
925
|
-
this.
|
|
860
|
+
this.subs.add(this.service.buttonClicked$.subscribe((button) => {
|
|
926
861
|
let newSelectionValue;
|
|
927
862
|
if (this.isSelectionSingle()) {
|
|
928
863
|
newSelectionValue = true;
|
|
@@ -936,7 +871,7 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
936
871
|
button.setSelected(newSelectionValue);
|
|
937
872
|
}
|
|
938
873
|
button.setAttribute(tabindex, '0');
|
|
939
|
-
});
|
|
874
|
+
}));
|
|
940
875
|
}
|
|
941
876
|
ngOnChanges(change) {
|
|
942
877
|
if (isChanged('disabled', change)) {
|
|
@@ -964,8 +899,7 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
964
899
|
}
|
|
965
900
|
}
|
|
966
901
|
ngOnDestroy() {
|
|
967
|
-
this.
|
|
968
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
902
|
+
this.subs.unsubscribe();
|
|
969
903
|
}
|
|
970
904
|
ngAfterContentChecked() {
|
|
971
905
|
this.verifySettings();
|
|
@@ -1028,110 +962,85 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
1028
962
|
isSelectionSingle() {
|
|
1029
963
|
return this.selection === 'single';
|
|
1030
964
|
}
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
__decorate([
|
|
1058
|
-
HostBinding('class.k-button-group'),
|
|
1059
|
-
__metadata("design:type", Boolean),
|
|
1060
|
-
__metadata("design:paramtypes", [])
|
|
1061
|
-
], ButtonGroupComponent.prototype, "wrapperClass", null);
|
|
1062
|
-
__decorate([
|
|
1063
|
-
HostBinding('class.k-disabled'),
|
|
1064
|
-
__metadata("design:type", Boolean),
|
|
1065
|
-
__metadata("design:paramtypes", [])
|
|
1066
|
-
], ButtonGroupComponent.prototype, "disabledClass", null);
|
|
1067
|
-
__decorate([
|
|
1068
|
-
HostBinding('class.k-button-group-stretched'),
|
|
1069
|
-
__metadata("design:type", Boolean),
|
|
1070
|
-
__metadata("design:paramtypes", [])
|
|
1071
|
-
], ButtonGroupComponent.prototype, "stretchedClass", null);
|
|
1072
|
-
__decorate([
|
|
1073
|
-
HostBinding('attr.role'),
|
|
1074
|
-
__metadata("design:type", String),
|
|
1075
|
-
__metadata("design:paramtypes", [])
|
|
1076
|
-
], ButtonGroupComponent.prototype, "getRole", null);
|
|
1077
|
-
__decorate([
|
|
1078
|
-
HostBinding('attr.dir'),
|
|
1079
|
-
__metadata("design:type", String),
|
|
1080
|
-
__metadata("design:paramtypes", [])
|
|
1081
|
-
], ButtonGroupComponent.prototype, "dir", null);
|
|
1082
|
-
__decorate([
|
|
1083
|
-
HostBinding('attr.aria-disabled'),
|
|
1084
|
-
__metadata("design:type", Boolean),
|
|
1085
|
-
__metadata("design:paramtypes", [])
|
|
1086
|
-
], ButtonGroupComponent.prototype, "ariaDisabled", null);
|
|
1087
|
-
__decorate([
|
|
1088
|
-
HostBinding('style.width'),
|
|
1089
|
-
__metadata("design:type", String),
|
|
1090
|
-
__metadata("design:paramtypes", [])
|
|
1091
|
-
], ButtonGroupComponent.prototype, "wrapperWidth", null);
|
|
1092
|
-
__decorate([
|
|
1093
|
-
HostBinding('attr.tabindex'),
|
|
1094
|
-
__metadata("design:type", Number),
|
|
1095
|
-
__metadata("design:paramtypes", [])
|
|
1096
|
-
], ButtonGroupComponent.prototype, "wrapperTabIndex", null);
|
|
1097
|
-
__decorate([
|
|
1098
|
-
HostListener('keydown', ['$event']),
|
|
1099
|
-
__metadata("design:type", Function),
|
|
1100
|
-
__metadata("design:paramtypes", [Object]),
|
|
1101
|
-
__metadata("design:returntype", void 0)
|
|
1102
|
-
], ButtonGroupComponent.prototype, "keydown", null);
|
|
1103
|
-
__decorate([
|
|
1104
|
-
HostListener('focus'),
|
|
1105
|
-
__metadata("design:type", Function),
|
|
1106
|
-
__metadata("design:paramtypes", []),
|
|
1107
|
-
__metadata("design:returntype", void 0)
|
|
1108
|
-
], ButtonGroupComponent.prototype, "onFocus", null);
|
|
1109
|
-
__decorate([
|
|
1110
|
-
HostListener('focusout', ['$event']),
|
|
1111
|
-
__metadata("design:type", Function),
|
|
1112
|
-
__metadata("design:paramtypes", [Object]),
|
|
1113
|
-
__metadata("design:returntype", void 0)
|
|
1114
|
-
], ButtonGroupComponent.prototype, "focusout", null);
|
|
1115
|
-
ButtonGroupComponent = __decorate([
|
|
1116
|
-
Component({
|
|
1117
|
-
exportAs: 'kendoButtonGroup',
|
|
1118
|
-
providers: [
|
|
1119
|
-
KendoButtonService,
|
|
1120
|
-
LocalizationService,
|
|
1121
|
-
{
|
|
1122
|
-
provide: L10N_PREFIX,
|
|
1123
|
-
useValue: 'kendo.buttongroup'
|
|
1124
|
-
}
|
|
1125
|
-
],
|
|
1126
|
-
selector: 'kendo-buttongroup',
|
|
1127
|
-
template: `
|
|
965
|
+
}
|
|
966
|
+
ButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonGroupComponent, deps: [{ token: KendoButtonService }, { token: i1.LocalizationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
967
|
+
ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", tabIndex: "tabIndex" }, outputs: { navigate: "navigate" }, host: { listeners: { "keydown": "keydown($event)", "focus": "onFocus()", "focusout": "focusout($event)" }, properties: { "class.k-button-group": "this.wrapperClass", "class.k-disabled": "this.disabledClass", "class.k-button-group-stretched": "this.stretchedClass", "attr.role": "this.getRole", "attr.dir": "this.dir", "attr.aria-disabled": "this.ariaDisabled", "style.width": "this.wrapperWidth", "attr.tabindex": "this.wrapperTabIndex" } }, providers: [
|
|
968
|
+
KendoButtonService,
|
|
969
|
+
LocalizationService,
|
|
970
|
+
{
|
|
971
|
+
provide: L10N_PREFIX,
|
|
972
|
+
useValue: 'kendo.buttongroup'
|
|
973
|
+
}
|
|
974
|
+
], queries: [{ propertyName: "buttons", predicate: ButtonDirective }], exportAs: ["kendoButtonGroup"], usesOnChanges: true, ngImport: i0, template: `
|
|
975
|
+
<ng-content select="[kendoButton]"></ng-content>
|
|
976
|
+
`, isInline: true });
|
|
977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonGroupComponent, decorators: [{
|
|
978
|
+
type: Component,
|
|
979
|
+
args: [{
|
|
980
|
+
exportAs: 'kendoButtonGroup',
|
|
981
|
+
providers: [
|
|
982
|
+
KendoButtonService,
|
|
983
|
+
LocalizationService,
|
|
984
|
+
{
|
|
985
|
+
provide: L10N_PREFIX,
|
|
986
|
+
useValue: 'kendo.buttongroup'
|
|
987
|
+
}
|
|
988
|
+
],
|
|
989
|
+
selector: 'kendo-buttongroup',
|
|
990
|
+
template: `
|
|
1128
991
|
<ng-content select="[kendoButton]"></ng-content>
|
|
1129
992
|
`
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
],
|
|
993
|
+
}]
|
|
994
|
+
}], ctorParameters: function () { return [{ type: KendoButtonService }, { type: i1.LocalizationService }, { type: i0.ElementRef }]; }, propDecorators: { disabled: [{
|
|
995
|
+
type: Input,
|
|
996
|
+
args: ['disabled']
|
|
997
|
+
}], selection: [{
|
|
998
|
+
type: Input,
|
|
999
|
+
args: ['selection']
|
|
1000
|
+
}], width: [{
|
|
1001
|
+
type: Input,
|
|
1002
|
+
args: ['width']
|
|
1003
|
+
}], tabIndex: [{
|
|
1004
|
+
type: Input
|
|
1005
|
+
}], navigate: [{
|
|
1006
|
+
type: Output
|
|
1007
|
+
}], buttons: [{
|
|
1008
|
+
type: ContentChildren,
|
|
1009
|
+
args: [ButtonDirective]
|
|
1010
|
+
}], wrapperClass: [{
|
|
1011
|
+
type: HostBinding,
|
|
1012
|
+
args: ['class.k-button-group']
|
|
1013
|
+
}], disabledClass: [{
|
|
1014
|
+
type: HostBinding,
|
|
1015
|
+
args: ['class.k-disabled']
|
|
1016
|
+
}], stretchedClass: [{
|
|
1017
|
+
type: HostBinding,
|
|
1018
|
+
args: ['class.k-button-group-stretched']
|
|
1019
|
+
}], getRole: [{
|
|
1020
|
+
type: HostBinding,
|
|
1021
|
+
args: ['attr.role']
|
|
1022
|
+
}], dir: [{
|
|
1023
|
+
type: HostBinding,
|
|
1024
|
+
args: ['attr.dir']
|
|
1025
|
+
}], ariaDisabled: [{
|
|
1026
|
+
type: HostBinding,
|
|
1027
|
+
args: ['attr.aria-disabled']
|
|
1028
|
+
}], wrapperWidth: [{
|
|
1029
|
+
type: HostBinding,
|
|
1030
|
+
args: ['style.width']
|
|
1031
|
+
}], wrapperTabIndex: [{
|
|
1032
|
+
type: HostBinding,
|
|
1033
|
+
args: ['attr.tabindex']
|
|
1034
|
+
}], keydown: [{
|
|
1035
|
+
type: HostListener,
|
|
1036
|
+
args: ['keydown', ['$event']]
|
|
1037
|
+
}], onFocus: [{
|
|
1038
|
+
type: HostListener,
|
|
1039
|
+
args: ['focus']
|
|
1040
|
+
}], focusout: [{
|
|
1041
|
+
type: HostListener,
|
|
1042
|
+
args: ['focusout', ['$event']]
|
|
1043
|
+
}] } });
|
|
1135
1044
|
|
|
1136
1045
|
/**
|
|
1137
1046
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
@@ -1164,14 +1073,18 @@ ButtonGroupComponent = __decorate([
|
|
|
1164
1073
|
*
|
|
1165
1074
|
* ```
|
|
1166
1075
|
*/
|
|
1167
|
-
|
|
1168
|
-
}
|
|
1169
|
-
ButtonModule =
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1076
|
+
class ButtonModule {
|
|
1077
|
+
}
|
|
1078
|
+
ButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1079
|
+
ButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonModule, declarations: [ButtonDirective], exports: [ButtonDirective] });
|
|
1080
|
+
ButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonModule });
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonModule, decorators: [{
|
|
1082
|
+
type: NgModule,
|
|
1083
|
+
args: [{
|
|
1084
|
+
declarations: [ButtonDirective],
|
|
1085
|
+
exports: [ButtonDirective]
|
|
1086
|
+
}]
|
|
1087
|
+
}] });
|
|
1175
1088
|
|
|
1176
1089
|
/**
|
|
1177
1090
|
* @hidden
|
|
@@ -1181,188 +1094,24 @@ ButtonModule = __decorate([
|
|
|
1181
1094
|
* The package exports:
|
|
1182
1095
|
* - `ButtonGroupComponent`—The ButtonGroupComponent component class.
|
|
1183
1096
|
*/
|
|
1184
|
-
|
|
1185
|
-
}
|
|
1186
|
-
ButtonGroupModule =
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
],
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
* To define the item template, nest a `<ng-template>` tag with the `kendo<ComponentName>ItemTemplate` directive inside the component tag.
|
|
1198
|
-
*
|
|
1199
|
-
* For the DropDownButton, use the `kendoDropDownButtonItemTemplate` directive.
|
|
1200
|
-
* For the SplitButton, use the `kendoSplitButtonItemTemplate` directive.
|
|
1201
|
-
*
|
|
1202
|
-
* The template context is set to the current component. To get a reference to the current data item, use the `let-dataItem` directive.
|
|
1203
|
-
*
|
|
1204
|
-
* @example
|
|
1205
|
-
* ```ts
|
|
1206
|
-
* _@Component({
|
|
1207
|
-
* selector: 'my-app',
|
|
1208
|
-
* template: `
|
|
1209
|
-
* <kendo-splitbutton [data]="listItems">
|
|
1210
|
-
* <ng-template kendoSplitButtonItemTemplate let-dataItem>
|
|
1211
|
-
* <span>{{dataItem}} option</span>
|
|
1212
|
-
* </ng-template>
|
|
1213
|
-
* </kendo-splitbutton>
|
|
1214
|
-
* <kendo-dropdownbutton [data]="listItems">
|
|
1215
|
-
* <ng-template kendoDropDownButtonItemTemplate let-dataItem>
|
|
1216
|
-
* <span>{{dataItem}} option</span>
|
|
1217
|
-
* </ng-template>
|
|
1218
|
-
* </kendo-dropdownbutton>
|
|
1219
|
-
* `
|
|
1220
|
-
* })
|
|
1221
|
-
* class AppComponent {
|
|
1222
|
-
* public listItems: Array<any> = [{
|
|
1223
|
-
* text: 'item1',
|
|
1224
|
-
* icon: 'refresh',
|
|
1225
|
-
* disabled: false,
|
|
1226
|
-
* click: (dataItem: any) => {
|
|
1227
|
-
* //action
|
|
1228
|
-
* }
|
|
1229
|
-
* }, {
|
|
1230
|
-
* text: 'item2',
|
|
1231
|
-
* icon: 'refresh',
|
|
1232
|
-
* disabled: false,
|
|
1233
|
-
* click: (dataItem: any) => {
|
|
1234
|
-
* //action
|
|
1235
|
-
* }
|
|
1236
|
-
* }]
|
|
1237
|
-
* }
|
|
1238
|
-
* ```
|
|
1239
|
-
*
|
|
1240
|
-
* For more examples, refer to the article on the [DropDownList templates]({% slug overview_ddl %}#templates).
|
|
1241
|
-
*/
|
|
1242
|
-
let ButtonItemTemplateDirective = class ButtonItemTemplateDirective {
|
|
1243
|
-
constructor(templateRef) {
|
|
1244
|
-
this.templateRef = templateRef;
|
|
1245
|
-
}
|
|
1246
|
-
};
|
|
1247
|
-
ButtonItemTemplateDirective = __decorate([
|
|
1248
|
-
Directive({
|
|
1249
|
-
selector: '[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]'
|
|
1250
|
-
}),
|
|
1251
|
-
__metadata("design:paramtypes", [TemplateRef])
|
|
1252
|
-
], ButtonItemTemplateDirective);
|
|
1253
|
-
|
|
1254
|
-
/**
|
|
1255
|
-
* @hidden
|
|
1256
|
-
*/
|
|
1257
|
-
let ListComponent = class ListComponent {
|
|
1258
|
-
constructor() {
|
|
1259
|
-
this.onItemClick = new EventEmitter();
|
|
1260
|
-
this.onItemBlur = new EventEmitter();
|
|
1261
|
-
this.sizeClass = '';
|
|
1262
|
-
validatePackage(packageMetadata);
|
|
1263
|
-
}
|
|
1264
|
-
set size(size) {
|
|
1265
|
-
if (size) {
|
|
1266
|
-
this.sizeClass = `k-menu-group-${SIZES[size]}`;
|
|
1267
|
-
}
|
|
1268
|
-
else {
|
|
1269
|
-
this.sizeClass = '';
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
getText(dataItem) {
|
|
1273
|
-
if (dataItem) {
|
|
1274
|
-
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1275
|
-
}
|
|
1276
|
-
return undefined;
|
|
1277
|
-
}
|
|
1278
|
-
getIconClasses(dataItem) {
|
|
1279
|
-
const icon = dataItem.icon ? 'k-icon k-i-' + dataItem.icon : undefined;
|
|
1280
|
-
const classes = {};
|
|
1281
|
-
classes[icon || dataItem.iconClass] = true;
|
|
1282
|
-
return classes;
|
|
1283
|
-
}
|
|
1284
|
-
onClick(index) {
|
|
1285
|
-
this.onItemClick.emit(index);
|
|
1286
|
-
}
|
|
1287
|
-
onBlur() {
|
|
1288
|
-
this.onItemBlur.emit();
|
|
1289
|
-
}
|
|
1290
|
-
};
|
|
1291
|
-
__decorate([
|
|
1292
|
-
Input(),
|
|
1293
|
-
__metadata("design:type", Array)
|
|
1294
|
-
], ListComponent.prototype, "data", void 0);
|
|
1295
|
-
__decorate([
|
|
1296
|
-
Input(),
|
|
1297
|
-
__metadata("design:type", String)
|
|
1298
|
-
], ListComponent.prototype, "textField", void 0);
|
|
1299
|
-
__decorate([
|
|
1300
|
-
Input(),
|
|
1301
|
-
__metadata("design:type", ButtonItemTemplateDirective)
|
|
1302
|
-
], ListComponent.prototype, "itemTemplate", void 0);
|
|
1303
|
-
__decorate([
|
|
1304
|
-
Output(),
|
|
1305
|
-
__metadata("design:type", EventEmitter)
|
|
1306
|
-
], ListComponent.prototype, "onItemClick", void 0);
|
|
1307
|
-
__decorate([
|
|
1308
|
-
Output(),
|
|
1309
|
-
__metadata("design:type", EventEmitter)
|
|
1310
|
-
], ListComponent.prototype, "onItemBlur", void 0);
|
|
1311
|
-
__decorate([
|
|
1312
|
-
Input(),
|
|
1313
|
-
__metadata("design:type", String),
|
|
1314
|
-
__metadata("design:paramtypes", [String])
|
|
1315
|
-
], ListComponent.prototype, "size", null);
|
|
1316
|
-
ListComponent = __decorate([
|
|
1317
|
-
Component({
|
|
1318
|
-
selector: 'kendo-button-list',
|
|
1319
|
-
template: `
|
|
1320
|
-
<ul class="k-group k-menu-group k-reset" [ngClass]="sizeClass" unselectable="on" role="menu">
|
|
1321
|
-
<li role="menuitem" unselectable="on"
|
|
1322
|
-
kendoButtonFocusable
|
|
1323
|
-
*ngFor="let dataItem of data; let index = index;"
|
|
1324
|
-
[index]="index"
|
|
1325
|
-
tabindex="-1"
|
|
1326
|
-
class="k-item k-menu-item"
|
|
1327
|
-
(click)="onClick(index)"
|
|
1328
|
-
(blur)="onBlur()"
|
|
1329
|
-
[attr.aria-disabled]="dataItem.disabled ? true : false">
|
|
1330
|
-
<ng-template [ngIf]="itemTemplate?.templateRef">
|
|
1331
|
-
<span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
|
|
1332
|
-
<ng-template [templateContext]="{templateRef: itemTemplate?.templateRef, $implicit: dataItem}"></ng-template>
|
|
1333
|
-
</span>
|
|
1334
|
-
</ng-template>
|
|
1335
|
-
<ng-template [ngIf]="!itemTemplate?.templateRef">
|
|
1336
|
-
<span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
|
|
1337
|
-
<span
|
|
1338
|
-
*ngIf="dataItem.icon || dataItem.iconClass"
|
|
1339
|
-
[ngClass]="getIconClasses(dataItem)"
|
|
1340
|
-
></span>
|
|
1341
|
-
<img
|
|
1342
|
-
*ngIf="dataItem.imageUrl"
|
|
1343
|
-
class="k-image"
|
|
1344
|
-
[src]="dataItem.imageUrl"
|
|
1345
|
-
alt=""
|
|
1346
|
-
>
|
|
1347
|
-
<span *ngIf="getText(dataItem)" class="k-menu-link-text">
|
|
1348
|
-
{{ getText(dataItem) }}
|
|
1349
|
-
</span>
|
|
1350
|
-
</span>
|
|
1351
|
-
</ng-template>
|
|
1352
|
-
</li>
|
|
1353
|
-
</ul>
|
|
1354
|
-
`
|
|
1355
|
-
}),
|
|
1356
|
-
__metadata("design:paramtypes", [])
|
|
1357
|
-
], ListComponent);
|
|
1097
|
+
class ButtonGroupModule {
|
|
1098
|
+
}
|
|
1099
|
+
ButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1100
|
+
ButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonGroupModule, declarations: [ButtonGroupComponent], imports: [CommonModule, ButtonModule], exports: [ButtonGroupComponent] });
|
|
1101
|
+
ButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonGroupModule, imports: [[CommonModule, ButtonModule]] });
|
|
1102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonGroupModule, decorators: [{
|
|
1103
|
+
type: NgModule,
|
|
1104
|
+
args: [{
|
|
1105
|
+
declarations: [ButtonGroupComponent],
|
|
1106
|
+
exports: [ButtonGroupComponent],
|
|
1107
|
+
imports: [CommonModule, ButtonModule]
|
|
1108
|
+
}]
|
|
1109
|
+
}] });
|
|
1358
1110
|
|
|
1359
1111
|
/**
|
|
1360
1112
|
* @hidden
|
|
1361
1113
|
*/
|
|
1362
|
-
|
|
1363
|
-
/**
|
|
1364
|
-
* @hidden
|
|
1365
|
-
*/
|
|
1114
|
+
class FocusService {
|
|
1366
1115
|
constructor() {
|
|
1367
1116
|
this.onFocus = new EventEmitter();
|
|
1368
1117
|
}
|
|
@@ -1386,18 +1135,21 @@ let FocusService = class FocusService {
|
|
|
1386
1135
|
this.focusedIndex = index;
|
|
1387
1136
|
this.onFocus.emit(index);
|
|
1388
1137
|
}
|
|
1389
|
-
}
|
|
1390
|
-
FocusService =
|
|
1391
|
-
|
|
1392
|
-
|
|
1138
|
+
}
|
|
1139
|
+
FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1140
|
+
FocusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService });
|
|
1141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, decorators: [{
|
|
1142
|
+
type: Injectable
|
|
1143
|
+
}] });
|
|
1393
1144
|
|
|
1394
1145
|
/**
|
|
1395
1146
|
* @hidden
|
|
1396
1147
|
*/
|
|
1397
|
-
|
|
1148
|
+
class FocusableDirective {
|
|
1398
1149
|
constructor(focusService, elementRef, renderer) {
|
|
1399
1150
|
this.focusService = focusService;
|
|
1400
1151
|
this.renderer = renderer;
|
|
1152
|
+
this.subs = new Subscription();
|
|
1401
1153
|
this.element = elementRef.nativeElement;
|
|
1402
1154
|
this.subscribeEvents();
|
|
1403
1155
|
}
|
|
@@ -1413,13 +1165,13 @@ let FocusableDirective = class FocusableDirective {
|
|
|
1413
1165
|
* @hidden
|
|
1414
1166
|
*/
|
|
1415
1167
|
ngOnDestroy() {
|
|
1416
|
-
this.
|
|
1168
|
+
this.subs.unsubscribe();
|
|
1417
1169
|
}
|
|
1418
1170
|
subscribeEvents() {
|
|
1419
1171
|
if (!isDocumentAvailable()) {
|
|
1420
1172
|
return;
|
|
1421
1173
|
}
|
|
1422
|
-
this.
|
|
1174
|
+
this.subs.add(this.focusService.onFocus.subscribe((index) => {
|
|
1423
1175
|
if (this.index === index) {
|
|
1424
1176
|
this.renderer.addClass(this.element, 'k-focus');
|
|
1425
1177
|
this.element.focus();
|
|
@@ -1427,32 +1179,24 @@ let FocusableDirective = class FocusableDirective {
|
|
|
1427
1179
|
else {
|
|
1428
1180
|
this.renderer.removeClass(this.element, 'k-focus');
|
|
1429
1181
|
}
|
|
1430
|
-
});
|
|
1431
|
-
}
|
|
1432
|
-
unsubscribeEvents() {
|
|
1433
|
-
if (!isDocumentAvailable()) {
|
|
1434
|
-
return;
|
|
1435
|
-
}
|
|
1436
|
-
if (this.focusSubscription) {
|
|
1437
|
-
this.focusSubscription.unsubscribe();
|
|
1438
|
-
}
|
|
1182
|
+
}));
|
|
1439
1183
|
}
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
]
|
|
1184
|
+
}
|
|
1185
|
+
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusableDirective, deps: [{ token: FocusService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1186
|
+
FocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FocusableDirective, selector: "[kendoButtonFocusable]", inputs: { index: "index" }, ngImport: i0 });
|
|
1187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusableDirective, decorators: [{
|
|
1188
|
+
type: Directive,
|
|
1189
|
+
args: [{
|
|
1190
|
+
selector: '[kendoButtonFocusable]'
|
|
1191
|
+
}]
|
|
1192
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { index: [{
|
|
1193
|
+
type: Input
|
|
1194
|
+
}] } });
|
|
1451
1195
|
|
|
1452
1196
|
/**
|
|
1453
1197
|
* @hidden
|
|
1454
1198
|
*/
|
|
1455
|
-
|
|
1199
|
+
class TemplateContextDirective {
|
|
1456
1200
|
constructor(viewContainerRef) {
|
|
1457
1201
|
this.viewContainerRef = viewContainerRef;
|
|
1458
1202
|
}
|
|
@@ -1465,86 +1209,398 @@ let TemplateContextDirective = class TemplateContextDirective {
|
|
|
1465
1209
|
this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context);
|
|
1466
1210
|
}
|
|
1467
1211
|
}
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
]
|
|
1480
|
-
|
|
1481
|
-
const EXPORTED_DIRECTIVES = [
|
|
1482
|
-
ListComponent,
|
|
1483
|
-
FocusableDirective,
|
|
1484
|
-
ButtonItemTemplateDirective,
|
|
1485
|
-
TemplateContextDirective
|
|
1486
|
-
];
|
|
1487
|
-
/**
|
|
1488
|
-
* @hidden
|
|
1489
|
-
*/
|
|
1490
|
-
let ListModule = class ListModule {
|
|
1491
|
-
};
|
|
1492
|
-
ListModule = __decorate([
|
|
1493
|
-
NgModule({
|
|
1494
|
-
declarations: [EXPORTED_DIRECTIVES],
|
|
1495
|
-
exports: [EXPORTED_DIRECTIVES],
|
|
1496
|
-
imports: [CommonModule]
|
|
1497
|
-
})
|
|
1498
|
-
], ListModule);
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* @hidden
|
|
1502
|
-
*/
|
|
1503
|
-
var KeyEvents;
|
|
1504
|
-
(function (KeyEvents) {
|
|
1505
|
-
KeyEvents[KeyEvents["keydown"] = 0] = "keydown";
|
|
1506
|
-
KeyEvents[KeyEvents["keypress"] = 1] = "keypress";
|
|
1507
|
-
KeyEvents[KeyEvents["keyup"] = 2] = "keyup";
|
|
1508
|
-
})(KeyEvents || (KeyEvents = {}));
|
|
1509
|
-
|
|
1510
|
-
/**
|
|
1511
|
-
* @hidden
|
|
1512
|
-
*/
|
|
1513
|
-
var NavigationAction;
|
|
1514
|
-
(function (NavigationAction) {
|
|
1515
|
-
NavigationAction[NavigationAction["Undefined"] = 0] = "Undefined";
|
|
1516
|
-
NavigationAction[NavigationAction["Open"] = 1] = "Open";
|
|
1517
|
-
NavigationAction[NavigationAction["Close"] = 2] = "Close";
|
|
1518
|
-
NavigationAction[NavigationAction["Enter"] = 3] = "Enter";
|
|
1519
|
-
NavigationAction[NavigationAction["EnterPress"] = 4] = "EnterPress";
|
|
1520
|
-
NavigationAction[NavigationAction["EnterUp"] = 5] = "EnterUp";
|
|
1521
|
-
NavigationAction[NavigationAction["Tab"] = 6] = "Tab";
|
|
1522
|
-
NavigationAction[NavigationAction["Esc"] = 7] = "Esc";
|
|
1523
|
-
NavigationAction[NavigationAction["Navigate"] = 8] = "Navigate";
|
|
1524
|
-
})(NavigationAction || (NavigationAction = {}));
|
|
1212
|
+
}
|
|
1213
|
+
TemplateContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateContextDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1214
|
+
TemplateContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TemplateContextDirective, selector: "[templateContext]", inputs: { templateContext: "templateContext" }, ngImport: i0 });
|
|
1215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateContextDirective, decorators: [{
|
|
1216
|
+
type: Directive,
|
|
1217
|
+
args: [{
|
|
1218
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1219
|
+
selector: '[templateContext]'
|
|
1220
|
+
}]
|
|
1221
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateContext: [{
|
|
1222
|
+
type: Input
|
|
1223
|
+
}] } });
|
|
1525
1224
|
|
|
1526
|
-
/* tslint:disable:deprecation */
|
|
1527
1225
|
/**
|
|
1528
1226
|
* @hidden
|
|
1529
1227
|
*/
|
|
1530
|
-
class
|
|
1531
|
-
constructor(
|
|
1532
|
-
this.
|
|
1533
|
-
this.
|
|
1534
|
-
this.
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1228
|
+
class ListComponent {
|
|
1229
|
+
constructor() {
|
|
1230
|
+
this.onItemClick = new EventEmitter();
|
|
1231
|
+
this.onItemBlur = new EventEmitter();
|
|
1232
|
+
this.sizeClass = '';
|
|
1233
|
+
validatePackage(packageMetadata);
|
|
1234
|
+
}
|
|
1235
|
+
set size(size) {
|
|
1236
|
+
if (size) {
|
|
1237
|
+
this.sizeClass = `k-menu-group-${SIZES[size]}`;
|
|
1238
|
+
}
|
|
1239
|
+
else {
|
|
1240
|
+
this.sizeClass = '';
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
getText(dataItem) {
|
|
1244
|
+
if (dataItem) {
|
|
1245
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1246
|
+
}
|
|
1247
|
+
return undefined;
|
|
1248
|
+
}
|
|
1249
|
+
getIconClasses(dataItem) {
|
|
1250
|
+
const icon = dataItem.icon ? 'k-icon k-i-' + dataItem.icon : undefined;
|
|
1251
|
+
const classes = {};
|
|
1252
|
+
classes[icon || dataItem.iconClass] = true;
|
|
1253
|
+
return classes;
|
|
1254
|
+
}
|
|
1255
|
+
onClick(index) {
|
|
1256
|
+
this.onItemClick.emit(index);
|
|
1257
|
+
}
|
|
1258
|
+
onBlur() {
|
|
1259
|
+
this.onItemBlur.emit();
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1263
|
+
ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ListComponent, selector: "kendo-button-list", inputs: { data: "data", textField: "textField", itemTemplate: "itemTemplate", size: "size" }, outputs: { onItemClick: "onItemClick", onItemBlur: "onItemBlur" }, ngImport: i0, template: `
|
|
1264
|
+
<ul class="k-group k-menu-group k-reset" [ngClass]="sizeClass" unselectable="on" role="menu">
|
|
1265
|
+
<li role="menuitem" unselectable="on"
|
|
1266
|
+
kendoButtonFocusable
|
|
1267
|
+
*ngFor="let dataItem of data; let index = index;"
|
|
1268
|
+
[index]="index"
|
|
1269
|
+
tabindex="-1"
|
|
1270
|
+
class="k-item k-menu-item"
|
|
1271
|
+
(click)="onClick(index)"
|
|
1272
|
+
(blur)="onBlur()"
|
|
1273
|
+
[attr.aria-disabled]="dataItem.disabled ? true : false">
|
|
1274
|
+
<ng-template [ngIf]="itemTemplate?.templateRef">
|
|
1275
|
+
<span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
|
|
1276
|
+
<ng-template [templateContext]="{templateRef: itemTemplate?.templateRef, $implicit: dataItem}"></ng-template>
|
|
1277
|
+
</span>
|
|
1278
|
+
</ng-template>
|
|
1279
|
+
<ng-template [ngIf]="!itemTemplate?.templateRef">
|
|
1280
|
+
<span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
|
|
1281
|
+
<span
|
|
1282
|
+
*ngIf="dataItem.icon || dataItem.iconClass"
|
|
1283
|
+
[ngClass]="getIconClasses(dataItem)"
|
|
1284
|
+
></span>
|
|
1285
|
+
<img
|
|
1286
|
+
*ngIf="dataItem.imageUrl"
|
|
1287
|
+
class="k-image"
|
|
1288
|
+
[src]="dataItem.imageUrl"
|
|
1289
|
+
alt=""
|
|
1290
|
+
>
|
|
1291
|
+
<span *ngIf="getText(dataItem)" class="k-menu-link-text">
|
|
1292
|
+
{{ getText(dataItem) }}
|
|
1293
|
+
</span>
|
|
1294
|
+
</span>
|
|
1295
|
+
</ng-template>
|
|
1296
|
+
</li>
|
|
1297
|
+
</ul>
|
|
1298
|
+
`, isInline: true, directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: FocusableDirective, selector: "[kendoButtonFocusable]", inputs: ["index"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
1299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListComponent, decorators: [{
|
|
1300
|
+
type: Component,
|
|
1301
|
+
args: [{
|
|
1302
|
+
selector: 'kendo-button-list',
|
|
1303
|
+
template: `
|
|
1304
|
+
<ul class="k-group k-menu-group k-reset" [ngClass]="sizeClass" unselectable="on" role="menu">
|
|
1305
|
+
<li role="menuitem" unselectable="on"
|
|
1306
|
+
kendoButtonFocusable
|
|
1307
|
+
*ngFor="let dataItem of data; let index = index;"
|
|
1308
|
+
[index]="index"
|
|
1309
|
+
tabindex="-1"
|
|
1310
|
+
class="k-item k-menu-item"
|
|
1311
|
+
(click)="onClick(index)"
|
|
1312
|
+
(blur)="onBlur()"
|
|
1313
|
+
[attr.aria-disabled]="dataItem.disabled ? true : false">
|
|
1314
|
+
<ng-template [ngIf]="itemTemplate?.templateRef">
|
|
1315
|
+
<span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
|
|
1316
|
+
<ng-template [templateContext]="{templateRef: itemTemplate?.templateRef, $implicit: dataItem}"></ng-template>
|
|
1317
|
+
</span>
|
|
1318
|
+
</ng-template>
|
|
1319
|
+
<ng-template [ngIf]="!itemTemplate?.templateRef">
|
|
1320
|
+
<span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
|
|
1321
|
+
<span
|
|
1322
|
+
*ngIf="dataItem.icon || dataItem.iconClass"
|
|
1323
|
+
[ngClass]="getIconClasses(dataItem)"
|
|
1324
|
+
></span>
|
|
1325
|
+
<img
|
|
1326
|
+
*ngIf="dataItem.imageUrl"
|
|
1327
|
+
class="k-image"
|
|
1328
|
+
[src]="dataItem.imageUrl"
|
|
1329
|
+
alt=""
|
|
1330
|
+
>
|
|
1331
|
+
<span *ngIf="getText(dataItem)" class="k-menu-link-text">
|
|
1332
|
+
{{ getText(dataItem) }}
|
|
1333
|
+
</span>
|
|
1334
|
+
</span>
|
|
1335
|
+
</ng-template>
|
|
1336
|
+
</li>
|
|
1337
|
+
</ul>
|
|
1338
|
+
`
|
|
1339
|
+
}]
|
|
1340
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
1341
|
+
type: Input
|
|
1342
|
+
}], textField: [{
|
|
1343
|
+
type: Input
|
|
1344
|
+
}], itemTemplate: [{
|
|
1345
|
+
type: Input
|
|
1346
|
+
}], onItemClick: [{
|
|
1347
|
+
type: Output
|
|
1348
|
+
}], onItemBlur: [{
|
|
1349
|
+
type: Output
|
|
1350
|
+
}], size: [{
|
|
1351
|
+
type: Input
|
|
1352
|
+
}] } });
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Used for rendering the list item content.
|
|
1356
|
+
*
|
|
1357
|
+
* To define the item template, nest a `<ng-template>` tag with the `kendo<ComponentName>ItemTemplate` directive inside the component tag.
|
|
1358
|
+
*
|
|
1359
|
+
* For the DropDownButton, use the `kendoDropDownButtonItemTemplate` directive.
|
|
1360
|
+
* For the SplitButton, use the `kendoSplitButtonItemTemplate` directive.
|
|
1361
|
+
*
|
|
1362
|
+
* The template context is set to the current component. To get a reference to the current data item, use the `let-dataItem` directive.
|
|
1363
|
+
*
|
|
1364
|
+
* @example
|
|
1365
|
+
* ```ts
|
|
1366
|
+
* _@Component({
|
|
1367
|
+
* selector: 'my-app',
|
|
1368
|
+
* template: `
|
|
1369
|
+
* <kendo-splitbutton [data]="listItems">
|
|
1370
|
+
* <ng-template kendoSplitButtonItemTemplate let-dataItem>
|
|
1371
|
+
* <span>{{dataItem}} option</span>
|
|
1372
|
+
* </ng-template>
|
|
1373
|
+
* </kendo-splitbutton>
|
|
1374
|
+
* <kendo-dropdownbutton [data]="listItems">
|
|
1375
|
+
* <ng-template kendoDropDownButtonItemTemplate let-dataItem>
|
|
1376
|
+
* <span>{{dataItem}} option</span>
|
|
1377
|
+
* </ng-template>
|
|
1378
|
+
* </kendo-dropdownbutton>
|
|
1379
|
+
* `
|
|
1380
|
+
* })
|
|
1381
|
+
* class AppComponent {
|
|
1382
|
+
* public listItems: Array<any> = [{
|
|
1383
|
+
* text: 'item1',
|
|
1384
|
+
* icon: 'refresh',
|
|
1385
|
+
* disabled: false,
|
|
1386
|
+
* click: (dataItem: any) => {
|
|
1387
|
+
* //action
|
|
1388
|
+
* }
|
|
1389
|
+
* }, {
|
|
1390
|
+
* text: 'item2',
|
|
1391
|
+
* icon: 'refresh',
|
|
1392
|
+
* disabled: false,
|
|
1393
|
+
* click: (dataItem: any) => {
|
|
1394
|
+
* //action
|
|
1395
|
+
* }
|
|
1396
|
+
* }]
|
|
1397
|
+
* }
|
|
1398
|
+
* ```
|
|
1399
|
+
*
|
|
1400
|
+
* For more examples, refer to the article on the [DropDownList templates]({% slug overview_ddl %}#templates).
|
|
1401
|
+
*/
|
|
1402
|
+
class ButtonItemTemplateDirective {
|
|
1403
|
+
constructor(templateRef) {
|
|
1404
|
+
this.templateRef = templateRef;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
ButtonItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonItemTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1408
|
+
ButtonItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ButtonItemTemplateDirective, selector: "[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]", ngImport: i0 });
|
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonItemTemplateDirective, decorators: [{
|
|
1410
|
+
type: Directive,
|
|
1411
|
+
args: [{
|
|
1412
|
+
selector: '[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]'
|
|
1413
|
+
}]
|
|
1414
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1415
|
+
|
|
1416
|
+
const EXPORTED_DIRECTIVES = [
|
|
1417
|
+
ListComponent,
|
|
1418
|
+
FocusableDirective,
|
|
1419
|
+
ButtonItemTemplateDirective,
|
|
1420
|
+
TemplateContextDirective
|
|
1421
|
+
];
|
|
1422
|
+
/**
|
|
1423
|
+
* @hidden
|
|
1424
|
+
*/
|
|
1425
|
+
class ListModule {
|
|
1426
|
+
}
|
|
1427
|
+
ListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1428
|
+
ListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListModule, declarations: [ListComponent,
|
|
1429
|
+
FocusableDirective,
|
|
1430
|
+
ButtonItemTemplateDirective,
|
|
1431
|
+
TemplateContextDirective], imports: [CommonModule], exports: [ListComponent,
|
|
1432
|
+
FocusableDirective,
|
|
1433
|
+
ButtonItemTemplateDirective,
|
|
1434
|
+
TemplateContextDirective] });
|
|
1435
|
+
ListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListModule, imports: [[CommonModule]] });
|
|
1436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListModule, decorators: [{
|
|
1437
|
+
type: NgModule,
|
|
1438
|
+
args: [{
|
|
1439
|
+
declarations: [EXPORTED_DIRECTIVES],
|
|
1440
|
+
exports: [EXPORTED_DIRECTIVES],
|
|
1441
|
+
imports: [CommonModule]
|
|
1442
|
+
}]
|
|
1443
|
+
}] });
|
|
1444
|
+
|
|
1445
|
+
/**
|
|
1446
|
+
* @hidden
|
|
1447
|
+
*/
|
|
1448
|
+
var KeyEvents;
|
|
1449
|
+
(function (KeyEvents) {
|
|
1450
|
+
KeyEvents[KeyEvents["keydown"] = 0] = "keydown";
|
|
1451
|
+
KeyEvents[KeyEvents["keypress"] = 1] = "keypress";
|
|
1452
|
+
KeyEvents[KeyEvents["keyup"] = 2] = "keyup";
|
|
1453
|
+
})(KeyEvents || (KeyEvents = {}));
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* @hidden
|
|
1457
|
+
*/
|
|
1458
|
+
var NavigationAction;
|
|
1459
|
+
(function (NavigationAction) {
|
|
1460
|
+
// eslint-disable-next-line id-denylist
|
|
1461
|
+
NavigationAction[NavigationAction["Undefined"] = 0] = "Undefined";
|
|
1462
|
+
NavigationAction[NavigationAction["Open"] = 1] = "Open";
|
|
1463
|
+
NavigationAction[NavigationAction["Close"] = 2] = "Close";
|
|
1464
|
+
NavigationAction[NavigationAction["Enter"] = 3] = "Enter";
|
|
1465
|
+
NavigationAction[NavigationAction["EnterPress"] = 4] = "EnterPress";
|
|
1466
|
+
NavigationAction[NavigationAction["EnterUp"] = 5] = "EnterUp";
|
|
1467
|
+
NavigationAction[NavigationAction["Tab"] = 6] = "Tab";
|
|
1468
|
+
NavigationAction[NavigationAction["Esc"] = 7] = "Esc";
|
|
1469
|
+
NavigationAction[NavigationAction["Navigate"] = 8] = "Navigate";
|
|
1470
|
+
})(NavigationAction || (NavigationAction = {}));
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* @hidden
|
|
1474
|
+
*/
|
|
1475
|
+
const NAVIGATION_CONFIG = new InjectionToken('navigation.config');
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* @hidden
|
|
1479
|
+
*/
|
|
1480
|
+
class NavigationService {
|
|
1481
|
+
constructor(config) {
|
|
1482
|
+
this.navigate = new EventEmitter();
|
|
1483
|
+
this.open = new EventEmitter();
|
|
1484
|
+
this.close = new EventEmitter();
|
|
1485
|
+
this.enter = new EventEmitter();
|
|
1486
|
+
this.enterpress = new EventEmitter();
|
|
1487
|
+
this.enterup = new EventEmitter();
|
|
1488
|
+
this.tab = new EventEmitter();
|
|
1489
|
+
this.esc = new EventEmitter();
|
|
1490
|
+
this.useLeftRightArrows = config.useLeftRightArrows;
|
|
1491
|
+
}
|
|
1492
|
+
process(args) {
|
|
1493
|
+
const keyCode = args.keyCode;
|
|
1494
|
+
const keyEvent = args.keyEvent;
|
|
1495
|
+
let index;
|
|
1496
|
+
let action = NavigationAction.Undefined;
|
|
1497
|
+
if (keyEvent === KeyEvents.keypress) {
|
|
1498
|
+
if (this.isEnter(keyCode)) {
|
|
1499
|
+
action = NavigationAction.EnterPress;
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
else if (keyEvent === KeyEvents.keyup) {
|
|
1503
|
+
if (this.isEnter(keyCode)) {
|
|
1504
|
+
action = NavigationAction.EnterUp;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
else {
|
|
1508
|
+
if (args.altKey && keyCode === Keys.ArrowDown) {
|
|
1509
|
+
action = NavigationAction.Open;
|
|
1510
|
+
}
|
|
1511
|
+
else if (args.altKey && keyCode === Keys.ArrowUp) {
|
|
1512
|
+
action = NavigationAction.Close;
|
|
1513
|
+
}
|
|
1514
|
+
else if (this.isEnter(keyCode)) {
|
|
1515
|
+
action = NavigationAction.Enter;
|
|
1516
|
+
}
|
|
1517
|
+
else if (keyCode === Keys.Escape) {
|
|
1518
|
+
action = NavigationAction.Esc;
|
|
1519
|
+
}
|
|
1520
|
+
else if (keyCode === Keys.Tab) {
|
|
1521
|
+
action = NavigationAction.Tab;
|
|
1522
|
+
}
|
|
1523
|
+
else if (keyCode === Keys.ArrowUp || (this.useLeftRightArrows && keyCode === Keys.ArrowLeft)) {
|
|
1524
|
+
const step = args.flipNavigation ? 1 : -1;
|
|
1525
|
+
const start = args.flipNavigation ? args.min : args.max;
|
|
1526
|
+
const end = args.flipNavigation ? args.max : args.min;
|
|
1527
|
+
index = this.next({
|
|
1528
|
+
current: args.current,
|
|
1529
|
+
start: start,
|
|
1530
|
+
end: end,
|
|
1531
|
+
step: step
|
|
1532
|
+
});
|
|
1533
|
+
action = NavigationAction.Navigate;
|
|
1534
|
+
}
|
|
1535
|
+
else if (keyCode === Keys.ArrowDown || (this.useLeftRightArrows && keyCode === Keys.ArrowRight)) {
|
|
1536
|
+
const step = args.flipNavigation ? -1 : 1;
|
|
1537
|
+
const start = args.flipNavigation ? args.max : args.min;
|
|
1538
|
+
const end = args.flipNavigation ? args.min : args.max;
|
|
1539
|
+
index = this.next({
|
|
1540
|
+
current: args.current,
|
|
1541
|
+
start: start,
|
|
1542
|
+
end: end,
|
|
1543
|
+
step: step
|
|
1544
|
+
});
|
|
1545
|
+
action = NavigationAction.Navigate;
|
|
1546
|
+
}
|
|
1547
|
+
else if (keyCode === Keys.Home) {
|
|
1548
|
+
index = args.min;
|
|
1549
|
+
action = NavigationAction.Navigate;
|
|
1550
|
+
}
|
|
1551
|
+
else if (keyCode === Keys.End) {
|
|
1552
|
+
index = args.max;
|
|
1553
|
+
action = NavigationAction.Navigate;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
if (action !== NavigationAction.Undefined) {
|
|
1557
|
+
this[NavigationAction[action].toLowerCase()].emit(index);
|
|
1558
|
+
}
|
|
1559
|
+
return action;
|
|
1560
|
+
}
|
|
1561
|
+
isEnter(keyCode) {
|
|
1562
|
+
return keyCode === Keys.Enter || keyCode === Keys.Space;
|
|
1563
|
+
}
|
|
1564
|
+
next(args) {
|
|
1565
|
+
if (!isPresent(args.current)) {
|
|
1566
|
+
return args.start;
|
|
1567
|
+
}
|
|
1568
|
+
else {
|
|
1569
|
+
return args.current !== args.end ? args.current + args.step : args.end;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, deps: [{ token: NAVIGATION_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1574
|
+
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService });
|
|
1575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, decorators: [{
|
|
1576
|
+
type: Injectable
|
|
1577
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1578
|
+
type: Inject,
|
|
1579
|
+
args: [NAVIGATION_CONFIG]
|
|
1580
|
+
}] }]; } });
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* @hidden
|
|
1584
|
+
*/
|
|
1585
|
+
class ListButton {
|
|
1586
|
+
constructor(focusService, navigationService, wrapperRef, _zone, localization, cdr) {
|
|
1587
|
+
this.focusService = focusService;
|
|
1588
|
+
this.navigationService = navigationService;
|
|
1589
|
+
this.wrapperRef = wrapperRef;
|
|
1590
|
+
this._zone = _zone;
|
|
1591
|
+
this.cdr = cdr;
|
|
1592
|
+
this._open = false;
|
|
1593
|
+
this._disabled = false;
|
|
1539
1594
|
this._active = false;
|
|
1540
1595
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
1541
1596
|
this.listId = guid();
|
|
1542
1597
|
this._isFocused = false;
|
|
1598
|
+
this.subs = new Subscription();
|
|
1543
1599
|
validatePackage(packageMetadata);
|
|
1544
1600
|
this.focusService = focusService;
|
|
1545
1601
|
this.navigationService = navigationService;
|
|
1546
1602
|
this.wrapper = wrapperRef.nativeElement;
|
|
1547
|
-
this.
|
|
1603
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
1548
1604
|
this.subscribeEvents();
|
|
1549
1605
|
}
|
|
1550
1606
|
get popupClasses() {
|
|
@@ -1581,12 +1637,9 @@ class ListButton {
|
|
|
1581
1637
|
}
|
|
1582
1638
|
ngOnDestroy() {
|
|
1583
1639
|
this.openState = false;
|
|
1584
|
-
this.unsubscribeEvents();
|
|
1585
1640
|
clearTimeout(this.focusFirstTimeout);
|
|
1586
1641
|
clearTimeout(this.blurTimeout);
|
|
1587
|
-
|
|
1588
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
1589
|
-
}
|
|
1642
|
+
this.subs.unsubscribe();
|
|
1590
1643
|
}
|
|
1591
1644
|
subscribeEvents() {
|
|
1592
1645
|
if (!isDocumentAvailable()) {
|
|
@@ -1597,25 +1650,25 @@ class ListButton {
|
|
|
1597
1650
|
this.subscribeNavigationEvents();
|
|
1598
1651
|
}
|
|
1599
1652
|
subscribeListItemFocusEvent() {
|
|
1600
|
-
this.
|
|
1653
|
+
this.subs.add(this.focusService.onFocus.subscribe(() => {
|
|
1601
1654
|
this._isFocused = true;
|
|
1602
|
-
});
|
|
1655
|
+
}));
|
|
1603
1656
|
}
|
|
1604
1657
|
subscribeComponentBlurredEvent() {
|
|
1605
1658
|
this._zone.runOutsideAngular(() => {
|
|
1606
|
-
this.
|
|
1607
|
-
this.
|
|
1659
|
+
this.subs.add(this.navigationService.tab.pipe(filter(() => this._isFocused)).subscribe(this.handleTab.bind(this)));
|
|
1660
|
+
this.subs.add(fromEvent(document, 'click')
|
|
1608
1661
|
.pipe(filter((event) => !this.wrapperContains(event.target)), filter(() => this._isFocused))
|
|
1609
|
-
.subscribe(() => this._zone.run(() => this.blurWrapper()));
|
|
1662
|
+
.subscribe(() => this._zone.run(() => this.blurWrapper())));
|
|
1610
1663
|
});
|
|
1611
1664
|
}
|
|
1612
1665
|
subscribeNavigationEvents() {
|
|
1613
|
-
this.
|
|
1614
|
-
this.
|
|
1666
|
+
this.subs.add(this.navigationService.navigate.subscribe(this.focusService.focus.bind(this.focusService)));
|
|
1667
|
+
this.subs.add(this.navigationService.enterup.subscribe(() => {
|
|
1615
1668
|
this.enterHandler();
|
|
1616
1669
|
this.focusWrapper();
|
|
1617
|
-
});
|
|
1618
|
-
this.
|
|
1670
|
+
}));
|
|
1671
|
+
this.subs.add(this.navigationService.open.subscribe(() => {
|
|
1619
1672
|
if (!this._open) {
|
|
1620
1673
|
this.togglePopupVisibility();
|
|
1621
1674
|
this.focusFirstItem();
|
|
@@ -1623,28 +1676,10 @@ class ListButton {
|
|
|
1623
1676
|
else {
|
|
1624
1677
|
this.focusWrapper();
|
|
1625
1678
|
}
|
|
1626
|
-
});
|
|
1627
|
-
this.
|
|
1628
|
-
}
|
|
1629
|
-
enterHandler() { } // tslint:disable-line
|
|
1630
|
-
unsubscribeEvents() {
|
|
1631
|
-
if (!isDocumentAvailable()) {
|
|
1632
|
-
return;
|
|
1633
|
-
}
|
|
1634
|
-
this.unsubscribe(this.componentBlurredSubscription);
|
|
1635
|
-
this.unsubscribe(this.focusSubscription);
|
|
1636
|
-
this.unsubscribe(this.navigationSubscription);
|
|
1637
|
-
this.unsubscribe(this.enterPressSubscription);
|
|
1638
|
-
this.unsubscribe(this.enterUpSubscription);
|
|
1639
|
-
this.unsubscribe(this.openSubscription);
|
|
1640
|
-
this.unsubscribe(this.closeSubscription);
|
|
1641
|
-
this.unsubscribe(this.tabSubscription);
|
|
1642
|
-
}
|
|
1643
|
-
unsubscribe(subscription) {
|
|
1644
|
-
if (subscription) {
|
|
1645
|
-
subscription.unsubscribe();
|
|
1646
|
-
}
|
|
1679
|
+
}));
|
|
1680
|
+
this.subs.add(merge(this.navigationService.close, this.navigationService.esc).subscribe(() => this.focusWrapper()));
|
|
1647
1681
|
}
|
|
1682
|
+
enterHandler() { } // eslint-disable-line
|
|
1648
1683
|
/**
|
|
1649
1684
|
* @hidden
|
|
1650
1685
|
*/
|
|
@@ -1734,122 +1769,70 @@ class ListButton {
|
|
|
1734
1769
|
this.blurWrapper(false);
|
|
1735
1770
|
}
|
|
1736
1771
|
}
|
|
1772
|
+
ListButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListButton, deps: [{ token: FocusService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1773
|
+
ListButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ListButton, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
1774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListButton, decorators: [{
|
|
1775
|
+
type: Component,
|
|
1776
|
+
args: [{
|
|
1777
|
+
template: ''
|
|
1778
|
+
}]
|
|
1779
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; } });
|
|
1737
1780
|
|
|
1738
1781
|
/**
|
|
1739
1782
|
* @hidden
|
|
1740
1783
|
*/
|
|
1741
|
-
|
|
1784
|
+
class Messages extends ComponentMessages {
|
|
1785
|
+
}
|
|
1786
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1787
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages, selector: "kendo-splitbutton-messages-base", inputs: { splitButtonLabel: "splitButtonLabel" }, usesInheritance: true, ngImport: i0 });
|
|
1788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, decorators: [{
|
|
1789
|
+
type: Directive,
|
|
1790
|
+
args: [{
|
|
1791
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1792
|
+
selector: 'kendo-splitbutton-messages-base'
|
|
1793
|
+
}]
|
|
1794
|
+
}], propDecorators: { splitButtonLabel: [{
|
|
1795
|
+
type: Input
|
|
1796
|
+
}] } });
|
|
1742
1797
|
|
|
1743
1798
|
/**
|
|
1744
1799
|
* @hidden
|
|
1745
1800
|
*/
|
|
1746
|
-
|
|
1747
|
-
constructor(
|
|
1748
|
-
|
|
1749
|
-
this.
|
|
1750
|
-
this.close = new EventEmitter();
|
|
1751
|
-
this.enter = new EventEmitter();
|
|
1752
|
-
this.enterpress = new EventEmitter();
|
|
1753
|
-
this.enterup = new EventEmitter();
|
|
1754
|
-
this.tab = new EventEmitter();
|
|
1755
|
-
this.esc = new EventEmitter();
|
|
1756
|
-
this.useLeftRightArrows = config.useLeftRightArrows;
|
|
1757
|
-
}
|
|
1758
|
-
process(args) {
|
|
1759
|
-
const keyCode = args.keyCode;
|
|
1760
|
-
const keyEvent = args.keyEvent;
|
|
1761
|
-
let index;
|
|
1762
|
-
let action = NavigationAction.Undefined;
|
|
1763
|
-
if (keyEvent === KeyEvents.keypress) {
|
|
1764
|
-
if (this.isEnter(keyCode)) {
|
|
1765
|
-
action = NavigationAction.EnterPress;
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
else if (keyEvent === KeyEvents.keyup) {
|
|
1769
|
-
if (this.isEnter(keyCode)) {
|
|
1770
|
-
action = NavigationAction.EnterUp;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
else {
|
|
1774
|
-
if (args.altKey && keyCode === Keys.ArrowDown) {
|
|
1775
|
-
action = NavigationAction.Open;
|
|
1776
|
-
}
|
|
1777
|
-
else if (args.altKey && keyCode === Keys.ArrowUp) {
|
|
1778
|
-
action = NavigationAction.Close;
|
|
1779
|
-
}
|
|
1780
|
-
else if (this.isEnter(keyCode)) {
|
|
1781
|
-
action = NavigationAction.Enter;
|
|
1782
|
-
}
|
|
1783
|
-
else if (keyCode === Keys.Escape) {
|
|
1784
|
-
action = NavigationAction.Esc;
|
|
1785
|
-
}
|
|
1786
|
-
else if (keyCode === Keys.Tab) {
|
|
1787
|
-
action = NavigationAction.Tab;
|
|
1788
|
-
}
|
|
1789
|
-
else if (keyCode === Keys.ArrowUp || (this.useLeftRightArrows && keyCode === Keys.ArrowLeft)) {
|
|
1790
|
-
const step = args.flipNavigation ? 1 : -1;
|
|
1791
|
-
const start = args.flipNavigation ? args.min : args.max;
|
|
1792
|
-
const end = args.flipNavigation ? args.max : args.min;
|
|
1793
|
-
index = this.next({
|
|
1794
|
-
current: args.current,
|
|
1795
|
-
start: start,
|
|
1796
|
-
end: end,
|
|
1797
|
-
step: step
|
|
1798
|
-
});
|
|
1799
|
-
action = NavigationAction.Navigate;
|
|
1800
|
-
}
|
|
1801
|
-
else if (keyCode === Keys.ArrowDown || (this.useLeftRightArrows && keyCode === Keys.ArrowRight)) {
|
|
1802
|
-
const step = args.flipNavigation ? -1 : 1;
|
|
1803
|
-
const start = args.flipNavigation ? args.max : args.min;
|
|
1804
|
-
const end = args.flipNavigation ? args.min : args.max;
|
|
1805
|
-
index = this.next({
|
|
1806
|
-
current: args.current,
|
|
1807
|
-
start: start,
|
|
1808
|
-
end: end,
|
|
1809
|
-
step: step
|
|
1810
|
-
});
|
|
1811
|
-
action = NavigationAction.Navigate;
|
|
1812
|
-
}
|
|
1813
|
-
else if (keyCode === Keys.Home) {
|
|
1814
|
-
index = args.min;
|
|
1815
|
-
action = NavigationAction.Navigate;
|
|
1816
|
-
}
|
|
1817
|
-
else if (keyCode === Keys.End) {
|
|
1818
|
-
index = args.max;
|
|
1819
|
-
action = NavigationAction.Navigate;
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
if (action !== NavigationAction.Undefined) {
|
|
1823
|
-
this[NavigationAction[action].toLowerCase()].emit(index);
|
|
1824
|
-
}
|
|
1825
|
-
return action;
|
|
1826
|
-
}
|
|
1827
|
-
isEnter(keyCode) {
|
|
1828
|
-
return keyCode === Keys.Enter || keyCode === Keys.Space;
|
|
1829
|
-
}
|
|
1830
|
-
next(args) {
|
|
1831
|
-
if (!isPresent(args.current)) {
|
|
1832
|
-
return args.start;
|
|
1833
|
-
}
|
|
1834
|
-
else {
|
|
1835
|
-
return args.current !== args.end ? args.current + args.step : args.end;
|
|
1836
|
-
}
|
|
1801
|
+
class LocalizedSplitButtonMessagesDirective extends Messages {
|
|
1802
|
+
constructor(service) {
|
|
1803
|
+
super();
|
|
1804
|
+
this.service = service;
|
|
1837
1805
|
}
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1806
|
+
}
|
|
1807
|
+
LocalizedSplitButtonMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedSplitButtonMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1808
|
+
LocalizedSplitButtonMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]", providers: [
|
|
1809
|
+
{
|
|
1810
|
+
provide: Messages,
|
|
1811
|
+
useExisting: forwardRef(() => LocalizedSplitButtonMessagesDirective)
|
|
1812
|
+
}
|
|
1813
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedSplitButtonMessagesDirective, decorators: [{
|
|
1815
|
+
type: Directive,
|
|
1816
|
+
args: [{
|
|
1817
|
+
providers: [
|
|
1818
|
+
{
|
|
1819
|
+
provide: Messages,
|
|
1820
|
+
useExisting: forwardRef(() => LocalizedSplitButtonMessagesDirective)
|
|
1821
|
+
}
|
|
1822
|
+
],
|
|
1823
|
+
selector: '[kendoSplitButtonLocalizedMessages]'
|
|
1824
|
+
}]
|
|
1825
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
1844
1826
|
|
|
1845
|
-
const NAVIGATION_SETTINGS = {
|
|
1827
|
+
const NAVIGATION_SETTINGS$2 = {
|
|
1846
1828
|
useLeftRightArrows: true
|
|
1847
1829
|
};
|
|
1848
|
-
const
|
|
1849
|
-
const NAVIGATION_SETTINGS_PROVIDER = {
|
|
1830
|
+
const NAVIGATION_SETTINGS_PROVIDER$2 = {
|
|
1850
1831
|
provide: NAVIGATION_CONFIG,
|
|
1851
|
-
useValue:
|
|
1832
|
+
useValue: NAVIGATION_SETTINGS$2
|
|
1852
1833
|
};
|
|
1834
|
+
const DEFAULT_ROUNDED$1 = 'medium';
|
|
1835
|
+
const DEFAULT_FILL_MODE$1 = 'solid';
|
|
1853
1836
|
/**
|
|
1854
1837
|
* Represents the Kendo UI SplitButton component for Angular.
|
|
1855
1838
|
*
|
|
@@ -1891,7 +1874,7 @@ const NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
1891
1874
|
* }
|
|
1892
1875
|
* ```
|
|
1893
1876
|
*/
|
|
1894
|
-
|
|
1877
|
+
class SplitButtonComponent extends ListButton {
|
|
1895
1878
|
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
|
|
1896
1879
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
1897
1880
|
this.popupService = popupService;
|
|
@@ -1926,10 +1909,10 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1926
1909
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-size)).
|
|
1927
1910
|
*
|
|
1928
1911
|
* The possible values are:
|
|
1929
|
-
* * `
|
|
1930
|
-
* * `
|
|
1931
|
-
* * `
|
|
1932
|
-
* * `
|
|
1912
|
+
* * `small`
|
|
1913
|
+
* * `medium` (default)
|
|
1914
|
+
* * `large`
|
|
1915
|
+
* * `none`
|
|
1933
1916
|
*/
|
|
1934
1917
|
this.size = 'medium';
|
|
1935
1918
|
/**
|
|
@@ -1949,6 +1932,7 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1949
1932
|
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
1950
1933
|
* * `light`— Applies coloring based on the `light` theme color.
|
|
1951
1934
|
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
1935
|
+
* * `none`— Removes the built in theme color.
|
|
1952
1936
|
*/
|
|
1953
1937
|
this.themeColor = 'base';
|
|
1954
1938
|
/**
|
|
@@ -2013,11 +1997,11 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2013
1997
|
/**
|
|
2014
1998
|
* Fires each time the SplitButton gets focused.
|
|
2015
1999
|
*/
|
|
2016
|
-
this.onFocus = new EventEmitter();
|
|
2000
|
+
this.onFocus = new EventEmitter();
|
|
2017
2001
|
/**
|
|
2018
2002
|
* Fires each time the SplitButton gets blurred.
|
|
2019
2003
|
*/
|
|
2020
|
-
this.onBlur = new EventEmitter();
|
|
2004
|
+
this.onBlur = new EventEmitter();
|
|
2021
2005
|
/**
|
|
2022
2006
|
* Fires each time the popup is about to open.
|
|
2023
2007
|
* This event is preventable. If you cancel the event, the popup will remain closed.
|
|
@@ -2035,8 +2019,9 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2035
2019
|
this.listId = guid();
|
|
2036
2020
|
this.buttonText = '';
|
|
2037
2021
|
this.lockFocus = false;
|
|
2038
|
-
this._rounded =
|
|
2039
|
-
this._fillMode =
|
|
2022
|
+
this._rounded = DEFAULT_ROUNDED$1;
|
|
2023
|
+
this._fillMode = DEFAULT_FILL_MODE$1;
|
|
2024
|
+
this.popupSubs = new Subscription();
|
|
2040
2025
|
this._itemClick = this.itemClick;
|
|
2041
2026
|
this._blur = this.onBlur;
|
|
2042
2027
|
}
|
|
@@ -2045,15 +2030,16 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2045
2030
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
2046
2031
|
*
|
|
2047
2032
|
* The possible values are:
|
|
2048
|
-
* * `
|
|
2049
|
-
* * `
|
|
2050
|
-
* * `
|
|
2051
|
-
* * `
|
|
2052
|
-
* * `
|
|
2033
|
+
* * `small`
|
|
2034
|
+
* * `medium` (default)
|
|
2035
|
+
* * `large`
|
|
2036
|
+
* * `full`
|
|
2037
|
+
* * `none`
|
|
2053
2038
|
*/
|
|
2054
2039
|
set rounded(rounded) {
|
|
2055
|
-
|
|
2056
|
-
this.
|
|
2040
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED$1;
|
|
2041
|
+
this.handleClasses(newRounded, 'rounded');
|
|
2042
|
+
this._rounded = newRounded;
|
|
2057
2043
|
}
|
|
2058
2044
|
get rounded() {
|
|
2059
2045
|
return this._rounded;
|
|
@@ -2069,7 +2055,8 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2069
2055
|
* * `link`
|
|
2070
2056
|
*/
|
|
2071
2057
|
set fillMode(fillMode) {
|
|
2072
|
-
|
|
2058
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE$1;
|
|
2059
|
+
this._fillMode = fillMode === 'clear' ? 'flat' : newFillMode;
|
|
2073
2060
|
}
|
|
2074
2061
|
get fillMode() {
|
|
2075
2062
|
return this._fillMode;
|
|
@@ -2384,11 +2371,12 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2384
2371
|
popupAlign: this.popupAlign,
|
|
2385
2372
|
popupClass: this.popupClasses
|
|
2386
2373
|
});
|
|
2387
|
-
this.popupRef.popupAnchorViewportLeave.subscribe(() => (this.openState = false));
|
|
2388
|
-
this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
|
|
2374
|
+
this.popupSubs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => (this.openState = false)));
|
|
2375
|
+
this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)));
|
|
2389
2376
|
}
|
|
2390
2377
|
destroyPopup() {
|
|
2391
2378
|
if (this.popupRef) {
|
|
2379
|
+
this.popupSubs.unsubscribe();
|
|
2392
2380
|
this.popupRef.close();
|
|
2393
2381
|
this.popupRef = null;
|
|
2394
2382
|
}
|
|
@@ -2403,173 +2391,18 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2403
2391
|
this.renderer.addClass(elem, classes.toAdd);
|
|
2404
2392
|
}
|
|
2405
2393
|
}
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
], SplitButtonComponent.prototype, "iconClass", void 0);
|
|
2419
|
-
__decorate([
|
|
2420
|
-
Input(),
|
|
2421
|
-
__metadata("design:type", String)
|
|
2422
|
-
], SplitButtonComponent.prototype, "type", void 0);
|
|
2423
|
-
__decorate([
|
|
2424
|
-
Input(),
|
|
2425
|
-
__metadata("design:type", String)
|
|
2426
|
-
], SplitButtonComponent.prototype, "imageUrl", void 0);
|
|
2427
|
-
__decorate([
|
|
2428
|
-
Input(),
|
|
2429
|
-
__metadata("design:type", String)
|
|
2430
|
-
], SplitButtonComponent.prototype, "size", void 0);
|
|
2431
|
-
__decorate([
|
|
2432
|
-
Input(),
|
|
2433
|
-
__metadata("design:type", String),
|
|
2434
|
-
__metadata("design:paramtypes", [String])
|
|
2435
|
-
], SplitButtonComponent.prototype, "rounded", null);
|
|
2436
|
-
__decorate([
|
|
2437
|
-
Input(),
|
|
2438
|
-
__metadata("design:type", String),
|
|
2439
|
-
__metadata("design:paramtypes", [String])
|
|
2440
|
-
], SplitButtonComponent.prototype, "fillMode", null);
|
|
2441
|
-
__decorate([
|
|
2442
|
-
Input(),
|
|
2443
|
-
__metadata("design:type", String)
|
|
2444
|
-
], SplitButtonComponent.prototype, "themeColor", void 0);
|
|
2445
|
-
__decorate([
|
|
2446
|
-
Input(),
|
|
2447
|
-
__metadata("design:type", Boolean),
|
|
2448
|
-
__metadata("design:paramtypes", [Boolean])
|
|
2449
|
-
], SplitButtonComponent.prototype, "disabled", null);
|
|
2450
|
-
__decorate([
|
|
2451
|
-
Input(),
|
|
2452
|
-
__metadata("design:type", Object),
|
|
2453
|
-
__metadata("design:paramtypes", [Object])
|
|
2454
|
-
], SplitButtonComponent.prototype, "popupSettings", null);
|
|
2455
|
-
__decorate([
|
|
2456
|
-
Input(),
|
|
2457
|
-
__metadata("design:type", Number)
|
|
2458
|
-
], SplitButtonComponent.prototype, "tabIndex", void 0);
|
|
2459
|
-
__decorate([
|
|
2460
|
-
Input(),
|
|
2461
|
-
__metadata("design:type", String)
|
|
2462
|
-
], SplitButtonComponent.prototype, "textField", void 0);
|
|
2463
|
-
__decorate([
|
|
2464
|
-
Input(),
|
|
2465
|
-
__metadata("design:type", Object),
|
|
2466
|
-
__metadata("design:paramtypes", [Object])
|
|
2467
|
-
], SplitButtonComponent.prototype, "data", null);
|
|
2468
|
-
__decorate([
|
|
2469
|
-
Input(),
|
|
2470
|
-
__metadata("design:type", Object)
|
|
2471
|
-
], SplitButtonComponent.prototype, "buttonClass", void 0);
|
|
2472
|
-
__decorate([
|
|
2473
|
-
Input(),
|
|
2474
|
-
__metadata("design:type", Object)
|
|
2475
|
-
], SplitButtonComponent.prototype, "arrowButtonClass", void 0);
|
|
2476
|
-
__decorate([
|
|
2477
|
-
Input(),
|
|
2478
|
-
__metadata("design:type", String)
|
|
2479
|
-
], SplitButtonComponent.prototype, "arrowButtonIcon", void 0);
|
|
2480
|
-
__decorate([
|
|
2481
|
-
Output(),
|
|
2482
|
-
__metadata("design:type", EventEmitter)
|
|
2483
|
-
], SplitButtonComponent.prototype, "buttonClick", void 0);
|
|
2484
|
-
__decorate([
|
|
2485
|
-
Output(),
|
|
2486
|
-
__metadata("design:type", EventEmitter)
|
|
2487
|
-
], SplitButtonComponent.prototype, "itemClick", void 0);
|
|
2488
|
-
__decorate([
|
|
2489
|
-
Output('focus'),
|
|
2490
|
-
__metadata("design:type", EventEmitter)
|
|
2491
|
-
], SplitButtonComponent.prototype, "onFocus", void 0);
|
|
2492
|
-
__decorate([
|
|
2493
|
-
Output('blur'),
|
|
2494
|
-
__metadata("design:type", EventEmitter)
|
|
2495
|
-
], SplitButtonComponent.prototype, "onBlur", void 0);
|
|
2496
|
-
__decorate([
|
|
2497
|
-
Output(),
|
|
2498
|
-
__metadata("design:type", EventEmitter)
|
|
2499
|
-
], SplitButtonComponent.prototype, "open", void 0);
|
|
2500
|
-
__decorate([
|
|
2501
|
-
Output(),
|
|
2502
|
-
__metadata("design:type", EventEmitter)
|
|
2503
|
-
], SplitButtonComponent.prototype, "close", void 0);
|
|
2504
|
-
__decorate([
|
|
2505
|
-
ContentChild(ButtonItemTemplateDirective, { static: false }),
|
|
2506
|
-
__metadata("design:type", ButtonItemTemplateDirective)
|
|
2507
|
-
], SplitButtonComponent.prototype, "itemTemplate", void 0);
|
|
2508
|
-
__decorate([
|
|
2509
|
-
ViewChild('button', { static: true }),
|
|
2510
|
-
__metadata("design:type", ElementRef)
|
|
2511
|
-
], SplitButtonComponent.prototype, "button", void 0);
|
|
2512
|
-
__decorate([
|
|
2513
|
-
ViewChild('arrowButton', { static: true, read: ElementRef }),
|
|
2514
|
-
__metadata("design:type", ElementRef)
|
|
2515
|
-
], SplitButtonComponent.prototype, "arrowButton", void 0);
|
|
2516
|
-
__decorate([
|
|
2517
|
-
ViewChild('popupTemplate', { static: true }),
|
|
2518
|
-
__metadata("design:type", TemplateRef)
|
|
2519
|
-
], SplitButtonComponent.prototype, "popupTemplate", void 0);
|
|
2520
|
-
__decorate([
|
|
2521
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
2522
|
-
__metadata("design:type", ViewContainerRef)
|
|
2523
|
-
], SplitButtonComponent.prototype, "containerRef", void 0);
|
|
2524
|
-
__decorate([
|
|
2525
|
-
HostBinding('class.k-focus'),
|
|
2526
|
-
__metadata("design:type", Boolean),
|
|
2527
|
-
__metadata("design:paramtypes", [Boolean])
|
|
2528
|
-
], SplitButtonComponent.prototype, "isFocused", null);
|
|
2529
|
-
__decorate([
|
|
2530
|
-
HostBinding('class.k-split-button'),
|
|
2531
|
-
HostBinding('class.k-button-group'),
|
|
2532
|
-
__metadata("design:type", Boolean),
|
|
2533
|
-
__metadata("design:paramtypes", [])
|
|
2534
|
-
], SplitButtonComponent.prototype, "widgetClasses", null);
|
|
2535
|
-
__decorate([
|
|
2536
|
-
HostBinding('attr.dir'),
|
|
2537
|
-
__metadata("design:type", String),
|
|
2538
|
-
__metadata("design:paramtypes", [])
|
|
2539
|
-
], SplitButtonComponent.prototype, "dir", null);
|
|
2540
|
-
__decorate([
|
|
2541
|
-
HostListener('keydown', ['$event']),
|
|
2542
|
-
__metadata("design:type", Function),
|
|
2543
|
-
__metadata("design:paramtypes", [Object]),
|
|
2544
|
-
__metadata("design:returntype", void 0)
|
|
2545
|
-
], SplitButtonComponent.prototype, "keydown", null);
|
|
2546
|
-
__decorate([
|
|
2547
|
-
HostListener('keypress', ['$event']),
|
|
2548
|
-
__metadata("design:type", Function),
|
|
2549
|
-
__metadata("design:paramtypes", [Object]),
|
|
2550
|
-
__metadata("design:returntype", void 0)
|
|
2551
|
-
], SplitButtonComponent.prototype, "keypress", null);
|
|
2552
|
-
__decorate([
|
|
2553
|
-
HostListener('keyup', ['$event']),
|
|
2554
|
-
__metadata("design:type", Function),
|
|
2555
|
-
__metadata("design:paramtypes", [Object]),
|
|
2556
|
-
__metadata("design:returntype", void 0)
|
|
2557
|
-
], SplitButtonComponent.prototype, "keyup", null);
|
|
2558
|
-
SplitButtonComponent = __decorate([
|
|
2559
|
-
Component({
|
|
2560
|
-
exportAs: 'kendoSplitButton',
|
|
2561
|
-
providers: [
|
|
2562
|
-
FocusService,
|
|
2563
|
-
NavigationService,
|
|
2564
|
-
NAVIGATION_SETTINGS_PROVIDER,
|
|
2565
|
-
LocalizationService,
|
|
2566
|
-
{
|
|
2567
|
-
provide: L10N_PREFIX,
|
|
2568
|
-
useValue: 'kendo.splitbutton'
|
|
2569
|
-
}
|
|
2570
|
-
],
|
|
2571
|
-
selector: 'kendo-splitbutton',
|
|
2572
|
-
template: `
|
|
2394
|
+
}
|
|
2395
|
+
SplitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonComponent, deps: [{ token: FocusService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2396
|
+
SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: { text: "text", icon: "icon", iconClass: "iconClass", type: "type", imageUrl: "imageUrl", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", disabled: "disabled", popupSettings: "popupSettings", tabIndex: "tabIndex", textField: "textField", data: "data", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "keyup": "keyup($event)" }, properties: { "class.k-focus": "this.isFocused", "class.k-split-button": "this.widgetClasses", "class.k-button-group": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2397
|
+
FocusService,
|
|
2398
|
+
NavigationService,
|
|
2399
|
+
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
2400
|
+
LocalizationService,
|
|
2401
|
+
{
|
|
2402
|
+
provide: L10N_PREFIX,
|
|
2403
|
+
useValue: 'kendo.splitbutton'
|
|
2404
|
+
}
|
|
2405
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ButtonItemTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true, static: true }, { propertyName: "arrowButton", first: true, predicate: ["arrowButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["kendoSplitButton"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
2573
2406
|
<ng-container kendoSplitButtonLocalizedMessages
|
|
2574
2407
|
i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
|
|
2575
2408
|
splitButtonLabel="{{ '{buttonText} splitbutton' }}">
|
|
@@ -2605,19 +2438,100 @@ SplitButtonComponent = __decorate([
|
|
|
2605
2438
|
{{ text }}
|
|
2606
2439
|
</span><ng-content></ng-content>
|
|
2607
2440
|
</button>
|
|
2441
|
+
<button kendoButton #arrowButton type="button"
|
|
2442
|
+
class="k-split-button-arrow"
|
|
2443
|
+
[class.k-active]="activeArrow"
|
|
2444
|
+
[ngClass]="arrowButtonClass"
|
|
2445
|
+
[disabled]="disabled"
|
|
2446
|
+
[icon]="arrowButtonIcon"
|
|
2447
|
+
[size]="size"
|
|
2448
|
+
[rounded]="rounded"
|
|
2449
|
+
[fillMode]="fillMode"
|
|
2450
|
+
[themeColor]="themeColor"
|
|
2451
|
+
[tabindex]="-1"
|
|
2452
|
+
(click)="onArrowButtonClick()"
|
|
2453
|
+
(mousedown)="toggleArrowButtonActiveState(true)"
|
|
2454
|
+
(mouseup)="toggleArrowButtonActiveState(false)"
|
|
2455
|
+
></button>
|
|
2456
|
+
<ng-template #popupTemplate>
|
|
2457
|
+
<kendo-button-list
|
|
2458
|
+
[id]="listId"
|
|
2459
|
+
[data]="data"
|
|
2460
|
+
[textField]="textField"
|
|
2461
|
+
[itemTemplate]="itemTemplate"
|
|
2462
|
+
(onItemClick)="onItemClick($event)"
|
|
2463
|
+
(keydown)="keyDownHandler($event)"
|
|
2464
|
+
(keypress)="keyPressHandler($event)"
|
|
2465
|
+
(keyup)="keyUpHandler($event)"
|
|
2466
|
+
[attr.dir]="dir"
|
|
2467
|
+
[size]="size"
|
|
2468
|
+
>
|
|
2469
|
+
</kendo-button-list>
|
|
2470
|
+
</ng-template>
|
|
2471
|
+
<ng-container #container></ng-container>
|
|
2472
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
2474
|
+
type: Component,
|
|
2475
|
+
args: [{
|
|
2476
|
+
exportAs: 'kendoSplitButton',
|
|
2477
|
+
providers: [
|
|
2478
|
+
FocusService,
|
|
2479
|
+
NavigationService,
|
|
2480
|
+
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
2481
|
+
LocalizationService,
|
|
2482
|
+
{
|
|
2483
|
+
provide: L10N_PREFIX,
|
|
2484
|
+
useValue: 'kendo.splitbutton'
|
|
2485
|
+
}
|
|
2486
|
+
],
|
|
2487
|
+
selector: 'kendo-splitbutton',
|
|
2488
|
+
template: `
|
|
2489
|
+
<ng-container kendoSplitButtonLocalizedMessages
|
|
2490
|
+
i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
|
|
2491
|
+
splitButtonLabel="{{ '{buttonText} splitbutton' }}">
|
|
2492
|
+
</ng-container>
|
|
2608
2493
|
<button
|
|
2609
2494
|
kendoButton
|
|
2610
|
-
#
|
|
2611
|
-
type="
|
|
2495
|
+
#button
|
|
2496
|
+
[type]="type"
|
|
2497
|
+
[tabindex]="componentTabIndex"
|
|
2498
|
+
[disabled]="disabled"
|
|
2499
|
+
[size]="size"
|
|
2500
|
+
[rounded]="rounded"
|
|
2501
|
+
[fillMode]="fillMode"
|
|
2502
|
+
[themeColor]="themeColor"
|
|
2503
|
+
[icon]="icon"
|
|
2504
|
+
[class.k-active]="active"
|
|
2505
|
+
[class.k-icon-button]="!text && icon"
|
|
2506
|
+
[iconClass]="iconClass"
|
|
2507
|
+
[imageUrl]="imageUrl"
|
|
2508
|
+
[ngClass]="buttonClass"
|
|
2509
|
+
(focus)="onButtonFocus()"
|
|
2510
|
+
(click)="onButtonClick()"
|
|
2511
|
+
(blur)="onButtonBlur()"
|
|
2512
|
+
(mousedown)="toggleButtonActiveState(true)"
|
|
2513
|
+
(mouseup)="toggleButtonActiveState(false)"
|
|
2514
|
+
[attr.aria-disabled]="disabled"
|
|
2515
|
+
[attr.aria-expanded]="openState"
|
|
2516
|
+
[attr.aria-haspopup]="true"
|
|
2517
|
+
[attr.aria-owns]="listId"
|
|
2518
|
+
[attr.aria-label]="ariaLabel"
|
|
2519
|
+
>
|
|
2520
|
+
<span *ngIf="text" class="k-button-text">
|
|
2521
|
+
{{ text }}
|
|
2522
|
+
</span><ng-content></ng-content>
|
|
2523
|
+
</button>
|
|
2524
|
+
<button kendoButton #arrowButton type="button"
|
|
2525
|
+
class="k-split-button-arrow"
|
|
2612
2526
|
[class.k-active]="activeArrow"
|
|
2527
|
+
[ngClass]="arrowButtonClass"
|
|
2613
2528
|
[disabled]="disabled"
|
|
2614
2529
|
[icon]="arrowButtonIcon"
|
|
2615
2530
|
[size]="size"
|
|
2616
2531
|
[rounded]="rounded"
|
|
2617
2532
|
[fillMode]="fillMode"
|
|
2618
|
-
[themeColor]="
|
|
2533
|
+
[themeColor]="themeColor"
|
|
2619
2534
|
[tabindex]="-1"
|
|
2620
|
-
[ngClass]="arrowButtonClass"
|
|
2621
2535
|
(click)="onArrowButtonClick()"
|
|
2622
2536
|
(mousedown)="toggleArrowButtonActiveState(true)"
|
|
2623
2537
|
(mouseup)="toggleArrowButtonActiveState(false)"
|
|
@@ -2639,57 +2553,98 @@ SplitButtonComponent = __decorate([
|
|
|
2639
2553
|
</ng-template>
|
|
2640
2554
|
<ng-container #container></ng-container>
|
|
2641
2555
|
`
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
{
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2556
|
+
}]
|
|
2557
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { text: [{
|
|
2558
|
+
type: Input
|
|
2559
|
+
}], icon: [{
|
|
2560
|
+
type: Input
|
|
2561
|
+
}], iconClass: [{
|
|
2562
|
+
type: Input
|
|
2563
|
+
}], type: [{
|
|
2564
|
+
type: Input
|
|
2565
|
+
}], imageUrl: [{
|
|
2566
|
+
type: Input
|
|
2567
|
+
}], size: [{
|
|
2568
|
+
type: Input
|
|
2569
|
+
}], rounded: [{
|
|
2570
|
+
type: Input
|
|
2571
|
+
}], fillMode: [{
|
|
2572
|
+
type: Input
|
|
2573
|
+
}], themeColor: [{
|
|
2574
|
+
type: Input
|
|
2575
|
+
}], disabled: [{
|
|
2576
|
+
type: Input
|
|
2577
|
+
}], popupSettings: [{
|
|
2578
|
+
type: Input
|
|
2579
|
+
}], tabIndex: [{
|
|
2580
|
+
type: Input
|
|
2581
|
+
}], textField: [{
|
|
2582
|
+
type: Input
|
|
2583
|
+
}], data: [{
|
|
2584
|
+
type: Input
|
|
2585
|
+
}], buttonClass: [{
|
|
2586
|
+
type: Input
|
|
2587
|
+
}], arrowButtonClass: [{
|
|
2588
|
+
type: Input
|
|
2589
|
+
}], arrowButtonIcon: [{
|
|
2590
|
+
type: Input
|
|
2591
|
+
}], buttonClick: [{
|
|
2592
|
+
type: Output
|
|
2593
|
+
}], itemClick: [{
|
|
2594
|
+
type: Output
|
|
2595
|
+
}], onFocus: [{
|
|
2596
|
+
type: Output,
|
|
2597
|
+
args: ['focus']
|
|
2598
|
+
}], onBlur: [{
|
|
2599
|
+
type: Output,
|
|
2600
|
+
args: ['blur']
|
|
2601
|
+
}], open: [{
|
|
2602
|
+
type: Output
|
|
2603
|
+
}], close: [{
|
|
2604
|
+
type: Output
|
|
2605
|
+
}], itemTemplate: [{
|
|
2606
|
+
type: ContentChild,
|
|
2607
|
+
args: [ButtonItemTemplateDirective, { static: false }]
|
|
2608
|
+
}], button: [{
|
|
2609
|
+
type: ViewChild,
|
|
2610
|
+
args: ['button', { static: true }]
|
|
2611
|
+
}], arrowButton: [{
|
|
2612
|
+
type: ViewChild,
|
|
2613
|
+
args: ['arrowButton', { static: true, read: ElementRef }]
|
|
2614
|
+
}], popupTemplate: [{
|
|
2615
|
+
type: ViewChild,
|
|
2616
|
+
args: ['popupTemplate', { static: true }]
|
|
2617
|
+
}], containerRef: [{
|
|
2618
|
+
type: ViewChild,
|
|
2619
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
2620
|
+
}], isFocused: [{
|
|
2621
|
+
type: HostBinding,
|
|
2622
|
+
args: ['class.k-focus']
|
|
2623
|
+
}], widgetClasses: [{
|
|
2624
|
+
type: HostBinding,
|
|
2625
|
+
args: ['class.k-split-button']
|
|
2626
|
+
}, {
|
|
2627
|
+
type: HostBinding,
|
|
2628
|
+
args: ['class.k-button-group']
|
|
2629
|
+
}], dir: [{
|
|
2630
|
+
type: HostBinding,
|
|
2631
|
+
args: ['attr.dir']
|
|
2632
|
+
}], keydown: [{
|
|
2633
|
+
type: HostListener,
|
|
2634
|
+
args: ['keydown', ['$event']]
|
|
2635
|
+
}], keypress: [{
|
|
2636
|
+
type: HostListener,
|
|
2637
|
+
args: ['keypress', ['$event']]
|
|
2638
|
+
}], keyup: [{
|
|
2639
|
+
type: HostListener,
|
|
2640
|
+
args: ['keyup', ['$event']]
|
|
2641
|
+
}] } });
|
|
2686
2642
|
|
|
2687
|
-
var SplitButtonCustomMessagesComponent_1;
|
|
2688
2643
|
/**
|
|
2689
2644
|
* Custom component messages override default component messages
|
|
2690
2645
|
* ([see example]({% slug rtl_buttons %}).
|
|
2691
2646
|
*/
|
|
2692
|
-
|
|
2647
|
+
class SplitButtonCustomMessagesComponent extends Messages {
|
|
2693
2648
|
constructor(service) {
|
|
2694
2649
|
super();
|
|
2695
2650
|
this.service = service;
|
|
@@ -2697,20 +2652,23 @@ let SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 =
|
|
|
2697
2652
|
get override() {
|
|
2698
2653
|
return true;
|
|
2699
2654
|
}
|
|
2700
|
-
}
|
|
2701
|
-
SplitButtonCustomMessagesComponent =
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2655
|
+
}
|
|
2656
|
+
SplitButtonCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2657
|
+
SplitButtonCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SplitButtonCustomMessagesComponent, selector: "kendo-splitbutton-messages", providers: [{
|
|
2658
|
+
provide: Messages,
|
|
2659
|
+
useExisting: forwardRef(() => SplitButtonCustomMessagesComponent)
|
|
2660
|
+
}], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
2661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonCustomMessagesComponent, decorators: [{
|
|
2662
|
+
type: Component,
|
|
2663
|
+
args: [{
|
|
2664
|
+
providers: [{
|
|
2665
|
+
provide: Messages,
|
|
2666
|
+
useExisting: forwardRef(() => SplitButtonCustomMessagesComponent)
|
|
2667
|
+
}],
|
|
2668
|
+
selector: 'kendo-splitbutton-messages',
|
|
2669
|
+
template: ``
|
|
2670
|
+
}]
|
|
2671
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
2714
2672
|
|
|
2715
2673
|
/**
|
|
2716
2674
|
* @hidden
|
|
@@ -2720,24 +2678,28 @@ SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = __de
|
|
|
2720
2678
|
* The package exports:
|
|
2721
2679
|
* - `SplitButtonComponent`—The SplitButtonComponent component class.
|
|
2722
2680
|
*/
|
|
2723
|
-
|
|
2724
|
-
}
|
|
2725
|
-
SplitButtonModule =
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
],
|
|
2681
|
+
class SplitButtonModule {
|
|
2682
|
+
}
|
|
2683
|
+
SplitButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2684
|
+
SplitButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonModule, declarations: [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent], imports: [CommonModule, PopupModule, ButtonModule, ListModule], exports: [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent] });
|
|
2685
|
+
SplitButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonModule, imports: [[CommonModule, PopupModule, ButtonModule, ListModule], ListModule] });
|
|
2686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonModule, decorators: [{
|
|
2687
|
+
type: NgModule,
|
|
2688
|
+
args: [{
|
|
2689
|
+
declarations: [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
2690
|
+
exports: [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
2691
|
+
imports: [CommonModule, PopupModule, ButtonModule, ListModule]
|
|
2692
|
+
}]
|
|
2693
|
+
}] });
|
|
2732
2694
|
|
|
2733
2695
|
const NAVIGATION_SETTINGS$1 = {
|
|
2734
2696
|
useLeftRightArrows: true
|
|
2735
2697
|
};
|
|
2736
|
-
const ɵ0$1 = NAVIGATION_SETTINGS$1;
|
|
2737
2698
|
const NAVIGATION_SETTINGS_PROVIDER$1 = {
|
|
2738
2699
|
provide: NAVIGATION_CONFIG,
|
|
2739
|
-
useValue:
|
|
2700
|
+
useValue: NAVIGATION_SETTINGS$1
|
|
2740
2701
|
};
|
|
2702
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
2741
2703
|
/**
|
|
2742
2704
|
* Represents the Kendo UI DropDownButton component for Angular.
|
|
2743
2705
|
*
|
|
@@ -2766,7 +2728,7 @@ const NAVIGATION_SETTINGS_PROVIDER$1 = {
|
|
|
2766
2728
|
* }
|
|
2767
2729
|
* ```
|
|
2768
2730
|
*/
|
|
2769
|
-
|
|
2731
|
+
class DropDownButtonComponent extends ListButton {
|
|
2770
2732
|
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
2771
2733
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
2772
2734
|
this.popupService = popupService;
|
|
@@ -2788,32 +2750,22 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
2788
2750
|
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)).
|
|
2789
2751
|
*
|
|
2790
2752
|
* The possible values are:
|
|
2791
|
-
* * `
|
|
2792
|
-
* * `
|
|
2793
|
-
* * `
|
|
2794
|
-
* * `
|
|
2753
|
+
* * `small`
|
|
2754
|
+
* * `medium` (default)
|
|
2755
|
+
* * `large`
|
|
2756
|
+
* * `none`
|
|
2795
2757
|
*/
|
|
2796
2758
|
this.size = 'medium';
|
|
2797
|
-
/**
|
|
2798
|
-
* The shape property specifies if the DropDownButton will be a square or rectangle.
|
|
2799
|
-
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)).
|
|
2800
|
-
*
|
|
2801
|
-
* The possible values are:
|
|
2802
|
-
* * `'rectangle'` (default)
|
|
2803
|
-
* * `'square'`
|
|
2804
|
-
* * `null`
|
|
2805
|
-
*/
|
|
2806
|
-
this.shape = 'rectangle';
|
|
2807
2759
|
/**
|
|
2808
2760
|
* The rounded property specifies the border radius of the DropDownButton
|
|
2809
2761
|
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)).
|
|
2810
2762
|
*
|
|
2811
2763
|
* The possible values are:
|
|
2812
|
-
* * `
|
|
2813
|
-
* * `
|
|
2814
|
-
* * `
|
|
2815
|
-
* * `
|
|
2816
|
-
* * `
|
|
2764
|
+
* * `small`
|
|
2765
|
+
* * `medium` (default)
|
|
2766
|
+
* * `large`
|
|
2767
|
+
* * `full`
|
|
2768
|
+
* * `none`
|
|
2817
2769
|
*/
|
|
2818
2770
|
this.rounded = 'medium';
|
|
2819
2771
|
/**
|
|
@@ -2833,7 +2785,7 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
2833
2785
|
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
2834
2786
|
* * `light`— Applies coloring based on the `light` theme color.
|
|
2835
2787
|
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
2836
|
-
* * `
|
|
2788
|
+
* * `none` —Removes the default CSS class (no class would be rendered).
|
|
2837
2789
|
*/
|
|
2838
2790
|
this.themeColor = 'base';
|
|
2839
2791
|
/**
|
|
@@ -2857,13 +2809,14 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
2857
2809
|
/**
|
|
2858
2810
|
* Fires each time the DropDownButton gets focused.
|
|
2859
2811
|
*/
|
|
2860
|
-
this.onFocus = new EventEmitter();
|
|
2812
|
+
this.onFocus = new EventEmitter();
|
|
2861
2813
|
/**
|
|
2862
2814
|
* Fires each time the DropDownButton gets blurred.
|
|
2863
2815
|
*/
|
|
2864
|
-
this.onBlur = new EventEmitter();
|
|
2816
|
+
this.onBlur = new EventEmitter();
|
|
2865
2817
|
this.listId = guid();
|
|
2866
|
-
this._fillMode =
|
|
2818
|
+
this._fillMode = DEFAULT_FILL_MODE;
|
|
2819
|
+
this.popupSubs = new Subscription();
|
|
2867
2820
|
this._itemClick = this.itemClick;
|
|
2868
2821
|
this._blur = this.onBlur;
|
|
2869
2822
|
}
|
|
@@ -2914,7 +2867,7 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
2914
2867
|
* * `flat`
|
|
2915
2868
|
* * `outline`
|
|
2916
2869
|
* * `link`
|
|
2917
|
-
* * `
|
|
2870
|
+
* * `none`
|
|
2918
2871
|
*/
|
|
2919
2872
|
set fillMode(fillMode) {
|
|
2920
2873
|
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
@@ -3115,11 +3068,11 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
3115
3068
|
|| (this.popupRef && this.popupRef.popupElement.contains(element));
|
|
3116
3069
|
}
|
|
3117
3070
|
subscribeNavigationEvents() {
|
|
3118
|
-
this.
|
|
3119
|
-
.subscribe(this.onArrowKeyNavigate.bind(this));
|
|
3120
|
-
this.
|
|
3121
|
-
this.
|
|
3122
|
-
this.
|
|
3071
|
+
this.subs.add(this.navigationService.navigate
|
|
3072
|
+
.subscribe(this.onArrowKeyNavigate.bind(this)));
|
|
3073
|
+
this.subs.add(this.navigationService.enterup.subscribe(this.onNavigationEnterUp.bind(this)));
|
|
3074
|
+
this.subs.add(this.navigationService.open.subscribe(this.onNavigationOpen.bind(this)));
|
|
3075
|
+
this.subs.add(merge(this.navigationService.close, this.navigationService.esc).subscribe(this.onNavigationClose.bind(this)));
|
|
3123
3076
|
}
|
|
3124
3077
|
onNavigationEnterUp() {
|
|
3125
3078
|
if (!this._disabled && !this.openState) {
|
|
@@ -3172,176 +3125,86 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
3172
3125
|
popupAlign: this.popupAlign,
|
|
3173
3126
|
popupClass: this.popupClasses
|
|
3174
3127
|
});
|
|
3175
|
-
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false);
|
|
3176
|
-
this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
|
|
3128
|
+
this.popupSubs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false));
|
|
3129
|
+
this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)));
|
|
3177
3130
|
}
|
|
3178
3131
|
destroyPopup() {
|
|
3179
3132
|
if (this.popupRef) {
|
|
3180
3133
|
this.popupRef.close();
|
|
3181
3134
|
this.popupRef = null;
|
|
3135
|
+
this.popupSubs.unsubscribe();
|
|
3182
3136
|
}
|
|
3183
3137
|
}
|
|
3184
|
-
}
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
]
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
]
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
]
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
]
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
]
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
Output(),
|
|
3255
|
-
__metadata("design:type", EventEmitter)
|
|
3256
|
-
], DropDownButtonComponent.prototype, "close", void 0);
|
|
3257
|
-
__decorate([
|
|
3258
|
-
Output('focus'),
|
|
3259
|
-
__metadata("design:type", EventEmitter)
|
|
3260
|
-
], DropDownButtonComponent.prototype, "onFocus", void 0);
|
|
3261
|
-
__decorate([
|
|
3262
|
-
Output('blur'),
|
|
3263
|
-
__metadata("design:type", EventEmitter)
|
|
3264
|
-
], DropDownButtonComponent.prototype, "onBlur", void 0);
|
|
3265
|
-
__decorate([
|
|
3266
|
-
HostBinding('class.k-focus'),
|
|
3267
|
-
__metadata("design:type", Boolean),
|
|
3268
|
-
__metadata("design:paramtypes", [])
|
|
3269
|
-
], DropDownButtonComponent.prototype, "focused", null);
|
|
3270
|
-
__decorate([
|
|
3271
|
-
HostBinding('class.k-dropdown-button'),
|
|
3272
|
-
__metadata("design:type", Boolean),
|
|
3273
|
-
__metadata("design:paramtypes", [])
|
|
3274
|
-
], DropDownButtonComponent.prototype, "widgetClasses", null);
|
|
3275
|
-
__decorate([
|
|
3276
|
-
HostBinding('attr.dir'),
|
|
3277
|
-
__metadata("design:type", String),
|
|
3278
|
-
__metadata("design:paramtypes", [])
|
|
3279
|
-
], DropDownButtonComponent.prototype, "dir", null);
|
|
3280
|
-
__decorate([
|
|
3281
|
-
ContentChild(ButtonItemTemplateDirective, { static: false }),
|
|
3282
|
-
__metadata("design:type", ButtonItemTemplateDirective)
|
|
3283
|
-
], DropDownButtonComponent.prototype, "itemTemplate", void 0);
|
|
3284
|
-
__decorate([
|
|
3285
|
-
ViewChild('button', { static: true }),
|
|
3286
|
-
__metadata("design:type", ElementRef)
|
|
3287
|
-
], DropDownButtonComponent.prototype, "button", void 0);
|
|
3288
|
-
__decorate([
|
|
3289
|
-
ViewChild('buttonList', { static: false }),
|
|
3290
|
-
__metadata("design:type", ListComponent)
|
|
3291
|
-
], DropDownButtonComponent.prototype, "buttonList", void 0);
|
|
3292
|
-
__decorate([
|
|
3293
|
-
ViewChild('popupTemplate', { static: true }),
|
|
3294
|
-
__metadata("design:type", TemplateRef)
|
|
3295
|
-
], DropDownButtonComponent.prototype, "popupTemplate", void 0);
|
|
3296
|
-
__decorate([
|
|
3297
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
3298
|
-
__metadata("design:type", ViewContainerRef)
|
|
3299
|
-
], DropDownButtonComponent.prototype, "container", void 0);
|
|
3300
|
-
__decorate([
|
|
3301
|
-
HostListener('keydown', ['$event']),
|
|
3302
|
-
__metadata("design:type", Function),
|
|
3303
|
-
__metadata("design:paramtypes", [Object]),
|
|
3304
|
-
__metadata("design:returntype", void 0)
|
|
3305
|
-
], DropDownButtonComponent.prototype, "keydown", null);
|
|
3306
|
-
__decorate([
|
|
3307
|
-
HostListener('keypress', ['$event']),
|
|
3308
|
-
__metadata("design:type", Function),
|
|
3309
|
-
__metadata("design:paramtypes", [Object]),
|
|
3310
|
-
__metadata("design:returntype", void 0)
|
|
3311
|
-
], DropDownButtonComponent.prototype, "keypress", null);
|
|
3312
|
-
__decorate([
|
|
3313
|
-
HostListener('keyup', ['$event']),
|
|
3314
|
-
__metadata("design:type", Function),
|
|
3315
|
-
__metadata("design:paramtypes", [Object]),
|
|
3316
|
-
__metadata("design:returntype", void 0)
|
|
3317
|
-
], DropDownButtonComponent.prototype, "keyup", null);
|
|
3318
|
-
__decorate([
|
|
3319
|
-
HostListener('mousedown', ['$event']),
|
|
3320
|
-
__metadata("design:type", Function),
|
|
3321
|
-
__metadata("design:paramtypes", [Object]),
|
|
3322
|
-
__metadata("design:returntype", void 0)
|
|
3323
|
-
], DropDownButtonComponent.prototype, "mousedown", null);
|
|
3324
|
-
__decorate([
|
|
3325
|
-
HostListener('mouseup', ['$event']),
|
|
3326
|
-
__metadata("design:type", Function),
|
|
3327
|
-
__metadata("design:paramtypes", [Object]),
|
|
3328
|
-
__metadata("design:returntype", void 0)
|
|
3329
|
-
], DropDownButtonComponent.prototype, "mouseup", null);
|
|
3330
|
-
DropDownButtonComponent = __decorate([
|
|
3331
|
-
Component({
|
|
3332
|
-
exportAs: 'kendoDropDownButton',
|
|
3333
|
-
providers: [
|
|
3334
|
-
FocusService,
|
|
3335
|
-
NavigationService,
|
|
3336
|
-
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
3337
|
-
LocalizationService,
|
|
3338
|
-
{
|
|
3339
|
-
provide: L10N_PREFIX,
|
|
3340
|
-
useValue: 'kendo.dropdownbutton'
|
|
3341
|
-
}
|
|
3342
|
-
],
|
|
3343
|
-
selector: 'kendo-dropdownbutton',
|
|
3344
|
-
template: `
|
|
3138
|
+
}
|
|
3139
|
+
DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonComponent, deps: [{ token: FocusService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3140
|
+
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: { icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", textField: "textField", disabled: "disabled", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", tabIndex: "tabIndex" }, outputs: { itemClick: "itemClick", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "class.k-dropdown-button": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
|
|
3141
|
+
FocusService,
|
|
3142
|
+
NavigationService,
|
|
3143
|
+
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
3144
|
+
LocalizationService,
|
|
3145
|
+
{
|
|
3146
|
+
provide: L10N_PREFIX,
|
|
3147
|
+
useValue: 'kendo.dropdownbutton'
|
|
3148
|
+
}
|
|
3149
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ButtonItemTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true, static: true }, { propertyName: "buttonList", first: true, predicate: ["buttonList"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["kendoDropDownButton"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
3150
|
+
<button kendoButton #button
|
|
3151
|
+
role="menu"
|
|
3152
|
+
type="button"
|
|
3153
|
+
[tabindex]="componentTabIndex"
|
|
3154
|
+
[class.k-active]="active"
|
|
3155
|
+
[disabled]="disabled"
|
|
3156
|
+
[icon]="icon"
|
|
3157
|
+
[iconClass]="iconClass"
|
|
3158
|
+
[imageUrl]="imageUrl"
|
|
3159
|
+
[ngClass]="buttonClass"
|
|
3160
|
+
[size]="size"
|
|
3161
|
+
[rounded]="rounded"
|
|
3162
|
+
[fillMode]="fillMode"
|
|
3163
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3164
|
+
(click)="openPopup()"
|
|
3165
|
+
(focus)="handleFocus()"
|
|
3166
|
+
(blur)="onButtonBlur()"
|
|
3167
|
+
[attr.aria-disabled]="disabled"
|
|
3168
|
+
[attr.aria-expanded]="openState"
|
|
3169
|
+
[attr.aria-haspopup]="true"
|
|
3170
|
+
[attr.aria-owns]="listId"
|
|
3171
|
+
>
|
|
3172
|
+
<ng-content></ng-content>
|
|
3173
|
+
</button>
|
|
3174
|
+
<ng-template #popupTemplate>
|
|
3175
|
+
<kendo-button-list
|
|
3176
|
+
#buttonList
|
|
3177
|
+
[id]="listId"
|
|
3178
|
+
[data]="data"
|
|
3179
|
+
[textField]="textField"
|
|
3180
|
+
[itemTemplate]="itemTemplate"
|
|
3181
|
+
(onItemClick)="onItemClick($event)"
|
|
3182
|
+
(keydown)="keyDownHandler($event)"
|
|
3183
|
+
(keypress)="keyPressHandler($event)"
|
|
3184
|
+
(keyup)="keyUpHandler($event)"
|
|
3185
|
+
[attr.dir]="dir"
|
|
3186
|
+
[size]="size"
|
|
3187
|
+
>
|
|
3188
|
+
</kendo-button-list>
|
|
3189
|
+
</ng-template>
|
|
3190
|
+
<ng-container #container></ng-container>
|
|
3191
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
3193
|
+
type: Component,
|
|
3194
|
+
args: [{
|
|
3195
|
+
exportAs: 'kendoDropDownButton',
|
|
3196
|
+
providers: [
|
|
3197
|
+
FocusService,
|
|
3198
|
+
NavigationService,
|
|
3199
|
+
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
3200
|
+
LocalizationService,
|
|
3201
|
+
{
|
|
3202
|
+
provide: L10N_PREFIX,
|
|
3203
|
+
useValue: 'kendo.dropdownbutton'
|
|
3204
|
+
}
|
|
3205
|
+
],
|
|
3206
|
+
selector: 'kendo-dropdownbutton',
|
|
3207
|
+
template: `
|
|
3345
3208
|
<button kendoButton #button
|
|
3346
3209
|
role="menu"
|
|
3347
3210
|
type="button"
|
|
@@ -3353,7 +3216,6 @@ DropDownButtonComponent = __decorate([
|
|
|
3353
3216
|
[imageUrl]="imageUrl"
|
|
3354
3217
|
[ngClass]="buttonClass"
|
|
3355
3218
|
[size]="size"
|
|
3356
|
-
[shape]="shape"
|
|
3357
3219
|
[rounded]="rounded"
|
|
3358
3220
|
[fillMode]="fillMode"
|
|
3359
3221
|
[themeColor]="fillMode ? themeColor : null"
|
|
@@ -3385,16 +3247,85 @@ DropDownButtonComponent = __decorate([
|
|
|
3385
3247
|
</ng-template>
|
|
3386
3248
|
<ng-container #container></ng-container>
|
|
3387
3249
|
`
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
],
|
|
3250
|
+
}]
|
|
3251
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { icon: [{
|
|
3252
|
+
type: Input
|
|
3253
|
+
}], iconClass: [{
|
|
3254
|
+
type: Input
|
|
3255
|
+
}], imageUrl: [{
|
|
3256
|
+
type: Input
|
|
3257
|
+
}], popupSettings: [{
|
|
3258
|
+
type: Input
|
|
3259
|
+
}], textField: [{
|
|
3260
|
+
type: Input
|
|
3261
|
+
}], disabled: [{
|
|
3262
|
+
type: Input
|
|
3263
|
+
}], data: [{
|
|
3264
|
+
type: Input
|
|
3265
|
+
}], size: [{
|
|
3266
|
+
type: Input
|
|
3267
|
+
}], rounded: [{
|
|
3268
|
+
type: Input
|
|
3269
|
+
}], fillMode: [{
|
|
3270
|
+
type: Input
|
|
3271
|
+
}], themeColor: [{
|
|
3272
|
+
type: Input
|
|
3273
|
+
}], buttonClass: [{
|
|
3274
|
+
type: Input
|
|
3275
|
+
}], tabIndex: [{
|
|
3276
|
+
type: Input
|
|
3277
|
+
}], itemClick: [{
|
|
3278
|
+
type: Output
|
|
3279
|
+
}], open: [{
|
|
3280
|
+
type: Output
|
|
3281
|
+
}], close: [{
|
|
3282
|
+
type: Output
|
|
3283
|
+
}], onFocus: [{
|
|
3284
|
+
type: Output,
|
|
3285
|
+
args: ['focus']
|
|
3286
|
+
}], onBlur: [{
|
|
3287
|
+
type: Output,
|
|
3288
|
+
args: ['blur']
|
|
3289
|
+
}], focused: [{
|
|
3290
|
+
type: HostBinding,
|
|
3291
|
+
args: ['class.k-focus']
|
|
3292
|
+
}], widgetClasses: [{
|
|
3293
|
+
type: HostBinding,
|
|
3294
|
+
args: ['class.k-dropdown-button']
|
|
3295
|
+
}], dir: [{
|
|
3296
|
+
type: HostBinding,
|
|
3297
|
+
args: ['attr.dir']
|
|
3298
|
+
}], itemTemplate: [{
|
|
3299
|
+
type: ContentChild,
|
|
3300
|
+
args: [ButtonItemTemplateDirective, { static: false }]
|
|
3301
|
+
}], button: [{
|
|
3302
|
+
type: ViewChild,
|
|
3303
|
+
args: ['button', { static: true }]
|
|
3304
|
+
}], buttonList: [{
|
|
3305
|
+
type: ViewChild,
|
|
3306
|
+
args: ['buttonList', { static: false }]
|
|
3307
|
+
}], popupTemplate: [{
|
|
3308
|
+
type: ViewChild,
|
|
3309
|
+
args: ['popupTemplate', { static: true }]
|
|
3310
|
+
}], container: [{
|
|
3311
|
+
type: ViewChild,
|
|
3312
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
3313
|
+
}], keydown: [{
|
|
3314
|
+
type: HostListener,
|
|
3315
|
+
args: ['keydown', ['$event']]
|
|
3316
|
+
}], keypress: [{
|
|
3317
|
+
type: HostListener,
|
|
3318
|
+
args: ['keypress', ['$event']]
|
|
3319
|
+
}], keyup: [{
|
|
3320
|
+
type: HostListener,
|
|
3321
|
+
args: ['keyup', ['$event']]
|
|
3322
|
+
}], mousedown: [{
|
|
3323
|
+
type: HostListener,
|
|
3324
|
+
args: ['mousedown', ['$event']]
|
|
3325
|
+
}], mouseup: [{
|
|
3326
|
+
type: HostListener,
|
|
3327
|
+
args: ['mouseup', ['$event']]
|
|
3328
|
+
}] } });
|
|
3398
3329
|
|
|
3399
3330
|
/**
|
|
3400
3331
|
* @hidden
|
|
@@ -3404,20 +3335,24 @@ DropDownButtonComponent = __decorate([
|
|
|
3404
3335
|
* The package exports:
|
|
3405
3336
|
* - `DropDownButtonComponent`—The DropDownButtonComponent component class.
|
|
3406
3337
|
*/
|
|
3407
|
-
|
|
3408
|
-
}
|
|
3409
|
-
DropDownButtonModule =
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
],
|
|
3338
|
+
class DropDownButtonModule {
|
|
3339
|
+
}
|
|
3340
|
+
DropDownButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3341
|
+
DropDownButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonModule, declarations: [DropDownButtonComponent], imports: [CommonModule, PopupModule, ListModule, ButtonModule], exports: [DropDownButtonComponent, ListModule] });
|
|
3342
|
+
DropDownButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonModule, imports: [[CommonModule, PopupModule, ListModule, ButtonModule], ListModule] });
|
|
3343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonModule, decorators: [{
|
|
3344
|
+
type: NgModule,
|
|
3345
|
+
args: [{
|
|
3346
|
+
declarations: [DropDownButtonComponent],
|
|
3347
|
+
exports: [DropDownButtonComponent, ListModule],
|
|
3348
|
+
imports: [CommonModule, PopupModule, ListModule, ButtonModule]
|
|
3349
|
+
}]
|
|
3350
|
+
}] });
|
|
3416
3351
|
|
|
3417
3352
|
/**
|
|
3418
3353
|
* Displays a Chip that represents an input, attribute or an action.
|
|
3419
3354
|
*/
|
|
3420
|
-
|
|
3355
|
+
class ChipComponent {
|
|
3421
3356
|
constructor(element, renderer, ngZone, localizationService) {
|
|
3422
3357
|
this.element = element;
|
|
3423
3358
|
this.renderer = renderer;
|
|
@@ -3454,6 +3389,7 @@ let ChipComponent = class ChipComponent {
|
|
|
3454
3389
|
this._fillMode = 'solid';
|
|
3455
3390
|
this._themeColor = 'base';
|
|
3456
3391
|
this.focused = false;
|
|
3392
|
+
this.subs = new Subscription();
|
|
3457
3393
|
validatePackage(packageMetadata);
|
|
3458
3394
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
3459
3395
|
}
|
|
@@ -3462,14 +3398,16 @@ let ChipComponent = class ChipComponent {
|
|
|
3462
3398
|
* ([see example]({% slug appearance_chip %}#toc-size)).
|
|
3463
3399
|
*
|
|
3464
3400
|
* The possible values are:
|
|
3465
|
-
* * `
|
|
3466
|
-
* * `
|
|
3467
|
-
* * `
|
|
3468
|
-
* * `
|
|
3401
|
+
* * `small`
|
|
3402
|
+
* * `medium` (default)
|
|
3403
|
+
* * `large`
|
|
3404
|
+
* * `none`
|
|
3469
3405
|
*/
|
|
3470
3406
|
set size(size) {
|
|
3471
|
-
|
|
3472
|
-
|
|
3407
|
+
if (isPresent(size)) {
|
|
3408
|
+
this._size = size;
|
|
3409
|
+
}
|
|
3410
|
+
this.handleClasses(this._size, 'size');
|
|
3473
3411
|
}
|
|
3474
3412
|
get size() {
|
|
3475
3413
|
return this._size;
|
|
@@ -3479,15 +3417,17 @@ let ChipComponent = class ChipComponent {
|
|
|
3479
3417
|
* ([see example]({% slug appearance_chip %}#toc-rounded)).
|
|
3480
3418
|
*
|
|
3481
3419
|
* The possible values are:
|
|
3482
|
-
* * `
|
|
3483
|
-
* * `
|
|
3484
|
-
* * `
|
|
3485
|
-
* * `
|
|
3486
|
-
* * `
|
|
3420
|
+
* * `small`
|
|
3421
|
+
* * `medium` (default)
|
|
3422
|
+
* * `large`
|
|
3423
|
+
* * `full`
|
|
3424
|
+
* * `none`
|
|
3487
3425
|
*/
|
|
3488
3426
|
set rounded(rounded) {
|
|
3489
|
-
|
|
3490
|
-
|
|
3427
|
+
if (isPresent(rounded)) {
|
|
3428
|
+
this._rounded = rounded;
|
|
3429
|
+
}
|
|
3430
|
+
this.handleClasses(this._rounded, 'rounded');
|
|
3491
3431
|
}
|
|
3492
3432
|
get rounded() {
|
|
3493
3433
|
return this._rounded;
|
|
@@ -3497,13 +3437,15 @@ let ChipComponent = class ChipComponent {
|
|
|
3497
3437
|
* ([see example]({% slug appearance_chip %}#toc-fillMode)).
|
|
3498
3438
|
*
|
|
3499
3439
|
* The possible values are:
|
|
3500
|
-
* * `
|
|
3501
|
-
* * `
|
|
3502
|
-
* * `
|
|
3440
|
+
* * `solid` (default)
|
|
3441
|
+
* * `outline`
|
|
3442
|
+
* * `none`
|
|
3503
3443
|
*/
|
|
3504
3444
|
set fillMode(fillMode) {
|
|
3505
|
-
|
|
3506
|
-
|
|
3445
|
+
if (isPresent(fillMode)) {
|
|
3446
|
+
this._fillMode = fillMode;
|
|
3447
|
+
}
|
|
3448
|
+
this.handleClasses(this._fillMode, 'fillMode');
|
|
3507
3449
|
}
|
|
3508
3450
|
get fillMode() {
|
|
3509
3451
|
return this._fillMode;
|
|
@@ -3514,16 +3456,18 @@ let ChipComponent = class ChipComponent {
|
|
|
3514
3456
|
* ([see example]({% slug appearance_chip %}#toc-themeColor)).
|
|
3515
3457
|
*
|
|
3516
3458
|
* The possible values are:
|
|
3517
|
-
* * `
|
|
3518
|
-
* * `
|
|
3519
|
-
* * `
|
|
3520
|
-
* * `
|
|
3521
|
-
* * `
|
|
3522
|
-
* * `
|
|
3459
|
+
* * `base` (default)
|
|
3460
|
+
* * `info`
|
|
3461
|
+
* * `success`
|
|
3462
|
+
* * `warning`
|
|
3463
|
+
* * `error`
|
|
3464
|
+
* * `none`
|
|
3523
3465
|
*/
|
|
3524
3466
|
set themeColor(themeColor) {
|
|
3525
|
-
|
|
3526
|
-
|
|
3467
|
+
if (isPresent(themeColor)) {
|
|
3468
|
+
this._themeColor = themeColor;
|
|
3469
|
+
}
|
|
3470
|
+
this.handleThemeColor(this._themeColor);
|
|
3527
3471
|
}
|
|
3528
3472
|
get themeColor() {
|
|
3529
3473
|
return this._themeColor;
|
|
@@ -3544,16 +3488,11 @@ let ChipComponent = class ChipComponent {
|
|
|
3544
3488
|
return this.focused;
|
|
3545
3489
|
}
|
|
3546
3490
|
ngOnInit() {
|
|
3547
|
-
this.
|
|
3548
|
-
.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
|
|
3491
|
+
this.subs.add(this.localizationService.changes
|
|
3492
|
+
.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
|
3549
3493
|
}
|
|
3550
3494
|
ngOnDestroy() {
|
|
3551
|
-
|
|
3552
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
3553
|
-
}
|
|
3554
|
-
if (this.detachDomEvents) {
|
|
3555
|
-
this.detachDomEvents();
|
|
3556
|
-
}
|
|
3495
|
+
this.subs.unsubscribe();
|
|
3557
3496
|
}
|
|
3558
3497
|
ngAfterViewInit() {
|
|
3559
3498
|
const chip = this.element.nativeElement;
|
|
@@ -3619,25 +3558,20 @@ let ChipComponent = class ChipComponent {
|
|
|
3619
3558
|
}
|
|
3620
3559
|
attachElementEventHandlers(chip) {
|
|
3621
3560
|
this.ngZone.runOutsideAngular(() => {
|
|
3622
|
-
|
|
3561
|
+
this.subs.add(this.renderer.listen(chip, 'focus', () => {
|
|
3623
3562
|
this.renderer.addClass(chip, 'k-focus');
|
|
3624
|
-
});
|
|
3625
|
-
|
|
3563
|
+
}));
|
|
3564
|
+
this.subs.add(this.renderer.listen(chip, 'blur', () => {
|
|
3626
3565
|
this.renderer.removeClass(chip, 'k-focus');
|
|
3627
|
-
});
|
|
3628
|
-
|
|
3566
|
+
}));
|
|
3567
|
+
this.subs.add(this.renderer.listen(chip, 'click', (e) => {
|
|
3629
3568
|
const isRemoveClicked = closest(e.target, '.k-chip-remove-action');
|
|
3630
3569
|
if (!isRemoveClicked) {
|
|
3631
3570
|
this.ngZone.run(() => {
|
|
3632
3571
|
this.contentClick.emit({ sender: this, originalEvent: e });
|
|
3633
3572
|
});
|
|
3634
3573
|
}
|
|
3635
|
-
});
|
|
3636
|
-
this.detachDomEvents = () => {
|
|
3637
|
-
focusListener();
|
|
3638
|
-
blurListener();
|
|
3639
|
-
contentClickListener();
|
|
3640
|
-
};
|
|
3574
|
+
}));
|
|
3641
3575
|
});
|
|
3642
3576
|
}
|
|
3643
3577
|
/**
|
|
@@ -3670,115 +3604,67 @@ let ChipComponent = class ChipComponent {
|
|
|
3670
3604
|
const addFillMode = fillMode ? fillMode : this.fillMode;
|
|
3671
3605
|
const themeColorClass = getThemeColorClasses('chip', removeFillMode, addFillMode, this.themeColor, value);
|
|
3672
3606
|
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
3673
|
-
if (addFillMode !==
|
|
3607
|
+
if (addFillMode !== 'none' && fillMode !== 'none') {
|
|
3674
3608
|
if (themeColorClass.toAdd) {
|
|
3675
3609
|
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
3676
3610
|
}
|
|
3677
3611
|
}
|
|
3678
3612
|
}
|
|
3679
|
-
}
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
],
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
]
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
__metadata("design:type", EventEmitter)
|
|
3735
|
-
], ChipComponent.prototype, "remove", void 0);
|
|
3736
|
-
__decorate([
|
|
3737
|
-
Output(),
|
|
3738
|
-
__metadata("design:type", EventEmitter)
|
|
3739
|
-
], ChipComponent.prototype, "contentClick", void 0);
|
|
3740
|
-
__decorate([
|
|
3741
|
-
HostBinding('attr.tabindex'),
|
|
3742
|
-
__metadata("design:type", Number)
|
|
3743
|
-
], ChipComponent.prototype, "tabIndex", void 0);
|
|
3744
|
-
__decorate([
|
|
3745
|
-
HostBinding('attr.aria-checked'),
|
|
3746
|
-
__metadata("design:type", Boolean),
|
|
3747
|
-
__metadata("design:paramtypes", [])
|
|
3748
|
-
], ChipComponent.prototype, "ariaChecked", null);
|
|
3749
|
-
__decorate([
|
|
3750
|
-
HostBinding('class.k-chip'),
|
|
3751
|
-
__metadata("design:type", Boolean)
|
|
3752
|
-
], ChipComponent.prototype, "hostClass", void 0);
|
|
3753
|
-
__decorate([
|
|
3754
|
-
HostBinding('class.k-chip-has-icon'),
|
|
3755
|
-
__metadata("design:type", Boolean),
|
|
3756
|
-
__metadata("design:paramtypes", [])
|
|
3757
|
-
], ChipComponent.prototype, "hasIconClass", null);
|
|
3758
|
-
__decorate([
|
|
3759
|
-
HostBinding('attr.aria-disabled'),
|
|
3760
|
-
HostBinding('class.k-disabled'),
|
|
3761
|
-
__metadata("design:type", Boolean),
|
|
3762
|
-
__metadata("design:paramtypes", [])
|
|
3763
|
-
], ChipComponent.prototype, "disabledClass", null);
|
|
3764
|
-
__decorate([
|
|
3765
|
-
HostBinding('class.k-selected'),
|
|
3766
|
-
__metadata("design:type", Boolean),
|
|
3767
|
-
__metadata("design:paramtypes", [])
|
|
3768
|
-
], ChipComponent.prototype, "selectedClass", null);
|
|
3769
|
-
__decorate([
|
|
3770
|
-
HostBinding('class.k-focus'),
|
|
3771
|
-
__metadata("design:type", Boolean),
|
|
3772
|
-
__metadata("design:paramtypes", [])
|
|
3773
|
-
], ChipComponent.prototype, "focusedClass", null);
|
|
3774
|
-
__decorate([
|
|
3775
|
-
HostBinding('attr.dir'),
|
|
3776
|
-
__metadata("design:type", String)
|
|
3777
|
-
], ChipComponent.prototype, "direction", void 0);
|
|
3778
|
-
ChipComponent = __decorate([
|
|
3779
|
-
Component({
|
|
3780
|
-
selector: 'kendo-chip',
|
|
3781
|
-
template: `
|
|
3613
|
+
}
|
|
3614
|
+
ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3615
|
+
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipComponent, selector: "kendo-chip", inputs: { label: "label", icon: "icon", iconClass: "iconClass", avatarClass: "avatarClass", selected: "selected", removable: "removable", removeIcon: "removeIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "attr.aria-checked": "this.ariaChecked", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
|
|
3616
|
+
LocalizationService,
|
|
3617
|
+
{
|
|
3618
|
+
provide: L10N_PREFIX,
|
|
3619
|
+
useValue: 'kendo.chip'
|
|
3620
|
+
}
|
|
3621
|
+
], ngImport: i0, template: `
|
|
3622
|
+
<span
|
|
3623
|
+
*ngIf="icon"
|
|
3624
|
+
class="k-chip-icon k-icon"
|
|
3625
|
+
[ngClass]="kendoIconClass"
|
|
3626
|
+
>
|
|
3627
|
+
</span>
|
|
3628
|
+
|
|
3629
|
+
<span
|
|
3630
|
+
*ngIf="iconClass"
|
|
3631
|
+
class="k-chip-icon"
|
|
3632
|
+
[ngClass]="customIconClass"
|
|
3633
|
+
>
|
|
3634
|
+
</span>
|
|
3635
|
+
|
|
3636
|
+
<span
|
|
3637
|
+
*ngIf="avatarClass"
|
|
3638
|
+
class="k-chip-avatar k-avatar k-rounded-full"
|
|
3639
|
+
>
|
|
3640
|
+
<span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
|
|
3641
|
+
</span>
|
|
3642
|
+
|
|
3643
|
+
<span class="k-chip-content">
|
|
3644
|
+
<span class="k-chip-label" *ngIf="label">
|
|
3645
|
+
{{ label }}
|
|
3646
|
+
</span>
|
|
3647
|
+
<ng-content *ngIf="!label"></ng-content>
|
|
3648
|
+
</span>
|
|
3649
|
+
|
|
3650
|
+
<span class="k-chip-actions">
|
|
3651
|
+
<span class="k-chip-action k-chip-remove-action"
|
|
3652
|
+
*ngIf="removable"
|
|
3653
|
+
(click)="onRemoveClick($event)"
|
|
3654
|
+
>
|
|
3655
|
+
<span
|
|
3656
|
+
class="k-icon"
|
|
3657
|
+
[ngClass]="removeIconClass"
|
|
3658
|
+
>
|
|
3659
|
+
</span>
|
|
3660
|
+
</span>
|
|
3661
|
+
</span>
|
|
3662
|
+
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipComponent, decorators: [{
|
|
3664
|
+
type: Component,
|
|
3665
|
+
args: [{
|
|
3666
|
+
selector: 'kendo-chip',
|
|
3667
|
+
template: `
|
|
3782
3668
|
<span
|
|
3783
3669
|
*ngIf="icon"
|
|
3784
3670
|
class="k-chip-icon k-icon"
|
|
@@ -3820,21 +3706,72 @@ ChipComponent = __decorate([
|
|
|
3820
3706
|
</span>
|
|
3821
3707
|
</span>
|
|
3822
3708
|
`,
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
],
|
|
3709
|
+
providers: [
|
|
3710
|
+
LocalizationService,
|
|
3711
|
+
{
|
|
3712
|
+
provide: L10N_PREFIX,
|
|
3713
|
+
useValue: 'kendo.chip'
|
|
3714
|
+
}
|
|
3715
|
+
]
|
|
3716
|
+
}]
|
|
3717
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { label: [{
|
|
3718
|
+
type: Input
|
|
3719
|
+
}], icon: [{
|
|
3720
|
+
type: Input
|
|
3721
|
+
}], iconClass: [{
|
|
3722
|
+
type: Input
|
|
3723
|
+
}], avatarClass: [{
|
|
3724
|
+
type: Input
|
|
3725
|
+
}], selected: [{
|
|
3726
|
+
type: Input
|
|
3727
|
+
}], removable: [{
|
|
3728
|
+
type: Input
|
|
3729
|
+
}], removeIcon: [{
|
|
3730
|
+
type: Input
|
|
3731
|
+
}], disabled: [{
|
|
3732
|
+
type: Input
|
|
3733
|
+
}], size: [{
|
|
3734
|
+
type: Input
|
|
3735
|
+
}], rounded: [{
|
|
3736
|
+
type: Input
|
|
3737
|
+
}], fillMode: [{
|
|
3738
|
+
type: Input
|
|
3739
|
+
}], themeColor: [{
|
|
3740
|
+
type: Input
|
|
3741
|
+
}], remove: [{
|
|
3742
|
+
type: Output
|
|
3743
|
+
}], contentClick: [{
|
|
3744
|
+
type: Output
|
|
3745
|
+
}], tabIndex: [{
|
|
3746
|
+
type: HostBinding,
|
|
3747
|
+
args: ['attr.tabindex']
|
|
3748
|
+
}], ariaChecked: [{
|
|
3749
|
+
type: HostBinding,
|
|
3750
|
+
args: ['attr.aria-checked']
|
|
3751
|
+
}], hostClass: [{
|
|
3752
|
+
type: HostBinding,
|
|
3753
|
+
args: ['class.k-chip']
|
|
3754
|
+
}], hasIconClass: [{
|
|
3755
|
+
type: HostBinding,
|
|
3756
|
+
args: ['class.k-chip-has-icon']
|
|
3757
|
+
}], disabledClass: [{
|
|
3758
|
+
type: HostBinding,
|
|
3759
|
+
args: ['attr.aria-disabled']
|
|
3760
|
+
}, {
|
|
3761
|
+
type: HostBinding,
|
|
3762
|
+
args: ['class.k-disabled']
|
|
3763
|
+
}], selectedClass: [{
|
|
3764
|
+
type: HostBinding,
|
|
3765
|
+
args: ['class.k-selected']
|
|
3766
|
+
}], focusedClass: [{
|
|
3767
|
+
type: HostBinding,
|
|
3768
|
+
args: ['class.k-focus']
|
|
3769
|
+
}], direction: [{
|
|
3770
|
+
type: HostBinding,
|
|
3771
|
+
args: ['attr.dir']
|
|
3772
|
+
}] } });
|
|
3836
3773
|
|
|
3837
|
-
|
|
3774
|
+
class ChipListComponent {
|
|
3838
3775
|
constructor(localizationService, renderer, element) {
|
|
3839
3776
|
this.localizationService = localizationService;
|
|
3840
3777
|
this.renderer = renderer;
|
|
@@ -3870,11 +3807,12 @@ let ChipListComponent = class ChipListComponent {
|
|
|
3870
3807
|
* * `'small'`
|
|
3871
3808
|
* * `'medium'` (default)
|
|
3872
3809
|
* * `'large'`
|
|
3873
|
-
* * `
|
|
3810
|
+
* * `none`
|
|
3874
3811
|
*/
|
|
3875
3812
|
set size(size) {
|
|
3876
|
-
|
|
3877
|
-
this.
|
|
3813
|
+
const sizeValue = size ? size : 'medium';
|
|
3814
|
+
this.handleClasses(sizeValue, 'size');
|
|
3815
|
+
this._size = sizeValue;
|
|
3878
3816
|
}
|
|
3879
3817
|
get size() {
|
|
3880
3818
|
return this._size;
|
|
@@ -3951,81 +3889,69 @@ let ChipListComponent = class ChipListComponent {
|
|
|
3951
3889
|
this.renderer.addClass(elem, classes.toAdd);
|
|
3952
3890
|
}
|
|
3953
3891
|
}
|
|
3954
|
-
}
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
],
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
__metadata("design:paramtypes", [String])
|
|
3971
|
-
], ChipListComponent.prototype, "size", null);
|
|
3972
|
-
__decorate([
|
|
3973
|
-
Output(),
|
|
3974
|
-
__metadata("design:type", EventEmitter)
|
|
3975
|
-
], ChipListComponent.prototype, "selectedChange", void 0);
|
|
3976
|
-
__decorate([
|
|
3977
|
-
Output(),
|
|
3978
|
-
__metadata("design:type", EventEmitter)
|
|
3979
|
-
], ChipListComponent.prototype, "remove", void 0);
|
|
3980
|
-
__decorate([
|
|
3981
|
-
ContentChildren(ChipComponent),
|
|
3982
|
-
__metadata("design:type", QueryList)
|
|
3983
|
-
], ChipListComponent.prototype, "chips", void 0);
|
|
3984
|
-
__decorate([
|
|
3985
|
-
HostBinding('class.k-selection-single'),
|
|
3986
|
-
__metadata("design:type", Boolean),
|
|
3987
|
-
__metadata("design:paramtypes", [])
|
|
3988
|
-
], ChipListComponent.prototype, "single", null);
|
|
3989
|
-
__decorate([
|
|
3990
|
-
HostBinding('class.k-selection-multiple'),
|
|
3991
|
-
__metadata("design:type", Boolean),
|
|
3992
|
-
__metadata("design:paramtypes", [])
|
|
3993
|
-
], ChipListComponent.prototype, "multiple", null);
|
|
3994
|
-
__decorate([
|
|
3995
|
-
HostBinding('attr.role'),
|
|
3996
|
-
__metadata("design:type", String)
|
|
3997
|
-
], ChipListComponent.prototype, "role", void 0);
|
|
3998
|
-
__decorate([
|
|
3999
|
-
HostListener('click', ['$event']),
|
|
4000
|
-
__metadata("design:type", Function),
|
|
4001
|
-
__metadata("design:paramtypes", [Object]),
|
|
4002
|
-
__metadata("design:returntype", void 0)
|
|
4003
|
-
], ChipListComponent.prototype, "onClick", null);
|
|
4004
|
-
ChipListComponent = __decorate([
|
|
4005
|
-
Component({
|
|
4006
|
-
selector: 'kendo-chiplist, kendo-chip-list',
|
|
4007
|
-
template: `
|
|
3892
|
+
}
|
|
3893
|
+
ChipListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipListComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3894
|
+
ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: { selection: "selection", size: "size" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-chip-list": "this.hostClass", "attr.dir": "this.direction", "class.k-selection-single": "this.single", "class.k-selection-multiple": "this.multiple", "attr.role": "this.role" } }, providers: [
|
|
3895
|
+
LocalizationService,
|
|
3896
|
+
{
|
|
3897
|
+
provide: L10N_PREFIX,
|
|
3898
|
+
useValue: 'kendo.chiplist'
|
|
3899
|
+
}
|
|
3900
|
+
], queries: [{ propertyName: "chips", predicate: ChipComponent }], ngImport: i0, template: `
|
|
3901
|
+
<ng-content></ng-content>
|
|
3902
|
+
`, isInline: true });
|
|
3903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipListComponent, decorators: [{
|
|
3904
|
+
type: Component,
|
|
3905
|
+
args: [{
|
|
3906
|
+
selector: 'kendo-chiplist, kendo-chip-list',
|
|
3907
|
+
template: `
|
|
4008
3908
|
<ng-content></ng-content>
|
|
4009
3909
|
`,
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
],
|
|
3910
|
+
providers: [
|
|
3911
|
+
LocalizationService,
|
|
3912
|
+
{
|
|
3913
|
+
provide: L10N_PREFIX,
|
|
3914
|
+
useValue: 'kendo.chiplist'
|
|
3915
|
+
}
|
|
3916
|
+
]
|
|
3917
|
+
}]
|
|
3918
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
|
|
3919
|
+
type: HostBinding,
|
|
3920
|
+
args: ['class.k-chip-list']
|
|
3921
|
+
}], direction: [{
|
|
3922
|
+
type: HostBinding,
|
|
3923
|
+
args: ['attr.dir']
|
|
3924
|
+
}], selection: [{
|
|
3925
|
+
type: Input
|
|
3926
|
+
}], size: [{
|
|
3927
|
+
type: Input
|
|
3928
|
+
}], selectedChange: [{
|
|
3929
|
+
type: Output
|
|
3930
|
+
}], remove: [{
|
|
3931
|
+
type: Output
|
|
3932
|
+
}], chips: [{
|
|
3933
|
+
type: ContentChildren,
|
|
3934
|
+
args: [ChipComponent]
|
|
3935
|
+
}], single: [{
|
|
3936
|
+
type: HostBinding,
|
|
3937
|
+
args: ['class.k-selection-single']
|
|
3938
|
+
}], multiple: [{
|
|
3939
|
+
type: HostBinding,
|
|
3940
|
+
args: ['class.k-selection-multiple']
|
|
3941
|
+
}], role: [{
|
|
3942
|
+
type: HostBinding,
|
|
3943
|
+
args: ['attr.role']
|
|
3944
|
+
}], onClick: [{
|
|
3945
|
+
type: HostListener,
|
|
3946
|
+
args: ['click', ['$event']]
|
|
3947
|
+
}] } });
|
|
4022
3948
|
|
|
4023
|
-
const exportedModules = [
|
|
3949
|
+
const exportedModules$1 = [
|
|
4024
3950
|
ChipComponent,
|
|
4025
3951
|
ChipListComponent
|
|
4026
3952
|
];
|
|
4027
|
-
const declarations = [
|
|
4028
|
-
...exportedModules
|
|
3953
|
+
const declarations$1 = [
|
|
3954
|
+
...exportedModules$1
|
|
4029
3955
|
];
|
|
4030
3956
|
/**
|
|
4031
3957
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
@@ -4055,15 +3981,21 @@ const declarations = [
|
|
|
4055
3981
|
*
|
|
4056
3982
|
* ```
|
|
4057
3983
|
*/
|
|
4058
|
-
|
|
4059
|
-
}
|
|
4060
|
-
ChipModule =
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
3984
|
+
class ChipModule {
|
|
3985
|
+
}
|
|
3986
|
+
ChipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3987
|
+
ChipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipModule, declarations: [ChipComponent,
|
|
3988
|
+
ChipListComponent], imports: [CommonModule], exports: [ChipComponent,
|
|
3989
|
+
ChipListComponent] });
|
|
3990
|
+
ChipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipModule, imports: [[CommonModule]] });
|
|
3991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipModule, decorators: [{
|
|
3992
|
+
type: NgModule,
|
|
3993
|
+
args: [{
|
|
3994
|
+
declarations: [declarations$1],
|
|
3995
|
+
exports: [exportedModules$1],
|
|
3996
|
+
imports: [CommonModule]
|
|
3997
|
+
}]
|
|
3998
|
+
}] });
|
|
4067
3999
|
|
|
4068
4000
|
/**
|
|
4069
4001
|
* @hidden
|
|
@@ -4129,61 +4061,262 @@ function closeAnimation(animationSettings) {
|
|
|
4129
4061
|
]);
|
|
4130
4062
|
}
|
|
4131
4063
|
|
|
4132
|
-
/**
|
|
4133
|
-
* Represents a template that defines the content of the whole dial item.
|
|
4134
|
-
* To define the template, nest an `<ng-template>` tag
|
|
4135
|
-
* with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
4136
|
-
* ([see example]({% slug templates_floatingactionbutton %}#toc-dial-item-template)).
|
|
4137
|
-
*/
|
|
4138
|
-
|
|
4139
|
-
constructor(templateRef) {
|
|
4140
|
-
this.templateRef = templateRef;
|
|
4141
|
-
}
|
|
4142
|
-
}
|
|
4143
|
-
DialItemTemplateDirective =
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
]
|
|
4064
|
+
/**
|
|
4065
|
+
* Represents a template that defines the content of the whole dial item.
|
|
4066
|
+
* To define the template, nest an `<ng-template>` tag
|
|
4067
|
+
* with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
4068
|
+
* ([see example]({% slug templates_floatingactionbutton %}#toc-dial-item-template)).
|
|
4069
|
+
*/
|
|
4070
|
+
class DialItemTemplateDirective {
|
|
4071
|
+
constructor(templateRef) {
|
|
4072
|
+
this.templateRef = templateRef;
|
|
4073
|
+
}
|
|
4074
|
+
}
|
|
4075
|
+
DialItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4076
|
+
DialItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DialItemTemplateDirective, selector: "[kendoDialItemTemplate]", ngImport: i0 });
|
|
4077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialItemTemplateDirective, decorators: [{
|
|
4078
|
+
type: Directive,
|
|
4079
|
+
args: [{
|
|
4080
|
+
selector: '[kendoDialItemTemplate]'
|
|
4081
|
+
}]
|
|
4082
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
4083
|
+
type: Optional
|
|
4084
|
+
}] }]; } });
|
|
4085
|
+
|
|
4086
|
+
/**
|
|
4087
|
+
* Represents a template that defines the content of the FloatingActionButton.
|
|
4088
|
+
* To define the template, nest an `<ng-template>` tag
|
|
4089
|
+
* with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
4090
|
+
* ([see example]({% slug templates_floatingactionbutton %}#toc-floatingactionbutton-template)).
|
|
4091
|
+
*/
|
|
4092
|
+
class FloatingActionButtonTemplateDirective {
|
|
4093
|
+
constructor(templateRef) {
|
|
4094
|
+
this.templateRef = templateRef;
|
|
4095
|
+
}
|
|
4096
|
+
}
|
|
4097
|
+
FloatingActionButtonTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4098
|
+
FloatingActionButtonTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FloatingActionButtonTemplateDirective, selector: "[kendoFloatingActionButtonTemplate]", ngImport: i0 });
|
|
4099
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonTemplateDirective, decorators: [{
|
|
4100
|
+
type: Directive,
|
|
4101
|
+
args: [{
|
|
4102
|
+
selector: '[kendoFloatingActionButtonTemplate]'
|
|
4103
|
+
}]
|
|
4104
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
4105
|
+
type: Optional
|
|
4106
|
+
}] }]; } });
|
|
4107
|
+
|
|
4108
|
+
/**
|
|
4109
|
+
* @hidden
|
|
4110
|
+
*/
|
|
4111
|
+
class DialItemComponent {
|
|
4112
|
+
constructor(element, renderer, localisationService) {
|
|
4113
|
+
this.element = element;
|
|
4114
|
+
this.renderer = renderer;
|
|
4115
|
+
this.localisationService = localisationService;
|
|
4116
|
+
this.hostClass = true;
|
|
4117
|
+
this.role = 'menuitem';
|
|
4118
|
+
}
|
|
4119
|
+
get disabledClass() {
|
|
4120
|
+
return this.item.disabled;
|
|
4121
|
+
}
|
|
4122
|
+
get title() {
|
|
4123
|
+
const label = this.item.label;
|
|
4124
|
+
return label ? label : this.itemTitle;
|
|
4125
|
+
}
|
|
4126
|
+
get indexAttr() {
|
|
4127
|
+
return this.index;
|
|
4128
|
+
}
|
|
4129
|
+
get iconClasses() {
|
|
4130
|
+
const classes = [];
|
|
4131
|
+
if (this.item.iconClass) {
|
|
4132
|
+
classes.push(`${this.item.iconClass}`);
|
|
4133
|
+
}
|
|
4134
|
+
if (this.item.icon) {
|
|
4135
|
+
classes.push(`k-fab-item-icon k-icon k-i-${this.item.icon}`);
|
|
4136
|
+
}
|
|
4137
|
+
return classes;
|
|
4138
|
+
}
|
|
4139
|
+
get itemTitle() {
|
|
4140
|
+
const icon = this.item.icon;
|
|
4141
|
+
const itemTitle = this.item.itemTitle;
|
|
4142
|
+
return (icon && itemTitle) ? itemTitle : icon;
|
|
4143
|
+
}
|
|
4144
|
+
ngAfterViewInit() {
|
|
4145
|
+
const element = this.element.nativeElement;
|
|
4146
|
+
const rtl = this.localisationService.rtl;
|
|
4147
|
+
const hAlign = this.align.horizontal;
|
|
4148
|
+
this.renderer.addClass(element, this.getTextDirectionClass(rtl, hAlign));
|
|
4149
|
+
}
|
|
4150
|
+
getTextDirectionClass(rtl, hAlign) {
|
|
4151
|
+
const dir = rtl ? 'rtl' : 'ltr';
|
|
4152
|
+
const align = hAlign === 'end' ? 'end' : 'start';
|
|
4153
|
+
const directions = {
|
|
4154
|
+
rtl: { end: 'k-text-left', start: 'k-text-right' },
|
|
4155
|
+
ltr: { start: 'k-text-left', end: 'k-text-right' }
|
|
4156
|
+
};
|
|
4157
|
+
return directions[dir][align];
|
|
4158
|
+
}
|
|
4159
|
+
}
|
|
4160
|
+
DialItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4161
|
+
DialItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DialItemComponent, selector: "[kendoDialItem]", inputs: { cssClass: "cssClass", cssStyle: "cssStyle", isFocused: "isFocused", index: "index", item: "item", dialItemTemplate: "dialItemTemplate", align: "align" }, host: { properties: { "class.k-fab-item": "this.hostClass", "attr.role": "this.role", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.title": "this.title", "attr.aria-label": "this.title", "attr.data-fab-item-index": "this.indexAttr" } }, ngImport: i0, template: `
|
|
4162
|
+
<ng-template *ngIf="dialItemTemplate"
|
|
4163
|
+
[ngTemplateOutlet]="dialItemTemplate"
|
|
4164
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }"
|
|
4165
|
+
>
|
|
4166
|
+
</ng-template>
|
|
4167
|
+
|
|
4168
|
+
<ng-container *ngIf="!dialItemTemplate">
|
|
4169
|
+
<span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span>
|
|
4170
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span>
|
|
4171
|
+
</ng-container>
|
|
4172
|
+
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
4173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialItemComponent, decorators: [{
|
|
4174
|
+
type: Component,
|
|
4175
|
+
args: [{
|
|
4176
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
4177
|
+
selector: '[kendoDialItem]',
|
|
4178
|
+
template: `
|
|
4179
|
+
<ng-template *ngIf="dialItemTemplate"
|
|
4180
|
+
[ngTemplateOutlet]="dialItemTemplate"
|
|
4181
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }"
|
|
4182
|
+
>
|
|
4183
|
+
</ng-template>
|
|
4184
|
+
|
|
4185
|
+
<ng-container *ngIf="!dialItemTemplate">
|
|
4186
|
+
<span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span>
|
|
4187
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span>
|
|
4188
|
+
</ng-container>
|
|
4189
|
+
`
|
|
4190
|
+
}]
|
|
4191
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClass: [{
|
|
4192
|
+
type: HostBinding,
|
|
4193
|
+
args: ['class.k-fab-item']
|
|
4194
|
+
}], role: [{
|
|
4195
|
+
type: HostBinding,
|
|
4196
|
+
args: ['attr.role']
|
|
4197
|
+
}], disabledClass: [{
|
|
4198
|
+
type: HostBinding,
|
|
4199
|
+
args: ['attr.aria-disabled']
|
|
4200
|
+
}, {
|
|
4201
|
+
type: HostBinding,
|
|
4202
|
+
args: ['class.k-disabled']
|
|
4203
|
+
}], title: [{
|
|
4204
|
+
type: HostBinding,
|
|
4205
|
+
args: ['attr.title']
|
|
4206
|
+
}, {
|
|
4207
|
+
type: HostBinding,
|
|
4208
|
+
args: ['attr.aria-label']
|
|
4209
|
+
}], indexAttr: [{
|
|
4210
|
+
type: HostBinding,
|
|
4211
|
+
args: ['attr.data-fab-item-index']
|
|
4212
|
+
}], cssClass: [{
|
|
4213
|
+
type: Input
|
|
4214
|
+
}], cssStyle: [{
|
|
4215
|
+
type: Input
|
|
4216
|
+
}], isFocused: [{
|
|
4217
|
+
type: Input
|
|
4218
|
+
}], index: [{
|
|
4219
|
+
type: Input
|
|
4220
|
+
}], item: [{
|
|
4221
|
+
type: Input
|
|
4222
|
+
}], dialItemTemplate: [{
|
|
4223
|
+
type: Input
|
|
4224
|
+
}], align: [{
|
|
4225
|
+
type: Input
|
|
4226
|
+
}] } });
|
|
4150
4227
|
|
|
4151
4228
|
/**
|
|
4152
|
-
*
|
|
4153
|
-
* To define the template, nest an `<ng-template>` tag
|
|
4154
|
-
* with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
4155
|
-
* ([see example]({% slug templates_floatingactionbutton %}#toc-floatingactionbutton-template)).
|
|
4229
|
+
* @hidden
|
|
4156
4230
|
*/
|
|
4157
|
-
|
|
4158
|
-
constructor(
|
|
4159
|
-
this.
|
|
4231
|
+
class DialListComponent {
|
|
4232
|
+
constructor(focusService, cdr) {
|
|
4233
|
+
this.focusService = focusService;
|
|
4234
|
+
this.cdr = cdr;
|
|
4235
|
+
this.hostClass = true;
|
|
4236
|
+
this.subscriptions = new Subscription();
|
|
4237
|
+
this.subscriptions.add(this.focusService.onFocus.subscribe(() => this.cdr.detectChanges()));
|
|
4160
4238
|
}
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4239
|
+
get bottomClass() {
|
|
4240
|
+
return this.align.vertical === 'top' || this.align.vertical === 'middle';
|
|
4241
|
+
}
|
|
4242
|
+
get topClass() {
|
|
4243
|
+
return this.align.vertical === 'bottom';
|
|
4244
|
+
}
|
|
4245
|
+
isFocused(index) {
|
|
4246
|
+
return this.focusService.isFocused(index);
|
|
4247
|
+
}
|
|
4248
|
+
ngOnDestroy() {
|
|
4249
|
+
this.subscriptions.unsubscribe();
|
|
4250
|
+
}
|
|
4251
|
+
}
|
|
4252
|
+
DialListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialListComponent, deps: [{ token: FocusService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4253
|
+
DialListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DialListComponent, selector: "[kendoDialList]", inputs: { dialItems: "dialItems", dialItemTemplate: "dialItemTemplate", align: "align" }, host: { properties: { "class.k-fab-items": "this.hostClass", "class.k-fab-items-bottom": "this.bottomClass", "class.k-fab-items-top": "this.topClass" } }, ngImport: i0, template: `
|
|
4254
|
+
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
4255
|
+
<li
|
|
4256
|
+
kendoButtonFocusable
|
|
4257
|
+
kendoDialItem
|
|
4258
|
+
[item]="dialItems[idx]"
|
|
4259
|
+
[index]="idx"
|
|
4260
|
+
[dialItemTemplate]="dialItemTemplate"
|
|
4261
|
+
[isFocused]="isFocused(idx)"
|
|
4262
|
+
[ngClass]='item.cssClass'
|
|
4263
|
+
[ngStyle]='item.cssStyle'
|
|
4264
|
+
[align]="align"
|
|
4265
|
+
>
|
|
4266
|
+
</li>
|
|
4267
|
+
</ng-container>
|
|
4268
|
+
`, isInline: true, components: [{ type: DialItemComponent, selector: "[kendoDialItem]", inputs: ["cssClass", "cssStyle", "isFocused", "index", "item", "dialItemTemplate", "align"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: FocusableDirective, selector: "[kendoButtonFocusable]", inputs: ["index"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
4269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialListComponent, decorators: [{
|
|
4270
|
+
type: Component,
|
|
4271
|
+
args: [{
|
|
4272
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
4273
|
+
selector: '[kendoDialList]',
|
|
4274
|
+
template: `
|
|
4275
|
+
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
4276
|
+
<li
|
|
4277
|
+
kendoButtonFocusable
|
|
4278
|
+
kendoDialItem
|
|
4279
|
+
[item]="dialItems[idx]"
|
|
4280
|
+
[index]="idx"
|
|
4281
|
+
[dialItemTemplate]="dialItemTemplate"
|
|
4282
|
+
[isFocused]="isFocused(idx)"
|
|
4283
|
+
[ngClass]='item.cssClass'
|
|
4284
|
+
[ngStyle]='item.cssStyle'
|
|
4285
|
+
[align]="align"
|
|
4286
|
+
>
|
|
4287
|
+
</li>
|
|
4288
|
+
</ng-container>
|
|
4289
|
+
`
|
|
4290
|
+
}]
|
|
4291
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
4292
|
+
type: HostBinding,
|
|
4293
|
+
args: ['class.k-fab-items']
|
|
4294
|
+
}], bottomClass: [{
|
|
4295
|
+
type: HostBinding,
|
|
4296
|
+
args: ['class.k-fab-items-bottom']
|
|
4297
|
+
}], topClass: [{
|
|
4298
|
+
type: HostBinding,
|
|
4299
|
+
args: ['class.k-fab-items-top']
|
|
4300
|
+
}], dialItems: [{
|
|
4301
|
+
type: Input
|
|
4302
|
+
}], dialItemTemplate: [{
|
|
4303
|
+
type: Input
|
|
4304
|
+
}], align: [{
|
|
4305
|
+
type: Input
|
|
4306
|
+
}] } });
|
|
4169
4307
|
|
|
4170
|
-
const NAVIGATION_SETTINGS
|
|
4308
|
+
const NAVIGATION_SETTINGS = {
|
|
4171
4309
|
useLeftRightArrows: false
|
|
4172
4310
|
};
|
|
4173
|
-
const
|
|
4174
|
-
const NAVIGATION_SETTINGS_PROVIDER$2 = {
|
|
4311
|
+
const NAVIGATION_SETTINGS_PROVIDER = {
|
|
4175
4312
|
provide: NAVIGATION_CONFIG,
|
|
4176
|
-
useValue:
|
|
4313
|
+
useValue: NAVIGATION_SETTINGS
|
|
4177
4314
|
};
|
|
4178
4315
|
const SIZE_CLASSES = {
|
|
4179
4316
|
small: 'k-fab-sm',
|
|
4180
4317
|
medium: 'k-fab-md',
|
|
4181
4318
|
large: 'k-fab-lg'
|
|
4182
4319
|
};
|
|
4183
|
-
const SHAPE_CLASSES = {
|
|
4184
|
-
rectangle: 'k-fab-rectangle',
|
|
4185
|
-
square: 'k-fab-square'
|
|
4186
|
-
};
|
|
4187
4320
|
const ROUNDED_CLASSES = {
|
|
4188
4321
|
small: 'k-rounded-sm',
|
|
4189
4322
|
medium: 'k-rounded-md',
|
|
@@ -4194,13 +4327,16 @@ const FILLMODE_CLASS = 'k-fab-solid';
|
|
|
4194
4327
|
const DEFAULT_DURATION = 180;
|
|
4195
4328
|
const DEFAULT_ITEM_GAP = 90;
|
|
4196
4329
|
const DEFAULT_OFFSET = '16px';
|
|
4330
|
+
const DEFAULT_ROUNDED = 'full';
|
|
4331
|
+
const DEFAULT_SIZE = 'medium';
|
|
4332
|
+
const DEFAULT_THEME_COLOR = 'primary';
|
|
4197
4333
|
/**
|
|
4198
4334
|
*
|
|
4199
4335
|
* Represents the [Kendo UI FloatingActionButton component for Angular]({% slug overview_floatingactionbutton %}).
|
|
4200
4336
|
* Used to specify the primary or the most common action in an application.
|
|
4201
4337
|
*
|
|
4202
4338
|
*/
|
|
4203
|
-
|
|
4339
|
+
class FloatingActionButtonComponent {
|
|
4204
4340
|
constructor(renderer, element, focusService, navigationService, ngZone, popupService, builder, localizationService) {
|
|
4205
4341
|
this.renderer = renderer;
|
|
4206
4342
|
this.element = element;
|
|
@@ -4268,13 +4404,12 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4268
4404
|
* @hidden
|
|
4269
4405
|
*/
|
|
4270
4406
|
this.id = `k-${guid()}`;
|
|
4271
|
-
this._themeColor =
|
|
4272
|
-
this._size =
|
|
4273
|
-
this.
|
|
4407
|
+
this._themeColor = DEFAULT_THEME_COLOR;
|
|
4408
|
+
this._size = DEFAULT_SIZE;
|
|
4409
|
+
this._rounded = DEFAULT_ROUNDED;
|
|
4274
4410
|
this._disabled = false;
|
|
4275
4411
|
this._align = { horizontal: 'end', vertical: 'bottom' };
|
|
4276
4412
|
this._offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
|
|
4277
|
-
this._rounded = 'full';
|
|
4278
4413
|
this.subscriptions = new Subscription();
|
|
4279
4414
|
this.rtl = false;
|
|
4280
4415
|
this.animationEnd = new EventEmitter();
|
|
@@ -4298,20 +4433,22 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4298
4433
|
* The theme color will be applied as background color of the component.
|
|
4299
4434
|
*
|
|
4300
4435
|
* The possible values are:
|
|
4301
|
-
* * `
|
|
4302
|
-
* * `
|
|
4303
|
-
* * `
|
|
4304
|
-
* * `
|
|
4305
|
-
* * `
|
|
4306
|
-
* * `
|
|
4307
|
-
* * `
|
|
4308
|
-
* * `
|
|
4309
|
-
* * `
|
|
4310
|
-
* * `
|
|
4436
|
+
* * `primary` (Default)—Applies coloring based on the `primary` theme color.
|
|
4437
|
+
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
4438
|
+
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
4439
|
+
* * `info`—Applies coloring based on the `info` theme color.
|
|
4440
|
+
* * `success`— Applies coloring based on the `success` theme color.
|
|
4441
|
+
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
4442
|
+
* * `error`— Applies coloring based on the `error` theme color.
|
|
4443
|
+
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
4444
|
+
* * `light`— Applies coloring based on the `light` theme color.
|
|
4445
|
+
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
4446
|
+
* * `none`— Removes the built in theme color.
|
|
4311
4447
|
*/
|
|
4312
4448
|
set themeColor(themeColor) {
|
|
4313
|
-
|
|
4314
|
-
this.
|
|
4449
|
+
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR;
|
|
4450
|
+
this.handleClasses(newThemeColor, 'themeColor');
|
|
4451
|
+
this._themeColor = newThemeColor;
|
|
4315
4452
|
}
|
|
4316
4453
|
get themeColor() {
|
|
4317
4454
|
return this._themeColor;
|
|
@@ -4321,13 +4458,15 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4321
4458
|
* ([see example]({% slug appearance_floatingactionbutton %}#toc-size)).
|
|
4322
4459
|
*
|
|
4323
4460
|
* The possible values are:
|
|
4324
|
-
* * `
|
|
4325
|
-
* * `
|
|
4326
|
-
* * `
|
|
4461
|
+
* * `small`
|
|
4462
|
+
* * `medium` (Default)
|
|
4463
|
+
* * `large`
|
|
4464
|
+
* * `none`
|
|
4327
4465
|
*/
|
|
4328
4466
|
set size(size) {
|
|
4329
|
-
|
|
4330
|
-
this.
|
|
4467
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
4468
|
+
this.handleClasses(newSize, 'size');
|
|
4469
|
+
this._size = newSize;
|
|
4331
4470
|
}
|
|
4332
4471
|
get size() {
|
|
4333
4472
|
return this._size;
|
|
@@ -4336,35 +4475,20 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4336
4475
|
* The rounded property specifies the border radius of the FloatingActionButton.
|
|
4337
4476
|
*
|
|
4338
4477
|
* The possible values are:
|
|
4339
|
-
* * `
|
|
4340
|
-
* * `
|
|
4341
|
-
* * `
|
|
4342
|
-
* * `
|
|
4343
|
-
* * `
|
|
4478
|
+
* * `small`
|
|
4479
|
+
* * `medium`
|
|
4480
|
+
* * `large`
|
|
4481
|
+
* * `full` (default)
|
|
4482
|
+
* * `none`
|
|
4344
4483
|
*/
|
|
4345
4484
|
set rounded(rounded) {
|
|
4346
|
-
|
|
4347
|
-
this.
|
|
4485
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
4486
|
+
this.handleClasses(newRounded, 'rounded');
|
|
4487
|
+
this._rounded = newRounded;
|
|
4348
4488
|
}
|
|
4349
4489
|
get rounded() {
|
|
4350
4490
|
return this._rounded;
|
|
4351
4491
|
}
|
|
4352
|
-
/**
|
|
4353
|
-
* Specifies the shape of the FloatingActionButton
|
|
4354
|
-
* ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)).
|
|
4355
|
-
*
|
|
4356
|
-
* The possible values are:
|
|
4357
|
-
* * `rectangle` (Default)—Applies rectangular shape on the FloatingActionButton.
|
|
4358
|
-
* * `square`—Applies square shape on the FloatingActionButton.
|
|
4359
|
-
*
|
|
4360
|
-
*/
|
|
4361
|
-
set shape(shape) {
|
|
4362
|
-
this.handleClasses(shape, 'shape');
|
|
4363
|
-
this._shape = shape;
|
|
4364
|
-
}
|
|
4365
|
-
get shape() {
|
|
4366
|
-
return this._shape;
|
|
4367
|
-
}
|
|
4368
4492
|
/**
|
|
4369
4493
|
* Specifies whether the FloatingActionButton is disabled.
|
|
4370
4494
|
*/
|
|
@@ -4412,7 +4536,7 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4412
4536
|
return this.disabled ? (-1) : this.tabIndex;
|
|
4413
4537
|
}
|
|
4414
4538
|
ngAfterViewInit() {
|
|
4415
|
-
['
|
|
4539
|
+
['size', 'rounded', 'themeColor'].forEach(option => this.handleClasses(this[option], option));
|
|
4416
4540
|
this.renderer.addClass(this.element.nativeElement, this.alignClass());
|
|
4417
4541
|
this.offsetStyles();
|
|
4418
4542
|
this.initialSetup = false;
|
|
@@ -4456,7 +4580,12 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4456
4580
|
if (this.disabled || shouldOpen === this.isOpen) {
|
|
4457
4581
|
return;
|
|
4458
4582
|
}
|
|
4459
|
-
|
|
4583
|
+
if (shouldOpen) {
|
|
4584
|
+
setTimeout(() => this.openDial());
|
|
4585
|
+
}
|
|
4586
|
+
else {
|
|
4587
|
+
this.closeDial();
|
|
4588
|
+
}
|
|
4460
4589
|
}
|
|
4461
4590
|
/**
|
|
4462
4591
|
* @hidden
|
|
@@ -4562,13 +4691,11 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4562
4691
|
const classesToRemove = {
|
|
4563
4692
|
themeColor: `${FILLMODE_CLASS}-${this.themeColor}`,
|
|
4564
4693
|
size: SIZE_CLASSES[this.size],
|
|
4565
|
-
shape: SHAPE_CLASSES[this.shape],
|
|
4566
4694
|
rounded: ROUNDED_CLASSES[this.rounded]
|
|
4567
4695
|
};
|
|
4568
4696
|
const classesToAdd = {
|
|
4569
|
-
themeColor: inputValue ? `${FILLMODE_CLASS}-${inputValue}` :
|
|
4697
|
+
themeColor: inputValue !== 'none' ? `${FILLMODE_CLASS}-${inputValue}` : '',
|
|
4570
4698
|
size: SIZE_CLASSES[inputValue],
|
|
4571
|
-
shape: SHAPE_CLASSES[inputValue],
|
|
4572
4699
|
rounded: ROUNDED_CLASSES[inputValue]
|
|
4573
4700
|
};
|
|
4574
4701
|
this.renderer.removeClass(button, classesToRemove[input]);
|
|
@@ -4634,11 +4761,21 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4634
4761
|
return;
|
|
4635
4762
|
}
|
|
4636
4763
|
const event = new PreventableEvent();
|
|
4637
|
-
|
|
4764
|
+
if (open) {
|
|
4765
|
+
this.open.emit(event);
|
|
4766
|
+
}
|
|
4767
|
+
else {
|
|
4768
|
+
this.close.emit(event);
|
|
4769
|
+
}
|
|
4638
4770
|
if (event.isDefaultPrevented()) {
|
|
4639
4771
|
return;
|
|
4640
4772
|
}
|
|
4641
|
-
|
|
4773
|
+
if (open) {
|
|
4774
|
+
this.openDial();
|
|
4775
|
+
}
|
|
4776
|
+
else {
|
|
4777
|
+
this.closeDial();
|
|
4778
|
+
}
|
|
4642
4779
|
}
|
|
4643
4780
|
openPopup() {
|
|
4644
4781
|
if (this.isOpen) {
|
|
@@ -4807,142 +4944,18 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4807
4944
|
}
|
|
4808
4945
|
return DEFAULT_DURATION;
|
|
4809
4946
|
}
|
|
4810
|
-
}
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
HostBinding('attr.dir'),
|
|
4823
|
-
__metadata("design:type", String)
|
|
4824
|
-
], FloatingActionButtonComponent.prototype, "direction", void 0);
|
|
4825
|
-
__decorate([
|
|
4826
|
-
ViewChild('button', { static: true }),
|
|
4827
|
-
__metadata("design:type", ElementRef)
|
|
4828
|
-
], FloatingActionButtonComponent.prototype, "button", void 0);
|
|
4829
|
-
__decorate([
|
|
4830
|
-
ViewChild('popupTemplate', { static: true }),
|
|
4831
|
-
__metadata("design:type", TemplateRef)
|
|
4832
|
-
], FloatingActionButtonComponent.prototype, "popupTemplate", void 0);
|
|
4833
|
-
__decorate([
|
|
4834
|
-
ContentChild(DialItemTemplateDirective, { static: false }),
|
|
4835
|
-
__metadata("design:type", DialItemTemplateDirective)
|
|
4836
|
-
], FloatingActionButtonComponent.prototype, "dialItemTemplate", void 0);
|
|
4837
|
-
__decorate([
|
|
4838
|
-
ContentChild(FloatingActionButtonTemplateDirective, { static: false }),
|
|
4839
|
-
__metadata("design:type", FloatingActionButtonTemplateDirective)
|
|
4840
|
-
], FloatingActionButtonComponent.prototype, "fabTemplate", void 0);
|
|
4841
|
-
__decorate([
|
|
4842
|
-
Input(),
|
|
4843
|
-
__metadata("design:type", String),
|
|
4844
|
-
__metadata("design:paramtypes", [String])
|
|
4845
|
-
], FloatingActionButtonComponent.prototype, "themeColor", null);
|
|
4846
|
-
__decorate([
|
|
4847
|
-
Input(),
|
|
4848
|
-
__metadata("design:type", String),
|
|
4849
|
-
__metadata("design:paramtypes", [String])
|
|
4850
|
-
], FloatingActionButtonComponent.prototype, "size", null);
|
|
4851
|
-
__decorate([
|
|
4852
|
-
Input(),
|
|
4853
|
-
__metadata("design:type", String),
|
|
4854
|
-
__metadata("design:paramtypes", [String])
|
|
4855
|
-
], FloatingActionButtonComponent.prototype, "rounded", null);
|
|
4856
|
-
__decorate([
|
|
4857
|
-
Input(),
|
|
4858
|
-
__metadata("design:type", String),
|
|
4859
|
-
__metadata("design:paramtypes", [String])
|
|
4860
|
-
], FloatingActionButtonComponent.prototype, "shape", null);
|
|
4861
|
-
__decorate([
|
|
4862
|
-
Input(),
|
|
4863
|
-
__metadata("design:type", Boolean),
|
|
4864
|
-
__metadata("design:paramtypes", [Boolean])
|
|
4865
|
-
], FloatingActionButtonComponent.prototype, "disabled", null);
|
|
4866
|
-
__decorate([
|
|
4867
|
-
Input(),
|
|
4868
|
-
__metadata("design:type", Object),
|
|
4869
|
-
__metadata("design:paramtypes", [Object])
|
|
4870
|
-
], FloatingActionButtonComponent.prototype, "align", null);
|
|
4871
|
-
__decorate([
|
|
4872
|
-
Input(),
|
|
4873
|
-
__metadata("design:type", Object),
|
|
4874
|
-
__metadata("design:paramtypes", [Object])
|
|
4875
|
-
], FloatingActionButtonComponent.prototype, "offset", null);
|
|
4876
|
-
__decorate([
|
|
4877
|
-
Input(),
|
|
4878
|
-
__metadata("design:type", String)
|
|
4879
|
-
], FloatingActionButtonComponent.prototype, "positionMode", void 0);
|
|
4880
|
-
__decorate([
|
|
4881
|
-
Input(),
|
|
4882
|
-
__metadata("design:type", String)
|
|
4883
|
-
], FloatingActionButtonComponent.prototype, "icon", void 0);
|
|
4884
|
-
__decorate([
|
|
4885
|
-
Input(),
|
|
4886
|
-
__metadata("design:type", String)
|
|
4887
|
-
], FloatingActionButtonComponent.prototype, "iconClass", void 0);
|
|
4888
|
-
__decorate([
|
|
4889
|
-
Input(),
|
|
4890
|
-
__metadata("design:type", Object)
|
|
4891
|
-
], FloatingActionButtonComponent.prototype, "buttonClass", void 0);
|
|
4892
|
-
__decorate([
|
|
4893
|
-
Input(),
|
|
4894
|
-
__metadata("design:type", Object)
|
|
4895
|
-
], FloatingActionButtonComponent.prototype, "dialClass", void 0);
|
|
4896
|
-
__decorate([
|
|
4897
|
-
Input(),
|
|
4898
|
-
__metadata("design:type", String)
|
|
4899
|
-
], FloatingActionButtonComponent.prototype, "text", void 0);
|
|
4900
|
-
__decorate([
|
|
4901
|
-
Input(),
|
|
4902
|
-
__metadata("design:type", Object)
|
|
4903
|
-
], FloatingActionButtonComponent.prototype, "dialItemAnimation", void 0);
|
|
4904
|
-
__decorate([
|
|
4905
|
-
Input(),
|
|
4906
|
-
__metadata("design:type", Number)
|
|
4907
|
-
], FloatingActionButtonComponent.prototype, "tabIndex", void 0);
|
|
4908
|
-
__decorate([
|
|
4909
|
-
Input(),
|
|
4910
|
-
__metadata("design:type", Array)
|
|
4911
|
-
], FloatingActionButtonComponent.prototype, "dialItems", void 0);
|
|
4912
|
-
__decorate([
|
|
4913
|
-
Output('blur'),
|
|
4914
|
-
__metadata("design:type", EventEmitter)
|
|
4915
|
-
], FloatingActionButtonComponent.prototype, "onBlur", void 0);
|
|
4916
|
-
__decorate([
|
|
4917
|
-
Output('focus'),
|
|
4918
|
-
__metadata("design:type", EventEmitter)
|
|
4919
|
-
], FloatingActionButtonComponent.prototype, "onFocus", void 0);
|
|
4920
|
-
__decorate([
|
|
4921
|
-
Output('dialItemClick'),
|
|
4922
|
-
__metadata("design:type", EventEmitter)
|
|
4923
|
-
], FloatingActionButtonComponent.prototype, "dialItemClick", void 0);
|
|
4924
|
-
__decorate([
|
|
4925
|
-
Output(),
|
|
4926
|
-
__metadata("design:type", EventEmitter)
|
|
4927
|
-
], FloatingActionButtonComponent.prototype, "open", void 0);
|
|
4928
|
-
__decorate([
|
|
4929
|
-
Output(),
|
|
4930
|
-
__metadata("design:type", EventEmitter)
|
|
4931
|
-
], FloatingActionButtonComponent.prototype, "close", void 0);
|
|
4932
|
-
FloatingActionButtonComponent = __decorate([
|
|
4933
|
-
Component({
|
|
4934
|
-
selector: 'kendo-floatingactionbutton',
|
|
4935
|
-
providers: [
|
|
4936
|
-
FocusService,
|
|
4937
|
-
NavigationService,
|
|
4938
|
-
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
4939
|
-
LocalizationService,
|
|
4940
|
-
{
|
|
4941
|
-
provide: L10N_PREFIX,
|
|
4942
|
-
useValue: 'kendo.floatingactionbutton'
|
|
4943
|
-
}
|
|
4944
|
-
],
|
|
4945
|
-
template: `
|
|
4947
|
+
}
|
|
4948
|
+
FloatingActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: FocusService }, { token: NavigationService }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i4.AnimationBuilder }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4949
|
+
FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: { themeColor: "themeColor", size: "size", rounded: "rounded", disabled: "disabled", align: "align", offset: "offset", positionMode: "positionMode", icon: "icon", iconClass: "iconClass", buttonClass: "buttonClass", dialClass: "dialClass", text: "text", dialItemAnimation: "dialItemAnimation", tabIndex: "tabIndex", dialItems: "dialItems" }, outputs: { onBlur: "blur", onFocus: "focus", dialItemClick: "dialItemClick", open: "open", close: "close" }, host: { properties: { "class.k-pos-fixed": "this.fixedClass", "class.k-pos-absolute": "this.absoluteClass", "attr.dir": "this.direction" } }, providers: [
|
|
4950
|
+
FocusService,
|
|
4951
|
+
NavigationService,
|
|
4952
|
+
NAVIGATION_SETTINGS_PROVIDER,
|
|
4953
|
+
LocalizationService,
|
|
4954
|
+
{
|
|
4955
|
+
provide: L10N_PREFIX,
|
|
4956
|
+
useValue: 'kendo.floatingactionbutton'
|
|
4957
|
+
}
|
|
4958
|
+
], queries: [{ propertyName: "dialItemTemplate", first: true, predicate: DialItemTemplateDirective, descendants: true }, { propertyName: "fabTemplate", first: true, predicate: FloatingActionButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
4946
4959
|
<button
|
|
4947
4960
|
#button
|
|
4948
4961
|
[attr.id]="id"
|
|
@@ -4987,224 +5000,141 @@ FloatingActionButtonComponent = __decorate([
|
|
|
4987
5000
|
>
|
|
4988
5001
|
</ul>
|
|
4989
5002
|
</ng-template>
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5003
|
+
`, isInline: true, components: [{ type: DialListComponent, selector: "[kendoDialList]", inputs: ["dialItems", "dialItemTemplate", "align"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
5004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonComponent, decorators: [{
|
|
5005
|
+
type: Component,
|
|
5006
|
+
args: [{
|
|
5007
|
+
selector: 'kendo-floatingactionbutton',
|
|
5008
|
+
providers: [
|
|
5009
|
+
FocusService,
|
|
5010
|
+
NavigationService,
|
|
5011
|
+
NAVIGATION_SETTINGS_PROVIDER,
|
|
5012
|
+
LocalizationService,
|
|
5013
|
+
{
|
|
5014
|
+
provide: L10N_PREFIX,
|
|
5015
|
+
useValue: 'kendo.floatingactionbutton'
|
|
5016
|
+
}
|
|
5017
|
+
],
|
|
5018
|
+
template: `
|
|
5019
|
+
<button
|
|
5020
|
+
#button
|
|
5021
|
+
[attr.id]="id"
|
|
5022
|
+
[attr.role]="role"
|
|
5023
|
+
[tabIndex]="componentTabIndex"
|
|
5024
|
+
type="button"
|
|
5025
|
+
class="k-fab k-fab-solid"
|
|
5026
|
+
[class.k-disabled]="disabled"
|
|
5027
|
+
[ngClass]="buttonClass"
|
|
5028
|
+
[disabled]="disabled"
|
|
5029
|
+
[attr.aria-disabled]="disabled"
|
|
5030
|
+
[attr.aria-expanded]="ariaExpanded"
|
|
5031
|
+
[attr.aria-haspopup]="ariaHasPopup"
|
|
5032
|
+
(focus)="focusHandler()"
|
|
5033
|
+
(blur)="blurHandler()"
|
|
5034
|
+
[kendoEventsOutsideAngular]="{
|
|
5035
|
+
keydown: keyDownHandler,
|
|
5036
|
+
click: clickHandler
|
|
5037
|
+
}"
|
|
5038
|
+
[scope]="this"
|
|
5039
|
+
>
|
|
5040
|
+
<ng-template *ngIf="fabTemplate"
|
|
5041
|
+
[ngTemplateOutlet]="fabTemplate?.templateRef"
|
|
5042
|
+
>
|
|
5043
|
+
</ng-template>
|
|
5001
5044
|
|
|
5002
|
-
|
|
5003
|
-
*
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
return this.align.vertical === 'top' || this.align.vertical === 'middle';
|
|
5015
|
-
}
|
|
5016
|
-
get topClass() {
|
|
5017
|
-
return this.align.vertical === 'bottom';
|
|
5018
|
-
}
|
|
5019
|
-
isFocused(index) {
|
|
5020
|
-
return this.focusService.isFocused(index);
|
|
5021
|
-
}
|
|
5022
|
-
ngOnDestroy() {
|
|
5023
|
-
this.subscriptions.unsubscribe();
|
|
5024
|
-
}
|
|
5025
|
-
};
|
|
5026
|
-
__decorate([
|
|
5027
|
-
HostBinding('class.k-fab-items'),
|
|
5028
|
-
__metadata("design:type", Boolean)
|
|
5029
|
-
], DialListComponent.prototype, "hostClass", void 0);
|
|
5030
|
-
__decorate([
|
|
5031
|
-
HostBinding('class.k-fab-items-bottom'),
|
|
5032
|
-
__metadata("design:type", Boolean),
|
|
5033
|
-
__metadata("design:paramtypes", [])
|
|
5034
|
-
], DialListComponent.prototype, "bottomClass", null);
|
|
5035
|
-
__decorate([
|
|
5036
|
-
HostBinding('class.k-fab-items-top'),
|
|
5037
|
-
__metadata("design:type", Boolean),
|
|
5038
|
-
__metadata("design:paramtypes", [])
|
|
5039
|
-
], DialListComponent.prototype, "topClass", null);
|
|
5040
|
-
__decorate([
|
|
5041
|
-
Input(),
|
|
5042
|
-
__metadata("design:type", Array)
|
|
5043
|
-
], DialListComponent.prototype, "dialItems", void 0);
|
|
5044
|
-
__decorate([
|
|
5045
|
-
Input(),
|
|
5046
|
-
__metadata("design:type", TemplateRef)
|
|
5047
|
-
], DialListComponent.prototype, "dialItemTemplate", void 0);
|
|
5048
|
-
__decorate([
|
|
5049
|
-
Input(),
|
|
5050
|
-
__metadata("design:type", Object)
|
|
5051
|
-
], DialListComponent.prototype, "align", void 0);
|
|
5052
|
-
DialListComponent = __decorate([
|
|
5053
|
-
Component({
|
|
5054
|
-
selector: '[kendoDialList]',
|
|
5055
|
-
template: `
|
|
5056
|
-
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
5057
|
-
<li
|
|
5058
|
-
kendoButtonFocusable
|
|
5059
|
-
kendoDialItem
|
|
5060
|
-
[item]="dialItems[idx]"
|
|
5061
|
-
[index]="idx"
|
|
5062
|
-
[dialItemTemplate]="dialItemTemplate"
|
|
5063
|
-
[isFocused]="isFocused(idx)"
|
|
5064
|
-
[ngClass]='item.cssClass'
|
|
5065
|
-
[ngStyle]='item.cssStyle'
|
|
5045
|
+
<ng-container *ngIf="!fabTemplate">
|
|
5046
|
+
<span *ngIf="icon || iconClass" [ngClass]="iconClasses"></span>
|
|
5047
|
+
<span *ngIf="text" class="k-fab-text">{{ text }}</span>
|
|
5048
|
+
</ng-container>
|
|
5049
|
+
</button>
|
|
5050
|
+
|
|
5051
|
+
<ng-template #popupTemplate>
|
|
5052
|
+
<ul
|
|
5053
|
+
kendoDialList
|
|
5054
|
+
[ngClass]="dialClass"
|
|
5055
|
+
[dialItems]="dialItems"
|
|
5056
|
+
[dialItemTemplate]='dialItemTemplate?.templateRef'
|
|
5066
5057
|
[align]="align"
|
|
5058
|
+
[attr.aria-labelledby]="id"
|
|
5059
|
+
(click)="onItemClick($event)"
|
|
5067
5060
|
>
|
|
5068
|
-
</
|
|
5069
|
-
</ng-container>
|
|
5070
|
-
`
|
|
5071
|
-
}),
|
|
5072
|
-
__metadata("design:paramtypes", [FocusService, ChangeDetectorRef])
|
|
5073
|
-
], DialListComponent);
|
|
5074
|
-
|
|
5075
|
-
/**
|
|
5076
|
-
* @hidden
|
|
5077
|
-
*/
|
|
5078
|
-
let DialItemComponent = class DialItemComponent {
|
|
5079
|
-
constructor(element, renderer, localisationService) {
|
|
5080
|
-
this.element = element;
|
|
5081
|
-
this.renderer = renderer;
|
|
5082
|
-
this.localisationService = localisationService;
|
|
5083
|
-
this.hostClass = true;
|
|
5084
|
-
this.role = 'menuitem';
|
|
5085
|
-
}
|
|
5086
|
-
get disabledClass() {
|
|
5087
|
-
return this.item.disabled;
|
|
5088
|
-
}
|
|
5089
|
-
get title() {
|
|
5090
|
-
const label = this.item.label;
|
|
5091
|
-
return label ? label : this.itemTitle;
|
|
5092
|
-
}
|
|
5093
|
-
get indexAttr() {
|
|
5094
|
-
return this.index;
|
|
5095
|
-
}
|
|
5096
|
-
get iconClasses() {
|
|
5097
|
-
const classes = [];
|
|
5098
|
-
if (this.item.iconClass) {
|
|
5099
|
-
classes.push(`${this.item.iconClass}`);
|
|
5100
|
-
}
|
|
5101
|
-
if (this.item.icon) {
|
|
5102
|
-
classes.push(`k-fab-item-icon k-icon k-i-${this.item.icon}`);
|
|
5103
|
-
}
|
|
5104
|
-
return classes;
|
|
5105
|
-
}
|
|
5106
|
-
get itemTitle() {
|
|
5107
|
-
const icon = this.item.icon;
|
|
5108
|
-
const itemTitle = this.item.itemTitle;
|
|
5109
|
-
return (icon && itemTitle) ? itemTitle : icon;
|
|
5110
|
-
}
|
|
5111
|
-
ngAfterViewInit() {
|
|
5112
|
-
const element = this.element.nativeElement;
|
|
5113
|
-
const rtl = this.localisationService.rtl;
|
|
5114
|
-
const hAlign = this.align.horizontal;
|
|
5115
|
-
this.renderer.addClass(element, this.getTextDirectionClass(rtl, hAlign));
|
|
5116
|
-
}
|
|
5117
|
-
getTextDirectionClass(rtl, hAlign) {
|
|
5118
|
-
const dir = rtl ? 'rtl' : 'ltr';
|
|
5119
|
-
const align = hAlign === 'end' ? 'end' : 'start';
|
|
5120
|
-
const directions = {
|
|
5121
|
-
rtl: { end: 'k-text-left', start: 'k-text-right' },
|
|
5122
|
-
ltr: { start: 'k-text-left', end: 'k-text-right' }
|
|
5123
|
-
};
|
|
5124
|
-
return directions[dir][align];
|
|
5125
|
-
}
|
|
5126
|
-
};
|
|
5127
|
-
__decorate([
|
|
5128
|
-
HostBinding('class.k-fab-item'),
|
|
5129
|
-
__metadata("design:type", Boolean)
|
|
5130
|
-
], DialItemComponent.prototype, "hostClass", void 0);
|
|
5131
|
-
__decorate([
|
|
5132
|
-
HostBinding('attr.role'),
|
|
5133
|
-
__metadata("design:type", String)
|
|
5134
|
-
], DialItemComponent.prototype, "role", void 0);
|
|
5135
|
-
__decorate([
|
|
5136
|
-
HostBinding('attr.aria-disabled'),
|
|
5137
|
-
HostBinding('class.k-disabled'),
|
|
5138
|
-
__metadata("design:type", Boolean),
|
|
5139
|
-
__metadata("design:paramtypes", [])
|
|
5140
|
-
], DialItemComponent.prototype, "disabledClass", null);
|
|
5141
|
-
__decorate([
|
|
5142
|
-
HostBinding('attr.title'),
|
|
5143
|
-
HostBinding('attr.aria-label'),
|
|
5144
|
-
__metadata("design:type", String),
|
|
5145
|
-
__metadata("design:paramtypes", [])
|
|
5146
|
-
], DialItemComponent.prototype, "title", null);
|
|
5147
|
-
__decorate([
|
|
5148
|
-
HostBinding('attr.data-fab-item-index'),
|
|
5149
|
-
__metadata("design:type", String),
|
|
5150
|
-
__metadata("design:paramtypes", [])
|
|
5151
|
-
], DialItemComponent.prototype, "indexAttr", null);
|
|
5152
|
-
__decorate([
|
|
5153
|
-
Input(),
|
|
5154
|
-
__metadata("design:type", Object)
|
|
5155
|
-
], DialItemComponent.prototype, "cssClass", void 0);
|
|
5156
|
-
__decorate([
|
|
5157
|
-
Input(),
|
|
5158
|
-
__metadata("design:type", Object)
|
|
5159
|
-
], DialItemComponent.prototype, "cssStyle", void 0);
|
|
5160
|
-
__decorate([
|
|
5161
|
-
Input(),
|
|
5162
|
-
__metadata("design:type", Boolean)
|
|
5163
|
-
], DialItemComponent.prototype, "isFocused", void 0);
|
|
5164
|
-
__decorate([
|
|
5165
|
-
Input(),
|
|
5166
|
-
__metadata("design:type", Object)
|
|
5167
|
-
], DialItemComponent.prototype, "index", void 0);
|
|
5168
|
-
__decorate([
|
|
5169
|
-
Input(),
|
|
5170
|
-
__metadata("design:type", Object)
|
|
5171
|
-
], DialItemComponent.prototype, "item", void 0);
|
|
5172
|
-
__decorate([
|
|
5173
|
-
Input(),
|
|
5174
|
-
__metadata("design:type", TemplateRef)
|
|
5175
|
-
], DialItemComponent.prototype, "dialItemTemplate", void 0);
|
|
5176
|
-
__decorate([
|
|
5177
|
-
Input(),
|
|
5178
|
-
__metadata("design:type", Object)
|
|
5179
|
-
], DialItemComponent.prototype, "align", void 0);
|
|
5180
|
-
DialItemComponent = __decorate([
|
|
5181
|
-
Component({
|
|
5182
|
-
selector: '[kendoDialItem]',
|
|
5183
|
-
template: `
|
|
5184
|
-
<ng-template *ngIf="dialItemTemplate"
|
|
5185
|
-
[ngTemplateOutlet]="dialItemTemplate"
|
|
5186
|
-
[ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }"
|
|
5187
|
-
>
|
|
5061
|
+
</ul>
|
|
5188
5062
|
</ng-template>
|
|
5189
|
-
|
|
5190
|
-
<ng-container *ngIf="!dialItemTemplate">
|
|
5191
|
-
<span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span>
|
|
5192
|
-
<span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span>
|
|
5193
|
-
</ng-container>
|
|
5194
5063
|
`
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
],
|
|
5064
|
+
}]
|
|
5065
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: FocusService }, { type: NavigationService }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i4.AnimationBuilder }, { type: i1.LocalizationService }]; }, propDecorators: { fixedClass: [{
|
|
5066
|
+
type: HostBinding,
|
|
5067
|
+
args: ['class.k-pos-fixed']
|
|
5068
|
+
}], absoluteClass: [{
|
|
5069
|
+
type: HostBinding,
|
|
5070
|
+
args: ['class.k-pos-absolute']
|
|
5071
|
+
}], direction: [{
|
|
5072
|
+
type: HostBinding,
|
|
5073
|
+
args: ['attr.dir']
|
|
5074
|
+
}], button: [{
|
|
5075
|
+
type: ViewChild,
|
|
5076
|
+
args: ['button', { static: true }]
|
|
5077
|
+
}], popupTemplate: [{
|
|
5078
|
+
type: ViewChild,
|
|
5079
|
+
args: ['popupTemplate', { static: true }]
|
|
5080
|
+
}], dialItemTemplate: [{
|
|
5081
|
+
type: ContentChild,
|
|
5082
|
+
args: [DialItemTemplateDirective, { static: false }]
|
|
5083
|
+
}], fabTemplate: [{
|
|
5084
|
+
type: ContentChild,
|
|
5085
|
+
args: [FloatingActionButtonTemplateDirective, { static: false }]
|
|
5086
|
+
}], themeColor: [{
|
|
5087
|
+
type: Input
|
|
5088
|
+
}], size: [{
|
|
5089
|
+
type: Input
|
|
5090
|
+
}], rounded: [{
|
|
5091
|
+
type: Input
|
|
5092
|
+
}], disabled: [{
|
|
5093
|
+
type: Input
|
|
5094
|
+
}], align: [{
|
|
5095
|
+
type: Input
|
|
5096
|
+
}], offset: [{
|
|
5097
|
+
type: Input
|
|
5098
|
+
}], positionMode: [{
|
|
5099
|
+
type: Input
|
|
5100
|
+
}], icon: [{
|
|
5101
|
+
type: Input
|
|
5102
|
+
}], iconClass: [{
|
|
5103
|
+
type: Input
|
|
5104
|
+
}], buttonClass: [{
|
|
5105
|
+
type: Input
|
|
5106
|
+
}], dialClass: [{
|
|
5107
|
+
type: Input
|
|
5108
|
+
}], text: [{
|
|
5109
|
+
type: Input
|
|
5110
|
+
}], dialItemAnimation: [{
|
|
5111
|
+
type: Input
|
|
5112
|
+
}], tabIndex: [{
|
|
5113
|
+
type: Input
|
|
5114
|
+
}], dialItems: [{
|
|
5115
|
+
type: Input
|
|
5116
|
+
}], onBlur: [{
|
|
5117
|
+
type: Output,
|
|
5118
|
+
args: ['blur']
|
|
5119
|
+
}], onFocus: [{
|
|
5120
|
+
type: Output,
|
|
5121
|
+
args: ['focus']
|
|
5122
|
+
}], dialItemClick: [{
|
|
5123
|
+
type: Output,
|
|
5124
|
+
args: ['dialItemClick']
|
|
5125
|
+
}], open: [{
|
|
5126
|
+
type: Output
|
|
5127
|
+
}], close: [{
|
|
5128
|
+
type: Output
|
|
5129
|
+
}] } });
|
|
5200
5130
|
|
|
5201
|
-
const exportedModules
|
|
5131
|
+
const exportedModules = [
|
|
5202
5132
|
FloatingActionButtonComponent,
|
|
5203
5133
|
DialItemTemplateDirective,
|
|
5204
5134
|
FloatingActionButtonTemplateDirective
|
|
5205
5135
|
];
|
|
5206
|
-
const declarations
|
|
5207
|
-
...exportedModules
|
|
5136
|
+
const declarations = [
|
|
5137
|
+
...exportedModules,
|
|
5208
5138
|
DialListComponent,
|
|
5209
5139
|
DialItemComponent
|
|
5210
5140
|
];
|
|
@@ -5236,15 +5166,24 @@ const declarations$1 = [
|
|
|
5236
5166
|
*
|
|
5237
5167
|
* ```
|
|
5238
5168
|
*/
|
|
5239
|
-
|
|
5240
|
-
}
|
|
5241
|
-
FloatingActionButtonModule =
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
imports: [CommonModule, PopupModule, ListModule, EventsModule]
|
|
5246
|
-
|
|
5247
|
-
]
|
|
5169
|
+
class FloatingActionButtonModule {
|
|
5170
|
+
}
|
|
5171
|
+
FloatingActionButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5172
|
+
FloatingActionButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonModule, declarations: [FloatingActionButtonComponent,
|
|
5173
|
+
DialItemTemplateDirective,
|
|
5174
|
+
FloatingActionButtonTemplateDirective, DialListComponent,
|
|
5175
|
+
DialItemComponent], imports: [CommonModule, PopupModule, ListModule, EventsModule], exports: [FloatingActionButtonComponent,
|
|
5176
|
+
DialItemTemplateDirective,
|
|
5177
|
+
FloatingActionButtonTemplateDirective] });
|
|
5178
|
+
FloatingActionButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonModule, imports: [[CommonModule, PopupModule, ListModule, EventsModule]] });
|
|
5179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonModule, decorators: [{
|
|
5180
|
+
type: NgModule,
|
|
5181
|
+
args: [{
|
|
5182
|
+
declarations: [declarations],
|
|
5183
|
+
exports: [exportedModules],
|
|
5184
|
+
imports: [CommonModule, PopupModule, ListModule, EventsModule]
|
|
5185
|
+
}]
|
|
5186
|
+
}] });
|
|
5248
5187
|
|
|
5249
5188
|
/**
|
|
5250
5189
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
@@ -5277,16 +5216,21 @@ FloatingActionButtonModule = __decorate([
|
|
|
5277
5216
|
*
|
|
5278
5217
|
* ```
|
|
5279
5218
|
*/
|
|
5280
|
-
|
|
5281
|
-
}
|
|
5282
|
-
ButtonsModule =
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5219
|
+
class ButtonsModule {
|
|
5220
|
+
}
|
|
5221
|
+
ButtonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5222
|
+
ButtonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonsModule, exports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] });
|
|
5223
|
+
ButtonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonsModule, imports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] });
|
|
5224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonsModule, decorators: [{
|
|
5225
|
+
type: NgModule,
|
|
5226
|
+
args: [{
|
|
5227
|
+
exports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule]
|
|
5228
|
+
}]
|
|
5229
|
+
}] });
|
|
5287
5230
|
|
|
5288
5231
|
/**
|
|
5289
5232
|
* Generated bundle index. Do not edit.
|
|
5290
5233
|
*/
|
|
5291
5234
|
|
|
5292
|
-
export {
|
|
5235
|
+
export { ButtonDirective as Button, ButtonDirective, ButtonGroupComponent as ButtonGroup, ButtonGroupComponent, ButtonGroupModule, ButtonItemTemplateDirective, ButtonModule, ButtonsModule, ChipComponent, ChipListComponent, ChipModule, DialItemTemplateDirective, DropDownButtonComponent as DropDownButton, DropDownButtonComponent, DropDownButtonModule, FloatingActionButtonComponent, FloatingActionButtonModule, FloatingActionButtonTemplateDirective, FocusableDirective, ListComponent, ListModule, LocalizedSplitButtonMessagesDirective, PreventableEvent, SplitButtonComponent as SplitButton, SplitButtonComponent, SplitButtonCustomMessagesComponent, SplitButtonModule, TemplateContextDirective };
|
|
5236
|
+
|