@progress/kendo-angular-buttons 6.4.0 → 7.0.0-next.202111120840
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-buttons.umd.js +5 -0
- package/{dist/es2015/button → button}/button.directive.d.ts +29 -21
- 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/button-look.d.ts → button-look.d.ts} +0 -0
- package/{dist/es2015/buttongroup → buttongroup}/buttongroup.component.d.ts +16 -12
- package/buttongroup/buttongroup.module.d.ts +21 -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 +5 -2
- package/{dist/es2015/chip → chip}/chip-remove-event-args.interface.d.ts +0 -0
- package/{dist/es2015/chip → chip}/chip.component.d.ts +15 -14
- package/{dist/es2015/chip → chip}/chip.module.d.ts +7 -0
- package/{dist/es2015/buttongroup/buttongroup.module.d.ts → chip/models/chip-look.d.ts} +10 -6
- package/{dist/es2015/chip → chip}/models/selection.d.ts +0 -0
- package/{dist/es2015/chip → chip}/models/type.d.ts +0 -0
- package/{dist/es2015/common → common}/models/shape.d.ts +0 -0
- package/{dist/es2015/common → common}/models/size.d.ts +0 -0
- package/{dist/es2015/common → common}/models/theme-color.d.ts +0 -0
- package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
- package/{dist/es2015/dropdownbutton → dropdownbutton}/dropdownbutton.component.d.ts +24 -17
- package/dropdownbutton/dropdownbutton.module.d.ts +23 -0
- package/{dist/es2015 → esm2015}/button/button.directive.js +97 -151
- package/{dist/es → esm2015}/button/button.module.js +13 -13
- package/{dist/es2015 → esm2015}/button/button.service.js +8 -10
- package/{dist/es → esm2015}/button/selection-settings.js +1 -0
- package/{dist/es2015 → esm2015}/button-look.js +1 -0
- package/{dist/es2015 → esm2015}/buttongroup/buttongroup.component.js +93 -125
- 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 +56 -63
- package/{dist/es → esm2015}/chip/chip-remove-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/chip/chip.component.js +121 -128
- package/{dist/es2015 → esm2015}/chip/chip.module.js +16 -11
- package/{dist/es → esm2015}/chip/models/chip-look.js +1 -0
- package/{dist/es → esm2015}/chip/models/selection.js +1 -0
- package/{dist/es → esm2015}/chip/models/type.js +1 -0
- package/{dist/es → esm2015}/common/models/shape.js +1 -0
- package/{dist/es → esm2015}/common/models/size.js +1 -0
- package/{dist/es → esm2015}/common/models/theme-color.js +1 -0
- package/{dist/es → esm2015}/direction.js +1 -0
- package/{dist/es2015 → esm2015}/dropdownbutton/dropdownbutton.component.js +162 -180
- 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 +126 -0
- package/esm2015/floatingactionbutton/dial-list.component.js +89 -0
- package/{dist/es2015 → esm2015}/floatingactionbutton/floatingactionbutton.component.js +150 -150
- 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 +15 -16
- 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 +13 -12
- package/{dist/es2015 → esm2015}/listbutton/list-button.js +15 -2
- package/{dist/es → esm2015}/listbutton/list-item-model.js +1 -0
- package/esm2015/listbutton/list.component.js +120 -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 +33 -0
- package/{dist/es2015 → esm2015}/main.js +5 -1
- package/{dist/es → esm2015}/navigation/key-events.js +0 -0
- package/{dist/es → esm2015}/navigation/navigation-action.js +0 -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/{dist/es2015 → esm2015}/splitbutton/splitbutton.component.js +186 -192
- package/esm2015/splitbutton/splitbutton.module.js +32 -0
- package/{dist/es2015 → esm2015}/util.js +2 -6
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-buttons.js} +1613 -1723
- 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 +28 -19
- 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 +3 -0
- package/kendo-angular-buttons.d.ts +9 -0
- package/{dist/es2015/listbutton → listbutton}/button-item-template.directive.d.ts +3 -0
- package/{dist/es2015/listbutton → listbutton}/list-button.d.ts +6 -2
- package/{dist/es2015/listbutton → listbutton}/list-item-model.d.ts +0 -0
- package/{dist/es2015/listbutton → listbutton}/list.component.d.ts +3 -0
- 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} +5 -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 +34 -105
- 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}/splitbutton.component.d.ts +26 -19
- package/splitbutton/splitbutton.module.d.ts +23 -0
- package/{dist/es2015/util.d.ts → util.d.ts} +0 -4
- 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 -630
- package/dist/es/button/button.service.js +0 -28
- package/dist/es/button-look.js +0 -4
- package/dist/es/buttongroup/buttongroup.component.js +0 -402
- 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 -164
- package/dist/es/chip/chip.component.js +0 -360
- package/dist/es/chip/chip.module.js +0 -55
- package/dist/es/dropdownbutton/dropdownbutton.component.js +0 -652
- 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 -878
- 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 -240
- package/dist/es/listbutton/list.component.js +0 -66
- 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-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 -761
- package/dist/es/splitbutton/splitbutton.module.js +0 -34
- package/dist/es/util.js +0 -45
- package/dist/es2015/button/button.module.js +0 -47
- 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/chip-remove-event-args.interface.js +0 -4
- package/dist/es2015/chip/models/chip-look.d.ts +0 -20
- package/dist/es2015/chip/models/chip-look.js +0 -4
- package/dist/es2015/chip/models/selection.js +0 -4
- package/dist/es2015/chip/models/type.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/theme-color.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 -96
- 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/navigation/navigation-action.js +0 -19
- package/dist/es2015/splitbutton/localization/custom-messages.component.d.ts +0 -15
- package/dist/es2015/splitbutton/localization/custom-messages.component.js +0 -36
- package/dist/es2015/splitbutton/localization/localized-messages.directive.d.ts +0 -13
- package/dist/es2015/splitbutton/localization/localized-messages.directive.js +0 -31
- package/dist/es2015/splitbutton/localization/messages.d.ts +0 -32
- 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 -5123
- package/dist/npm/button/button.directive.js +0 -632
- package/dist/npm/button/button.module.js +0 -52
- package/dist/npm/button/button.service.js +0 -30
- package/dist/npm/button/selection-settings.js +0 -6
- package/dist/npm/button-look.js +0 -6
- package/dist/npm/buttongroup/buttongroup.component.js +0 -404
- 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 -166
- package/dist/npm/chip/chip-remove-event-args.interface.js +0 -6
- package/dist/npm/chip/chip.component.js +0 -362
- package/dist/npm/chip/chip.module.js +0 -57
- package/dist/npm/chip/models/chip-look.js +0 -6
- package/dist/npm/chip/models/selection.js +0 -6
- package/dist/npm/chip/models/type.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/theme-color.js +0 -6
- package/dist/npm/direction.js +0 -6
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +0 -654
- 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 -880
- 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 -242
- package/dist/npm/listbutton/list-item-model.js +0 -6
- package/dist/npm/listbutton/list.component.js +0 -68
- 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 -763
- package/dist/npm/splitbutton/splitbutton.module.js +0 -36
- package/dist/npm/util.js +0 -48
- package/dist/systemjs/kendo-angular-buttons.js +0 -5
|
@@ -2,24 +2,38 @@
|
|
|
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,
|
|
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, ElementRef, ViewContainerRef, ContentChild, ViewChild } from '@angular/core';
|
|
7
|
+
import * as i8 from '@progress/kendo-angular-common';
|
|
8
8
|
import { Keys, isChanged, isDocumentAvailable, hasObservers, guid, EventsModule } from '@progress/kendo-angular-common';
|
|
9
|
-
import
|
|
9
|
+
import * as i1 from '@progress/kendo-angular-l10n';
|
|
10
|
+
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
11
|
import { filter, take } from 'rxjs/operators';
|
|
11
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
+
import { BehaviorSubject, Subject, fromEvent, merge, Subscription } from 'rxjs';
|
|
14
|
+
import * as i2 from '@angular/common';
|
|
12
15
|
import { CommonModule } from '@angular/common';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
16
|
+
import * as i3 from '@progress/kendo-angular-popup';
|
|
17
|
+
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
18
|
+
import * as i4 from '@angular/animations';
|
|
19
|
+
import { sequence, query, style, stagger, animate } from '@angular/animations';
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* @hidden
|
|
18
23
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
const packageMetadata = {
|
|
25
|
+
name: '@progress/kendo-angular-buttons',
|
|
26
|
+
productName: 'Kendo UI for Angular',
|
|
27
|
+
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
28
|
+
publishDate: 1636706456,
|
|
29
|
+
version: '',
|
|
30
|
+
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'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
class KendoButtonService {
|
|
23
37
|
constructor() {
|
|
24
38
|
this.buttonLookChange = new BehaviorSubject('default');
|
|
25
39
|
this.buttonClicked = new Subject();
|
|
@@ -31,28 +45,18 @@ let KendoButtonService = class KendoButtonService {
|
|
|
31
45
|
setButtonLook(look) {
|
|
32
46
|
this.buttonLookChange.next(look);
|
|
33
47
|
}
|
|
34
|
-
}
|
|
35
|
-
KendoButtonService =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* @hidden
|
|
41
|
-
*/
|
|
42
|
-
const packageMetadata = {
|
|
43
|
-
name: '@progress/kendo-angular-buttons',
|
|
44
|
-
productName: 'Kendo UI for Angular',
|
|
45
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
46
|
-
publishDate: 1635407170,
|
|
47
|
-
version: '',
|
|
48
|
-
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'
|
|
49
|
-
};
|
|
48
|
+
}
|
|
49
|
+
KendoButtonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: KendoButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
50
|
+
KendoButtonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: KendoButtonService });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: KendoButtonService, decorators: [{
|
|
52
|
+
type: Injectable
|
|
53
|
+
}] });
|
|
50
54
|
|
|
51
55
|
const SPAN_TAG_NAME = 'SPAN';
|
|
52
56
|
/**
|
|
53
57
|
* Represents the Kendo UI Button component for Angular.
|
|
54
58
|
*/
|
|
55
|
-
|
|
59
|
+
class ButtonDirective {
|
|
56
60
|
constructor(element, renderer, service, localization, ngZone) {
|
|
57
61
|
this.service = service;
|
|
58
62
|
this.ngZone = ngZone;
|
|
@@ -430,156 +434,102 @@ let ButtonDirective = class ButtonDirective {
|
|
|
430
434
|
this.setSelected(!this.selected);
|
|
431
435
|
}
|
|
432
436
|
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
__metadata("design:type", Boolean)
|
|
437
|
-
], ButtonDirective.prototype, "toggleable", void 0);
|
|
438
|
-
__decorate([
|
|
439
|
-
Input(),
|
|
440
|
-
__metadata("design:type", Boolean),
|
|
441
|
-
__metadata("design:paramtypes", [Boolean])
|
|
442
|
-
], ButtonDirective.prototype, "togglable", null);
|
|
443
|
-
__decorate([
|
|
444
|
-
Input(),
|
|
445
|
-
__metadata("design:type", Boolean)
|
|
446
|
-
], ButtonDirective.prototype, "primary", void 0);
|
|
447
|
-
__decorate([
|
|
448
|
-
Input(),
|
|
449
|
-
__metadata("design:type", String)
|
|
450
|
-
], ButtonDirective.prototype, "look", void 0);
|
|
451
|
-
__decorate([
|
|
452
|
-
Input(),
|
|
453
|
-
__metadata("design:type", Boolean),
|
|
454
|
-
__metadata("design:paramtypes", [Boolean])
|
|
455
|
-
], ButtonDirective.prototype, "selected", null);
|
|
456
|
-
__decorate([
|
|
457
|
-
Input(),
|
|
458
|
-
__metadata("design:type", Number),
|
|
459
|
-
__metadata("design:paramtypes", [Number])
|
|
460
|
-
], ButtonDirective.prototype, "tabIndex", null);
|
|
461
|
-
__decorate([
|
|
462
|
-
Input(),
|
|
463
|
-
__metadata("design:type", String),
|
|
464
|
-
__metadata("design:paramtypes", [String])
|
|
465
|
-
], ButtonDirective.prototype, "icon", null);
|
|
466
|
-
__decorate([
|
|
467
|
-
Input(),
|
|
468
|
-
__metadata("design:type", String),
|
|
469
|
-
__metadata("design:paramtypes", [String])
|
|
470
|
-
], ButtonDirective.prototype, "iconClass", null);
|
|
471
|
-
__decorate([
|
|
472
|
-
Input(),
|
|
473
|
-
__metadata("design:type", String),
|
|
474
|
-
__metadata("design:paramtypes", [String])
|
|
475
|
-
], ButtonDirective.prototype, "imageUrl", null);
|
|
476
|
-
__decorate([
|
|
477
|
-
Input(),
|
|
478
|
-
__metadata("design:type", Boolean),
|
|
479
|
-
__metadata("design:paramtypes", [Boolean])
|
|
480
|
-
], ButtonDirective.prototype, "disabled", null);
|
|
481
|
-
__decorate([
|
|
482
|
-
Input(),
|
|
483
|
-
__metadata("design:type", String)
|
|
484
|
-
], ButtonDirective.prototype, "role", void 0);
|
|
485
|
-
__decorate([
|
|
486
|
-
Output(),
|
|
487
|
-
__metadata("design:type", EventEmitter)
|
|
488
|
-
], ButtonDirective.prototype, "selectedChange", void 0);
|
|
489
|
-
__decorate([
|
|
490
|
-
Output(),
|
|
491
|
-
__metadata("design:type", EventEmitter)
|
|
492
|
-
], ButtonDirective.prototype, "click", void 0);
|
|
493
|
-
__decorate([
|
|
494
|
-
HostBinding('class.k-button'),
|
|
495
|
-
__metadata("design:type", Boolean),
|
|
496
|
-
__metadata("design:paramtypes", [])
|
|
497
|
-
], ButtonDirective.prototype, "classButton", null);
|
|
498
|
-
__decorate([
|
|
499
|
-
HostBinding('class.k-primary'),
|
|
500
|
-
__metadata("design:type", Boolean),
|
|
501
|
-
__metadata("design:paramtypes", [])
|
|
502
|
-
], ButtonDirective.prototype, "classPrimary", null);
|
|
503
|
-
__decorate([
|
|
504
|
-
HostBinding('class.k-toggle-button'),
|
|
505
|
-
__metadata("design:type", Boolean),
|
|
506
|
-
__metadata("design:paramtypes", [])
|
|
507
|
-
], ButtonDirective.prototype, "isToggleable", null);
|
|
508
|
-
__decorate([
|
|
509
|
-
HostBinding('class.k-flat'),
|
|
510
|
-
__metadata("design:type", Boolean),
|
|
511
|
-
__metadata("design:paramtypes", [])
|
|
512
|
-
], ButtonDirective.prototype, "isFlat", null);
|
|
513
|
-
__decorate([
|
|
514
|
-
HostBinding('class.k-bare'),
|
|
515
|
-
__metadata("design:type", Boolean),
|
|
516
|
-
__metadata("design:paramtypes", [])
|
|
517
|
-
], ButtonDirective.prototype, "isBare", null);
|
|
518
|
-
__decorate([
|
|
519
|
-
HostBinding('class.k-outline'),
|
|
520
|
-
__metadata("design:type", Boolean),
|
|
521
|
-
__metadata("design:paramtypes", [])
|
|
522
|
-
], ButtonDirective.prototype, "isOutline", null);
|
|
523
|
-
__decorate([
|
|
524
|
-
HostBinding('class.k-button-clear'),
|
|
525
|
-
__metadata("design:type", Boolean),
|
|
526
|
-
__metadata("design:paramtypes", [])
|
|
527
|
-
], ButtonDirective.prototype, "isClear", null);
|
|
528
|
-
__decorate([
|
|
529
|
-
HostBinding('attr.role'),
|
|
530
|
-
__metadata("design:type", String),
|
|
531
|
-
__metadata("design:paramtypes", [])
|
|
532
|
-
], ButtonDirective.prototype, "roleSetter", null);
|
|
533
|
-
__decorate([
|
|
534
|
-
HostBinding('attr.aria-disabled'),
|
|
535
|
-
HostBinding('class.k-state-disabled'),
|
|
536
|
-
__metadata("design:type", Boolean),
|
|
537
|
-
__metadata("design:paramtypes", [])
|
|
538
|
-
], ButtonDirective.prototype, "classDisabled", null);
|
|
539
|
-
__decorate([
|
|
540
|
-
HostBinding('class.k-state-selected'),
|
|
541
|
-
__metadata("design:type", Boolean),
|
|
542
|
-
__metadata("design:paramtypes", [])
|
|
543
|
-
], ButtonDirective.prototype, "classActive", null);
|
|
544
|
-
__decorate([
|
|
545
|
-
HostBinding('attr.dir'),
|
|
546
|
-
__metadata("design:type", String),
|
|
547
|
-
__metadata("design:paramtypes", [])
|
|
548
|
-
], ButtonDirective.prototype, "getDirection", null);
|
|
549
|
-
__decorate([
|
|
550
|
-
HostListener('focus'),
|
|
551
|
-
__metadata("design:type", Function),
|
|
552
|
-
__metadata("design:paramtypes", []),
|
|
553
|
-
__metadata("design:returntype", void 0)
|
|
554
|
-
], ButtonDirective.prototype, "onFocus", null);
|
|
555
|
-
__decorate([
|
|
556
|
-
HostListener('blur'),
|
|
557
|
-
__metadata("design:type", Function),
|
|
558
|
-
__metadata("design:paramtypes", []),
|
|
559
|
-
__metadata("design:returntype", void 0)
|
|
560
|
-
], ButtonDirective.prototype, "onBlur", null);
|
|
561
|
-
ButtonDirective = __decorate([
|
|
562
|
-
Directive({
|
|
563
|
-
exportAs: 'kendoButton',
|
|
564
|
-
providers: [
|
|
565
|
-
LocalizationService,
|
|
566
|
-
{
|
|
567
|
-
provide: L10N_PREFIX,
|
|
568
|
-
useValue: 'kendo.button'
|
|
569
|
-
}
|
|
570
|
-
],
|
|
571
|
-
selector: 'button[kendoButton], span[kendoButton]' // tslint:disable-line
|
|
572
|
-
}),
|
|
573
|
-
__param(2, Optional()),
|
|
574
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
575
|
-
Renderer2,
|
|
576
|
-
KendoButtonService,
|
|
437
|
+
}
|
|
438
|
+
ButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", 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 });
|
|
439
|
+
ButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: { toggleable: "toggleable", togglable: "togglable", primary: "primary", look: "look", selected: "selected", tabIndex: "tabIndex", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", role: "role" }, outputs: { selectedChange: "selectedChange", click: "click" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-button": "this.classButton", "class.k-primary": "this.classPrimary", "class.k-toggle-button": "this.isToggleable", "class.k-flat": "this.isFlat", "class.k-bare": "this.isBare", "class.k-outline": "this.isOutline", "class.k-button-clear": "this.isClear", "attr.role": "this.roleSetter", "attr.aria-disabled": "this.classDisabled", "class.k-state-disabled": "this.classDisabled", "class.k-state-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
|
|
577
440
|
LocalizationService,
|
|
578
|
-
|
|
579
|
-
|
|
441
|
+
{
|
|
442
|
+
provide: L10N_PREFIX,
|
|
443
|
+
useValue: 'kendo.button'
|
|
444
|
+
}
|
|
445
|
+
], exportAs: ["kendoButton"], usesOnChanges: true, ngImport: i0 });
|
|
446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
447
|
+
type: Directive,
|
|
448
|
+
args: [{
|
|
449
|
+
exportAs: 'kendoButton',
|
|
450
|
+
providers: [
|
|
451
|
+
LocalizationService,
|
|
452
|
+
{
|
|
453
|
+
provide: L10N_PREFIX,
|
|
454
|
+
useValue: 'kendo.button'
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
selector: 'button[kendoButton], span[kendoButton]' // eslint-disable-line
|
|
458
|
+
}]
|
|
459
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: KendoButtonService, decorators: [{
|
|
460
|
+
type: Optional
|
|
461
|
+
}] }, { type: i1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { toggleable: [{
|
|
462
|
+
type: Input
|
|
463
|
+
}], togglable: [{
|
|
464
|
+
type: Input
|
|
465
|
+
}], primary: [{
|
|
466
|
+
type: Input
|
|
467
|
+
}], look: [{
|
|
468
|
+
type: Input
|
|
469
|
+
}], selected: [{
|
|
470
|
+
type: Input
|
|
471
|
+
}], tabIndex: [{
|
|
472
|
+
type: Input
|
|
473
|
+
}], icon: [{
|
|
474
|
+
type: Input
|
|
475
|
+
}], iconClass: [{
|
|
476
|
+
type: Input
|
|
477
|
+
}], imageUrl: [{
|
|
478
|
+
type: Input
|
|
479
|
+
}], disabled: [{
|
|
480
|
+
type: Input
|
|
481
|
+
}], role: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}], selectedChange: [{
|
|
484
|
+
type: Output
|
|
485
|
+
}], click: [{
|
|
486
|
+
type: Output
|
|
487
|
+
}], classButton: [{
|
|
488
|
+
type: HostBinding,
|
|
489
|
+
args: ['class.k-button']
|
|
490
|
+
}], classPrimary: [{
|
|
491
|
+
type: HostBinding,
|
|
492
|
+
args: ['class.k-primary']
|
|
493
|
+
}], isToggleable: [{
|
|
494
|
+
type: HostBinding,
|
|
495
|
+
args: ['class.k-toggle-button']
|
|
496
|
+
}], isFlat: [{
|
|
497
|
+
type: HostBinding,
|
|
498
|
+
args: ['class.k-flat']
|
|
499
|
+
}], isBare: [{
|
|
500
|
+
type: HostBinding,
|
|
501
|
+
args: ['class.k-bare']
|
|
502
|
+
}], isOutline: [{
|
|
503
|
+
type: HostBinding,
|
|
504
|
+
args: ['class.k-outline']
|
|
505
|
+
}], isClear: [{
|
|
506
|
+
type: HostBinding,
|
|
507
|
+
args: ['class.k-button-clear']
|
|
508
|
+
}], roleSetter: [{
|
|
509
|
+
type: HostBinding,
|
|
510
|
+
args: ['attr.role']
|
|
511
|
+
}], classDisabled: [{
|
|
512
|
+
type: HostBinding,
|
|
513
|
+
args: ['attr.aria-disabled']
|
|
514
|
+
}, {
|
|
515
|
+
type: HostBinding,
|
|
516
|
+
args: ['class.k-state-disabled']
|
|
517
|
+
}], classActive: [{
|
|
518
|
+
type: HostBinding,
|
|
519
|
+
args: ['class.k-state-selected']
|
|
520
|
+
}], getDirection: [{
|
|
521
|
+
type: HostBinding,
|
|
522
|
+
args: ['attr.dir']
|
|
523
|
+
}], onFocus: [{
|
|
524
|
+
type: HostListener,
|
|
525
|
+
args: ['focus']
|
|
526
|
+
}], onBlur: [{
|
|
527
|
+
type: HostListener,
|
|
528
|
+
args: ['blur']
|
|
529
|
+
}] } });
|
|
580
530
|
|
|
581
|
-
/*
|
|
582
|
-
/*
|
|
531
|
+
/* eslint-disable no-null-keyword */
|
|
532
|
+
/* eslint-disable no-bitwise */
|
|
583
533
|
const resolvedPromise = Promise.resolve(null);
|
|
584
534
|
/**
|
|
585
535
|
* @hidden
|
|
@@ -613,10 +563,6 @@ function closest(element, selector) {
|
|
|
613
563
|
node = node.parentNode;
|
|
614
564
|
}
|
|
615
565
|
}
|
|
616
|
-
/**
|
|
617
|
-
* @hidden
|
|
618
|
-
*/
|
|
619
|
-
const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|
|
620
566
|
|
|
621
567
|
/**
|
|
622
568
|
* @hidden
|
|
@@ -649,7 +595,7 @@ const tabindex = 'tabindex';
|
|
|
649
595
|
/**
|
|
650
596
|
* Represents the Kendo UI ButtonGroup component for Angular.
|
|
651
597
|
*/
|
|
652
|
-
|
|
598
|
+
class ButtonGroupComponent {
|
|
653
599
|
constructor(service, localization, element) {
|
|
654
600
|
this.service = service;
|
|
655
601
|
this.element = element;
|
|
@@ -855,129 +801,96 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
855
801
|
isSelectionSingle() {
|
|
856
802
|
return this.selection === 'single';
|
|
857
803
|
}
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
__decorate([
|
|
885
|
-
ContentChildren(ButtonDirective),
|
|
886
|
-
__metadata("design:type", QueryList)
|
|
887
|
-
], ButtonGroupComponent.prototype, "buttons", void 0);
|
|
888
|
-
__decorate([
|
|
889
|
-
HostBinding('class.k-button-group'),
|
|
890
|
-
__metadata("design:type", Boolean),
|
|
891
|
-
__metadata("design:paramtypes", [])
|
|
892
|
-
], ButtonGroupComponent.prototype, "wrapperClass", null);
|
|
893
|
-
__decorate([
|
|
894
|
-
HostBinding('class.k-state-disabled'),
|
|
895
|
-
__metadata("design:type", Boolean),
|
|
896
|
-
__metadata("design:paramtypes", [])
|
|
897
|
-
], ButtonGroupComponent.prototype, "disabledClass", null);
|
|
898
|
-
__decorate([
|
|
899
|
-
HostBinding('class.k-button-group-stretched'),
|
|
900
|
-
__metadata("design:type", Boolean),
|
|
901
|
-
__metadata("design:paramtypes", [])
|
|
902
|
-
], ButtonGroupComponent.prototype, "stretchedClass", null);
|
|
903
|
-
__decorate([
|
|
904
|
-
HostBinding('class.k-button-group-flat'),
|
|
905
|
-
__metadata("design:type", Boolean),
|
|
906
|
-
__metadata("design:paramtypes", [])
|
|
907
|
-
], ButtonGroupComponent.prototype, "isFlat", null);
|
|
908
|
-
__decorate([
|
|
909
|
-
HostBinding('class.k-button-group-bare'),
|
|
910
|
-
__metadata("design:type", Boolean),
|
|
911
|
-
__metadata("design:paramtypes", [])
|
|
912
|
-
], ButtonGroupComponent.prototype, "isBare", null);
|
|
913
|
-
__decorate([
|
|
914
|
-
HostBinding('class.k-button-group-outline'),
|
|
915
|
-
__metadata("design:type", Boolean),
|
|
916
|
-
__metadata("design:paramtypes", [])
|
|
917
|
-
], ButtonGroupComponent.prototype, "isOutline", null);
|
|
918
|
-
__decorate([
|
|
919
|
-
HostBinding('attr.role'),
|
|
920
|
-
__metadata("design:type", String),
|
|
921
|
-
__metadata("design:paramtypes", [])
|
|
922
|
-
], ButtonGroupComponent.prototype, "getRole", null);
|
|
923
|
-
__decorate([
|
|
924
|
-
HostBinding('attr.dir'),
|
|
925
|
-
__metadata("design:type", String),
|
|
926
|
-
__metadata("design:paramtypes", [])
|
|
927
|
-
], ButtonGroupComponent.prototype, "dir", null);
|
|
928
|
-
__decorate([
|
|
929
|
-
HostBinding('attr.aria-disabled'),
|
|
930
|
-
__metadata("design:type", Boolean),
|
|
931
|
-
__metadata("design:paramtypes", [])
|
|
932
|
-
], ButtonGroupComponent.prototype, "ariaDisabled", null);
|
|
933
|
-
__decorate([
|
|
934
|
-
HostBinding('style.width'),
|
|
935
|
-
__metadata("design:type", String),
|
|
936
|
-
__metadata("design:paramtypes", [])
|
|
937
|
-
], ButtonGroupComponent.prototype, "wrapperWidth", null);
|
|
938
|
-
__decorate([
|
|
939
|
-
HostBinding('attr.tabindex'),
|
|
940
|
-
__metadata("design:type", Number),
|
|
941
|
-
__metadata("design:paramtypes", [])
|
|
942
|
-
], ButtonGroupComponent.prototype, "wrapperTabIndex", null);
|
|
943
|
-
__decorate([
|
|
944
|
-
HostListener('keydown', ['$event']),
|
|
945
|
-
__metadata("design:type", Function),
|
|
946
|
-
__metadata("design:paramtypes", [Object]),
|
|
947
|
-
__metadata("design:returntype", void 0)
|
|
948
|
-
], ButtonGroupComponent.prototype, "keydown", null);
|
|
949
|
-
__decorate([
|
|
950
|
-
HostListener('focus'),
|
|
951
|
-
__metadata("design:type", Function),
|
|
952
|
-
__metadata("design:paramtypes", []),
|
|
953
|
-
__metadata("design:returntype", void 0)
|
|
954
|
-
], ButtonGroupComponent.prototype, "onFocus", null);
|
|
955
|
-
__decorate([
|
|
956
|
-
HostListener('focusout', ['$event']),
|
|
957
|
-
__metadata("design:type", Function),
|
|
958
|
-
__metadata("design:paramtypes", [Object]),
|
|
959
|
-
__metadata("design:returntype", void 0)
|
|
960
|
-
], ButtonGroupComponent.prototype, "focusout", null);
|
|
961
|
-
ButtonGroupComponent = __decorate([
|
|
962
|
-
Component({
|
|
963
|
-
exportAs: 'kendoButtonGroup',
|
|
964
|
-
providers: [
|
|
965
|
-
KendoButtonService,
|
|
966
|
-
LocalizationService,
|
|
967
|
-
{
|
|
968
|
-
provide: L10N_PREFIX,
|
|
969
|
-
useValue: 'kendo.buttongroup'
|
|
970
|
-
}
|
|
971
|
-
],
|
|
972
|
-
selector: 'kendo-buttongroup',
|
|
973
|
-
template: `
|
|
804
|
+
}
|
|
805
|
+
ButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonGroupComponent, deps: [{ token: KendoButtonService }, { token: i1.LocalizationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
806
|
+
ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", look: "look", tabIndex: "tabIndex" }, outputs: { navigate: "navigate" }, host: { listeners: { "keydown": "keydown($event)", "focus": "onFocus()", "focusout": "focusout($event)" }, properties: { "class.k-button-group": "this.wrapperClass", "class.k-state-disabled": "this.disabledClass", "class.k-button-group-stretched": "this.stretchedClass", "class.k-button-group-flat": "this.isFlat", "class.k-button-group-bare": "this.isBare", "class.k-button-group-outline": "this.isOutline", "attr.role": "this.getRole", "attr.dir": "this.dir", "attr.aria-disabled": "this.ariaDisabled", "style.width": "this.wrapperWidth", "attr.tabindex": "this.wrapperTabIndex" } }, providers: [
|
|
807
|
+
KendoButtonService,
|
|
808
|
+
LocalizationService,
|
|
809
|
+
{
|
|
810
|
+
provide: L10N_PREFIX,
|
|
811
|
+
useValue: 'kendo.buttongroup'
|
|
812
|
+
}
|
|
813
|
+
], queries: [{ propertyName: "buttons", predicate: ButtonDirective }], exportAs: ["kendoButtonGroup"], usesOnChanges: true, ngImport: i0, template: `
|
|
814
|
+
<ng-content select="[kendoButton]"></ng-content>
|
|
815
|
+
`, isInline: true });
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonGroupComponent, decorators: [{
|
|
817
|
+
type: Component,
|
|
818
|
+
args: [{
|
|
819
|
+
exportAs: 'kendoButtonGroup',
|
|
820
|
+
providers: [
|
|
821
|
+
KendoButtonService,
|
|
822
|
+
LocalizationService,
|
|
823
|
+
{
|
|
824
|
+
provide: L10N_PREFIX,
|
|
825
|
+
useValue: 'kendo.buttongroup'
|
|
826
|
+
}
|
|
827
|
+
],
|
|
828
|
+
selector: 'kendo-buttongroup',
|
|
829
|
+
template: `
|
|
974
830
|
<ng-content select="[kendoButton]"></ng-content>
|
|
975
831
|
`
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
],
|
|
832
|
+
}]
|
|
833
|
+
}], ctorParameters: function () { return [{ type: KendoButtonService }, { type: i1.LocalizationService }, { type: i0.ElementRef }]; }, propDecorators: { disabled: [{
|
|
834
|
+
type: Input,
|
|
835
|
+
args: ['disabled']
|
|
836
|
+
}], selection: [{
|
|
837
|
+
type: Input,
|
|
838
|
+
args: ['selection']
|
|
839
|
+
}], width: [{
|
|
840
|
+
type: Input,
|
|
841
|
+
args: ['width']
|
|
842
|
+
}], look: [{
|
|
843
|
+
type: Input
|
|
844
|
+
}], tabIndex: [{
|
|
845
|
+
type: Input
|
|
846
|
+
}], navigate: [{
|
|
847
|
+
type: Output
|
|
848
|
+
}], buttons: [{
|
|
849
|
+
type: ContentChildren,
|
|
850
|
+
args: [ButtonDirective]
|
|
851
|
+
}], wrapperClass: [{
|
|
852
|
+
type: HostBinding,
|
|
853
|
+
args: ['class.k-button-group']
|
|
854
|
+
}], disabledClass: [{
|
|
855
|
+
type: HostBinding,
|
|
856
|
+
args: ['class.k-state-disabled']
|
|
857
|
+
}], stretchedClass: [{
|
|
858
|
+
type: HostBinding,
|
|
859
|
+
args: ['class.k-button-group-stretched']
|
|
860
|
+
}], isFlat: [{
|
|
861
|
+
type: HostBinding,
|
|
862
|
+
args: ['class.k-button-group-flat']
|
|
863
|
+
}], isBare: [{
|
|
864
|
+
type: HostBinding,
|
|
865
|
+
args: ['class.k-button-group-bare']
|
|
866
|
+
}], isOutline: [{
|
|
867
|
+
type: HostBinding,
|
|
868
|
+
args: ['class.k-button-group-outline']
|
|
869
|
+
}], getRole: [{
|
|
870
|
+
type: HostBinding,
|
|
871
|
+
args: ['attr.role']
|
|
872
|
+
}], dir: [{
|
|
873
|
+
type: HostBinding,
|
|
874
|
+
args: ['attr.dir']
|
|
875
|
+
}], ariaDisabled: [{
|
|
876
|
+
type: HostBinding,
|
|
877
|
+
args: ['attr.aria-disabled']
|
|
878
|
+
}], wrapperWidth: [{
|
|
879
|
+
type: HostBinding,
|
|
880
|
+
args: ['style.width']
|
|
881
|
+
}], wrapperTabIndex: [{
|
|
882
|
+
type: HostBinding,
|
|
883
|
+
args: ['attr.tabindex']
|
|
884
|
+
}], keydown: [{
|
|
885
|
+
type: HostListener,
|
|
886
|
+
args: ['keydown', ['$event']]
|
|
887
|
+
}], onFocus: [{
|
|
888
|
+
type: HostListener,
|
|
889
|
+
args: ['focus']
|
|
890
|
+
}], focusout: [{
|
|
891
|
+
type: HostListener,
|
|
892
|
+
args: ['focusout', ['$event']]
|
|
893
|
+
}] } });
|
|
981
894
|
|
|
982
895
|
/**
|
|
983
896
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
@@ -1010,14 +923,18 @@ ButtonGroupComponent = __decorate([
|
|
|
1010
923
|
*
|
|
1011
924
|
* ```
|
|
1012
925
|
*/
|
|
1013
|
-
|
|
1014
|
-
}
|
|
1015
|
-
ButtonModule =
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
926
|
+
class ButtonModule {
|
|
927
|
+
}
|
|
928
|
+
ButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
929
|
+
ButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonModule, declarations: [ButtonDirective], exports: [ButtonDirective] });
|
|
930
|
+
ButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonModule });
|
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonModule, decorators: [{
|
|
932
|
+
type: NgModule,
|
|
933
|
+
args: [{
|
|
934
|
+
declarations: [ButtonDirective],
|
|
935
|
+
exports: [ButtonDirective]
|
|
936
|
+
}]
|
|
937
|
+
}] });
|
|
1021
938
|
|
|
1022
939
|
/**
|
|
1023
940
|
* @hidden
|
|
@@ -1027,170 +944,24 @@ ButtonModule = __decorate([
|
|
|
1027
944
|
* The package exports:
|
|
1028
945
|
* - `ButtonGroupComponent`—The ButtonGroupComponent component class.
|
|
1029
946
|
*/
|
|
1030
|
-
|
|
1031
|
-
}
|
|
1032
|
-
ButtonGroupModule =
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
],
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
* To define the item template, nest a `<ng-template>` tag with the `kendo<ComponentName>ItemTemplate` directive inside the component tag.
|
|
1044
|
-
*
|
|
1045
|
-
* For the DropDownButton, use the `kendoDropDownButtonItemTemplate` directive.
|
|
1046
|
-
* For the SplitButton, use the `kendoSplitButtonItemTemplate` directive.
|
|
1047
|
-
*
|
|
1048
|
-
* The template context is set to the current component. To get a reference to the current data item, use the `let-dataItem` directive.
|
|
1049
|
-
*
|
|
1050
|
-
* @example
|
|
1051
|
-
* ```ts
|
|
1052
|
-
* _@Component({
|
|
1053
|
-
* selector: 'my-app',
|
|
1054
|
-
* template: `
|
|
1055
|
-
* <kendo-splitbutton [data]="listItems">
|
|
1056
|
-
* <ng-template kendoSplitButtonItemTemplate let-dataItem>
|
|
1057
|
-
* <span>{{dataItem}} option</span>
|
|
1058
|
-
* </ng-template>
|
|
1059
|
-
* </kendo-splitbutton>
|
|
1060
|
-
* <kendo-dropdownbutton [data]="listItems">
|
|
1061
|
-
* <ng-template kendoDropDownButtonItemTemplate let-dataItem>
|
|
1062
|
-
* <span>{{dataItem}} option</span>
|
|
1063
|
-
* </ng-template>
|
|
1064
|
-
* </kendo-dropdownbutton>
|
|
1065
|
-
* `
|
|
1066
|
-
* })
|
|
1067
|
-
* class AppComponent {
|
|
1068
|
-
* public listItems: Array<any> = [{
|
|
1069
|
-
* text: 'item1',
|
|
1070
|
-
* icon: 'refresh',
|
|
1071
|
-
* disabled: false,
|
|
1072
|
-
* click: (dataItem: any) => {
|
|
1073
|
-
* //action
|
|
1074
|
-
* }
|
|
1075
|
-
* }, {
|
|
1076
|
-
* text: 'item2',
|
|
1077
|
-
* icon: 'refresh',
|
|
1078
|
-
* disabled: false,
|
|
1079
|
-
* click: (dataItem: any) => {
|
|
1080
|
-
* //action
|
|
1081
|
-
* }
|
|
1082
|
-
* }]
|
|
1083
|
-
* }
|
|
1084
|
-
* ```
|
|
1085
|
-
*
|
|
1086
|
-
* For more examples, refer to the article on the [DropDownList templates]({% slug overview_ddl %}#templates).
|
|
1087
|
-
*/
|
|
1088
|
-
let ButtonItemTemplateDirective = class ButtonItemTemplateDirective {
|
|
1089
|
-
constructor(templateRef) {
|
|
1090
|
-
this.templateRef = templateRef;
|
|
1091
|
-
}
|
|
1092
|
-
};
|
|
1093
|
-
ButtonItemTemplateDirective = __decorate([
|
|
1094
|
-
Directive({
|
|
1095
|
-
selector: '[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]'
|
|
1096
|
-
}),
|
|
1097
|
-
__metadata("design:paramtypes", [TemplateRef])
|
|
1098
|
-
], ButtonItemTemplateDirective);
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* @hidden
|
|
1102
|
-
*/
|
|
1103
|
-
let ListComponent = class ListComponent {
|
|
1104
|
-
constructor() {
|
|
1105
|
-
this.onItemClick = new EventEmitter();
|
|
1106
|
-
this.onItemBlur = new EventEmitter();
|
|
1107
|
-
validatePackage(packageMetadata);
|
|
1108
|
-
}
|
|
1109
|
-
getText(dataItem) {
|
|
1110
|
-
if (dataItem) {
|
|
1111
|
-
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1112
|
-
}
|
|
1113
|
-
return undefined;
|
|
1114
|
-
}
|
|
1115
|
-
getIconClasses(dataItem) {
|
|
1116
|
-
const icon = dataItem.icon ? 'k-icon k-i-' + dataItem.icon : undefined;
|
|
1117
|
-
const classes = {};
|
|
1118
|
-
classes[icon || dataItem.iconClass] = true;
|
|
1119
|
-
return classes;
|
|
1120
|
-
}
|
|
1121
|
-
onClick(index) {
|
|
1122
|
-
this.onItemClick.emit(index);
|
|
1123
|
-
}
|
|
1124
|
-
onBlur() {
|
|
1125
|
-
this.onItemBlur.emit();
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
__decorate([
|
|
1129
|
-
Input(),
|
|
1130
|
-
__metadata("design:type", Array)
|
|
1131
|
-
], ListComponent.prototype, "data", void 0);
|
|
1132
|
-
__decorate([
|
|
1133
|
-
Input(),
|
|
1134
|
-
__metadata("design:type", String)
|
|
1135
|
-
], ListComponent.prototype, "textField", void 0);
|
|
1136
|
-
__decorate([
|
|
1137
|
-
Input(),
|
|
1138
|
-
__metadata("design:type", ButtonItemTemplateDirective)
|
|
1139
|
-
], ListComponent.prototype, "itemTemplate", void 0);
|
|
1140
|
-
__decorate([
|
|
1141
|
-
Output(),
|
|
1142
|
-
__metadata("design:type", EventEmitter)
|
|
1143
|
-
], ListComponent.prototype, "onItemClick", void 0);
|
|
1144
|
-
__decorate([
|
|
1145
|
-
Output(),
|
|
1146
|
-
__metadata("design:type", EventEmitter)
|
|
1147
|
-
], ListComponent.prototype, "onItemBlur", void 0);
|
|
1148
|
-
ListComponent = __decorate([
|
|
1149
|
-
Component({
|
|
1150
|
-
selector: 'kendo-button-list',
|
|
1151
|
-
template: `
|
|
1152
|
-
<ul class="k-list k-reset" unselectable="on" role="menu">
|
|
1153
|
-
<li role="menuitem" unselectable="on" tabindex="-1"
|
|
1154
|
-
kendoButtonFocusable
|
|
1155
|
-
*ngFor="let dataItem of data; let index = index;"
|
|
1156
|
-
[index]="index"
|
|
1157
|
-
[ngClass]="{'k-item': true, 'k-state-disabled': dataItem.disabled}"
|
|
1158
|
-
(click)="onClick(index)"
|
|
1159
|
-
(blur)="onBlur()"
|
|
1160
|
-
[attr.aria-disabled]="dataItem.disabled ? true : false">
|
|
1161
|
-
<ng-template *ngIf="itemTemplate?.templateRef"
|
|
1162
|
-
[templateContext]="{
|
|
1163
|
-
templateRef: itemTemplate?.templateRef,
|
|
1164
|
-
$implicit: dataItem
|
|
1165
|
-
}">
|
|
1166
|
-
</ng-template>
|
|
1167
|
-
<ng-template [ngIf]="!itemTemplate?.templateRef">
|
|
1168
|
-
<span
|
|
1169
|
-
*ngIf="dataItem.icon || dataItem.iconClass"
|
|
1170
|
-
[ngClass]="getIconClasses(dataItem)"
|
|
1171
|
-
></span>
|
|
1172
|
-
<img
|
|
1173
|
-
*ngIf="dataItem.imageUrl"
|
|
1174
|
-
class="k-image"
|
|
1175
|
-
[src]="dataItem.imageUrl"
|
|
1176
|
-
alt=""
|
|
1177
|
-
>
|
|
1178
|
-
{{ getText(dataItem) }}
|
|
1179
|
-
</ng-template>
|
|
1180
|
-
</li>
|
|
1181
|
-
</ul>
|
|
1182
|
-
`
|
|
1183
|
-
}),
|
|
1184
|
-
__metadata("design:paramtypes", [])
|
|
1185
|
-
], ListComponent);
|
|
947
|
+
class ButtonGroupModule {
|
|
948
|
+
}
|
|
949
|
+
ButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
950
|
+
ButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonGroupModule, declarations: [ButtonGroupComponent], imports: [CommonModule, ButtonModule], exports: [ButtonGroupComponent] });
|
|
951
|
+
ButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonGroupModule, imports: [[CommonModule, ButtonModule]] });
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonGroupModule, decorators: [{
|
|
953
|
+
type: NgModule,
|
|
954
|
+
args: [{
|
|
955
|
+
declarations: [ButtonGroupComponent],
|
|
956
|
+
exports: [ButtonGroupComponent],
|
|
957
|
+
imports: [CommonModule, ButtonModule]
|
|
958
|
+
}]
|
|
959
|
+
}] });
|
|
1186
960
|
|
|
1187
961
|
/**
|
|
1188
962
|
* @hidden
|
|
1189
963
|
*/
|
|
1190
|
-
|
|
1191
|
-
/**
|
|
1192
|
-
* @hidden
|
|
1193
|
-
*/
|
|
964
|
+
class FocusService {
|
|
1194
965
|
constructor() {
|
|
1195
966
|
this.onFocus = new EventEmitter();
|
|
1196
967
|
}
|
|
@@ -1214,15 +985,17 @@ let FocusService = class FocusService {
|
|
|
1214
985
|
this.focusedIndex = index;
|
|
1215
986
|
this.onFocus.emit(index);
|
|
1216
987
|
}
|
|
1217
|
-
}
|
|
1218
|
-
FocusService =
|
|
1219
|
-
|
|
1220
|
-
|
|
988
|
+
}
|
|
989
|
+
FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FocusService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
990
|
+
FocusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FocusService });
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FocusService, decorators: [{
|
|
992
|
+
type: Injectable
|
|
993
|
+
}] });
|
|
1221
994
|
|
|
1222
995
|
/**
|
|
1223
996
|
* @hidden
|
|
1224
997
|
*/
|
|
1225
|
-
|
|
998
|
+
class FocusableDirective {
|
|
1226
999
|
constructor(focusService, elementRef, renderer) {
|
|
1227
1000
|
this.focusService = focusService;
|
|
1228
1001
|
this.renderer = renderer;
|
|
@@ -1265,22 +1038,22 @@ let FocusableDirective = class FocusableDirective {
|
|
|
1265
1038
|
this.focusSubscription.unsubscribe();
|
|
1266
1039
|
}
|
|
1267
1040
|
}
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
]
|
|
1041
|
+
}
|
|
1042
|
+
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FocusableDirective, deps: [{ token: FocusService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1043
|
+
FocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: FocusableDirective, selector: "[kendoButtonFocusable]", inputs: { index: "index" }, ngImport: i0 });
|
|
1044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FocusableDirective, decorators: [{
|
|
1045
|
+
type: Directive,
|
|
1046
|
+
args: [{
|
|
1047
|
+
selector: '[kendoButtonFocusable]'
|
|
1048
|
+
}]
|
|
1049
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { index: [{
|
|
1050
|
+
type: Input
|
|
1051
|
+
}] } });
|
|
1279
1052
|
|
|
1280
1053
|
/**
|
|
1281
1054
|
* @hidden
|
|
1282
1055
|
*/
|
|
1283
|
-
|
|
1056
|
+
class TemplateContextDirective {
|
|
1284
1057
|
constructor(viewContainerRef) {
|
|
1285
1058
|
this.viewContainerRef = viewContainerRef;
|
|
1286
1059
|
}
|
|
@@ -1293,109 +1066,400 @@ let TemplateContextDirective = class TemplateContextDirective {
|
|
|
1293
1066
|
this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context);
|
|
1294
1067
|
}
|
|
1295
1068
|
}
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
], TemplateContextDirective);
|
|
1308
|
-
|
|
1309
|
-
const EXPORTED_DIRECTIVES = [
|
|
1310
|
-
ListComponent,
|
|
1311
|
-
FocusableDirective,
|
|
1312
|
-
ButtonItemTemplateDirective,
|
|
1313
|
-
TemplateContextDirective
|
|
1314
|
-
];
|
|
1315
|
-
/**
|
|
1316
|
-
* @hidden
|
|
1317
|
-
*/
|
|
1318
|
-
let ListModule = class ListModule {
|
|
1319
|
-
};
|
|
1320
|
-
ListModule = __decorate([
|
|
1321
|
-
NgModule({
|
|
1322
|
-
declarations: [EXPORTED_DIRECTIVES],
|
|
1323
|
-
exports: [EXPORTED_DIRECTIVES],
|
|
1324
|
-
imports: [CommonModule]
|
|
1325
|
-
})
|
|
1326
|
-
], ListModule);
|
|
1327
|
-
|
|
1328
|
-
/**
|
|
1329
|
-
* @hidden
|
|
1330
|
-
*/
|
|
1331
|
-
var KeyEvents;
|
|
1332
|
-
(function (KeyEvents) {
|
|
1333
|
-
KeyEvents[KeyEvents["keydown"] = 0] = "keydown";
|
|
1334
|
-
KeyEvents[KeyEvents["keypress"] = 1] = "keypress";
|
|
1335
|
-
KeyEvents[KeyEvents["keyup"] = 2] = "keyup";
|
|
1336
|
-
})(KeyEvents || (KeyEvents = {}));
|
|
1337
|
-
|
|
1338
|
-
/**
|
|
1339
|
-
* @hidden
|
|
1340
|
-
*/
|
|
1341
|
-
var NavigationAction;
|
|
1342
|
-
(function (NavigationAction) {
|
|
1343
|
-
NavigationAction[NavigationAction["Undefined"] = 0] = "Undefined";
|
|
1344
|
-
NavigationAction[NavigationAction["Open"] = 1] = "Open";
|
|
1345
|
-
NavigationAction[NavigationAction["Close"] = 2] = "Close";
|
|
1346
|
-
NavigationAction[NavigationAction["Enter"] = 3] = "Enter";
|
|
1347
|
-
NavigationAction[NavigationAction["EnterPress"] = 4] = "EnterPress";
|
|
1348
|
-
NavigationAction[NavigationAction["EnterUp"] = 5] = "EnterUp";
|
|
1349
|
-
NavigationAction[NavigationAction["Tab"] = 6] = "Tab";
|
|
1350
|
-
NavigationAction[NavigationAction["Esc"] = 7] = "Esc";
|
|
1351
|
-
NavigationAction[NavigationAction["Navigate"] = 8] = "Navigate";
|
|
1352
|
-
})(NavigationAction || (NavigationAction = {}));
|
|
1069
|
+
}
|
|
1070
|
+
TemplateContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: TemplateContextDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1071
|
+
TemplateContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: TemplateContextDirective, selector: "[templateContext]", inputs: { templateContext: "templateContext" }, ngImport: i0 });
|
|
1072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: TemplateContextDirective, decorators: [{
|
|
1073
|
+
type: Directive,
|
|
1074
|
+
args: [{
|
|
1075
|
+
selector: '[templateContext]' // eslint-disable-line directive-selector
|
|
1076
|
+
}]
|
|
1077
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateContext: [{
|
|
1078
|
+
type: Input
|
|
1079
|
+
}] } });
|
|
1353
1080
|
|
|
1354
|
-
/* tslint:disable:deprecation */
|
|
1355
1081
|
/**
|
|
1356
1082
|
* @hidden
|
|
1357
1083
|
*/
|
|
1358
|
-
class
|
|
1359
|
-
constructor(
|
|
1360
|
-
this.
|
|
1361
|
-
this.
|
|
1362
|
-
|
|
1363
|
-
this._zone = _zone;
|
|
1364
|
-
this.cdr = cdr;
|
|
1365
|
-
this._open = false;
|
|
1366
|
-
this._disabled = false;
|
|
1367
|
-
this._active = false;
|
|
1368
|
-
this._popupSettings = { animate: true, popupClass: '' };
|
|
1369
|
-
this.listId = guid();
|
|
1370
|
-
this._isFocused = false;
|
|
1371
|
-
this.focusService = focusService;
|
|
1372
|
-
this.navigationService = navigationService;
|
|
1373
|
-
this.wrapper = wrapperRef.nativeElement;
|
|
1374
|
-
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr'));
|
|
1375
|
-
this.subscribeEvents();
|
|
1084
|
+
class ListComponent {
|
|
1085
|
+
constructor() {
|
|
1086
|
+
this.onItemClick = new EventEmitter();
|
|
1087
|
+
this.onItemBlur = new EventEmitter();
|
|
1088
|
+
validatePackage(packageMetadata);
|
|
1376
1089
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
popupClasses.push(this._popupSettings.popupClass);
|
|
1090
|
+
getText(dataItem) {
|
|
1091
|
+
if (dataItem) {
|
|
1092
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1381
1093
|
}
|
|
1382
|
-
return
|
|
1094
|
+
return undefined;
|
|
1383
1095
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1096
|
+
getIconClasses(dataItem) {
|
|
1097
|
+
const icon = dataItem.icon ? 'k-icon k-i-' + dataItem.icon : undefined;
|
|
1098
|
+
const classes = {};
|
|
1099
|
+
classes[icon || dataItem.iconClass] = true;
|
|
1100
|
+
return classes;
|
|
1386
1101
|
}
|
|
1387
|
-
|
|
1388
|
-
this.
|
|
1102
|
+
onClick(index) {
|
|
1103
|
+
this.onItemClick.emit(index);
|
|
1389
1104
|
}
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1105
|
+
onBlur() {
|
|
1106
|
+
this.onItemBlur.emit();
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1110
|
+
ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ListComponent, selector: "kendo-button-list", inputs: { data: "data", textField: "textField", itemTemplate: "itemTemplate" }, outputs: { onItemClick: "onItemClick", onItemBlur: "onItemBlur" }, ngImport: i0, template: `
|
|
1111
|
+
<ul class="k-list k-reset" unselectable="on">
|
|
1112
|
+
<li role="menuitem" unselectable="on" tabindex="-1"
|
|
1113
|
+
kendoButtonFocusable
|
|
1114
|
+
*ngFor="let dataItem of data; let index = index;"
|
|
1115
|
+
[index]="index"
|
|
1116
|
+
[ngClass]="{'k-item': true, 'k-state-disabled': dataItem.disabled}"
|
|
1117
|
+
(click)="onClick(index)"
|
|
1118
|
+
(blur)="onBlur()"
|
|
1119
|
+
[attr.aria-disabled]="dataItem.disabled ? true : false">
|
|
1120
|
+
<ng-template *ngIf="itemTemplate?.templateRef"
|
|
1121
|
+
[templateContext]="{
|
|
1122
|
+
templateRef: itemTemplate?.templateRef,
|
|
1123
|
+
$implicit: dataItem
|
|
1124
|
+
}">
|
|
1125
|
+
</ng-template>
|
|
1126
|
+
<ng-template [ngIf]="!itemTemplate?.templateRef">
|
|
1127
|
+
<span
|
|
1128
|
+
*ngIf="dataItem.icon || dataItem.iconClass"
|
|
1129
|
+
[ngClass]="getIconClasses(dataItem)"
|
|
1130
|
+
></span>
|
|
1131
|
+
<img
|
|
1132
|
+
*ngIf="dataItem.imageUrl"
|
|
1133
|
+
class="k-image"
|
|
1134
|
+
[src]="dataItem.imageUrl"
|
|
1135
|
+
alt=""
|
|
1136
|
+
>
|
|
1137
|
+
{{ getText(dataItem) }}
|
|
1138
|
+
</ng-template>
|
|
1139
|
+
</li>
|
|
1140
|
+
</ul>
|
|
1141
|
+
`, isInline: true, 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
1142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListComponent, decorators: [{
|
|
1143
|
+
type: Component,
|
|
1144
|
+
args: [{
|
|
1145
|
+
selector: 'kendo-button-list',
|
|
1146
|
+
template: `
|
|
1147
|
+
<ul class="k-list k-reset" unselectable="on">
|
|
1148
|
+
<li role="menuitem" unselectable="on" tabindex="-1"
|
|
1149
|
+
kendoButtonFocusable
|
|
1150
|
+
*ngFor="let dataItem of data; let index = index;"
|
|
1151
|
+
[index]="index"
|
|
1152
|
+
[ngClass]="{'k-item': true, 'k-state-disabled': dataItem.disabled}"
|
|
1153
|
+
(click)="onClick(index)"
|
|
1154
|
+
(blur)="onBlur()"
|
|
1155
|
+
[attr.aria-disabled]="dataItem.disabled ? true : false">
|
|
1156
|
+
<ng-template *ngIf="itemTemplate?.templateRef"
|
|
1157
|
+
[templateContext]="{
|
|
1158
|
+
templateRef: itemTemplate?.templateRef,
|
|
1159
|
+
$implicit: dataItem
|
|
1160
|
+
}">
|
|
1161
|
+
</ng-template>
|
|
1162
|
+
<ng-template [ngIf]="!itemTemplate?.templateRef">
|
|
1163
|
+
<span
|
|
1164
|
+
*ngIf="dataItem.icon || dataItem.iconClass"
|
|
1165
|
+
[ngClass]="getIconClasses(dataItem)"
|
|
1166
|
+
></span>
|
|
1167
|
+
<img
|
|
1168
|
+
*ngIf="dataItem.imageUrl"
|
|
1169
|
+
class="k-image"
|
|
1170
|
+
[src]="dataItem.imageUrl"
|
|
1171
|
+
alt=""
|
|
1172
|
+
>
|
|
1173
|
+
{{ getText(dataItem) }}
|
|
1174
|
+
</ng-template>
|
|
1175
|
+
</li>
|
|
1176
|
+
</ul>
|
|
1177
|
+
`
|
|
1178
|
+
}]
|
|
1179
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
1180
|
+
type: Input
|
|
1181
|
+
}], textField: [{
|
|
1182
|
+
type: Input
|
|
1183
|
+
}], itemTemplate: [{
|
|
1184
|
+
type: Input
|
|
1185
|
+
}], onItemClick: [{
|
|
1186
|
+
type: Output
|
|
1187
|
+
}], onItemBlur: [{
|
|
1188
|
+
type: Output
|
|
1189
|
+
}] } });
|
|
1190
|
+
|
|
1191
|
+
/* eslint-disable directive-selector-name */
|
|
1192
|
+
/**
|
|
1193
|
+
* Used for rendering the list item content.
|
|
1194
|
+
*
|
|
1195
|
+
* To define the item template, nest a `<ng-template>` tag with the `kendo<ComponentName>ItemTemplate` directive inside the component tag.
|
|
1196
|
+
*
|
|
1197
|
+
* For the DropDownButton, use the `kendoDropDownButtonItemTemplate` directive.
|
|
1198
|
+
* For the SplitButton, use the `kendoSplitButtonItemTemplate` directive.
|
|
1199
|
+
*
|
|
1200
|
+
* The template context is set to the current component. To get a reference to the current data item, use the `let-dataItem` directive.
|
|
1201
|
+
*
|
|
1202
|
+
* @example
|
|
1203
|
+
* ```ts
|
|
1204
|
+
* _@Component({
|
|
1205
|
+
* selector: 'my-app',
|
|
1206
|
+
* template: `
|
|
1207
|
+
* <kendo-splitbutton [data]="listItems">
|
|
1208
|
+
* <ng-template kendoSplitButtonItemTemplate let-dataItem>
|
|
1209
|
+
* <span>{{dataItem}} option</span>
|
|
1210
|
+
* </ng-template>
|
|
1211
|
+
* </kendo-splitbutton>
|
|
1212
|
+
* <kendo-dropdownbutton [data]="listItems">
|
|
1213
|
+
* <ng-template kendoDropDownButtonItemTemplate let-dataItem>
|
|
1214
|
+
* <span>{{dataItem}} option</span>
|
|
1215
|
+
* </ng-template>
|
|
1216
|
+
* </kendo-dropdownbutton>
|
|
1217
|
+
* `
|
|
1218
|
+
* })
|
|
1219
|
+
* class AppComponent {
|
|
1220
|
+
* public listItems: Array<any> = [{
|
|
1221
|
+
* text: 'item1',
|
|
1222
|
+
* icon: 'refresh',
|
|
1223
|
+
* disabled: false,
|
|
1224
|
+
* click: (dataItem: any) => {
|
|
1225
|
+
* //action
|
|
1226
|
+
* }
|
|
1227
|
+
* }, {
|
|
1228
|
+
* text: 'item2',
|
|
1229
|
+
* icon: 'refresh',
|
|
1230
|
+
* disabled: false,
|
|
1231
|
+
* click: (dataItem: any) => {
|
|
1232
|
+
* //action
|
|
1233
|
+
* }
|
|
1234
|
+
* }]
|
|
1235
|
+
* }
|
|
1236
|
+
* ```
|
|
1237
|
+
*
|
|
1238
|
+
* For more examples, refer to the article on the [DropDownList templates]({% slug overview_ddl %}#templates).
|
|
1239
|
+
*/
|
|
1240
|
+
class ButtonItemTemplateDirective {
|
|
1241
|
+
constructor(templateRef) {
|
|
1242
|
+
this.templateRef = templateRef;
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
ButtonItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonItemTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1246
|
+
ButtonItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ButtonItemTemplateDirective, selector: "[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]", ngImport: i0 });
|
|
1247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonItemTemplateDirective, decorators: [{
|
|
1248
|
+
type: Directive,
|
|
1249
|
+
args: [{
|
|
1250
|
+
selector: '[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]'
|
|
1251
|
+
}]
|
|
1252
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1253
|
+
|
|
1254
|
+
const EXPORTED_DIRECTIVES = [
|
|
1255
|
+
ListComponent,
|
|
1256
|
+
FocusableDirective,
|
|
1257
|
+
ButtonItemTemplateDirective,
|
|
1258
|
+
TemplateContextDirective
|
|
1259
|
+
];
|
|
1260
|
+
/**
|
|
1261
|
+
* @hidden
|
|
1262
|
+
*/
|
|
1263
|
+
class ListModule {
|
|
1264
|
+
}
|
|
1265
|
+
ListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1266
|
+
ListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListModule, declarations: [ListComponent,
|
|
1267
|
+
FocusableDirective,
|
|
1268
|
+
ButtonItemTemplateDirective,
|
|
1269
|
+
TemplateContextDirective], imports: [CommonModule], exports: [ListComponent,
|
|
1270
|
+
FocusableDirective,
|
|
1271
|
+
ButtonItemTemplateDirective,
|
|
1272
|
+
TemplateContextDirective] });
|
|
1273
|
+
ListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListModule, imports: [[CommonModule]] });
|
|
1274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListModule, decorators: [{
|
|
1275
|
+
type: NgModule,
|
|
1276
|
+
args: [{
|
|
1277
|
+
declarations: [EXPORTED_DIRECTIVES],
|
|
1278
|
+
exports: [EXPORTED_DIRECTIVES],
|
|
1279
|
+
imports: [CommonModule]
|
|
1280
|
+
}]
|
|
1281
|
+
}] });
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* @hidden
|
|
1285
|
+
*/
|
|
1286
|
+
var KeyEvents;
|
|
1287
|
+
(function (KeyEvents) {
|
|
1288
|
+
KeyEvents[KeyEvents["keydown"] = 0] = "keydown";
|
|
1289
|
+
KeyEvents[KeyEvents["keypress"] = 1] = "keypress";
|
|
1290
|
+
KeyEvents[KeyEvents["keyup"] = 2] = "keyup";
|
|
1291
|
+
})(KeyEvents || (KeyEvents = {}));
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* @hidden
|
|
1295
|
+
*/
|
|
1296
|
+
var NavigationAction;
|
|
1297
|
+
(function (NavigationAction) {
|
|
1298
|
+
NavigationAction[NavigationAction["Undefined"] = 0] = "Undefined";
|
|
1299
|
+
NavigationAction[NavigationAction["Open"] = 1] = "Open";
|
|
1300
|
+
NavigationAction[NavigationAction["Close"] = 2] = "Close";
|
|
1301
|
+
NavigationAction[NavigationAction["Enter"] = 3] = "Enter";
|
|
1302
|
+
NavigationAction[NavigationAction["EnterPress"] = 4] = "EnterPress";
|
|
1303
|
+
NavigationAction[NavigationAction["EnterUp"] = 5] = "EnterUp";
|
|
1304
|
+
NavigationAction[NavigationAction["Tab"] = 6] = "Tab";
|
|
1305
|
+
NavigationAction[NavigationAction["Esc"] = 7] = "Esc";
|
|
1306
|
+
NavigationAction[NavigationAction["Navigate"] = 8] = "Navigate";
|
|
1307
|
+
})(NavigationAction || (NavigationAction = {}));
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* @hidden
|
|
1311
|
+
*/
|
|
1312
|
+
const NAVIGATION_CONFIG = new InjectionToken('navigation.config');
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* @hidden
|
|
1316
|
+
*/
|
|
1317
|
+
class NavigationService {
|
|
1318
|
+
constructor(config) {
|
|
1319
|
+
this.navigate = new EventEmitter();
|
|
1320
|
+
this.open = new EventEmitter();
|
|
1321
|
+
this.close = new EventEmitter();
|
|
1322
|
+
this.enter = new EventEmitter();
|
|
1323
|
+
this.enterpress = new EventEmitter();
|
|
1324
|
+
this.enterup = new EventEmitter();
|
|
1325
|
+
this.tab = new EventEmitter();
|
|
1326
|
+
this.esc = new EventEmitter();
|
|
1327
|
+
this.useLeftRightArrows = config.useLeftRightArrows;
|
|
1328
|
+
}
|
|
1329
|
+
process(args) {
|
|
1330
|
+
const keyCode = args.keyCode;
|
|
1331
|
+
const keyEvent = args.keyEvent;
|
|
1332
|
+
let index;
|
|
1333
|
+
let action = NavigationAction.Undefined;
|
|
1334
|
+
if (keyEvent === KeyEvents.keypress) {
|
|
1335
|
+
if (this.isEnter(keyCode)) {
|
|
1336
|
+
action = NavigationAction.EnterPress;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
else if (keyEvent === KeyEvents.keyup) {
|
|
1340
|
+
if (this.isEnter(keyCode)) {
|
|
1341
|
+
action = NavigationAction.EnterUp;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
if (args.altKey && keyCode === Keys.ArrowDown) {
|
|
1346
|
+
action = NavigationAction.Open;
|
|
1347
|
+
}
|
|
1348
|
+
else if (args.altKey && keyCode === Keys.ArrowUp) {
|
|
1349
|
+
action = NavigationAction.Close;
|
|
1350
|
+
}
|
|
1351
|
+
else if (this.isEnter(keyCode)) {
|
|
1352
|
+
action = NavigationAction.Enter;
|
|
1353
|
+
}
|
|
1354
|
+
else if (keyCode === Keys.Escape) {
|
|
1355
|
+
action = NavigationAction.Esc;
|
|
1356
|
+
}
|
|
1357
|
+
else if (keyCode === Keys.Tab) {
|
|
1358
|
+
action = NavigationAction.Tab;
|
|
1359
|
+
}
|
|
1360
|
+
else if (keyCode === Keys.ArrowUp || (this.useLeftRightArrows && keyCode === Keys.ArrowLeft)) {
|
|
1361
|
+
const step = args.flipNavigation ? 1 : -1;
|
|
1362
|
+
const start = args.flipNavigation ? args.min : args.max;
|
|
1363
|
+
const end = args.flipNavigation ? args.max : args.min;
|
|
1364
|
+
index = this.next({
|
|
1365
|
+
current: args.current,
|
|
1366
|
+
start: start,
|
|
1367
|
+
end: end,
|
|
1368
|
+
step: step
|
|
1369
|
+
});
|
|
1370
|
+
action = NavigationAction.Navigate;
|
|
1371
|
+
}
|
|
1372
|
+
else if (keyCode === Keys.ArrowDown || (this.useLeftRightArrows && keyCode === Keys.ArrowRight)) {
|
|
1373
|
+
const step = args.flipNavigation ? -1 : 1;
|
|
1374
|
+
const start = args.flipNavigation ? args.max : args.min;
|
|
1375
|
+
const end = args.flipNavigation ? args.min : args.max;
|
|
1376
|
+
index = this.next({
|
|
1377
|
+
current: args.current,
|
|
1378
|
+
start: start,
|
|
1379
|
+
end: end,
|
|
1380
|
+
step: step
|
|
1381
|
+
});
|
|
1382
|
+
action = NavigationAction.Navigate;
|
|
1383
|
+
}
|
|
1384
|
+
else if (keyCode === Keys.Home) {
|
|
1385
|
+
index = args.min;
|
|
1386
|
+
action = NavigationAction.Navigate;
|
|
1387
|
+
}
|
|
1388
|
+
else if (keyCode === Keys.End) {
|
|
1389
|
+
index = args.max;
|
|
1390
|
+
action = NavigationAction.Navigate;
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
if (action !== NavigationAction.Undefined) {
|
|
1394
|
+
this[NavigationAction[action].toLowerCase()].emit(index);
|
|
1395
|
+
}
|
|
1396
|
+
return action;
|
|
1397
|
+
}
|
|
1398
|
+
isEnter(keyCode) {
|
|
1399
|
+
return keyCode === Keys.Enter || keyCode === Keys.Space;
|
|
1400
|
+
}
|
|
1401
|
+
next(args) {
|
|
1402
|
+
if (!isPresent(args.current)) {
|
|
1403
|
+
return args.start;
|
|
1404
|
+
}
|
|
1405
|
+
else {
|
|
1406
|
+
return args.current !== args.end ? args.current + args.step : args.end;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavigationService, deps: [{ token: NAVIGATION_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1411
|
+
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavigationService });
|
|
1412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavigationService, decorators: [{
|
|
1413
|
+
type: Injectable
|
|
1414
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1415
|
+
type: Inject,
|
|
1416
|
+
args: [NAVIGATION_CONFIG]
|
|
1417
|
+
}] }]; } });
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* @hidden
|
|
1421
|
+
*/
|
|
1422
|
+
class ListButton {
|
|
1423
|
+
constructor(focusService, navigationService, wrapperRef, _zone, localization, cdr) {
|
|
1424
|
+
this.focusService = focusService;
|
|
1425
|
+
this.navigationService = navigationService;
|
|
1426
|
+
this.wrapperRef = wrapperRef;
|
|
1427
|
+
this._zone = _zone;
|
|
1428
|
+
this.cdr = cdr;
|
|
1429
|
+
this._open = false;
|
|
1430
|
+
this._disabled = false;
|
|
1431
|
+
this._active = false;
|
|
1432
|
+
this._popupSettings = { animate: true, popupClass: '' };
|
|
1433
|
+
this.listId = guid();
|
|
1434
|
+
this._isFocused = false;
|
|
1435
|
+
this.focusService = focusService;
|
|
1436
|
+
this.navigationService = navigationService;
|
|
1437
|
+
this.wrapper = wrapperRef.nativeElement;
|
|
1438
|
+
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr'));
|
|
1439
|
+
this.subscribeEvents();
|
|
1440
|
+
}
|
|
1441
|
+
get popupClasses() {
|
|
1442
|
+
const popupClasses = ['k-list-container', 'k-reset', 'k-group'];
|
|
1443
|
+
if (this._popupSettings.popupClass) {
|
|
1444
|
+
popupClasses.push(this._popupSettings.popupClass);
|
|
1445
|
+
}
|
|
1446
|
+
return popupClasses.join(' ');
|
|
1447
|
+
}
|
|
1448
|
+
get openState() {
|
|
1449
|
+
return this._open;
|
|
1450
|
+
}
|
|
1451
|
+
set openState(open) {
|
|
1452
|
+
this._open = open;
|
|
1453
|
+
}
|
|
1454
|
+
/**
|
|
1455
|
+
* @hidden
|
|
1456
|
+
*/
|
|
1457
|
+
togglePopupVisibility() {
|
|
1458
|
+
if (this._disabled) {
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
this.openState = !this.openState;
|
|
1462
|
+
if (!this.openState) {
|
|
1399
1463
|
this.focusService.focus(-1);
|
|
1400
1464
|
}
|
|
1401
1465
|
}
|
|
@@ -1453,7 +1517,7 @@ class ListButton {
|
|
|
1453
1517
|
});
|
|
1454
1518
|
this.closeSubscription = merge(this.navigationService.close, this.navigationService.esc).subscribe(() => this.focusWrapper());
|
|
1455
1519
|
}
|
|
1456
|
-
enterHandler() { } //
|
|
1520
|
+
enterHandler() { } // eslint-disable-line
|
|
1457
1521
|
unsubscribeEvents() {
|
|
1458
1522
|
if (!isDocumentAvailable()) {
|
|
1459
1523
|
return;
|
|
@@ -1556,126 +1620,27 @@ class ListButton {
|
|
|
1556
1620
|
this.button.nativeElement.focus();
|
|
1557
1621
|
}
|
|
1558
1622
|
}
|
|
1559
|
-
handleTab() {
|
|
1560
|
-
this.focusButton();
|
|
1561
|
-
this.blurWrapper(false);
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
*/
|
|
1573
|
-
let NavigationService = class NavigationService {
|
|
1574
|
-
constructor(config) {
|
|
1575
|
-
this.navigate = new EventEmitter();
|
|
1576
|
-
this.open = new EventEmitter();
|
|
1577
|
-
this.close = new EventEmitter();
|
|
1578
|
-
this.enter = new EventEmitter();
|
|
1579
|
-
this.enterpress = new EventEmitter();
|
|
1580
|
-
this.enterup = new EventEmitter();
|
|
1581
|
-
this.tab = new EventEmitter();
|
|
1582
|
-
this.esc = new EventEmitter();
|
|
1583
|
-
this.useLeftRightArrows = config.useLeftRightArrows;
|
|
1584
|
-
}
|
|
1585
|
-
process(args) {
|
|
1586
|
-
const keyCode = args.keyCode;
|
|
1587
|
-
const keyEvent = args.keyEvent;
|
|
1588
|
-
let index;
|
|
1589
|
-
let action = NavigationAction.Undefined;
|
|
1590
|
-
if (keyEvent === KeyEvents.keypress) {
|
|
1591
|
-
if (this.isEnter(keyCode)) {
|
|
1592
|
-
action = NavigationAction.EnterPress;
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
else if (keyEvent === KeyEvents.keyup) {
|
|
1596
|
-
if (this.isEnter(keyCode)) {
|
|
1597
|
-
action = NavigationAction.EnterUp;
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
else {
|
|
1601
|
-
if (args.altKey && keyCode === Keys.ArrowDown) {
|
|
1602
|
-
action = NavigationAction.Open;
|
|
1603
|
-
}
|
|
1604
|
-
else if (args.altKey && keyCode === Keys.ArrowUp) {
|
|
1605
|
-
action = NavigationAction.Close;
|
|
1606
|
-
}
|
|
1607
|
-
else if (this.isEnter(keyCode)) {
|
|
1608
|
-
action = NavigationAction.Enter;
|
|
1609
|
-
}
|
|
1610
|
-
else if (keyCode === Keys.Escape) {
|
|
1611
|
-
action = NavigationAction.Esc;
|
|
1612
|
-
}
|
|
1613
|
-
else if (keyCode === Keys.Tab) {
|
|
1614
|
-
action = NavigationAction.Tab;
|
|
1615
|
-
}
|
|
1616
|
-
else if (keyCode === Keys.ArrowUp || (this.useLeftRightArrows && keyCode === Keys.ArrowLeft)) {
|
|
1617
|
-
const step = args.flipNavigation ? 1 : -1;
|
|
1618
|
-
const start = args.flipNavigation ? args.min : args.max;
|
|
1619
|
-
const end = args.flipNavigation ? args.max : args.min;
|
|
1620
|
-
index = this.next({
|
|
1621
|
-
current: args.current,
|
|
1622
|
-
start: start,
|
|
1623
|
-
end: end,
|
|
1624
|
-
step: step
|
|
1625
|
-
});
|
|
1626
|
-
action = NavigationAction.Navigate;
|
|
1627
|
-
}
|
|
1628
|
-
else if (keyCode === Keys.ArrowDown || (this.useLeftRightArrows && keyCode === Keys.ArrowRight)) {
|
|
1629
|
-
const step = args.flipNavigation ? -1 : 1;
|
|
1630
|
-
const start = args.flipNavigation ? args.max : args.min;
|
|
1631
|
-
const end = args.flipNavigation ? args.min : args.max;
|
|
1632
|
-
index = this.next({
|
|
1633
|
-
current: args.current,
|
|
1634
|
-
start: start,
|
|
1635
|
-
end: end,
|
|
1636
|
-
step: step
|
|
1637
|
-
});
|
|
1638
|
-
action = NavigationAction.Navigate;
|
|
1639
|
-
}
|
|
1640
|
-
else if (keyCode === Keys.Home) {
|
|
1641
|
-
index = args.min;
|
|
1642
|
-
action = NavigationAction.Navigate;
|
|
1643
|
-
}
|
|
1644
|
-
else if (keyCode === Keys.End) {
|
|
1645
|
-
index = args.max;
|
|
1646
|
-
action = NavigationAction.Navigate;
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
if (action !== NavigationAction.Undefined) {
|
|
1650
|
-
this[NavigationAction[action].toLowerCase()].emit(index);
|
|
1651
|
-
}
|
|
1652
|
-
return action;
|
|
1653
|
-
}
|
|
1654
|
-
isEnter(keyCode) {
|
|
1655
|
-
return keyCode === Keys.Enter || keyCode === Keys.Space;
|
|
1656
|
-
}
|
|
1657
|
-
next(args) {
|
|
1658
|
-
if (!isPresent(args.current)) {
|
|
1659
|
-
return args.start;
|
|
1660
|
-
}
|
|
1661
|
-
else {
|
|
1662
|
-
return args.current !== args.end ? args.current + args.step : args.end;
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
};
|
|
1666
|
-
NavigationService = __decorate([
|
|
1667
|
-
Injectable(),
|
|
1668
|
-
__param(0, Inject(NAVIGATION_CONFIG)),
|
|
1669
|
-
__metadata("design:paramtypes", [Object])
|
|
1670
|
-
], NavigationService);
|
|
1623
|
+
handleTab() {
|
|
1624
|
+
this.focusButton();
|
|
1625
|
+
this.blurWrapper(false);
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
ListButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", 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 });
|
|
1629
|
+
ListButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ListButton, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
1630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListButton, decorators: [{
|
|
1631
|
+
type: Component,
|
|
1632
|
+
args: [{
|
|
1633
|
+
template: ''
|
|
1634
|
+
}]
|
|
1635
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; } });
|
|
1671
1636
|
|
|
1672
|
-
|
|
1637
|
+
/* eslint-disable no-access-missing-member */
|
|
1638
|
+
const NAVIGATION_SETTINGS$2 = {
|
|
1673
1639
|
useLeftRightArrows: true
|
|
1674
1640
|
};
|
|
1675
|
-
const
|
|
1676
|
-
const NAVIGATION_SETTINGS_PROVIDER = {
|
|
1641
|
+
const NAVIGATION_SETTINGS_PROVIDER$2 = {
|
|
1677
1642
|
provide: NAVIGATION_CONFIG,
|
|
1678
|
-
useValue:
|
|
1643
|
+
useValue: NAVIGATION_SETTINGS$2
|
|
1679
1644
|
};
|
|
1680
1645
|
/**
|
|
1681
1646
|
* Represents the Kendo UI SplitButton component for Angular.
|
|
@@ -1718,12 +1683,11 @@ const NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
1718
1683
|
* }
|
|
1719
1684
|
* ```
|
|
1720
1685
|
*/
|
|
1721
|
-
|
|
1686
|
+
class SplitButtonComponent extends ListButton {
|
|
1722
1687
|
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
1723
1688
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
1724
1689
|
this.popupService = popupService;
|
|
1725
1690
|
this.elRef = elRef;
|
|
1726
|
-
this.localization = localization;
|
|
1727
1691
|
/**
|
|
1728
1692
|
* Sets the text of the SplitButton.
|
|
1729
1693
|
*/
|
|
@@ -1817,11 +1781,11 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1817
1781
|
/**
|
|
1818
1782
|
* Fires each time the SplitButton gets focused.
|
|
1819
1783
|
*/
|
|
1820
|
-
this.onFocus = new EventEmitter(); //
|
|
1784
|
+
this.onFocus = new EventEmitter(); //eslint-disable-line no-output-rename
|
|
1821
1785
|
/**
|
|
1822
1786
|
* Fires each time the SplitButton gets blurred.
|
|
1823
1787
|
*/
|
|
1824
|
-
this.onBlur = new EventEmitter(); //
|
|
1788
|
+
this.onBlur = new EventEmitter(); //eslint-disable-line no-output-rename
|
|
1825
1789
|
/**
|
|
1826
1790
|
* Fires each time the popup is about to open.
|
|
1827
1791
|
* This event is preventable. If you cancel the event, the popup will remain closed.
|
|
@@ -1943,8 +1907,7 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1943
1907
|
* @hidden
|
|
1944
1908
|
*/
|
|
1945
1909
|
get ariaLabel() {
|
|
1946
|
-
|
|
1947
|
-
return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
|
|
1910
|
+
return `${this.buttonText} splitbutton`;
|
|
1948
1911
|
}
|
|
1949
1912
|
/**
|
|
1950
1913
|
* @hidden
|
|
@@ -2166,176 +2129,94 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2166
2129
|
this.popupRef = null;
|
|
2167
2130
|
}
|
|
2168
2131
|
}
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
]
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
]
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
]
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
]
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
]
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
]
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
]
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
],
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
__decorate([
|
|
2254
|
-
ContentChild(ButtonItemTemplateDirective, { static: false }),
|
|
2255
|
-
__metadata("design:type", ButtonItemTemplateDirective)
|
|
2256
|
-
], SplitButtonComponent.prototype, "itemTemplate", void 0);
|
|
2257
|
-
__decorate([
|
|
2258
|
-
ViewChild('button', { static: true }),
|
|
2259
|
-
__metadata("design:type", ElementRef)
|
|
2260
|
-
], SplitButtonComponent.prototype, "button", void 0);
|
|
2261
|
-
__decorate([
|
|
2262
|
-
ViewChild('arrowButton', { static: true, read: ElementRef }),
|
|
2263
|
-
__metadata("design:type", ElementRef)
|
|
2264
|
-
], SplitButtonComponent.prototype, "arrowButton", void 0);
|
|
2265
|
-
__decorate([
|
|
2266
|
-
ViewChild('popupTemplate', { static: true }),
|
|
2267
|
-
__metadata("design:type", TemplateRef)
|
|
2268
|
-
], SplitButtonComponent.prototype, "popupTemplate", void 0);
|
|
2269
|
-
__decorate([
|
|
2270
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
2271
|
-
__metadata("design:type", ViewContainerRef)
|
|
2272
|
-
], SplitButtonComponent.prototype, "containerRef", void 0);
|
|
2273
|
-
__decorate([
|
|
2274
|
-
HostBinding('class.k-state-focused'),
|
|
2275
|
-
__metadata("design:type", Boolean),
|
|
2276
|
-
__metadata("design:paramtypes", [Boolean])
|
|
2277
|
-
], SplitButtonComponent.prototype, "isFocused", null);
|
|
2278
|
-
__decorate([
|
|
2279
|
-
HostBinding('class.k-flat'),
|
|
2280
|
-
__metadata("design:type", Boolean),
|
|
2281
|
-
__metadata("design:paramtypes", [])
|
|
2282
|
-
], SplitButtonComponent.prototype, "isFlat", null);
|
|
2283
|
-
__decorate([
|
|
2284
|
-
HostBinding('class.k-outline'),
|
|
2285
|
-
__metadata("design:type", Boolean),
|
|
2286
|
-
__metadata("design:paramtypes", [])
|
|
2287
|
-
], SplitButtonComponent.prototype, "isOutline", null);
|
|
2288
|
-
__decorate([
|
|
2289
|
-
HostBinding('class.k-split-button'),
|
|
2290
|
-
HostBinding('class.k-button-group'),
|
|
2291
|
-
__metadata("design:type", Boolean),
|
|
2292
|
-
__metadata("design:paramtypes", [])
|
|
2293
|
-
], SplitButtonComponent.prototype, "widgetClasses", null);
|
|
2294
|
-
__decorate([
|
|
2295
|
-
HostBinding('attr.dir'),
|
|
2296
|
-
__metadata("design:type", String),
|
|
2297
|
-
__metadata("design:paramtypes", [])
|
|
2298
|
-
], SplitButtonComponent.prototype, "dir", null);
|
|
2299
|
-
__decorate([
|
|
2300
|
-
HostListener('keydown', ['$event']),
|
|
2301
|
-
__metadata("design:type", Function),
|
|
2302
|
-
__metadata("design:paramtypes", [Object]),
|
|
2303
|
-
__metadata("design:returntype", void 0)
|
|
2304
|
-
], SplitButtonComponent.prototype, "keydown", null);
|
|
2305
|
-
__decorate([
|
|
2306
|
-
HostListener('keypress', ['$event']),
|
|
2307
|
-
__metadata("design:type", Function),
|
|
2308
|
-
__metadata("design:paramtypes", [Object]),
|
|
2309
|
-
__metadata("design:returntype", void 0)
|
|
2310
|
-
], SplitButtonComponent.prototype, "keypress", null);
|
|
2311
|
-
__decorate([
|
|
2312
|
-
HostListener('keyup', ['$event']),
|
|
2313
|
-
__metadata("design:type", Function),
|
|
2314
|
-
__metadata("design:paramtypes", [Object]),
|
|
2315
|
-
__metadata("design:returntype", void 0)
|
|
2316
|
-
], SplitButtonComponent.prototype, "keyup", null);
|
|
2317
|
-
SplitButtonComponent = __decorate([
|
|
2318
|
-
Component({
|
|
2319
|
-
exportAs: 'kendoSplitButton',
|
|
2320
|
-
providers: [
|
|
2321
|
-
FocusService,
|
|
2322
|
-
NavigationService,
|
|
2323
|
-
NAVIGATION_SETTINGS_PROVIDER,
|
|
2324
|
-
LocalizationService,
|
|
2325
|
-
{
|
|
2326
|
-
provide: L10N_PREFIX,
|
|
2327
|
-
useValue: 'kendo.splitbutton'
|
|
2328
|
-
}
|
|
2329
|
-
],
|
|
2330
|
-
selector: 'kendo-splitbutton',
|
|
2331
|
-
template: `
|
|
2332
|
-
<ng-container kendoSplitButtonLocalizedMessages
|
|
2333
|
-
i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
|
|
2334
|
-
splitButtonLabel="{{ '{buttonText} splitbutton' }}">
|
|
2335
|
-
</ng-container>
|
|
2132
|
+
}
|
|
2133
|
+
SplitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", 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 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2134
|
+
SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: { text: "text", icon: "icon", iconClass: "iconClass", type: "type", imageUrl: "imageUrl", look: "look", 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-state-focused": "this.isFocused", "class.k-flat": "this.isFlat", "class.k-outline": "this.isOutline", "class.k-split-button": "this.widgetClasses", "class.k-button-group": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2135
|
+
FocusService,
|
|
2136
|
+
NavigationService,
|
|
2137
|
+
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
2138
|
+
LocalizationService,
|
|
2139
|
+
{
|
|
2140
|
+
provide: L10N_PREFIX,
|
|
2141
|
+
useValue: 'kendo.splitbutton'
|
|
2142
|
+
}
|
|
2143
|
+
], 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: `
|
|
2144
|
+
<button
|
|
2145
|
+
kendoButton
|
|
2146
|
+
#button
|
|
2147
|
+
role="listbox"
|
|
2148
|
+
[type]="type"
|
|
2149
|
+
[look]="look"
|
|
2150
|
+
[tabindex]="componentTabIndex"
|
|
2151
|
+
[disabled]="disabled"
|
|
2152
|
+
[icon]="icon"
|
|
2153
|
+
[class.k-state-active]="active"
|
|
2154
|
+
[iconClass]="iconClass"
|
|
2155
|
+
[imageUrl]="imageUrl"
|
|
2156
|
+
[ngClass]="buttonClass"
|
|
2157
|
+
(focus)="onButtonFocus()"
|
|
2158
|
+
(click)="onButtonClick()"
|
|
2159
|
+
(blur)="onButtonBlur()"
|
|
2160
|
+
(mousedown)="toggleButtonActiveState(true)"
|
|
2161
|
+
(mouseup)="toggleButtonActiveState(false)"
|
|
2162
|
+
[attr.aria-disabled]="disabled"
|
|
2163
|
+
[attr.aria-expanded]="openState"
|
|
2164
|
+
[attr.aria-haspopup]="true"
|
|
2165
|
+
[attr.aria-owns]="listId"
|
|
2166
|
+
[attr.aria-label]="ariaLabel"
|
|
2167
|
+
>
|
|
2168
|
+
{{ text }}<ng-content></ng-content>
|
|
2169
|
+
</button>
|
|
2170
|
+
<button
|
|
2171
|
+
kendoButton
|
|
2172
|
+
#arrowButton
|
|
2173
|
+
type="button"
|
|
2174
|
+
[class.k-state-active]="activeArrow"
|
|
2175
|
+
[disabled]="disabled"
|
|
2176
|
+
[icon]="arrowButtonIcon"
|
|
2177
|
+
[look]="look"
|
|
2178
|
+
[tabindex]="-1"
|
|
2179
|
+
[ngClass]="arrowButtonClass"
|
|
2180
|
+
(click)="onArrowButtonClick()"
|
|
2181
|
+
(mousedown)="toggleArrowButtonActiveState(true)"
|
|
2182
|
+
(mouseup)="toggleArrowButtonActiveState(false)"
|
|
2183
|
+
></button>
|
|
2184
|
+
<ng-template #popupTemplate>
|
|
2185
|
+
<kendo-button-list
|
|
2186
|
+
[id]="listId"
|
|
2187
|
+
[data]="data"
|
|
2188
|
+
[textField]="textField"
|
|
2189
|
+
[itemTemplate]="itemTemplate"
|
|
2190
|
+
(onItemClick)="onItemClick($event)"
|
|
2191
|
+
(keydown)="keyDownHandler($event)"
|
|
2192
|
+
(keypress)="keyPressHandler($event)"
|
|
2193
|
+
(keyup)="keyUpHandler($event)"
|
|
2194
|
+
[attr.dir]="dir"
|
|
2195
|
+
>
|
|
2196
|
+
</kendo-button-list>
|
|
2197
|
+
</ng-template>
|
|
2198
|
+
<ng-container #container></ng-container>
|
|
2199
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "primary", "look", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "role"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
2201
|
+
type: Component,
|
|
2202
|
+
args: [{
|
|
2203
|
+
exportAs: 'kendoSplitButton',
|
|
2204
|
+
providers: [
|
|
2205
|
+
FocusService,
|
|
2206
|
+
NavigationService,
|
|
2207
|
+
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
2208
|
+
LocalizationService,
|
|
2209
|
+
{
|
|
2210
|
+
provide: L10N_PREFIX,
|
|
2211
|
+
useValue: 'kendo.splitbutton'
|
|
2212
|
+
}
|
|
2213
|
+
],
|
|
2214
|
+
selector: 'kendo-splitbutton',
|
|
2215
|
+
template: `
|
|
2336
2216
|
<button
|
|
2337
2217
|
kendoButton
|
|
2338
2218
|
#button
|
|
2219
|
+
role="listbox"
|
|
2339
2220
|
[type]="type"
|
|
2340
2221
|
[look]="look"
|
|
2341
2222
|
[tabindex]="componentTabIndex"
|
|
@@ -2388,77 +2269,92 @@ SplitButtonComponent = __decorate([
|
|
|
2388
2269
|
</ng-template>
|
|
2389
2270
|
<ng-container #container></ng-container>
|
|
2390
2271
|
`
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
],
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
],
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
}
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
{
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2272
|
+
}]
|
|
2273
|
+
}], 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: { text: [{
|
|
2274
|
+
type: Input
|
|
2275
|
+
}], icon: [{
|
|
2276
|
+
type: Input
|
|
2277
|
+
}], iconClass: [{
|
|
2278
|
+
type: Input
|
|
2279
|
+
}], type: [{
|
|
2280
|
+
type: Input
|
|
2281
|
+
}], imageUrl: [{
|
|
2282
|
+
type: Input
|
|
2283
|
+
}], look: [{
|
|
2284
|
+
type: Input
|
|
2285
|
+
}], disabled: [{
|
|
2286
|
+
type: Input
|
|
2287
|
+
}], popupSettings: [{
|
|
2288
|
+
type: Input
|
|
2289
|
+
}], tabIndex: [{
|
|
2290
|
+
type: Input
|
|
2291
|
+
}], textField: [{
|
|
2292
|
+
type: Input
|
|
2293
|
+
}], data: [{
|
|
2294
|
+
type: Input
|
|
2295
|
+
}], buttonClass: [{
|
|
2296
|
+
type: Input
|
|
2297
|
+
}], arrowButtonClass: [{
|
|
2298
|
+
type: Input
|
|
2299
|
+
}], arrowButtonIcon: [{
|
|
2300
|
+
type: Input
|
|
2301
|
+
}], buttonClick: [{
|
|
2302
|
+
type: Output
|
|
2303
|
+
}], itemClick: [{
|
|
2304
|
+
type: Output
|
|
2305
|
+
}], onFocus: [{
|
|
2306
|
+
type: Output,
|
|
2307
|
+
args: ['focus']
|
|
2308
|
+
}], onBlur: [{
|
|
2309
|
+
type: Output,
|
|
2310
|
+
args: ['blur']
|
|
2311
|
+
}], open: [{
|
|
2312
|
+
type: Output
|
|
2313
|
+
}], close: [{
|
|
2314
|
+
type: Output
|
|
2315
|
+
}], itemTemplate: [{
|
|
2316
|
+
type: ContentChild,
|
|
2317
|
+
args: [ButtonItemTemplateDirective, { static: false }]
|
|
2318
|
+
}], button: [{
|
|
2319
|
+
type: ViewChild,
|
|
2320
|
+
args: ['button', { static: true }]
|
|
2321
|
+
}], arrowButton: [{
|
|
2322
|
+
type: ViewChild,
|
|
2323
|
+
args: ['arrowButton', { static: true, read: ElementRef }]
|
|
2324
|
+
}], popupTemplate: [{
|
|
2325
|
+
type: ViewChild,
|
|
2326
|
+
args: ['popupTemplate', { static: true }]
|
|
2327
|
+
}], containerRef: [{
|
|
2328
|
+
type: ViewChild,
|
|
2329
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
2330
|
+
}], isFocused: [{
|
|
2331
|
+
type: HostBinding,
|
|
2332
|
+
args: ['class.k-state-focused']
|
|
2333
|
+
}], isFlat: [{
|
|
2334
|
+
type: HostBinding,
|
|
2335
|
+
args: ['class.k-flat']
|
|
2336
|
+
}], isOutline: [{
|
|
2337
|
+
type: HostBinding,
|
|
2338
|
+
args: ['class.k-outline']
|
|
2339
|
+
}], widgetClasses: [{
|
|
2340
|
+
type: HostBinding,
|
|
2341
|
+
args: ['class.k-split-button']
|
|
2342
|
+
}, {
|
|
2343
|
+
type: HostBinding,
|
|
2344
|
+
args: ['class.k-button-group']
|
|
2345
|
+
}], dir: [{
|
|
2346
|
+
type: HostBinding,
|
|
2347
|
+
args: ['attr.dir']
|
|
2348
|
+
}], keydown: [{
|
|
2349
|
+
type: HostListener,
|
|
2350
|
+
args: ['keydown', ['$event']]
|
|
2351
|
+
}], keypress: [{
|
|
2352
|
+
type: HostListener,
|
|
2353
|
+
args: ['keypress', ['$event']]
|
|
2354
|
+
}], keyup: [{
|
|
2355
|
+
type: HostListener,
|
|
2356
|
+
args: ['keyup', ['$event']]
|
|
2357
|
+
}] } });
|
|
2462
2358
|
|
|
2463
2359
|
/**
|
|
2464
2360
|
* @hidden
|
|
@@ -2468,23 +2364,27 @@ SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = __de
|
|
|
2468
2364
|
* The package exports:
|
|
2469
2365
|
* - `SplitButtonComponent`—The SplitButtonComponent component class.
|
|
2470
2366
|
*/
|
|
2471
|
-
|
|
2472
|
-
}
|
|
2473
|
-
SplitButtonModule =
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
],
|
|
2367
|
+
class SplitButtonModule {
|
|
2368
|
+
}
|
|
2369
|
+
SplitButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SplitButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2370
|
+
SplitButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SplitButtonModule, declarations: [SplitButtonComponent], imports: [CommonModule, PopupModule, ButtonModule, ListModule], exports: [SplitButtonComponent, ListModule] });
|
|
2371
|
+
SplitButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SplitButtonModule, imports: [[CommonModule, PopupModule, ButtonModule, ListModule], ListModule] });
|
|
2372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SplitButtonModule, decorators: [{
|
|
2373
|
+
type: NgModule,
|
|
2374
|
+
args: [{
|
|
2375
|
+
declarations: [SplitButtonComponent],
|
|
2376
|
+
exports: [SplitButtonComponent, ListModule],
|
|
2377
|
+
imports: [CommonModule, PopupModule, ButtonModule, ListModule]
|
|
2378
|
+
}]
|
|
2379
|
+
}] });
|
|
2480
2380
|
|
|
2381
|
+
/* eslint-disable no-access-missing-member */
|
|
2481
2382
|
const NAVIGATION_SETTINGS$1 = {
|
|
2482
2383
|
useLeftRightArrows: true
|
|
2483
2384
|
};
|
|
2484
|
-
const ɵ0$1 = NAVIGATION_SETTINGS$1;
|
|
2485
2385
|
const NAVIGATION_SETTINGS_PROVIDER$1 = {
|
|
2486
2386
|
provide: NAVIGATION_CONFIG,
|
|
2487
|
-
useValue:
|
|
2387
|
+
useValue: NAVIGATION_SETTINGS$1
|
|
2488
2388
|
};
|
|
2489
2389
|
/**
|
|
2490
2390
|
* Represents the Kendo UI DropDownButton component for Angular.
|
|
@@ -2514,7 +2414,7 @@ const NAVIGATION_SETTINGS_PROVIDER$1 = {
|
|
|
2514
2414
|
* }
|
|
2515
2415
|
* ```
|
|
2516
2416
|
*/
|
|
2517
|
-
|
|
2417
|
+
class DropDownButtonComponent extends ListButton {
|
|
2518
2418
|
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
2519
2419
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
2520
2420
|
this.popupService = popupService;
|
|
@@ -2564,11 +2464,11 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
2564
2464
|
/**
|
|
2565
2465
|
* Fires each time the DropDownButton gets focused.
|
|
2566
2466
|
*/
|
|
2567
|
-
this.onFocus = new EventEmitter(); //
|
|
2467
|
+
this.onFocus = new EventEmitter(); //eslint-disable-line no-output-rename
|
|
2568
2468
|
/**
|
|
2569
2469
|
* Fires each time the DropDownButton gets blurred.
|
|
2570
2470
|
*/
|
|
2571
|
-
this.onBlur = new EventEmitter(); //
|
|
2471
|
+
this.onBlur = new EventEmitter(); //eslint-disable-line no-output-rename
|
|
2572
2472
|
this.listId = guid();
|
|
2573
2473
|
this._itemClick = this.itemClick;
|
|
2574
2474
|
this._blur = this.onBlur;
|
|
@@ -2876,164 +2776,73 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
2876
2776
|
this.popupRef = null;
|
|
2877
2777
|
}
|
|
2878
2778
|
}
|
|
2879
|
-
}
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
]
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
]
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
]
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
]
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
], DropDownButtonComponent.prototype, "onBlur", void 0);
|
|
2947
|
-
__decorate([
|
|
2948
|
-
HostBinding('class.k-state-focused'),
|
|
2949
|
-
__metadata("design:type", Boolean),
|
|
2950
|
-
__metadata("design:paramtypes", [])
|
|
2951
|
-
], DropDownButtonComponent.prototype, "focused", null);
|
|
2952
|
-
__decorate([
|
|
2953
|
-
HostBinding('class.k-flat'),
|
|
2954
|
-
__metadata("design:type", Boolean),
|
|
2955
|
-
__metadata("design:paramtypes", [])
|
|
2956
|
-
], DropDownButtonComponent.prototype, "isFlat", null);
|
|
2957
|
-
__decorate([
|
|
2958
|
-
HostBinding('class.k-outline'),
|
|
2959
|
-
__metadata("design:type", Boolean),
|
|
2960
|
-
__metadata("design:paramtypes", [])
|
|
2961
|
-
], DropDownButtonComponent.prototype, "isOutline", null);
|
|
2962
|
-
__decorate([
|
|
2963
|
-
HostBinding('class.k-dropdown-button'),
|
|
2964
|
-
__metadata("design:type", Boolean),
|
|
2965
|
-
__metadata("design:paramtypes", [])
|
|
2966
|
-
], DropDownButtonComponent.prototype, "widgetClasses", null);
|
|
2967
|
-
__decorate([
|
|
2968
|
-
HostBinding('attr.dir'),
|
|
2969
|
-
__metadata("design:type", String),
|
|
2970
|
-
__metadata("design:paramtypes", [])
|
|
2971
|
-
], DropDownButtonComponent.prototype, "dir", null);
|
|
2972
|
-
__decorate([
|
|
2973
|
-
ContentChild(ButtonItemTemplateDirective, { static: false }),
|
|
2974
|
-
__metadata("design:type", ButtonItemTemplateDirective)
|
|
2975
|
-
], DropDownButtonComponent.prototype, "itemTemplate", void 0);
|
|
2976
|
-
__decorate([
|
|
2977
|
-
ViewChild('button', { static: true }),
|
|
2978
|
-
__metadata("design:type", ElementRef)
|
|
2979
|
-
], DropDownButtonComponent.prototype, "button", void 0);
|
|
2980
|
-
__decorate([
|
|
2981
|
-
ViewChild('buttonList', { static: false }),
|
|
2982
|
-
__metadata("design:type", ListComponent)
|
|
2983
|
-
], DropDownButtonComponent.prototype, "buttonList", void 0);
|
|
2984
|
-
__decorate([
|
|
2985
|
-
ViewChild('popupTemplate', { static: true }),
|
|
2986
|
-
__metadata("design:type", TemplateRef)
|
|
2987
|
-
], DropDownButtonComponent.prototype, "popupTemplate", void 0);
|
|
2988
|
-
__decorate([
|
|
2989
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
2990
|
-
__metadata("design:type", ViewContainerRef)
|
|
2991
|
-
], DropDownButtonComponent.prototype, "container", void 0);
|
|
2992
|
-
__decorate([
|
|
2993
|
-
HostListener('keydown', ['$event']),
|
|
2994
|
-
__metadata("design:type", Function),
|
|
2995
|
-
__metadata("design:paramtypes", [Object]),
|
|
2996
|
-
__metadata("design:returntype", void 0)
|
|
2997
|
-
], DropDownButtonComponent.prototype, "keydown", null);
|
|
2998
|
-
__decorate([
|
|
2999
|
-
HostListener('keypress', ['$event']),
|
|
3000
|
-
__metadata("design:type", Function),
|
|
3001
|
-
__metadata("design:paramtypes", [Object]),
|
|
3002
|
-
__metadata("design:returntype", void 0)
|
|
3003
|
-
], DropDownButtonComponent.prototype, "keypress", null);
|
|
3004
|
-
__decorate([
|
|
3005
|
-
HostListener('keyup', ['$event']),
|
|
3006
|
-
__metadata("design:type", Function),
|
|
3007
|
-
__metadata("design:paramtypes", [Object]),
|
|
3008
|
-
__metadata("design:returntype", void 0)
|
|
3009
|
-
], DropDownButtonComponent.prototype, "keyup", null);
|
|
3010
|
-
__decorate([
|
|
3011
|
-
HostListener('mousedown', ['$event']),
|
|
3012
|
-
__metadata("design:type", Function),
|
|
3013
|
-
__metadata("design:paramtypes", [Object]),
|
|
3014
|
-
__metadata("design:returntype", void 0)
|
|
3015
|
-
], DropDownButtonComponent.prototype, "mousedown", null);
|
|
3016
|
-
__decorate([
|
|
3017
|
-
HostListener('mouseup', ['$event']),
|
|
3018
|
-
__metadata("design:type", Function),
|
|
3019
|
-
__metadata("design:paramtypes", [Object]),
|
|
3020
|
-
__metadata("design:returntype", void 0)
|
|
3021
|
-
], DropDownButtonComponent.prototype, "mouseup", null);
|
|
3022
|
-
DropDownButtonComponent = __decorate([
|
|
3023
|
-
Component({
|
|
3024
|
-
exportAs: 'kendoDropDownButton',
|
|
3025
|
-
providers: [
|
|
3026
|
-
FocusService,
|
|
3027
|
-
NavigationService,
|
|
3028
|
-
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
3029
|
-
LocalizationService,
|
|
3030
|
-
{
|
|
3031
|
-
provide: L10N_PREFIX,
|
|
3032
|
-
useValue: 'kendo.dropdownbutton'
|
|
3033
|
-
}
|
|
3034
|
-
],
|
|
3035
|
-
selector: 'kendo-dropdownbutton',
|
|
3036
|
-
template: `
|
|
2779
|
+
}
|
|
2780
|
+
DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", 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 });
|
|
2781
|
+
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: { icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", textField: "textField", disabled: "disabled", data: "data", primary: "primary", look: "look", 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-state-focused": "this.focused", "class.k-flat": "this.isFlat", "class.k-outline": "this.isOutline", "class.k-dropdown-button": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2782
|
+
FocusService,
|
|
2783
|
+
NavigationService,
|
|
2784
|
+
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
2785
|
+
LocalizationService,
|
|
2786
|
+
{
|
|
2787
|
+
provide: L10N_PREFIX,
|
|
2788
|
+
useValue: 'kendo.dropdownbutton'
|
|
2789
|
+
}
|
|
2790
|
+
], 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: `
|
|
2791
|
+
<button kendoButton #button
|
|
2792
|
+
role="menu"
|
|
2793
|
+
type="button"
|
|
2794
|
+
[tabindex]="componentTabIndex"
|
|
2795
|
+
[class.k-state-active]="active"
|
|
2796
|
+
[disabled]="disabled"
|
|
2797
|
+
[icon]="icon"
|
|
2798
|
+
[iconClass]="iconClass"
|
|
2799
|
+
[imageUrl]="imageUrl"
|
|
2800
|
+
[ngClass]="buttonClass"
|
|
2801
|
+
(click)="openPopup()"
|
|
2802
|
+
(focus)="handleFocus()"
|
|
2803
|
+
(blur)="onButtonBlur()"
|
|
2804
|
+
[attr.aria-disabled]="disabled"
|
|
2805
|
+
[attr.aria-expanded]="openState"
|
|
2806
|
+
[attr.aria-haspopup]="true"
|
|
2807
|
+
[attr.aria-owns]="listId"
|
|
2808
|
+
[look]="look"
|
|
2809
|
+
[primary]="primary"
|
|
2810
|
+
>
|
|
2811
|
+
<ng-content></ng-content>
|
|
2812
|
+
</button>
|
|
2813
|
+
<ng-template #popupTemplate>
|
|
2814
|
+
<kendo-button-list
|
|
2815
|
+
#buttonList
|
|
2816
|
+
[id]="listId"
|
|
2817
|
+
[data]="data"
|
|
2818
|
+
[textField]="textField"
|
|
2819
|
+
[itemTemplate]="itemTemplate"
|
|
2820
|
+
(onItemClick)="onItemClick($event)"
|
|
2821
|
+
(keydown)="keyDownHandler($event)"
|
|
2822
|
+
(keypress)="keyPressHandler($event)"
|
|
2823
|
+
(keyup)="keyUpHandler($event)"
|
|
2824
|
+
[attr.dir]="dir"
|
|
2825
|
+
>
|
|
2826
|
+
</kendo-button-list>
|
|
2827
|
+
</ng-template>
|
|
2828
|
+
<ng-container #container></ng-container>
|
|
2829
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "primary", "look", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "role"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
2831
|
+
type: Component,
|
|
2832
|
+
args: [{
|
|
2833
|
+
exportAs: 'kendoDropDownButton',
|
|
2834
|
+
providers: [
|
|
2835
|
+
FocusService,
|
|
2836
|
+
NavigationService,
|
|
2837
|
+
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
2838
|
+
LocalizationService,
|
|
2839
|
+
{
|
|
2840
|
+
provide: L10N_PREFIX,
|
|
2841
|
+
useValue: 'kendo.dropdownbutton'
|
|
2842
|
+
}
|
|
2843
|
+
],
|
|
2844
|
+
selector: 'kendo-dropdownbutton',
|
|
2845
|
+
template: `
|
|
3037
2846
|
<button kendoButton #button
|
|
3038
2847
|
role="menu"
|
|
3039
2848
|
type="button"
|
|
@@ -3073,16 +2882,87 @@ DropDownButtonComponent = __decorate([
|
|
|
3073
2882
|
</ng-template>
|
|
3074
2883
|
<ng-container #container></ng-container>
|
|
3075
2884
|
`
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
],
|
|
2885
|
+
}]
|
|
2886
|
+
}], 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: [{
|
|
2887
|
+
type: Input
|
|
2888
|
+
}], iconClass: [{
|
|
2889
|
+
type: Input
|
|
2890
|
+
}], imageUrl: [{
|
|
2891
|
+
type: Input
|
|
2892
|
+
}], popupSettings: [{
|
|
2893
|
+
type: Input
|
|
2894
|
+
}], textField: [{
|
|
2895
|
+
type: Input
|
|
2896
|
+
}], disabled: [{
|
|
2897
|
+
type: Input
|
|
2898
|
+
}], data: [{
|
|
2899
|
+
type: Input
|
|
2900
|
+
}], primary: [{
|
|
2901
|
+
type: Input
|
|
2902
|
+
}], look: [{
|
|
2903
|
+
type: Input
|
|
2904
|
+
}], buttonClass: [{
|
|
2905
|
+
type: Input
|
|
2906
|
+
}], tabIndex: [{
|
|
2907
|
+
type: Input
|
|
2908
|
+
}], itemClick: [{
|
|
2909
|
+
type: Output
|
|
2910
|
+
}], open: [{
|
|
2911
|
+
type: Output
|
|
2912
|
+
}], close: [{
|
|
2913
|
+
type: Output
|
|
2914
|
+
}], onFocus: [{
|
|
2915
|
+
type: Output,
|
|
2916
|
+
args: ['focus']
|
|
2917
|
+
}], onBlur: [{
|
|
2918
|
+
type: Output,
|
|
2919
|
+
args: ['blur']
|
|
2920
|
+
}], focused: [{
|
|
2921
|
+
type: HostBinding,
|
|
2922
|
+
args: ['class.k-state-focused']
|
|
2923
|
+
}], isFlat: [{
|
|
2924
|
+
type: HostBinding,
|
|
2925
|
+
args: ['class.k-flat']
|
|
2926
|
+
}], isOutline: [{
|
|
2927
|
+
type: HostBinding,
|
|
2928
|
+
args: ['class.k-outline']
|
|
2929
|
+
}], widgetClasses: [{
|
|
2930
|
+
type: HostBinding,
|
|
2931
|
+
args: ['class.k-dropdown-button']
|
|
2932
|
+
}], dir: [{
|
|
2933
|
+
type: HostBinding,
|
|
2934
|
+
args: ['attr.dir']
|
|
2935
|
+
}], itemTemplate: [{
|
|
2936
|
+
type: ContentChild,
|
|
2937
|
+
args: [ButtonItemTemplateDirective, { static: false }]
|
|
2938
|
+
}], button: [{
|
|
2939
|
+
type: ViewChild,
|
|
2940
|
+
args: ['button', { static: true }]
|
|
2941
|
+
}], buttonList: [{
|
|
2942
|
+
type: ViewChild,
|
|
2943
|
+
args: ['buttonList', { static: false }]
|
|
2944
|
+
}], popupTemplate: [{
|
|
2945
|
+
type: ViewChild,
|
|
2946
|
+
args: ['popupTemplate', { static: true }]
|
|
2947
|
+
}], container: [{
|
|
2948
|
+
type: ViewChild,
|
|
2949
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
2950
|
+
}], keydown: [{
|
|
2951
|
+
type: HostListener,
|
|
2952
|
+
args: ['keydown', ['$event']]
|
|
2953
|
+
}], keypress: [{
|
|
2954
|
+
type: HostListener,
|
|
2955
|
+
args: ['keypress', ['$event']]
|
|
2956
|
+
}], keyup: [{
|
|
2957
|
+
type: HostListener,
|
|
2958
|
+
args: ['keyup', ['$event']]
|
|
2959
|
+
}], mousedown: [{
|
|
2960
|
+
type: HostListener,
|
|
2961
|
+
args: ['mousedown', ['$event']]
|
|
2962
|
+
}], mouseup: [{
|
|
2963
|
+
type: HostListener,
|
|
2964
|
+
args: ['mouseup', ['$event']]
|
|
2965
|
+
}] } });
|
|
3086
2966
|
|
|
3087
2967
|
/**
|
|
3088
2968
|
* @hidden
|
|
@@ -3092,20 +2972,24 @@ DropDownButtonComponent = __decorate([
|
|
|
3092
2972
|
* The package exports:
|
|
3093
2973
|
* - `DropDownButtonComponent`—The DropDownButtonComponent component class.
|
|
3094
2974
|
*/
|
|
3095
|
-
|
|
3096
|
-
}
|
|
3097
|
-
DropDownButtonModule =
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
],
|
|
2975
|
+
class DropDownButtonModule {
|
|
2976
|
+
}
|
|
2977
|
+
DropDownButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DropDownButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2978
|
+
DropDownButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DropDownButtonModule, declarations: [DropDownButtonComponent], imports: [CommonModule, PopupModule, ListModule, ButtonModule], exports: [DropDownButtonComponent, ListModule] });
|
|
2979
|
+
DropDownButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DropDownButtonModule, imports: [[CommonModule, PopupModule, ListModule, ButtonModule], ListModule] });
|
|
2980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DropDownButtonModule, decorators: [{
|
|
2981
|
+
type: NgModule,
|
|
2982
|
+
args: [{
|
|
2983
|
+
declarations: [DropDownButtonComponent],
|
|
2984
|
+
exports: [DropDownButtonComponent, ListModule],
|
|
2985
|
+
imports: [CommonModule, PopupModule, ListModule, ButtonModule]
|
|
2986
|
+
}]
|
|
2987
|
+
}] });
|
|
3104
2988
|
|
|
3105
2989
|
/**
|
|
3106
2990
|
* Displays a Chip that represents an input, attribute or an action.
|
|
3107
2991
|
*/
|
|
3108
|
-
|
|
2992
|
+
class ChipComponent {
|
|
3109
2993
|
constructor(element, renderer, ngZone, localizationService) {
|
|
3110
2994
|
this.element = element;
|
|
3111
2995
|
this.renderer = renderer;
|
|
@@ -3115,12 +2999,10 @@ let ChipComponent = class ChipComponent {
|
|
|
3115
2999
|
* Changes the visual appearance by using alternative styling options.
|
|
3116
3000
|
*
|
|
3117
3001
|
* The available values are:
|
|
3118
|
-
* * `
|
|
3119
|
-
* * `
|
|
3120
|
-
* * `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
|
|
3121
|
-
* * `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
|
|
3002
|
+
* * `filled`
|
|
3003
|
+
* * `outlined`
|
|
3122
3004
|
*/
|
|
3123
|
-
this.look = '
|
|
3005
|
+
this.look = 'filled';
|
|
3124
3006
|
/**
|
|
3125
3007
|
* Specifies the selected state of the Chip.
|
|
3126
3008
|
*/
|
|
@@ -3163,10 +3045,10 @@ let ChipComponent = class ChipComponent {
|
|
|
3163
3045
|
return this.selected;
|
|
3164
3046
|
}
|
|
3165
3047
|
get outlineClass() {
|
|
3166
|
-
return this.look === '
|
|
3048
|
+
return this.look === 'outlined';
|
|
3167
3049
|
}
|
|
3168
|
-
get
|
|
3169
|
-
return this.look === '
|
|
3050
|
+
get filledClass() {
|
|
3051
|
+
return this.look === 'filled';
|
|
3170
3052
|
}
|
|
3171
3053
|
get hasIconClass() {
|
|
3172
3054
|
return this.icon || this.iconClass ? true : false;
|
|
@@ -3270,10 +3152,10 @@ let ChipComponent = class ChipComponent {
|
|
|
3270
3152
|
attachElementEventHandlers(chip) {
|
|
3271
3153
|
this.ngZone.runOutsideAngular(() => {
|
|
3272
3154
|
const focusListener = this.renderer.listen(chip, 'focus', () => {
|
|
3273
|
-
this.renderer.addClass(chip, 'k-
|
|
3155
|
+
this.renderer.addClass(chip, 'k-chip-focused');
|
|
3274
3156
|
});
|
|
3275
3157
|
const blurListener = this.renderer.listen(chip, 'blur', () => {
|
|
3276
|
-
this.renderer.removeClass(chip, 'k-
|
|
3158
|
+
this.renderer.removeClass(chip, 'k-chip-focused');
|
|
3277
3159
|
});
|
|
3278
3160
|
const contentClickListener = this.renderer.listen(chip, 'click', (e) => {
|
|
3279
3161
|
const isRemoveClicked = closest(e.target, '.k-remove-icon');
|
|
@@ -3290,107 +3172,48 @@ let ChipComponent = class ChipComponent {
|
|
|
3290
3172
|
};
|
|
3291
3173
|
});
|
|
3292
3174
|
}
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
],
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
]
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
Output(),
|
|
3336
|
-
__metadata("design:type", EventEmitter)
|
|
3337
|
-
], ChipComponent.prototype, "remove", void 0);
|
|
3338
|
-
__decorate([
|
|
3339
|
-
Output(),
|
|
3340
|
-
__metadata("design:type", EventEmitter)
|
|
3341
|
-
], ChipComponent.prototype, "contentClick", void 0);
|
|
3342
|
-
__decorate([
|
|
3343
|
-
HostBinding('attr.tabindex'),
|
|
3344
|
-
__metadata("design:type", Number)
|
|
3345
|
-
], ChipComponent.prototype, "tabIndex", void 0);
|
|
3346
|
-
__decorate([
|
|
3347
|
-
HostBinding('attr.aria-checked'),
|
|
3348
|
-
__metadata("design:type", Boolean),
|
|
3349
|
-
__metadata("design:paramtypes", [])
|
|
3350
|
-
], ChipComponent.prototype, "ariaChecked", null);
|
|
3351
|
-
__decorate([
|
|
3352
|
-
HostBinding('class.k-chip'),
|
|
3353
|
-
__metadata("design:type", Boolean)
|
|
3354
|
-
], ChipComponent.prototype, "hostClass", void 0);
|
|
3355
|
-
__decorate([
|
|
3356
|
-
HostBinding('class.k-chip-outline'),
|
|
3357
|
-
__metadata("design:type", Boolean),
|
|
3358
|
-
__metadata("design:paramtypes", [])
|
|
3359
|
-
], ChipComponent.prototype, "outlineClass", null);
|
|
3360
|
-
__decorate([
|
|
3361
|
-
HostBinding('class.k-chip-solid'),
|
|
3362
|
-
__metadata("design:type", Boolean),
|
|
3363
|
-
__metadata("design:paramtypes", [])
|
|
3364
|
-
], ChipComponent.prototype, "solidClass", null);
|
|
3365
|
-
__decorate([
|
|
3366
|
-
HostBinding('class.k-chip-has-icon'),
|
|
3367
|
-
__metadata("design:type", Boolean),
|
|
3368
|
-
__metadata("design:paramtypes", [])
|
|
3369
|
-
], ChipComponent.prototype, "hasIconClass", null);
|
|
3370
|
-
__decorate([
|
|
3371
|
-
HostBinding('attr.aria-disabled'),
|
|
3372
|
-
HostBinding('class.k-disabled'),
|
|
3373
|
-
__metadata("design:type", Boolean),
|
|
3374
|
-
__metadata("design:paramtypes", [])
|
|
3375
|
-
], ChipComponent.prototype, "disabledClass", null);
|
|
3376
|
-
__decorate([
|
|
3377
|
-
HostBinding('class.k-selected'),
|
|
3378
|
-
__metadata("design:type", Boolean),
|
|
3379
|
-
__metadata("design:paramtypes", [])
|
|
3380
|
-
], ChipComponent.prototype, "selectedClass", null);
|
|
3381
|
-
__decorate([
|
|
3382
|
-
HostBinding('class.k-focus'),
|
|
3383
|
-
__metadata("design:type", Boolean),
|
|
3384
|
-
__metadata("design:paramtypes", [])
|
|
3385
|
-
], ChipComponent.prototype, "focusedClass", null);
|
|
3386
|
-
__decorate([
|
|
3387
|
-
HostBinding('attr.dir'),
|
|
3388
|
-
__metadata("design:type", String)
|
|
3389
|
-
], ChipComponent.prototype, "direction", void 0);
|
|
3390
|
-
ChipComponent = __decorate([
|
|
3391
|
-
Component({
|
|
3392
|
-
selector: 'kendo-chip',
|
|
3393
|
-
template: `
|
|
3175
|
+
}
|
|
3176
|
+
ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3177
|
+
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ChipComponent, selector: "kendo-chip", inputs: { look: "look", label: "label", icon: "icon", iconClass: "iconClass", selected: "selected", selectedIcon: "selectedIcon", removable: "removable", removeIcon: "removeIcon", type: "type", disabled: "disabled" }, outputs: { remove: "remove", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "attr.aria-checked": "this.ariaChecked", "class.k-chip": "this.hostClass", "class.k-chip-outline": "this.outlineClass", "class.k-chip-filled": "this.filledClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-chip-disabled": "this.disabledClass", "class.k-chip-selected": "this.selectedClass", "class.k-chip-focused": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
|
|
3178
|
+
LocalizationService,
|
|
3179
|
+
{
|
|
3180
|
+
provide: L10N_PREFIX,
|
|
3181
|
+
useValue: 'kendo.chip'
|
|
3182
|
+
}
|
|
3183
|
+
], ngImport: i0, template: `
|
|
3184
|
+
<span class="k-selected-icon-wrapper">
|
|
3185
|
+
<span *ngIf="selected"
|
|
3186
|
+
class="k-selected-icon"
|
|
3187
|
+
[ngClass]="selectedIconClasses"
|
|
3188
|
+
>
|
|
3189
|
+
</span>
|
|
3190
|
+
</span>
|
|
3191
|
+
|
|
3192
|
+
<span *ngIf="icon || iconClass"
|
|
3193
|
+
class="k-chip-icon"
|
|
3194
|
+
[ngClass]="iconClasses"
|
|
3195
|
+
>
|
|
3196
|
+
</span>
|
|
3197
|
+
|
|
3198
|
+
<span class="k-chip-content">
|
|
3199
|
+
<span class="k-chip-label" *ngIf="label">
|
|
3200
|
+
{{ label }}
|
|
3201
|
+
</span>
|
|
3202
|
+
<ng-content *ngIf="!label"></ng-content>
|
|
3203
|
+
</span>
|
|
3204
|
+
|
|
3205
|
+
<span *ngIf="removable"
|
|
3206
|
+
class="k-remove-icon"
|
|
3207
|
+
(click)="onRemoveClick($event)"
|
|
3208
|
+
>
|
|
3209
|
+
<span [ngClass]="removeIconClasses"></span>
|
|
3210
|
+
</span>
|
|
3211
|
+
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipComponent, decorators: [{
|
|
3213
|
+
type: Component,
|
|
3214
|
+
args: [{
|
|
3215
|
+
selector: 'kendo-chip',
|
|
3216
|
+
template: `
|
|
3394
3217
|
<span class="k-selected-icon-wrapper">
|
|
3395
3218
|
<span *ngIf="selected"
|
|
3396
3219
|
class="k-selected-icon"
|
|
@@ -3419,21 +3242,74 @@ ChipComponent = __decorate([
|
|
|
3419
3242
|
<span [ngClass]="removeIconClasses"></span>
|
|
3420
3243
|
</span>
|
|
3421
3244
|
`,
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
],
|
|
3245
|
+
providers: [
|
|
3246
|
+
LocalizationService,
|
|
3247
|
+
{
|
|
3248
|
+
provide: L10N_PREFIX,
|
|
3249
|
+
useValue: 'kendo.chip'
|
|
3250
|
+
}
|
|
3251
|
+
]
|
|
3252
|
+
}]
|
|
3253
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { look: [{
|
|
3254
|
+
type: Input
|
|
3255
|
+
}], label: [{
|
|
3256
|
+
type: Input
|
|
3257
|
+
}], icon: [{
|
|
3258
|
+
type: Input
|
|
3259
|
+
}], iconClass: [{
|
|
3260
|
+
type: Input
|
|
3261
|
+
}], selected: [{
|
|
3262
|
+
type: Input
|
|
3263
|
+
}], selectedIcon: [{
|
|
3264
|
+
type: Input
|
|
3265
|
+
}], removable: [{
|
|
3266
|
+
type: Input
|
|
3267
|
+
}], removeIcon: [{
|
|
3268
|
+
type: Input
|
|
3269
|
+
}], type: [{
|
|
3270
|
+
type: Input
|
|
3271
|
+
}], disabled: [{
|
|
3272
|
+
type: Input
|
|
3273
|
+
}], remove: [{
|
|
3274
|
+
type: Output
|
|
3275
|
+
}], contentClick: [{
|
|
3276
|
+
type: Output
|
|
3277
|
+
}], tabIndex: [{
|
|
3278
|
+
type: HostBinding,
|
|
3279
|
+
args: ['attr.tabindex']
|
|
3280
|
+
}], ariaChecked: [{
|
|
3281
|
+
type: HostBinding,
|
|
3282
|
+
args: ['attr.aria-checked']
|
|
3283
|
+
}], hostClass: [{
|
|
3284
|
+
type: HostBinding,
|
|
3285
|
+
args: ['class.k-chip']
|
|
3286
|
+
}], outlineClass: [{
|
|
3287
|
+
type: HostBinding,
|
|
3288
|
+
args: ['class.k-chip-outline']
|
|
3289
|
+
}], filledClass: [{
|
|
3290
|
+
type: HostBinding,
|
|
3291
|
+
args: ['class.k-chip-filled']
|
|
3292
|
+
}], hasIconClass: [{
|
|
3293
|
+
type: HostBinding,
|
|
3294
|
+
args: ['class.k-chip-has-icon']
|
|
3295
|
+
}], disabledClass: [{
|
|
3296
|
+
type: HostBinding,
|
|
3297
|
+
args: ['attr.aria-disabled']
|
|
3298
|
+
}, {
|
|
3299
|
+
type: HostBinding,
|
|
3300
|
+
args: ['class.k-chip-disabled']
|
|
3301
|
+
}], selectedClass: [{
|
|
3302
|
+
type: HostBinding,
|
|
3303
|
+
args: ['class.k-chip-selected']
|
|
3304
|
+
}], focusedClass: [{
|
|
3305
|
+
type: HostBinding,
|
|
3306
|
+
args: ['class.k-chip-focused']
|
|
3307
|
+
}], direction: [{
|
|
3308
|
+
type: HostBinding,
|
|
3309
|
+
args: ['attr.dir']
|
|
3310
|
+
}] } });
|
|
3435
3311
|
|
|
3436
|
-
|
|
3312
|
+
class ChipListComponent {
|
|
3437
3313
|
constructor(localizationService, renderer) {
|
|
3438
3314
|
this.localizationService = localizationService;
|
|
3439
3315
|
this.renderer = renderer;
|
|
@@ -3514,74 +3390,67 @@ let ChipListComponent = class ChipListComponent {
|
|
|
3514
3390
|
}
|
|
3515
3391
|
});
|
|
3516
3392
|
}
|
|
3517
|
-
}
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
],
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
], ChipListComponent.prototype, "selectedChange", void 0);
|
|
3534
|
-
__decorate([
|
|
3535
|
-
Output(),
|
|
3536
|
-
__metadata("design:type", EventEmitter)
|
|
3537
|
-
], ChipListComponent.prototype, "remove", void 0);
|
|
3538
|
-
__decorate([
|
|
3539
|
-
ContentChildren(ChipComponent),
|
|
3540
|
-
__metadata("design:type", QueryList)
|
|
3541
|
-
], ChipListComponent.prototype, "chips", void 0);
|
|
3542
|
-
__decorate([
|
|
3543
|
-
HostBinding('class.k-selection-single'),
|
|
3544
|
-
__metadata("design:type", Boolean),
|
|
3545
|
-
__metadata("design:paramtypes", [])
|
|
3546
|
-
], ChipListComponent.prototype, "single", null);
|
|
3547
|
-
__decorate([
|
|
3548
|
-
HostBinding('class.k-selection-multiple'),
|
|
3549
|
-
__metadata("design:type", Boolean),
|
|
3550
|
-
__metadata("design:paramtypes", [])
|
|
3551
|
-
], ChipListComponent.prototype, "multiple", null);
|
|
3552
|
-
__decorate([
|
|
3553
|
-
HostBinding('attr.role'),
|
|
3554
|
-
__metadata("design:type", String)
|
|
3555
|
-
], ChipListComponent.prototype, "role", void 0);
|
|
3556
|
-
__decorate([
|
|
3557
|
-
HostListener('click', ['$event']),
|
|
3558
|
-
__metadata("design:type", Function),
|
|
3559
|
-
__metadata("design:paramtypes", [Object]),
|
|
3560
|
-
__metadata("design:returntype", void 0)
|
|
3561
|
-
], ChipListComponent.prototype, "onClick", null);
|
|
3562
|
-
ChipListComponent = __decorate([
|
|
3563
|
-
Component({
|
|
3564
|
-
selector: 'kendo-chip-list, kendo-chiplist',
|
|
3565
|
-
template: `
|
|
3393
|
+
}
|
|
3394
|
+
ChipListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipListComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3395
|
+
ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ChipListComponent, selector: "kendo-chip-list, kendo-chiplist", inputs: { selection: "selection" }, 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: [
|
|
3396
|
+
LocalizationService,
|
|
3397
|
+
{
|
|
3398
|
+
provide: L10N_PREFIX,
|
|
3399
|
+
useValue: 'kendo.chip-list'
|
|
3400
|
+
}
|
|
3401
|
+
], queries: [{ propertyName: "chips", predicate: ChipComponent }], ngImport: i0, template: `
|
|
3402
|
+
<ng-content></ng-content>
|
|
3403
|
+
`, isInline: true });
|
|
3404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipListComponent, decorators: [{
|
|
3405
|
+
type: Component,
|
|
3406
|
+
args: [{
|
|
3407
|
+
selector: 'kendo-chip-list, kendo-chiplist',
|
|
3408
|
+
template: `
|
|
3566
3409
|
<ng-content></ng-content>
|
|
3567
3410
|
`,
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3411
|
+
providers: [
|
|
3412
|
+
LocalizationService,
|
|
3413
|
+
{
|
|
3414
|
+
provide: L10N_PREFIX,
|
|
3415
|
+
useValue: 'kendo.chip-list'
|
|
3416
|
+
}
|
|
3417
|
+
]
|
|
3418
|
+
}]
|
|
3419
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { hostClass: [{
|
|
3420
|
+
type: HostBinding,
|
|
3421
|
+
args: ['class.k-chip-list']
|
|
3422
|
+
}], direction: [{
|
|
3423
|
+
type: HostBinding,
|
|
3424
|
+
args: ['attr.dir']
|
|
3425
|
+
}], selection: [{
|
|
3426
|
+
type: Input
|
|
3427
|
+
}], selectedChange: [{
|
|
3428
|
+
type: Output
|
|
3429
|
+
}], remove: [{
|
|
3430
|
+
type: Output
|
|
3431
|
+
}], chips: [{
|
|
3432
|
+
type: ContentChildren,
|
|
3433
|
+
args: [ChipComponent]
|
|
3434
|
+
}], single: [{
|
|
3435
|
+
type: HostBinding,
|
|
3436
|
+
args: ['class.k-selection-single']
|
|
3437
|
+
}], multiple: [{
|
|
3438
|
+
type: HostBinding,
|
|
3439
|
+
args: ['class.k-selection-multiple']
|
|
3440
|
+
}], role: [{
|
|
3441
|
+
type: HostBinding,
|
|
3442
|
+
args: ['attr.role']
|
|
3443
|
+
}], onClick: [{
|
|
3444
|
+
type: HostListener,
|
|
3445
|
+
args: ['click', ['$event']]
|
|
3446
|
+
}] } });
|
|
3578
3447
|
|
|
3579
|
-
const exportedModules = [
|
|
3448
|
+
const exportedModules$1 = [
|
|
3580
3449
|
ChipComponent,
|
|
3581
3450
|
ChipListComponent
|
|
3582
3451
|
];
|
|
3583
|
-
const declarations = [
|
|
3584
|
-
...exportedModules
|
|
3452
|
+
const declarations$1 = [
|
|
3453
|
+
...exportedModules$1
|
|
3585
3454
|
];
|
|
3586
3455
|
/**
|
|
3587
3456
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
@@ -3611,15 +3480,21 @@ const declarations = [
|
|
|
3611
3480
|
*
|
|
3612
3481
|
* ```
|
|
3613
3482
|
*/
|
|
3614
|
-
|
|
3615
|
-
}
|
|
3616
|
-
ChipModule =
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3483
|
+
class ChipModule {
|
|
3484
|
+
}
|
|
3485
|
+
ChipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3486
|
+
ChipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipModule, declarations: [ChipComponent,
|
|
3487
|
+
ChipListComponent], imports: [CommonModule], exports: [ChipComponent,
|
|
3488
|
+
ChipListComponent] });
|
|
3489
|
+
ChipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipModule, imports: [[CommonModule]] });
|
|
3490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChipModule, decorators: [{
|
|
3491
|
+
type: NgModule,
|
|
3492
|
+
args: [{
|
|
3493
|
+
declarations: [declarations$1],
|
|
3494
|
+
exports: [exportedModules$1],
|
|
3495
|
+
imports: [CommonModule]
|
|
3496
|
+
}]
|
|
3497
|
+
}] });
|
|
3623
3498
|
|
|
3624
3499
|
/**
|
|
3625
3500
|
* @hidden
|
|
@@ -3685,51 +3560,254 @@ function closeAnimation(animationSettings) {
|
|
|
3685
3560
|
]);
|
|
3686
3561
|
}
|
|
3687
3562
|
|
|
3688
|
-
/**
|
|
3689
|
-
* Represents a template that defines the content of the whole dial item.
|
|
3690
|
-
* To define the template, nest an `<ng-template>` tag
|
|
3691
|
-
* with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
3692
|
-
* ([see example]({% slug templates_floatingactionbutton %}#toc-dial-item-template)).
|
|
3693
|
-
*/
|
|
3694
|
-
|
|
3695
|
-
constructor(templateRef) {
|
|
3696
|
-
this.templateRef = templateRef;
|
|
3697
|
-
}
|
|
3698
|
-
}
|
|
3699
|
-
DialItemTemplateDirective =
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
]
|
|
3563
|
+
/**
|
|
3564
|
+
* Represents a template that defines the content of the whole dial item.
|
|
3565
|
+
* To define the template, nest an `<ng-template>` tag
|
|
3566
|
+
* with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
3567
|
+
* ([see example]({% slug templates_floatingactionbutton %}#toc-dial-item-template)).
|
|
3568
|
+
*/
|
|
3569
|
+
class DialItemTemplateDirective {
|
|
3570
|
+
constructor(templateRef) {
|
|
3571
|
+
this.templateRef = templateRef;
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
DialItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DialItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3575
|
+
DialItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: DialItemTemplateDirective, selector: "[kendoDialItemTemplate]", ngImport: i0 });
|
|
3576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DialItemTemplateDirective, decorators: [{
|
|
3577
|
+
type: Directive,
|
|
3578
|
+
args: [{
|
|
3579
|
+
selector: '[kendoDialItemTemplate]'
|
|
3580
|
+
}]
|
|
3581
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
3582
|
+
type: Optional
|
|
3583
|
+
}] }]; } });
|
|
3584
|
+
|
|
3585
|
+
/**
|
|
3586
|
+
* Represents a template that defines the content of the FloatingActionButton.
|
|
3587
|
+
* To define the template, nest an `<ng-template>` tag
|
|
3588
|
+
* with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
3589
|
+
* ([see example]({% slug templates_floatingactionbutton %}#toc-floatingactionbutton-template)).
|
|
3590
|
+
*/
|
|
3591
|
+
class FloatingActionButtonTemplateDirective {
|
|
3592
|
+
constructor(templateRef) {
|
|
3593
|
+
this.templateRef = templateRef;
|
|
3594
|
+
}
|
|
3595
|
+
}
|
|
3596
|
+
FloatingActionButtonTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3597
|
+
FloatingActionButtonTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: FloatingActionButtonTemplateDirective, selector: "[kendoFloatingActionButtonTemplate]", ngImport: i0 });
|
|
3598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonTemplateDirective, decorators: [{
|
|
3599
|
+
type: Directive,
|
|
3600
|
+
args: [{
|
|
3601
|
+
selector: '[kendoFloatingActionButtonTemplate]'
|
|
3602
|
+
}]
|
|
3603
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
3604
|
+
type: Optional
|
|
3605
|
+
}] }]; } });
|
|
3606
|
+
|
|
3607
|
+
/**
|
|
3608
|
+
* @hidden
|
|
3609
|
+
*/
|
|
3610
|
+
class DialItemComponent {
|
|
3611
|
+
constructor(element, renderer, localisationService) {
|
|
3612
|
+
this.element = element;
|
|
3613
|
+
this.renderer = renderer;
|
|
3614
|
+
this.localisationService = localisationService;
|
|
3615
|
+
this.hostClass = true;
|
|
3616
|
+
this.role = 'menuitem';
|
|
3617
|
+
}
|
|
3618
|
+
get disabledClass() {
|
|
3619
|
+
return this.item.disabled;
|
|
3620
|
+
}
|
|
3621
|
+
get title() {
|
|
3622
|
+
const label = this.item.label;
|
|
3623
|
+
return label ? label : this.itemTitle;
|
|
3624
|
+
}
|
|
3625
|
+
get indexAttr() {
|
|
3626
|
+
return this.index;
|
|
3627
|
+
}
|
|
3628
|
+
get iconClasses() {
|
|
3629
|
+
const classes = [];
|
|
3630
|
+
if (this.item.iconClass) {
|
|
3631
|
+
classes.push(`${this.item.iconClass}`);
|
|
3632
|
+
}
|
|
3633
|
+
if (this.item.icon) {
|
|
3634
|
+
classes.push(`k-fab-item-icon k-icon k-i-${this.item.icon}`);
|
|
3635
|
+
}
|
|
3636
|
+
return classes;
|
|
3637
|
+
}
|
|
3638
|
+
get itemTitle() {
|
|
3639
|
+
const icon = this.item.icon;
|
|
3640
|
+
const itemTitle = this.item.itemTitle;
|
|
3641
|
+
return (icon && itemTitle) ? itemTitle : icon;
|
|
3642
|
+
}
|
|
3643
|
+
ngAfterViewInit() {
|
|
3644
|
+
const element = this.element.nativeElement;
|
|
3645
|
+
const rtl = this.localisationService.rtl;
|
|
3646
|
+
const hAlign = this.align.horizontal;
|
|
3647
|
+
this.renderer.addClass(element, this.getTextDirectionClass(rtl, hAlign));
|
|
3648
|
+
}
|
|
3649
|
+
getTextDirectionClass(rtl, hAlign) {
|
|
3650
|
+
const dir = rtl ? 'rtl' : 'ltr';
|
|
3651
|
+
const align = hAlign === 'end' ? 'end' : 'start';
|
|
3652
|
+
const directions = {
|
|
3653
|
+
rtl: { end: 'k-text-left', start: 'k-text-right' },
|
|
3654
|
+
ltr: { start: 'k-text-left', end: 'k-text-right' }
|
|
3655
|
+
};
|
|
3656
|
+
return directions[dir][align];
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
DialItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DialItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3660
|
+
DialItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", 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-state-disabled": "this.disabledClass", "attr.title": "this.title", "attr.aria-label": "this.title", "attr.data-fab-item-index": "this.indexAttr" } }, ngImport: i0, template: `
|
|
3661
|
+
<ng-template *ngIf="dialItemTemplate"
|
|
3662
|
+
[ngTemplateOutlet]="dialItemTemplate"
|
|
3663
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }"
|
|
3664
|
+
>
|
|
3665
|
+
</ng-template>
|
|
3666
|
+
|
|
3667
|
+
<ng-container *ngIf="!dialItemTemplate">
|
|
3668
|
+
<span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span>
|
|
3669
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span>
|
|
3670
|
+
</ng-container>
|
|
3671
|
+
`, 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"] }] });
|
|
3672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DialItemComponent, decorators: [{
|
|
3673
|
+
type: Component,
|
|
3674
|
+
args: [{
|
|
3675
|
+
selector: '[kendoDialItem]',
|
|
3676
|
+
template: `
|
|
3677
|
+
<ng-template *ngIf="dialItemTemplate"
|
|
3678
|
+
[ngTemplateOutlet]="dialItemTemplate"
|
|
3679
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }"
|
|
3680
|
+
>
|
|
3681
|
+
</ng-template>
|
|
3682
|
+
|
|
3683
|
+
<ng-container *ngIf="!dialItemTemplate">
|
|
3684
|
+
<span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span>
|
|
3685
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span>
|
|
3686
|
+
</ng-container>
|
|
3687
|
+
`
|
|
3688
|
+
}]
|
|
3689
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClass: [{
|
|
3690
|
+
type: HostBinding,
|
|
3691
|
+
args: ['class.k-fab-item']
|
|
3692
|
+
}], role: [{
|
|
3693
|
+
type: HostBinding,
|
|
3694
|
+
args: ['attr.role']
|
|
3695
|
+
}], disabledClass: [{
|
|
3696
|
+
type: HostBinding,
|
|
3697
|
+
args: ['attr.aria-disabled']
|
|
3698
|
+
}, {
|
|
3699
|
+
type: HostBinding,
|
|
3700
|
+
args: ['class.k-state-disabled']
|
|
3701
|
+
}], title: [{
|
|
3702
|
+
type: HostBinding,
|
|
3703
|
+
args: ['attr.title']
|
|
3704
|
+
}, {
|
|
3705
|
+
type: HostBinding,
|
|
3706
|
+
args: ['attr.aria-label']
|
|
3707
|
+
}], indexAttr: [{
|
|
3708
|
+
type: HostBinding,
|
|
3709
|
+
args: ['attr.data-fab-item-index']
|
|
3710
|
+
}], cssClass: [{
|
|
3711
|
+
type: Input
|
|
3712
|
+
}], cssStyle: [{
|
|
3713
|
+
type: Input
|
|
3714
|
+
}], isFocused: [{
|
|
3715
|
+
type: Input
|
|
3716
|
+
}], index: [{
|
|
3717
|
+
type: Input
|
|
3718
|
+
}], item: [{
|
|
3719
|
+
type: Input
|
|
3720
|
+
}], dialItemTemplate: [{
|
|
3721
|
+
type: Input
|
|
3722
|
+
}], align: [{
|
|
3723
|
+
type: Input
|
|
3724
|
+
}] } });
|
|
3706
3725
|
|
|
3707
3726
|
/**
|
|
3708
|
-
*
|
|
3709
|
-
* To define the template, nest an `<ng-template>` tag
|
|
3710
|
-
* with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
3711
|
-
* ([see example]({% slug templates_floatingactionbutton %}#toc-floatingactionbutton-template)).
|
|
3727
|
+
* @hidden
|
|
3712
3728
|
*/
|
|
3713
|
-
|
|
3714
|
-
constructor(
|
|
3715
|
-
this.
|
|
3729
|
+
class DialListComponent {
|
|
3730
|
+
constructor(focusService, cdr) {
|
|
3731
|
+
this.focusService = focusService;
|
|
3732
|
+
this.cdr = cdr;
|
|
3733
|
+
this.hostClass = true;
|
|
3734
|
+
this.subscriptions = new Subscription();
|
|
3735
|
+
this.subscriptions.add(this.focusService.onFocus.subscribe(() => this.cdr.detectChanges()));
|
|
3716
3736
|
}
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3737
|
+
get bottomClass() {
|
|
3738
|
+
return this.align.vertical === 'top' || this.align.vertical === 'middle';
|
|
3739
|
+
}
|
|
3740
|
+
get topClass() {
|
|
3741
|
+
return this.align.vertical === 'bottom';
|
|
3742
|
+
}
|
|
3743
|
+
isFocused(index) {
|
|
3744
|
+
return this.focusService.isFocused(index);
|
|
3745
|
+
}
|
|
3746
|
+
ngOnDestroy() {
|
|
3747
|
+
this.subscriptions.unsubscribe();
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
DialListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DialListComponent, deps: [{ token: FocusService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3751
|
+
DialListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", 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: `
|
|
3752
|
+
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
3753
|
+
<li
|
|
3754
|
+
kendoButtonFocusable
|
|
3755
|
+
kendoDialItem
|
|
3756
|
+
[item]="dialItems[idx]"
|
|
3757
|
+
[index]="idx"
|
|
3758
|
+
[dialItemTemplate]="dialItemTemplate"
|
|
3759
|
+
[isFocused]="isFocused(idx)"
|
|
3760
|
+
[ngClass]='item.cssClass'
|
|
3761
|
+
[ngStyle]='item.cssStyle'
|
|
3762
|
+
[align]="align"
|
|
3763
|
+
>
|
|
3764
|
+
</li>
|
|
3765
|
+
</ng-container>
|
|
3766
|
+
`, 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"] }] });
|
|
3767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DialListComponent, decorators: [{
|
|
3768
|
+
type: Component,
|
|
3769
|
+
args: [{
|
|
3770
|
+
selector: '[kendoDialList]',
|
|
3771
|
+
template: `
|
|
3772
|
+
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
3773
|
+
<li
|
|
3774
|
+
kendoButtonFocusable
|
|
3775
|
+
kendoDialItem
|
|
3776
|
+
[item]="dialItems[idx]"
|
|
3777
|
+
[index]="idx"
|
|
3778
|
+
[dialItemTemplate]="dialItemTemplate"
|
|
3779
|
+
[isFocused]="isFocused(idx)"
|
|
3780
|
+
[ngClass]='item.cssClass'
|
|
3781
|
+
[ngStyle]='item.cssStyle'
|
|
3782
|
+
[align]="align"
|
|
3783
|
+
>
|
|
3784
|
+
</li>
|
|
3785
|
+
</ng-container>
|
|
3786
|
+
`
|
|
3787
|
+
}]
|
|
3788
|
+
}], ctorParameters: function () { return [{ type: FocusService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
3789
|
+
type: HostBinding,
|
|
3790
|
+
args: ['class.k-fab-items']
|
|
3791
|
+
}], bottomClass: [{
|
|
3792
|
+
type: HostBinding,
|
|
3793
|
+
args: ['class.k-fab-items-bottom']
|
|
3794
|
+
}], topClass: [{
|
|
3795
|
+
type: HostBinding,
|
|
3796
|
+
args: ['class.k-fab-items-top']
|
|
3797
|
+
}], dialItems: [{
|
|
3798
|
+
type: Input
|
|
3799
|
+
}], dialItemTemplate: [{
|
|
3800
|
+
type: Input
|
|
3801
|
+
}], align: [{
|
|
3802
|
+
type: Input
|
|
3803
|
+
}] } });
|
|
3725
3804
|
|
|
3726
|
-
const NAVIGATION_SETTINGS
|
|
3805
|
+
const NAVIGATION_SETTINGS = {
|
|
3727
3806
|
useLeftRightArrows: false
|
|
3728
3807
|
};
|
|
3729
|
-
const
|
|
3730
|
-
const NAVIGATION_SETTINGS_PROVIDER$2 = {
|
|
3808
|
+
const NAVIGATION_SETTINGS_PROVIDER = {
|
|
3731
3809
|
provide: NAVIGATION_CONFIG,
|
|
3732
|
-
useValue:
|
|
3810
|
+
useValue: NAVIGATION_SETTINGS
|
|
3733
3811
|
};
|
|
3734
3812
|
const SIZE_CLASSES = {
|
|
3735
3813
|
small: 'k-fab-sm',
|
|
@@ -3752,7 +3830,7 @@ const DEFAULT_OFFSET = '16px';
|
|
|
3752
3830
|
* Used to specify the primary or the most common action in an application.
|
|
3753
3831
|
*
|
|
3754
3832
|
*/
|
|
3755
|
-
|
|
3833
|
+
class FloatingActionButtonComponent {
|
|
3756
3834
|
constructor(renderer, element, focusService, navigationService, ngZone, popupService, builder, localizationService) {
|
|
3757
3835
|
this.renderer = renderer;
|
|
3758
3836
|
this.element = element;
|
|
@@ -4348,137 +4426,18 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
4348
4426
|
}
|
|
4349
4427
|
return DEFAULT_DURATION;
|
|
4350
4428
|
}
|
|
4351
|
-
}
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
HostBinding('attr.dir'),
|
|
4364
|
-
__metadata("design:type", String)
|
|
4365
|
-
], FloatingActionButtonComponent.prototype, "direction", void 0);
|
|
4366
|
-
__decorate([
|
|
4367
|
-
ViewChild('button', { static: true }),
|
|
4368
|
-
__metadata("design:type", ElementRef)
|
|
4369
|
-
], FloatingActionButtonComponent.prototype, "button", void 0);
|
|
4370
|
-
__decorate([
|
|
4371
|
-
ViewChild('popupTemplate', { static: true }),
|
|
4372
|
-
__metadata("design:type", TemplateRef)
|
|
4373
|
-
], FloatingActionButtonComponent.prototype, "popupTemplate", void 0);
|
|
4374
|
-
__decorate([
|
|
4375
|
-
ContentChild(DialItemTemplateDirective, { static: true }),
|
|
4376
|
-
__metadata("design:type", DialItemTemplateDirective)
|
|
4377
|
-
], FloatingActionButtonComponent.prototype, "dialItemTemplate", void 0);
|
|
4378
|
-
__decorate([
|
|
4379
|
-
ContentChild(FloatingActionButtonTemplateDirective, { static: true }),
|
|
4380
|
-
__metadata("design:type", FloatingActionButtonTemplateDirective)
|
|
4381
|
-
], FloatingActionButtonComponent.prototype, "fabTemplate", void 0);
|
|
4382
|
-
__decorate([
|
|
4383
|
-
Input(),
|
|
4384
|
-
__metadata("design:type", String),
|
|
4385
|
-
__metadata("design:paramtypes", [String])
|
|
4386
|
-
], FloatingActionButtonComponent.prototype, "themeColor", null);
|
|
4387
|
-
__decorate([
|
|
4388
|
-
Input(),
|
|
4389
|
-
__metadata("design:type", String),
|
|
4390
|
-
__metadata("design:paramtypes", [String])
|
|
4391
|
-
], FloatingActionButtonComponent.prototype, "size", null);
|
|
4392
|
-
__decorate([
|
|
4393
|
-
Input(),
|
|
4394
|
-
__metadata("design:type", String),
|
|
4395
|
-
__metadata("design:paramtypes", [String])
|
|
4396
|
-
], FloatingActionButtonComponent.prototype, "shape", null);
|
|
4397
|
-
__decorate([
|
|
4398
|
-
Input(),
|
|
4399
|
-
__metadata("design:type", Boolean),
|
|
4400
|
-
__metadata("design:paramtypes", [Boolean])
|
|
4401
|
-
], FloatingActionButtonComponent.prototype, "disabled", null);
|
|
4402
|
-
__decorate([
|
|
4403
|
-
Input(),
|
|
4404
|
-
__metadata("design:type", Object),
|
|
4405
|
-
__metadata("design:paramtypes", [Object])
|
|
4406
|
-
], FloatingActionButtonComponent.prototype, "align", null);
|
|
4407
|
-
__decorate([
|
|
4408
|
-
Input(),
|
|
4409
|
-
__metadata("design:type", Object),
|
|
4410
|
-
__metadata("design:paramtypes", [Object])
|
|
4411
|
-
], FloatingActionButtonComponent.prototype, "offset", null);
|
|
4412
|
-
__decorate([
|
|
4413
|
-
Input(),
|
|
4414
|
-
__metadata("design:type", String)
|
|
4415
|
-
], FloatingActionButtonComponent.prototype, "positionMode", void 0);
|
|
4416
|
-
__decorate([
|
|
4417
|
-
Input(),
|
|
4418
|
-
__metadata("design:type", String)
|
|
4419
|
-
], FloatingActionButtonComponent.prototype, "icon", void 0);
|
|
4420
|
-
__decorate([
|
|
4421
|
-
Input(),
|
|
4422
|
-
__metadata("design:type", String)
|
|
4423
|
-
], FloatingActionButtonComponent.prototype, "iconClass", void 0);
|
|
4424
|
-
__decorate([
|
|
4425
|
-
Input(),
|
|
4426
|
-
__metadata("design:type", Object)
|
|
4427
|
-
], FloatingActionButtonComponent.prototype, "buttonClass", void 0);
|
|
4428
|
-
__decorate([
|
|
4429
|
-
Input(),
|
|
4430
|
-
__metadata("design:type", Object)
|
|
4431
|
-
], FloatingActionButtonComponent.prototype, "dialClass", void 0);
|
|
4432
|
-
__decorate([
|
|
4433
|
-
Input(),
|
|
4434
|
-
__metadata("design:type", String)
|
|
4435
|
-
], FloatingActionButtonComponent.prototype, "text", void 0);
|
|
4436
|
-
__decorate([
|
|
4437
|
-
Input(),
|
|
4438
|
-
__metadata("design:type", Object)
|
|
4439
|
-
], FloatingActionButtonComponent.prototype, "dialItemAnimation", void 0);
|
|
4440
|
-
__decorate([
|
|
4441
|
-
Input(),
|
|
4442
|
-
__metadata("design:type", Number)
|
|
4443
|
-
], FloatingActionButtonComponent.prototype, "tabIndex", void 0);
|
|
4444
|
-
__decorate([
|
|
4445
|
-
Input(),
|
|
4446
|
-
__metadata("design:type", Array)
|
|
4447
|
-
], FloatingActionButtonComponent.prototype, "dialItems", void 0);
|
|
4448
|
-
__decorate([
|
|
4449
|
-
Output('blur'),
|
|
4450
|
-
__metadata("design:type", EventEmitter)
|
|
4451
|
-
], FloatingActionButtonComponent.prototype, "onBlur", void 0);
|
|
4452
|
-
__decorate([
|
|
4453
|
-
Output('focus'),
|
|
4454
|
-
__metadata("design:type", EventEmitter)
|
|
4455
|
-
], FloatingActionButtonComponent.prototype, "onFocus", void 0);
|
|
4456
|
-
__decorate([
|
|
4457
|
-
Output('dialItemClick'),
|
|
4458
|
-
__metadata("design:type", EventEmitter)
|
|
4459
|
-
], FloatingActionButtonComponent.prototype, "dialItemClick", void 0);
|
|
4460
|
-
__decorate([
|
|
4461
|
-
Output(),
|
|
4462
|
-
__metadata("design:type", EventEmitter)
|
|
4463
|
-
], FloatingActionButtonComponent.prototype, "open", void 0);
|
|
4464
|
-
__decorate([
|
|
4465
|
-
Output(),
|
|
4466
|
-
__metadata("design:type", EventEmitter)
|
|
4467
|
-
], FloatingActionButtonComponent.prototype, "close", void 0);
|
|
4468
|
-
FloatingActionButtonComponent = __decorate([
|
|
4469
|
-
Component({
|
|
4470
|
-
selector: 'kendo-floatingactionbutton',
|
|
4471
|
-
providers: [
|
|
4472
|
-
FocusService,
|
|
4473
|
-
NavigationService,
|
|
4474
|
-
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
4475
|
-
LocalizationService,
|
|
4476
|
-
{
|
|
4477
|
-
provide: L10N_PREFIX,
|
|
4478
|
-
useValue: 'kendo.floatingactionbutton'
|
|
4479
|
-
}
|
|
4480
|
-
],
|
|
4481
|
-
template: `
|
|
4429
|
+
}
|
|
4430
|
+
FloatingActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", 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 });
|
|
4431
|
+
FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: { themeColor: "themeColor", size: "size", shape: "shape", 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: [
|
|
4432
|
+
FocusService,
|
|
4433
|
+
NavigationService,
|
|
4434
|
+
NAVIGATION_SETTINGS_PROVIDER,
|
|
4435
|
+
LocalizationService,
|
|
4436
|
+
{
|
|
4437
|
+
provide: L10N_PREFIX,
|
|
4438
|
+
useValue: 'kendo.floatingactionbutton'
|
|
4439
|
+
}
|
|
4440
|
+
], queries: [{ propertyName: "dialItemTemplate", first: true, predicate: DialItemTemplateDirective, descendants: true, static: true }, { propertyName: "fabTemplate", first: true, predicate: FloatingActionButtonTemplateDirective, descendants: true, static: 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: `
|
|
4482
4441
|
<button
|
|
4483
4442
|
#button
|
|
4484
4443
|
[attr.id]="id"
|
|
@@ -4523,224 +4482,141 @@ FloatingActionButtonComponent = __decorate([
|
|
|
4523
4482
|
>
|
|
4524
4483
|
</ul>
|
|
4525
4484
|
</ng-template>
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4485
|
+
`, 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"] }] });
|
|
4486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonComponent, decorators: [{
|
|
4487
|
+
type: Component,
|
|
4488
|
+
args: [{
|
|
4489
|
+
selector: 'kendo-floatingactionbutton',
|
|
4490
|
+
providers: [
|
|
4491
|
+
FocusService,
|
|
4492
|
+
NavigationService,
|
|
4493
|
+
NAVIGATION_SETTINGS_PROVIDER,
|
|
4494
|
+
LocalizationService,
|
|
4495
|
+
{
|
|
4496
|
+
provide: L10N_PREFIX,
|
|
4497
|
+
useValue: 'kendo.floatingactionbutton'
|
|
4498
|
+
}
|
|
4499
|
+
],
|
|
4500
|
+
template: `
|
|
4501
|
+
<button
|
|
4502
|
+
#button
|
|
4503
|
+
[attr.id]="id"
|
|
4504
|
+
[attr.role]="role"
|
|
4505
|
+
[tabIndex]="componentTabIndex"
|
|
4506
|
+
type="button"
|
|
4507
|
+
[class.k-fab]="true"
|
|
4508
|
+
[class.k-state-disabled]="disabled"
|
|
4509
|
+
[ngClass]="buttonClass"
|
|
4510
|
+
[disabled]="disabled"
|
|
4511
|
+
[attr.aria-disabled]="disabled"
|
|
4512
|
+
[attr.aria-expanded]="ariaExpanded"
|
|
4513
|
+
[attr.aria-haspopup]="ariaHasPopup"
|
|
4514
|
+
(focus)="focusHandler()"
|
|
4515
|
+
(blur)="blurHandler()"
|
|
4516
|
+
[kendoEventsOutsideAngular]="{
|
|
4517
|
+
keydown: keyDownHandler,
|
|
4518
|
+
click: clickHandler
|
|
4519
|
+
}"
|
|
4520
|
+
[scope]="this"
|
|
4521
|
+
>
|
|
4522
|
+
<ng-template *ngIf="fabTemplate"
|
|
4523
|
+
[ngTemplateOutlet]="fabTemplate?.templateRef"
|
|
4524
|
+
>
|
|
4525
|
+
</ng-template>
|
|
4537
4526
|
|
|
4538
|
-
|
|
4539
|
-
*
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
return this.align.vertical === 'top' || this.align.vertical === 'middle';
|
|
4551
|
-
}
|
|
4552
|
-
get topClass() {
|
|
4553
|
-
return this.align.vertical === 'bottom';
|
|
4554
|
-
}
|
|
4555
|
-
isFocused(index) {
|
|
4556
|
-
return this.focusService.isFocused(index);
|
|
4557
|
-
}
|
|
4558
|
-
ngOnDestroy() {
|
|
4559
|
-
this.subscriptions.unsubscribe();
|
|
4560
|
-
}
|
|
4561
|
-
};
|
|
4562
|
-
__decorate([
|
|
4563
|
-
HostBinding('class.k-fab-items'),
|
|
4564
|
-
__metadata("design:type", Boolean)
|
|
4565
|
-
], DialListComponent.prototype, "hostClass", void 0);
|
|
4566
|
-
__decorate([
|
|
4567
|
-
HostBinding('class.k-fab-items-bottom'),
|
|
4568
|
-
__metadata("design:type", Boolean),
|
|
4569
|
-
__metadata("design:paramtypes", [])
|
|
4570
|
-
], DialListComponent.prototype, "bottomClass", null);
|
|
4571
|
-
__decorate([
|
|
4572
|
-
HostBinding('class.k-fab-items-top'),
|
|
4573
|
-
__metadata("design:type", Boolean),
|
|
4574
|
-
__metadata("design:paramtypes", [])
|
|
4575
|
-
], DialListComponent.prototype, "topClass", null);
|
|
4576
|
-
__decorate([
|
|
4577
|
-
Input(),
|
|
4578
|
-
__metadata("design:type", Array)
|
|
4579
|
-
], DialListComponent.prototype, "dialItems", void 0);
|
|
4580
|
-
__decorate([
|
|
4581
|
-
Input(),
|
|
4582
|
-
__metadata("design:type", TemplateRef)
|
|
4583
|
-
], DialListComponent.prototype, "dialItemTemplate", void 0);
|
|
4584
|
-
__decorate([
|
|
4585
|
-
Input(),
|
|
4586
|
-
__metadata("design:type", Object)
|
|
4587
|
-
], DialListComponent.prototype, "align", void 0);
|
|
4588
|
-
DialListComponent = __decorate([
|
|
4589
|
-
Component({
|
|
4590
|
-
selector: '[kendoDialList]',
|
|
4591
|
-
template: `
|
|
4592
|
-
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
4593
|
-
<li
|
|
4594
|
-
kendoButtonFocusable
|
|
4595
|
-
kendoDialItem
|
|
4596
|
-
[item]="dialItems[idx]"
|
|
4597
|
-
[index]="idx"
|
|
4598
|
-
[dialItemTemplate]="dialItemTemplate"
|
|
4599
|
-
[isFocused]="isFocused(idx)"
|
|
4600
|
-
[ngClass]='item.cssClass'
|
|
4601
|
-
[ngStyle]='item.cssStyle'
|
|
4527
|
+
<ng-container *ngIf="!fabTemplate">
|
|
4528
|
+
<span *ngIf="icon || iconClass" [ngClass]="iconClasses"></span>
|
|
4529
|
+
<span *ngIf="text" class="k-fab-text">{{ text }}</span>
|
|
4530
|
+
</ng-container>
|
|
4531
|
+
</button>
|
|
4532
|
+
|
|
4533
|
+
<ng-template #popupTemplate>
|
|
4534
|
+
<ul
|
|
4535
|
+
kendoDialList
|
|
4536
|
+
[ngClass]="dialClass"
|
|
4537
|
+
[dialItems]="dialItems"
|
|
4538
|
+
[dialItemTemplate]='dialItemTemplate?.templateRef'
|
|
4602
4539
|
[align]="align"
|
|
4540
|
+
[attr.aria-labelledby]="id"
|
|
4541
|
+
(click)="onItemClick($event)"
|
|
4603
4542
|
>
|
|
4604
|
-
</
|
|
4605
|
-
</ng-container>
|
|
4606
|
-
`
|
|
4607
|
-
}),
|
|
4608
|
-
__metadata("design:paramtypes", [FocusService, ChangeDetectorRef])
|
|
4609
|
-
], DialListComponent);
|
|
4610
|
-
|
|
4611
|
-
/**
|
|
4612
|
-
* @hidden
|
|
4613
|
-
*/
|
|
4614
|
-
let DialItemComponent = class DialItemComponent {
|
|
4615
|
-
constructor(element, renderer, localisationService) {
|
|
4616
|
-
this.element = element;
|
|
4617
|
-
this.renderer = renderer;
|
|
4618
|
-
this.localisationService = localisationService;
|
|
4619
|
-
this.hostClass = true;
|
|
4620
|
-
this.role = 'menuitem';
|
|
4621
|
-
}
|
|
4622
|
-
get disabledClass() {
|
|
4623
|
-
return this.item.disabled;
|
|
4624
|
-
}
|
|
4625
|
-
get title() {
|
|
4626
|
-
const label = this.item.label;
|
|
4627
|
-
return label ? label : this.itemTitle;
|
|
4628
|
-
}
|
|
4629
|
-
get indexAttr() {
|
|
4630
|
-
return this.index;
|
|
4631
|
-
}
|
|
4632
|
-
get iconClasses() {
|
|
4633
|
-
const classes = [];
|
|
4634
|
-
if (this.item.iconClass) {
|
|
4635
|
-
classes.push(`${this.item.iconClass}`);
|
|
4636
|
-
}
|
|
4637
|
-
if (this.item.icon) {
|
|
4638
|
-
classes.push(`k-fab-item-icon k-icon k-i-${this.item.icon}`);
|
|
4639
|
-
}
|
|
4640
|
-
return classes;
|
|
4641
|
-
}
|
|
4642
|
-
get itemTitle() {
|
|
4643
|
-
const icon = this.item.icon;
|
|
4644
|
-
const itemTitle = this.item.itemTitle;
|
|
4645
|
-
return (icon && itemTitle) ? itemTitle : icon;
|
|
4646
|
-
}
|
|
4647
|
-
ngAfterViewInit() {
|
|
4648
|
-
const element = this.element.nativeElement;
|
|
4649
|
-
const rtl = this.localisationService.rtl;
|
|
4650
|
-
const hAlign = this.align.horizontal;
|
|
4651
|
-
this.renderer.addClass(element, this.getTextDirectionClass(rtl, hAlign));
|
|
4652
|
-
}
|
|
4653
|
-
getTextDirectionClass(rtl, hAlign) {
|
|
4654
|
-
const dir = rtl ? 'rtl' : 'ltr';
|
|
4655
|
-
const align = hAlign === 'end' ? 'end' : 'start';
|
|
4656
|
-
const directions = {
|
|
4657
|
-
rtl: { end: 'k-text-left', start: 'k-text-right' },
|
|
4658
|
-
ltr: { start: 'k-text-left', end: 'k-text-right' }
|
|
4659
|
-
};
|
|
4660
|
-
return directions[dir][align];
|
|
4661
|
-
}
|
|
4662
|
-
};
|
|
4663
|
-
__decorate([
|
|
4664
|
-
HostBinding('class.k-fab-item'),
|
|
4665
|
-
__metadata("design:type", Boolean)
|
|
4666
|
-
], DialItemComponent.prototype, "hostClass", void 0);
|
|
4667
|
-
__decorate([
|
|
4668
|
-
HostBinding('attr.role'),
|
|
4669
|
-
__metadata("design:type", String)
|
|
4670
|
-
], DialItemComponent.prototype, "role", void 0);
|
|
4671
|
-
__decorate([
|
|
4672
|
-
HostBinding('attr.aria-disabled'),
|
|
4673
|
-
HostBinding('class.k-state-disabled'),
|
|
4674
|
-
__metadata("design:type", Boolean),
|
|
4675
|
-
__metadata("design:paramtypes", [])
|
|
4676
|
-
], DialItemComponent.prototype, "disabledClass", null);
|
|
4677
|
-
__decorate([
|
|
4678
|
-
HostBinding('attr.title'),
|
|
4679
|
-
HostBinding('attr.aria-label'),
|
|
4680
|
-
__metadata("design:type", String),
|
|
4681
|
-
__metadata("design:paramtypes", [])
|
|
4682
|
-
], DialItemComponent.prototype, "title", null);
|
|
4683
|
-
__decorate([
|
|
4684
|
-
HostBinding('attr.data-fab-item-index'),
|
|
4685
|
-
__metadata("design:type", String),
|
|
4686
|
-
__metadata("design:paramtypes", [])
|
|
4687
|
-
], DialItemComponent.prototype, "indexAttr", null);
|
|
4688
|
-
__decorate([
|
|
4689
|
-
Input(),
|
|
4690
|
-
__metadata("design:type", Object)
|
|
4691
|
-
], DialItemComponent.prototype, "cssClass", void 0);
|
|
4692
|
-
__decorate([
|
|
4693
|
-
Input(),
|
|
4694
|
-
__metadata("design:type", Object)
|
|
4695
|
-
], DialItemComponent.prototype, "cssStyle", void 0);
|
|
4696
|
-
__decorate([
|
|
4697
|
-
Input(),
|
|
4698
|
-
__metadata("design:type", Boolean)
|
|
4699
|
-
], DialItemComponent.prototype, "isFocused", void 0);
|
|
4700
|
-
__decorate([
|
|
4701
|
-
Input(),
|
|
4702
|
-
__metadata("design:type", Object)
|
|
4703
|
-
], DialItemComponent.prototype, "index", void 0);
|
|
4704
|
-
__decorate([
|
|
4705
|
-
Input(),
|
|
4706
|
-
__metadata("design:type", Object)
|
|
4707
|
-
], DialItemComponent.prototype, "item", void 0);
|
|
4708
|
-
__decorate([
|
|
4709
|
-
Input(),
|
|
4710
|
-
__metadata("design:type", TemplateRef)
|
|
4711
|
-
], DialItemComponent.prototype, "dialItemTemplate", void 0);
|
|
4712
|
-
__decorate([
|
|
4713
|
-
Input(),
|
|
4714
|
-
__metadata("design:type", Object)
|
|
4715
|
-
], DialItemComponent.prototype, "align", void 0);
|
|
4716
|
-
DialItemComponent = __decorate([
|
|
4717
|
-
Component({
|
|
4718
|
-
selector: '[kendoDialItem]',
|
|
4719
|
-
template: `
|
|
4720
|
-
<ng-template *ngIf="dialItemTemplate"
|
|
4721
|
-
[ngTemplateOutlet]="dialItemTemplate"
|
|
4722
|
-
[ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }"
|
|
4723
|
-
>
|
|
4543
|
+
</ul>
|
|
4724
4544
|
</ng-template>
|
|
4725
|
-
|
|
4726
|
-
<ng-container *ngIf="!dialItemTemplate">
|
|
4727
|
-
<span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span>
|
|
4728
|
-
<span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span>
|
|
4729
|
-
</ng-container>
|
|
4730
4545
|
`
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
],
|
|
4546
|
+
}]
|
|
4547
|
+
}], 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: [{
|
|
4548
|
+
type: HostBinding,
|
|
4549
|
+
args: ['class.k-pos-fixed']
|
|
4550
|
+
}], absoluteClass: [{
|
|
4551
|
+
type: HostBinding,
|
|
4552
|
+
args: ['class.k-pos-absolute']
|
|
4553
|
+
}], direction: [{
|
|
4554
|
+
type: HostBinding,
|
|
4555
|
+
args: ['attr.dir']
|
|
4556
|
+
}], button: [{
|
|
4557
|
+
type: ViewChild,
|
|
4558
|
+
args: ['button', { static: true }]
|
|
4559
|
+
}], popupTemplate: [{
|
|
4560
|
+
type: ViewChild,
|
|
4561
|
+
args: ['popupTemplate', { static: true }]
|
|
4562
|
+
}], dialItemTemplate: [{
|
|
4563
|
+
type: ContentChild,
|
|
4564
|
+
args: [DialItemTemplateDirective, { static: true }]
|
|
4565
|
+
}], fabTemplate: [{
|
|
4566
|
+
type: ContentChild,
|
|
4567
|
+
args: [FloatingActionButtonTemplateDirective, { static: true }]
|
|
4568
|
+
}], themeColor: [{
|
|
4569
|
+
type: Input
|
|
4570
|
+
}], size: [{
|
|
4571
|
+
type: Input
|
|
4572
|
+
}], shape: [{
|
|
4573
|
+
type: Input
|
|
4574
|
+
}], disabled: [{
|
|
4575
|
+
type: Input
|
|
4576
|
+
}], align: [{
|
|
4577
|
+
type: Input
|
|
4578
|
+
}], offset: [{
|
|
4579
|
+
type: Input
|
|
4580
|
+
}], positionMode: [{
|
|
4581
|
+
type: Input
|
|
4582
|
+
}], icon: [{
|
|
4583
|
+
type: Input
|
|
4584
|
+
}], iconClass: [{
|
|
4585
|
+
type: Input
|
|
4586
|
+
}], buttonClass: [{
|
|
4587
|
+
type: Input
|
|
4588
|
+
}], dialClass: [{
|
|
4589
|
+
type: Input
|
|
4590
|
+
}], text: [{
|
|
4591
|
+
type: Input
|
|
4592
|
+
}], dialItemAnimation: [{
|
|
4593
|
+
type: Input
|
|
4594
|
+
}], tabIndex: [{
|
|
4595
|
+
type: Input
|
|
4596
|
+
}], dialItems: [{
|
|
4597
|
+
type: Input
|
|
4598
|
+
}], onBlur: [{
|
|
4599
|
+
type: Output,
|
|
4600
|
+
args: ['blur']
|
|
4601
|
+
}], onFocus: [{
|
|
4602
|
+
type: Output,
|
|
4603
|
+
args: ['focus']
|
|
4604
|
+
}], dialItemClick: [{
|
|
4605
|
+
type: Output,
|
|
4606
|
+
args: ['dialItemClick']
|
|
4607
|
+
}], open: [{
|
|
4608
|
+
type: Output
|
|
4609
|
+
}], close: [{
|
|
4610
|
+
type: Output
|
|
4611
|
+
}] } });
|
|
4736
4612
|
|
|
4737
|
-
const exportedModules
|
|
4613
|
+
const exportedModules = [
|
|
4738
4614
|
FloatingActionButtonComponent,
|
|
4739
4615
|
DialItemTemplateDirective,
|
|
4740
4616
|
FloatingActionButtonTemplateDirective
|
|
4741
4617
|
];
|
|
4742
|
-
const declarations
|
|
4743
|
-
...exportedModules
|
|
4618
|
+
const declarations = [
|
|
4619
|
+
...exportedModules,
|
|
4744
4620
|
DialListComponent,
|
|
4745
4621
|
DialItemComponent
|
|
4746
4622
|
];
|
|
@@ -4772,15 +4648,24 @@ const declarations$1 = [
|
|
|
4772
4648
|
*
|
|
4773
4649
|
* ```
|
|
4774
4650
|
*/
|
|
4775
|
-
|
|
4776
|
-
}
|
|
4777
|
-
FloatingActionButtonModule =
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
imports: [CommonModule, PopupModule, ListModule, EventsModule]
|
|
4782
|
-
|
|
4783
|
-
]
|
|
4651
|
+
class FloatingActionButtonModule {
|
|
4652
|
+
}
|
|
4653
|
+
FloatingActionButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4654
|
+
FloatingActionButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonModule, declarations: [FloatingActionButtonComponent,
|
|
4655
|
+
DialItemTemplateDirective,
|
|
4656
|
+
FloatingActionButtonTemplateDirective, DialListComponent,
|
|
4657
|
+
DialItemComponent], imports: [CommonModule, PopupModule, ListModule, EventsModule], exports: [FloatingActionButtonComponent,
|
|
4658
|
+
DialItemTemplateDirective,
|
|
4659
|
+
FloatingActionButtonTemplateDirective] });
|
|
4660
|
+
FloatingActionButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonModule, imports: [[CommonModule, PopupModule, ListModule, EventsModule]] });
|
|
4661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: FloatingActionButtonModule, decorators: [{
|
|
4662
|
+
type: NgModule,
|
|
4663
|
+
args: [{
|
|
4664
|
+
declarations: [declarations],
|
|
4665
|
+
exports: [exportedModules],
|
|
4666
|
+
imports: [CommonModule, PopupModule, ListModule, EventsModule]
|
|
4667
|
+
}]
|
|
4668
|
+
}] });
|
|
4784
4669
|
|
|
4785
4670
|
/**
|
|
4786
4671
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
@@ -4813,16 +4698,21 @@ FloatingActionButtonModule = __decorate([
|
|
|
4813
4698
|
*
|
|
4814
4699
|
* ```
|
|
4815
4700
|
*/
|
|
4816
|
-
|
|
4817
|
-
}
|
|
4818
|
-
ButtonsModule =
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4701
|
+
class ButtonsModule {
|
|
4702
|
+
}
|
|
4703
|
+
ButtonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4704
|
+
ButtonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonsModule, exports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] });
|
|
4705
|
+
ButtonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonsModule, imports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] });
|
|
4706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonsModule, decorators: [{
|
|
4707
|
+
type: NgModule,
|
|
4708
|
+
args: [{
|
|
4709
|
+
exports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule]
|
|
4710
|
+
}]
|
|
4711
|
+
}] });
|
|
4823
4712
|
|
|
4824
4713
|
/**
|
|
4825
4714
|
* Generated bundle index. Do not edit.
|
|
4826
4715
|
*/
|
|
4827
4716
|
|
|
4828
|
-
export {
|
|
4717
|
+
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, SplitButtonComponent as SplitButton, SplitButtonComponent, SplitButtonModule, TemplateContextDirective };
|
|
4718
|
+
|