@progress/kendo-angular-buttons 7.0.0-next.202111120840 → 7.0.2-dev.202201201235
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-buttons.js +20 -0
- package/dist/cdn/main.js +5 -0
- package/dist/es/button/button.directive.js +769 -0
- package/{esm2015 → dist/es}/button/button.module.js +13 -13
- package/dist/es/button/button.service.js +24 -0
- package/{esm2015 → dist/es}/button/selection-settings.js +0 -1
- package/dist/es/buttongroup/buttongroup.component.js +353 -0
- package/dist/es/buttongroup/buttongroup.module.js +30 -0
- package/{esm2015 → dist/es}/buttons.module.js +12 -12
- package/{esm2015 → dist/es}/chip/chip-content-click-event-args.interface.js +0 -1
- package/{esm2015 → dist/es}/chip/chip-list-remove-event-args.interface.js +0 -1
- package/dist/es/chip/chip-list.component.js +214 -0
- package/{esm2015 → dist/es}/chip/chip-remove-event-args.interface.js +0 -1
- package/dist/es/chip/chip.component.js +449 -0
- package/dist/es/chip/chip.module.js +55 -0
- package/{esm2015 → dist/es}/chip/models/selection.js +0 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/{esm2015 → dist/es}/common/models/shape.js +0 -1
- package/{esm2015 → dist/es}/common/models/size.js +0 -1
- package/dist/es/common/models/styling-classes.js +4 -0
- package/{esm2015 → dist/es}/common/models/theme-color.js +0 -1
- package/{esm2015/button-look.js → dist/es/common/models.js} +0 -1
- package/{esm2015 → dist/es}/direction.js +0 -1
- package/dist/es/dropdownbutton/dropdownbutton.component.js +704 -0
- package/dist/es/dropdownbutton/dropdownbutton.module.js +32 -0
- package/dist/es/floatingactionbutton/animations/animations.js +33 -0
- package/dist/es/floatingactionbutton/dial-item.component.js +143 -0
- package/dist/es/floatingactionbutton/dial-list.component.js +76 -0
- package/dist/es/floatingactionbutton/floatingactionbutton.component.js +903 -0
- package/dist/es/floatingactionbutton/floatingactionbutton.module.js +65 -0
- package/{esm2015 → dist/es}/floatingactionbutton/models/align.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/item-animation.interface.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/item-click.event.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/item.interface.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/offset.js +0 -1
- package/{esm2015 → dist/es}/floatingactionbutton/models/position-mode.js +0 -1
- package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +26 -0
- package/dist/es/floatingactionbutton/templates/fab-template.directive.js +26 -0
- package/dist/es/floatingactionbutton/utils.js +38 -0
- package/dist/es/focusable/focus.service.js +43 -0
- package/dist/es/focusable/focusable.directive.js +68 -0
- package/dist/es/index.js +22 -0
- package/dist/es/listbutton/button-item-template.directive.js +68 -0
- package/dist/es/listbutton/list-button.js +243 -0
- package/{esm2015 → dist/es}/listbutton/list-item-model.js +0 -1
- package/dist/es/listbutton/list.component.js +85 -0
- package/dist/es/listbutton/list.module.js +33 -0
- package/{esm2015 → dist/es}/listbutton/popup-settings.js +0 -1
- package/dist/es/listbutton/template-context.directive.js +40 -0
- package/{esm2015 → dist/es}/main.js +1 -5
- package/{esm2015 → dist/es}/navigation/key-events.js +0 -0
- package/{esm2015 → dist/es}/navigation/navigation-action.js +0 -0
- package/dist/es/navigation/navigation-config.js +9 -0
- package/dist/es/navigation/navigation.service.js +114 -0
- package/dist/es/package-metadata.js +15 -0
- package/dist/es/preventable-event.js +29 -0
- package/dist/es/splitbutton/localization/custom-messages.component.js +44 -0
- package/dist/es/splitbutton/localization/localized-messages.directive.js +35 -0
- package/dist/es/splitbutton/localization/messages.js +22 -0
- package/dist/es/splitbutton/splitbutton.component.js +830 -0
- package/dist/es/splitbutton/splitbutton.module.js +34 -0
- package/dist/es/util.js +97 -0
- package/{button → dist/es2015/button}/button.directive.d.ts +101 -46
- package/dist/es2015/button/button.directive.js +671 -0
- package/{button → dist/es2015/button}/button.module.d.ts +0 -5
- package/dist/es2015/button/button.module.js +47 -0
- package/{button → dist/es2015/button}/button.service.d.ts +1 -7
- package/dist/es2015/button/button.service.js +26 -0
- package/{button → dist/es2015/button}/selection-settings.d.ts +0 -0
- package/dist/es2015/button/selection-settings.js +4 -0
- package/{buttongroup → dist/es2015/buttongroup}/buttongroup.component.d.ts +9 -28
- package/{esm2015 → dist/es2015}/buttongroup/buttongroup.component.js +116 -121
- package/dist/es2015/buttongroup/buttongroup.module.d.ts +14 -0
- package/dist/es2015/buttongroup/buttongroup.module.js +27 -0
- package/{buttons.module.d.ts → dist/es2015/buttons.module.d.ts} +0 -10
- package/dist/es2015/buttons.module.js +51 -0
- package/{chip → dist/es2015/chip}/chip-content-click-event-args.interface.d.ts +0 -0
- package/dist/es2015/chip/chip-content-click-event-args.interface.js +4 -0
- package/{chip → dist/es2015/chip}/chip-list-remove-event-args.interface.d.ts +0 -0
- package/dist/es2015/chip/chip-list-remove-event-args.interface.js +4 -0
- package/{chip → dist/es2015/chip}/chip-list.component.d.ts +21 -8
- package/dist/es2015/chip/chip-list.component.js +197 -0
- package/{chip → dist/es2015/chip}/chip-remove-event-args.interface.d.ts +0 -0
- package/dist/es2015/chip/chip-remove-event-args.interface.js +4 -0
- package/{chip → dist/es2015/chip}/chip.component.d.ts +72 -38
- package/dist/es2015/chip/chip.component.js +431 -0
- package/{chip → dist/es2015/chip}/chip.module.d.ts +0 -7
- package/{esm2015 → dist/es2015}/chip/chip.module.js +11 -16
- package/{chip → dist/es2015/chip}/models/selection.d.ts +0 -0
- package/dist/es2015/chip/models/selection.js +4 -0
- package/{util.d.ts → dist/es2015/common/models/fillmode.d.ts} +4 -8
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +12 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/shape.d.ts +9 -0
- package/dist/es2015/common/models/shape.js +4 -0
- package/dist/es2015/common/models/size.d.ts +17 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/{esm2015/kendo-angular-buttons.js → dist/es2015/common/models/styling-classes.d.ts} +5 -2
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/{common → dist/es2015/common}/models/theme-color.d.ts +15 -4
- package/dist/es2015/common/models/theme-color.js +4 -0
- package/{common/models/size.d.ts → dist/es2015/common/models.d.ts} +6 -10
- package/dist/es2015/common/models.js +4 -0
- package/{direction.d.ts → dist/es2015/direction.d.ts} +0 -0
- package/dist/es2015/direction.js +4 -0
- package/{dropdownbutton → dist/es2015/dropdownbutton}/dropdownbutton.component.d.ts +74 -29
- package/{esm2015 → dist/es2015}/dropdownbutton/dropdownbutton.component.js +257 -179
- package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +14 -0
- package/dist/es2015/dropdownbutton/dropdownbutton.module.js +29 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/animations/animations.d.ts +0 -0
- package/{esm2015 → dist/es2015}/floatingactionbutton/animations/animations.js +0 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-item.component.d.ts +5 -8
- package/dist/es2015/floatingactionbutton/dial-item.component.js +133 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-list.component.d.ts +2 -5
- package/dist/es2015/floatingactionbutton/dial-list.component.js +81 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.component.d.ts +47 -49
- package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.component.js +212 -192
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.module.d.ts +0 -13
- package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.module.js +11 -19
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/align.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/align.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-click.event.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/item-click.event.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item.interface.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/item.interface.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/offset.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/offset.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/position-mode.d.ts +0 -0
- package/dist/es2015/floatingactionbutton/models/position-mode.js +4 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/dial-item-template.directive.d.ts +0 -3
- package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +25 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/fab-template.directive.d.ts +0 -3
- package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +25 -0
- package/{floatingactionbutton → dist/es2015/floatingactionbutton}/utils.d.ts +0 -0
- package/{esm2015 → dist/es2015}/floatingactionbutton/utils.js +0 -0
- package/{focusable → dist/es2015/focusable}/focus.service.d.ts +1 -5
- package/{esm2015 → dist/es2015}/focusable/focus.service.js +10 -8
- package/{focusable → dist/es2015/focusable}/focusable.directive.d.ts +0 -3
- package/{esm2015 → dist/es2015}/focusable/focusable.directive.js +20 -19
- package/dist/es2015/index.d.ts +22 -0
- package/dist/es2015/index.js +22 -0
- package/dist/es2015/index.metadata.json +1 -0
- package/{listbutton → dist/es2015/listbutton}/button-item-template.directive.d.ts +0 -3
- package/{esm2015 → dist/es2015}/listbutton/button-item-template.directive.js +12 -13
- package/{listbutton → dist/es2015/listbutton}/list-button.d.ts +2 -6
- package/{esm2015 → dist/es2015}/listbutton/list-button.js +6 -16
- package/{listbutton → dist/es2015/listbutton}/list-item-model.d.ts +0 -0
- package/dist/es2015/listbutton/list-item-model.js +4 -0
- package/{listbutton → dist/es2015/listbutton}/list.component.d.ts +3 -3
- package/dist/es2015/listbutton/list.component.js +113 -0
- package/dist/es2015/listbutton/list.module.d.ts +9 -0
- package/dist/es2015/listbutton/list.module.js +30 -0
- package/{listbutton → dist/es2015/listbutton}/popup-settings.d.ts +0 -0
- package/dist/es2015/listbutton/popup-settings.js +4 -0
- package/{listbutton → dist/es2015/listbutton}/template-context.directive.d.ts +1 -4
- package/dist/es2015/listbutton/template-context.directive.js +35 -0
- package/{main.d.ts → dist/es2015/main.d.ts} +5 -9
- package/dist/es2015/main.js +22 -0
- package/{navigation → dist/es2015/navigation}/key-events.d.ts +0 -0
- package/dist/es2015/navigation/key-events.js +13 -0
- package/{navigation → dist/es2015/navigation}/navigation-action.d.ts +0 -0
- package/dist/es2015/navigation/navigation-action.js +19 -0
- package/{navigation → dist/es2015/navigation}/navigation-config.d.ts +0 -0
- package/{esm2015 → dist/es2015}/navigation/navigation-config.js +0 -0
- package/{navigation → dist/es2015/navigation}/navigation.service.d.ts +0 -3
- package/{esm2015 → dist/es2015}/navigation/navigation.service.js +9 -11
- package/{package-metadata.d.ts → dist/es2015/package-metadata.d.ts} +0 -0
- package/{esm2015 → dist/es2015}/package-metadata.js +1 -1
- package/{preventable-event.d.ts → dist/es2015/preventable-event.d.ts} +0 -0
- package/{esm2015 → dist/es2015}/preventable-event.js +0 -0
- package/dist/es2015/splitbutton/localization/custom-messages.component.d.ts +15 -0
- package/dist/es2015/splitbutton/localization/custom-messages.component.js +36 -0
- package/dist/es2015/splitbutton/localization/localized-messages.directive.d.ts +13 -0
- package/dist/es2015/splitbutton/localization/localized-messages.directive.js +31 -0
- package/dist/es2015/splitbutton/localization/messages.d.ts +32 -0
- package/dist/es2015/splitbutton/localization/messages.js +16 -0
- package/{splitbutton → dist/es2015/splitbutton}/splitbutton.component.d.ts +74 -34
- package/{esm2015 → dist/es2015}/splitbutton/splitbutton.component.js +288 -203
- package/dist/es2015/splitbutton/splitbutton.module.d.ts +14 -0
- package/dist/es2015/splitbutton/splitbutton.module.js +31 -0
- package/dist/es2015/util.d.ts +41 -0
- package/dist/es2015/util.js +95 -0
- package/{fesm2015/kendo-angular-buttons.js → dist/fesm2015/index.js} +2394 -1838
- package/dist/fesm5/index.js +5561 -0
- package/dist/npm/button/button.directive.js +771 -0
- package/dist/npm/button/button.module.js +52 -0
- package/dist/npm/button/button.service.js +26 -0
- package/dist/npm/button/selection-settings.js +6 -0
- package/dist/npm/buttongroup/buttongroup.component.js +355 -0
- package/dist/npm/buttongroup/buttongroup.module.js +32 -0
- package/dist/npm/buttons.module.js +56 -0
- package/dist/npm/chip/chip-content-click-event-args.interface.js +6 -0
- package/dist/npm/chip/chip-list-remove-event-args.interface.js +6 -0
- package/dist/npm/chip/chip-list.component.js +216 -0
- package/dist/npm/chip/chip-remove-event-args.interface.js +6 -0
- package/dist/npm/chip/chip.component.js +451 -0
- package/dist/npm/chip/chip.module.js +57 -0
- package/dist/npm/chip/models/selection.js +6 -0
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/shape.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/models/styling-classes.js +6 -0
- package/dist/npm/common/models/theme-color.js +6 -0
- package/dist/npm/common/models.js +6 -0
- package/dist/npm/direction.js +6 -0
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +706 -0
- package/dist/npm/dropdownbutton/dropdownbutton.module.js +34 -0
- package/dist/npm/floatingactionbutton/animations/animations.js +37 -0
- package/dist/npm/floatingactionbutton/dial-item.component.js +145 -0
- package/dist/npm/floatingactionbutton/dial-list.component.js +78 -0
- package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +905 -0
- package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +67 -0
- package/dist/npm/floatingactionbutton/models/align.js +6 -0
- package/dist/npm/floatingactionbutton/models/item-animation.interface.js +6 -0
- package/dist/npm/floatingactionbutton/models/item-click.event.js +6 -0
- package/dist/npm/floatingactionbutton/models/item.interface.js +6 -0
- package/dist/npm/floatingactionbutton/models/offset.js +6 -0
- package/dist/npm/floatingactionbutton/models/position-mode.js +6 -0
- package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +28 -0
- package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +28 -0
- package/dist/npm/floatingactionbutton/utils.js +42 -0
- package/dist/npm/focusable/focus.service.js +45 -0
- package/dist/npm/focusable/focusable.directive.js +70 -0
- package/dist/npm/index.js +39 -0
- package/dist/npm/listbutton/button-item-template.directive.js +70 -0
- package/dist/npm/listbutton/list-button.js +245 -0
- package/dist/npm/listbutton/list-item-model.js +6 -0
- package/dist/npm/listbutton/list.component.js +87 -0
- package/dist/npm/listbutton/list.module.js +35 -0
- package/dist/npm/listbutton/popup-settings.js +6 -0
- package/dist/npm/listbutton/template-context.directive.js +42 -0
- package/dist/npm/main.js +45 -0
- package/dist/npm/navigation/key-events.js +15 -0
- package/dist/npm/navigation/navigation-action.js +21 -0
- package/dist/npm/navigation/navigation-config.js +11 -0
- package/dist/npm/navigation/navigation.service.js +116 -0
- package/dist/npm/package-metadata.js +17 -0
- package/dist/npm/preventable-event.js +31 -0
- package/dist/npm/splitbutton/localization/custom-messages.component.js +46 -0
- package/dist/npm/splitbutton/localization/localized-messages.directive.js +37 -0
- package/dist/npm/splitbutton/localization/messages.js +24 -0
- package/dist/npm/splitbutton/splitbutton.component.js +832 -0
- package/dist/npm/splitbutton/splitbutton.module.js +36 -0
- package/dist/npm/util.js +100 -0
- package/dist/systemjs/kendo-angular-buttons.js +5 -0
- package/package.json +110 -35
- package/schematics/ngAdd/index.js +2 -5
- package/schematics/ngAdd/index.js.map +1 -1
- package/bundles/kendo-angular-buttons.umd.js +0 -5
- package/button-look.d.ts +0 -21
- package/buttongroup/buttongroup.module.d.ts +0 -21
- package/chip/models/chip-look.d.ts +0 -18
- package/chip/models/type.d.ts +0 -21
- package/common/models/shape.d.ts +0 -16
- package/dropdownbutton/dropdownbutton.module.d.ts +0 -23
- package/esm2015/button/button.directive.js +0 -488
- package/esm2015/button/button.service.js +0 -28
- package/esm2015/buttongroup/buttongroup.module.js +0 -30
- package/esm2015/chip/chip-list.component.js +0 -145
- package/esm2015/chip/chip.component.js +0 -335
- package/esm2015/chip/models/chip-look.js +0 -5
- package/esm2015/chip/models/type.js +0 -5
- package/esm2015/dropdownbutton/dropdownbutton.module.js +0 -32
- package/esm2015/floatingactionbutton/dial-item.component.js +0 -126
- package/esm2015/floatingactionbutton/dial-list.component.js +0 -89
- package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -27
- package/esm2015/floatingactionbutton/templates/fab-template.directive.js +0 -27
- package/esm2015/listbutton/list.component.js +0 -120
- package/esm2015/listbutton/list.module.js +0 -39
- package/esm2015/listbutton/template-context.directive.js +0 -33
- package/esm2015/splitbutton/splitbutton.module.js +0 -32
- package/esm2015/util.js +0 -39
- package/kendo-angular-buttons.d.ts +0 -9
- package/listbutton/list.module.d.ts +0 -18
- package/splitbutton/splitbutton.module.d.ts +0 -23
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import * as tslib_1 from "tslib";
|
|
6
|
+
import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Renderer2 as Renderer, Output, Optional, NgZone } from '@angular/core';
|
|
7
|
+
import { KendoButtonService } from './button.service';
|
|
8
|
+
import { isDocumentAvailable, isChanged, hasObservers, Keys } from '@progress/kendo-angular-common';
|
|
9
|
+
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
+
import { packageMetadata } from '../package-metadata';
|
|
12
|
+
import { getStylingClasses, getThemeColorClasses } from '../util';
|
|
13
|
+
const SPAN_TAG_NAME = 'SPAN';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the Kendo UI Button component for Angular.
|
|
16
|
+
*/
|
|
17
|
+
let ButtonDirective = class ButtonDirective {
|
|
18
|
+
constructor(element, renderer, service, localization, ngZone) {
|
|
19
|
+
this.service = service;
|
|
20
|
+
this.ngZone = ngZone;
|
|
21
|
+
/**
|
|
22
|
+
* Provides visual styling that indicates if the Button is active.
|
|
23
|
+
* By default, `toggleable` is set to `false`.
|
|
24
|
+
*/
|
|
25
|
+
this.toggleable = false;
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
this.role = 'button';
|
|
30
|
+
/**
|
|
31
|
+
* Fires each time the selected state of a toggleable button is changed.
|
|
32
|
+
*
|
|
33
|
+
* The event argument is the new selected state (boolean).
|
|
34
|
+
*/
|
|
35
|
+
this.selectedChange = new EventEmitter();
|
|
36
|
+
/**
|
|
37
|
+
* Fires each time the user clicks the button.
|
|
38
|
+
*/
|
|
39
|
+
this.click = new EventEmitter();
|
|
40
|
+
this.isDisabled = false;
|
|
41
|
+
this.isIcon = false;
|
|
42
|
+
this.isIconClass = false;
|
|
43
|
+
this._size = 'medium';
|
|
44
|
+
this._rounded = 'medium';
|
|
45
|
+
this._shape = 'rectangle';
|
|
46
|
+
this._fillMode = 'solid';
|
|
47
|
+
this._themeColor = 'base';
|
|
48
|
+
this._focused = false;
|
|
49
|
+
this.domEvents = [];
|
|
50
|
+
validatePackage(packageMetadata);
|
|
51
|
+
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
52
|
+
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr'));
|
|
53
|
+
this.element = element.nativeElement;
|
|
54
|
+
this.renderer = renderer;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Backwards-compatible alias
|
|
58
|
+
*
|
|
59
|
+
* @hidden
|
|
60
|
+
*/
|
|
61
|
+
get togglable() {
|
|
62
|
+
return this.toggleable;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
set togglable(value) {
|
|
68
|
+
this.toggleable = value;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Sets the selected state of the Button.
|
|
72
|
+
*/
|
|
73
|
+
get selected() {
|
|
74
|
+
return this._selected || false;
|
|
75
|
+
}
|
|
76
|
+
set selected(value) {
|
|
77
|
+
this._selected = value;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @hidden
|
|
81
|
+
*/
|
|
82
|
+
set tabIndex(index) {
|
|
83
|
+
this.element.tabIndex = index;
|
|
84
|
+
}
|
|
85
|
+
get tabIndex() {
|
|
86
|
+
return this.element.tabIndex;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Defines the name for an existing icon in a Kendo UI theme.
|
|
90
|
+
* The icon is rendered inside the Button by a `span.k-icon` element.
|
|
91
|
+
*/
|
|
92
|
+
set icon(icon) {
|
|
93
|
+
if (icon) {
|
|
94
|
+
this.iconSetter(icon, () => {
|
|
95
|
+
this.isIcon = true;
|
|
96
|
+
const classes = 'k-button-icon k-icon k-i-' + icon;
|
|
97
|
+
this.addIcon(classes);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this.isIcon = false;
|
|
102
|
+
this.updateIconNode();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Defines a CSS class—or multiple classes separated by spaces—
|
|
107
|
+
* which are applied to a `span` element inside the Button. Allows the usage of custom icons.
|
|
108
|
+
*/
|
|
109
|
+
set iconClass(iconClassName) {
|
|
110
|
+
if (iconClassName) {
|
|
111
|
+
this.iconSetter(iconClassName, () => {
|
|
112
|
+
this.isIconClass = true;
|
|
113
|
+
const classes = 'k-button-icon k-icon ' + iconClassName;
|
|
114
|
+
this.addIcon(classes);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.isIconClass = false;
|
|
119
|
+
this.updateIconNode();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Defines a URL which is used for an `img` element inside the Button.
|
|
124
|
+
* The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
|
|
125
|
+
*/
|
|
126
|
+
set imageUrl(imageUrl) {
|
|
127
|
+
if (imageUrl) {
|
|
128
|
+
this.iconSetter(imageUrl, this.addImgIcon.bind(this));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this.removeImageNode();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* If set to `true`, it disables the Button.
|
|
136
|
+
*/
|
|
137
|
+
set disabled(disabled) {
|
|
138
|
+
this.isDisabled = disabled;
|
|
139
|
+
this.renderer.setProperty(this.element, 'disabled', disabled);
|
|
140
|
+
}
|
|
141
|
+
get disabled() {
|
|
142
|
+
return this.isDisabled;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The size property specifies the padding of the Button
|
|
146
|
+
* ([see example]({% slug appearance_button %}#toc-size)).
|
|
147
|
+
*
|
|
148
|
+
* The possible values are:
|
|
149
|
+
* * `'small'`
|
|
150
|
+
* * `'medium'` (default)
|
|
151
|
+
* * `'large'`
|
|
152
|
+
* * `null`
|
|
153
|
+
*/
|
|
154
|
+
set size(size) {
|
|
155
|
+
this.handleClasses(size, 'size');
|
|
156
|
+
this._size = size;
|
|
157
|
+
}
|
|
158
|
+
get size() {
|
|
159
|
+
return this._size;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The rounded property specifies the border radius of the Button
|
|
163
|
+
* ([see example]({% slug appearance_button %}#toc-rounded)).
|
|
164
|
+
*
|
|
165
|
+
* The possible values are:
|
|
166
|
+
* * `'small'`
|
|
167
|
+
* * `'medium'` (default)
|
|
168
|
+
* * `'large'`
|
|
169
|
+
* * `'full'`
|
|
170
|
+
* * `null`
|
|
171
|
+
*/
|
|
172
|
+
set rounded(rounded) {
|
|
173
|
+
this.handleClasses(rounded, 'rounded');
|
|
174
|
+
this._rounded = rounded;
|
|
175
|
+
}
|
|
176
|
+
get rounded() {
|
|
177
|
+
return this._rounded;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The fillMode property specifies the background and border styles of the Button
|
|
181
|
+
* ([see example]({% slug appearance_button %}#toc-fillMode)).
|
|
182
|
+
*
|
|
183
|
+
* The possible values are:
|
|
184
|
+
* * `'flat'`
|
|
185
|
+
* * `'solid'` (default)
|
|
186
|
+
* * `'outline'`
|
|
187
|
+
* * `'clear'`
|
|
188
|
+
* * `'link'`
|
|
189
|
+
* * `null`
|
|
190
|
+
*/
|
|
191
|
+
set fillMode(fillMode) {
|
|
192
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
193
|
+
this._fillMode = fillMode;
|
|
194
|
+
}
|
|
195
|
+
get fillMode() {
|
|
196
|
+
return this._fillMode;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The Button allows you to specify predefined theme colors.
|
|
200
|
+
* The theme color will be applied as a background and border color while also amending the text color accordingly
|
|
201
|
+
* ([see example]({% slug appearance_button %}#toc-themeColor)).
|
|
202
|
+
*
|
|
203
|
+
* The possible values are:
|
|
204
|
+
* * `'base'` (default)
|
|
205
|
+
* * `'primary'`
|
|
206
|
+
* * `'secondary'`
|
|
207
|
+
* * `'tertiary'`
|
|
208
|
+
* * `'info'`
|
|
209
|
+
* * `'success'`
|
|
210
|
+
* * `'warning'`
|
|
211
|
+
* * `'error'`
|
|
212
|
+
* * `'dark'`
|
|
213
|
+
* * `'light`'
|
|
214
|
+
* * `'inverse'`
|
|
215
|
+
*/
|
|
216
|
+
set themeColor(themeColor) {
|
|
217
|
+
this.handleThemeColor(themeColor);
|
|
218
|
+
this._themeColor = themeColor;
|
|
219
|
+
}
|
|
220
|
+
get themeColor() {
|
|
221
|
+
return this._themeColor;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The shape property specifies if the Button will form a rectangle or square.
|
|
225
|
+
* ([see example]({% slug appearance_button %}#toc-shape)).
|
|
226
|
+
*
|
|
227
|
+
* The possible values are:
|
|
228
|
+
* * `'square'`
|
|
229
|
+
* * `'rectangle'` (default)
|
|
230
|
+
*/
|
|
231
|
+
set shape(shape) {
|
|
232
|
+
this.handleClasses(shape, 'shape');
|
|
233
|
+
this._shape = shape;
|
|
234
|
+
}
|
|
235
|
+
get shape() {
|
|
236
|
+
return this._shape;
|
|
237
|
+
}
|
|
238
|
+
set isFocused(isFocused) {
|
|
239
|
+
this.toggleClass('k-focus', isFocused);
|
|
240
|
+
this._focused = isFocused;
|
|
241
|
+
}
|
|
242
|
+
get isFocused() {
|
|
243
|
+
return this._focused;
|
|
244
|
+
}
|
|
245
|
+
get classButton() {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
get isToggleable() {
|
|
249
|
+
return this.toggleable;
|
|
250
|
+
}
|
|
251
|
+
get roleSetter() {
|
|
252
|
+
return this.role;
|
|
253
|
+
}
|
|
254
|
+
get classDisabled() {
|
|
255
|
+
return this.isDisabled;
|
|
256
|
+
}
|
|
257
|
+
get classActive() {
|
|
258
|
+
return this.selected;
|
|
259
|
+
}
|
|
260
|
+
get getDirection() {
|
|
261
|
+
return this.direction;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @hidden
|
|
265
|
+
*/
|
|
266
|
+
onFocus() {
|
|
267
|
+
this.isFocused = true;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @hidden
|
|
271
|
+
*/
|
|
272
|
+
onBlur() {
|
|
273
|
+
this.isFocused = false;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* @hidden
|
|
277
|
+
*/
|
|
278
|
+
set primary(value) {
|
|
279
|
+
this.themeColor = value ? 'primary' : 'base';
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @hidden
|
|
283
|
+
*/
|
|
284
|
+
set look(value) {
|
|
285
|
+
switch (value) {
|
|
286
|
+
case 'default':
|
|
287
|
+
this.fillMode = 'solid';
|
|
288
|
+
break;
|
|
289
|
+
default:
|
|
290
|
+
this.fillMode = value;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
ngOnInit() {
|
|
295
|
+
const isSpan = this.element.tagName === SPAN_TAG_NAME;
|
|
296
|
+
this.addTextSpan();
|
|
297
|
+
if (!this.element.hasAttribute('role') && this.togglable) {
|
|
298
|
+
this.toggleAriaPressed(this.toggleable);
|
|
299
|
+
}
|
|
300
|
+
if (this.role) {
|
|
301
|
+
this.setAttribute('role', this.role);
|
|
302
|
+
}
|
|
303
|
+
this.ngZone.runOutsideAngular(() => {
|
|
304
|
+
this.domEvents.push(this.renderer.listen(this.element, 'click', this._onButtonClick.bind(this)));
|
|
305
|
+
this.domEvents.push(this.renderer.listen(this.element, 'keydown', (event) => {
|
|
306
|
+
const isSpaceOrEnter = event.keyCode === Keys.Space || event.keyCode === Keys.Enter;
|
|
307
|
+
if (isSpan && isSpaceOrEnter) {
|
|
308
|
+
this.click.emit(event);
|
|
309
|
+
this._onButtonClick();
|
|
310
|
+
}
|
|
311
|
+
}));
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
ngOnChanges(change) {
|
|
315
|
+
if (isChanged('togglable', change) || isChanged('toggleable', change)) {
|
|
316
|
+
this.toggleAriaPressed(this.toggleable);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
ngAfterViewInit() {
|
|
320
|
+
const stylingOptions = ['size', 'rounded', 'shape', 'fillMode'];
|
|
321
|
+
stylingOptions.forEach(input => {
|
|
322
|
+
this.handleClasses(this[input], input);
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
ngAfterViewChecked() {
|
|
326
|
+
this.setIconTextClasses();
|
|
327
|
+
}
|
|
328
|
+
ngOnDestroy() {
|
|
329
|
+
this.imageNode = null;
|
|
330
|
+
this.iconNode = null;
|
|
331
|
+
this.iconSpanNode = null;
|
|
332
|
+
this.renderer = null;
|
|
333
|
+
this.localizationChangeSubscription.unsubscribe();
|
|
334
|
+
clearTimeout(this.deferTimeout);
|
|
335
|
+
this.domEvents.forEach(unbindHandler => unbindHandler());
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Focuses the Button component.
|
|
339
|
+
*/
|
|
340
|
+
focus() {
|
|
341
|
+
if (isDocumentAvailable()) {
|
|
342
|
+
this.element.focus();
|
|
343
|
+
this.isFocused = true;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Blurs the Button component.
|
|
348
|
+
*/
|
|
349
|
+
blur() {
|
|
350
|
+
if (isDocumentAvailable()) {
|
|
351
|
+
this.element.blur();
|
|
352
|
+
this.isFocused = false;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @hidden
|
|
357
|
+
*/
|
|
358
|
+
setAttribute(attribute, value) {
|
|
359
|
+
this.renderer.setAttribute(this.element, attribute, value);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* @hidden
|
|
363
|
+
*/
|
|
364
|
+
removeAttribute(attribute) {
|
|
365
|
+
this.renderer.removeAttribute(this.element, attribute);
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* @hidden
|
|
369
|
+
*
|
|
370
|
+
* Internal setter that triggers selectedChange
|
|
371
|
+
*/
|
|
372
|
+
setSelected(value) {
|
|
373
|
+
const changed = this.selected !== value;
|
|
374
|
+
this.selected = value;
|
|
375
|
+
this.setAttribute('aria-pressed', this.selected.toString());
|
|
376
|
+
this.toggleClass('k-selected', this.selected);
|
|
377
|
+
if (changed && hasObservers(this.selectedChange)) {
|
|
378
|
+
this.ngZone.run(() => {
|
|
379
|
+
this.selectedChange.emit(value);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
toggleAriaPressed(shouldSet) {
|
|
384
|
+
if (!isDocumentAvailable()) {
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
if (shouldSet) {
|
|
388
|
+
this.setAttribute('aria-pressed', this.selected.toString());
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
this.removeAttribute('aria-pressed');
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
hasText() {
|
|
395
|
+
return isDocumentAvailable() && this.element.textContent.trim().length > 0;
|
|
396
|
+
}
|
|
397
|
+
addImgIcon(imageUrl) {
|
|
398
|
+
let renderer = this.renderer;
|
|
399
|
+
this.iconSpanNode = renderer.createElement('span');
|
|
400
|
+
renderer.setProperty(this.iconSpanNode, 'className', 'k-button-icon k-icon');
|
|
401
|
+
if (this.imageNode) {
|
|
402
|
+
renderer.setProperty(this.imageNode, 'src', imageUrl);
|
|
403
|
+
}
|
|
404
|
+
else if (isDocumentAvailable()) {
|
|
405
|
+
this.imageNode = renderer.createElement('img');
|
|
406
|
+
renderer.setProperty(this.imageNode, 'src', imageUrl);
|
|
407
|
+
renderer.setProperty(this.imageNode, 'className', 'k-image');
|
|
408
|
+
renderer.setAttribute(this.imageNode, 'role', 'presentation');
|
|
409
|
+
}
|
|
410
|
+
this.iconSpanNode.appendChild(this.imageNode);
|
|
411
|
+
this.prependChild(this.iconSpanNode);
|
|
412
|
+
}
|
|
413
|
+
addIcon(classNames) {
|
|
414
|
+
let renderer = this.renderer;
|
|
415
|
+
if (this.iconNode) {
|
|
416
|
+
renderer.setProperty(this.iconNode, 'className', classNames);
|
|
417
|
+
}
|
|
418
|
+
else if (isDocumentAvailable()) {
|
|
419
|
+
this.iconNode = renderer.createElement('span');
|
|
420
|
+
renderer.setProperty(this.iconNode, 'className', classNames);
|
|
421
|
+
renderer.setAttribute(this.iconNode, 'role', 'presentation');
|
|
422
|
+
this.prependChild(this.iconNode);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
addTextSpan() {
|
|
426
|
+
if (isDocumentAvailable() && this.hasText()) {
|
|
427
|
+
const span = this.renderer.createElement('span');
|
|
428
|
+
this.renderer.addClass(span, 'k-button-text');
|
|
429
|
+
const buttonContentNodes = Array.from(this.element.childNodes);
|
|
430
|
+
buttonContentNodes.forEach(node => this.renderer.appendChild(span, node));
|
|
431
|
+
this.renderer.appendChild(this.element, span);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
prependChild(node) {
|
|
435
|
+
this.defer(() => {
|
|
436
|
+
if (this.renderer && node !== this.element.firstChild) {
|
|
437
|
+
this.renderer.insertBefore(this.element, node, this.element.firstChild);
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
defer(callback) {
|
|
442
|
+
this.ngZone.runOutsideAngular(() => {
|
|
443
|
+
this.deferTimeout = setTimeout(callback, 0);
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
iconSetter(icon, insertIcon) {
|
|
447
|
+
if (icon) {
|
|
448
|
+
insertIcon(icon);
|
|
449
|
+
}
|
|
450
|
+
this.setIconTextClasses();
|
|
451
|
+
}
|
|
452
|
+
removeImageNode() {
|
|
453
|
+
if (this.imageNode && this.renderer.parentNode(this.imageNode)) {
|
|
454
|
+
this.renderer.removeChild(this.element, this.imageNode);
|
|
455
|
+
this.renderer.removeChild(this.element, this.iconSpanNode);
|
|
456
|
+
this.imageNode = null;
|
|
457
|
+
this.iconSpanNode = null;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
removeIconNode() {
|
|
461
|
+
if (this.iconNode && this.renderer.parentNode(this.iconNode)) {
|
|
462
|
+
this.renderer.removeChild(this.element, this.iconNode);
|
|
463
|
+
this.iconNode = null;
|
|
464
|
+
}
|
|
465
|
+
if (this.iconSpanNode) {
|
|
466
|
+
this.renderer.removeChild(this.element, this.iconSpanNode);
|
|
467
|
+
this.iconSpanNode = null;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
updateIconNode() {
|
|
471
|
+
if (!this.isIcon && !this.isIconClass) {
|
|
472
|
+
this.removeIconNode();
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
setIconTextClasses() {
|
|
476
|
+
const hasIcon = this.isIcon || this.isIconClass || this.imageNode;
|
|
477
|
+
this.toggleClass('k-icon-button', hasIcon && !this.hasText());
|
|
478
|
+
}
|
|
479
|
+
toggleClass(className, add) {
|
|
480
|
+
if (add) {
|
|
481
|
+
this.renderer.addClass(this.element, className);
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
this.renderer.removeClass(this.element, className);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
_onButtonClick() {
|
|
488
|
+
if (!this.disabled && this.service) {
|
|
489
|
+
this.ngZone.run(() => {
|
|
490
|
+
this.service.click(this);
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
if (this.togglable && !this.service) {
|
|
494
|
+
this.setSelected(!this.selected);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
handleClasses(value, input) {
|
|
498
|
+
const elem = this.element;
|
|
499
|
+
const classes = getStylingClasses('button', input, this[input], value);
|
|
500
|
+
if (input === 'fillMode') {
|
|
501
|
+
this.handleThemeColor(this.themeColor, this[input], value);
|
|
502
|
+
}
|
|
503
|
+
if (classes.toRemove) {
|
|
504
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
505
|
+
}
|
|
506
|
+
if (classes.toAdd) {
|
|
507
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
handleThemeColor(value, prevFillMode, fillMode) {
|
|
511
|
+
const elem = this.element;
|
|
512
|
+
const removeFillMode = prevFillMode ? prevFillMode : this.fillMode;
|
|
513
|
+
const addFillMode = fillMode ? fillMode : this.fillMode;
|
|
514
|
+
const themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
|
|
515
|
+
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
516
|
+
if (addFillMode !== null && fillMode !== null) {
|
|
517
|
+
if (themeColorClass.toAdd) {
|
|
518
|
+
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
tslib_1.__decorate([
|
|
524
|
+
Input(),
|
|
525
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
526
|
+
], ButtonDirective.prototype, "toggleable", void 0);
|
|
527
|
+
tslib_1.__decorate([
|
|
528
|
+
Input(),
|
|
529
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
530
|
+
tslib_1.__metadata("design:paramtypes", [Boolean])
|
|
531
|
+
], ButtonDirective.prototype, "togglable", null);
|
|
532
|
+
tslib_1.__decorate([
|
|
533
|
+
Input(),
|
|
534
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
535
|
+
tslib_1.__metadata("design:paramtypes", [Boolean])
|
|
536
|
+
], ButtonDirective.prototype, "selected", null);
|
|
537
|
+
tslib_1.__decorate([
|
|
538
|
+
Input(),
|
|
539
|
+
tslib_1.__metadata("design:type", Number),
|
|
540
|
+
tslib_1.__metadata("design:paramtypes", [Number])
|
|
541
|
+
], ButtonDirective.prototype, "tabIndex", null);
|
|
542
|
+
tslib_1.__decorate([
|
|
543
|
+
Input(),
|
|
544
|
+
tslib_1.__metadata("design:type", String),
|
|
545
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
546
|
+
], ButtonDirective.prototype, "icon", null);
|
|
547
|
+
tslib_1.__decorate([
|
|
548
|
+
Input(),
|
|
549
|
+
tslib_1.__metadata("design:type", String),
|
|
550
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
551
|
+
], ButtonDirective.prototype, "iconClass", null);
|
|
552
|
+
tslib_1.__decorate([
|
|
553
|
+
Input(),
|
|
554
|
+
tslib_1.__metadata("design:type", String),
|
|
555
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
556
|
+
], ButtonDirective.prototype, "imageUrl", null);
|
|
557
|
+
tslib_1.__decorate([
|
|
558
|
+
Input(),
|
|
559
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
560
|
+
tslib_1.__metadata("design:paramtypes", [Boolean])
|
|
561
|
+
], ButtonDirective.prototype, "disabled", null);
|
|
562
|
+
tslib_1.__decorate([
|
|
563
|
+
Input(),
|
|
564
|
+
tslib_1.__metadata("design:type", String),
|
|
565
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
566
|
+
], ButtonDirective.prototype, "size", null);
|
|
567
|
+
tslib_1.__decorate([
|
|
568
|
+
Input(),
|
|
569
|
+
tslib_1.__metadata("design:type", String),
|
|
570
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
571
|
+
], ButtonDirective.prototype, "rounded", null);
|
|
572
|
+
tslib_1.__decorate([
|
|
573
|
+
Input(),
|
|
574
|
+
tslib_1.__metadata("design:type", String),
|
|
575
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
576
|
+
], ButtonDirective.prototype, "fillMode", null);
|
|
577
|
+
tslib_1.__decorate([
|
|
578
|
+
Input(),
|
|
579
|
+
tslib_1.__metadata("design:type", String),
|
|
580
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
581
|
+
], ButtonDirective.prototype, "themeColor", null);
|
|
582
|
+
tslib_1.__decorate([
|
|
583
|
+
Input(),
|
|
584
|
+
tslib_1.__metadata("design:type", String),
|
|
585
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
586
|
+
], ButtonDirective.prototype, "shape", null);
|
|
587
|
+
tslib_1.__decorate([
|
|
588
|
+
Input(),
|
|
589
|
+
tslib_1.__metadata("design:type", String)
|
|
590
|
+
], ButtonDirective.prototype, "role", void 0);
|
|
591
|
+
tslib_1.__decorate([
|
|
592
|
+
Output(),
|
|
593
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
594
|
+
], ButtonDirective.prototype, "selectedChange", void 0);
|
|
595
|
+
tslib_1.__decorate([
|
|
596
|
+
Output(),
|
|
597
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
598
|
+
], ButtonDirective.prototype, "click", void 0);
|
|
599
|
+
tslib_1.__decorate([
|
|
600
|
+
HostBinding('class.k-button'),
|
|
601
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
602
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
603
|
+
], ButtonDirective.prototype, "classButton", null);
|
|
604
|
+
tslib_1.__decorate([
|
|
605
|
+
HostBinding('class.k-toggle-button'),
|
|
606
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
607
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
608
|
+
], ButtonDirective.prototype, "isToggleable", null);
|
|
609
|
+
tslib_1.__decorate([
|
|
610
|
+
HostBinding('attr.role'),
|
|
611
|
+
tslib_1.__metadata("design:type", String),
|
|
612
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
613
|
+
], ButtonDirective.prototype, "roleSetter", null);
|
|
614
|
+
tslib_1.__decorate([
|
|
615
|
+
HostBinding('attr.aria-disabled'),
|
|
616
|
+
HostBinding('class.k-disabled'),
|
|
617
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
618
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
619
|
+
], ButtonDirective.prototype, "classDisabled", null);
|
|
620
|
+
tslib_1.__decorate([
|
|
621
|
+
HostBinding('class.k-selected'),
|
|
622
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
623
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
624
|
+
], ButtonDirective.prototype, "classActive", null);
|
|
625
|
+
tslib_1.__decorate([
|
|
626
|
+
HostBinding('attr.dir'),
|
|
627
|
+
tslib_1.__metadata("design:type", String),
|
|
628
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
629
|
+
], ButtonDirective.prototype, "getDirection", null);
|
|
630
|
+
tslib_1.__decorate([
|
|
631
|
+
HostListener('focus'),
|
|
632
|
+
tslib_1.__metadata("design:type", Function),
|
|
633
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
634
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
635
|
+
], ButtonDirective.prototype, "onFocus", null);
|
|
636
|
+
tslib_1.__decorate([
|
|
637
|
+
HostListener('blur'),
|
|
638
|
+
tslib_1.__metadata("design:type", Function),
|
|
639
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
640
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
641
|
+
], ButtonDirective.prototype, "onBlur", null);
|
|
642
|
+
tslib_1.__decorate([
|
|
643
|
+
Input(),
|
|
644
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
645
|
+
tslib_1.__metadata("design:paramtypes", [Boolean])
|
|
646
|
+
], ButtonDirective.prototype, "primary", null);
|
|
647
|
+
tslib_1.__decorate([
|
|
648
|
+
Input(),
|
|
649
|
+
tslib_1.__metadata("design:type", String),
|
|
650
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
651
|
+
], ButtonDirective.prototype, "look", null);
|
|
652
|
+
ButtonDirective = tslib_1.__decorate([
|
|
653
|
+
Directive({
|
|
654
|
+
exportAs: 'kendoButton',
|
|
655
|
+
providers: [
|
|
656
|
+
LocalizationService,
|
|
657
|
+
{
|
|
658
|
+
provide: L10N_PREFIX,
|
|
659
|
+
useValue: 'kendo.button'
|
|
660
|
+
}
|
|
661
|
+
],
|
|
662
|
+
selector: 'button[kendoButton], span[kendoButton]',
|
|
663
|
+
}),
|
|
664
|
+
tslib_1.__param(2, Optional()),
|
|
665
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
666
|
+
Renderer,
|
|
667
|
+
KendoButtonService,
|
|
668
|
+
LocalizationService,
|
|
669
|
+
NgZone])
|
|
670
|
+
], ButtonDirective);
|
|
671
|
+
export { ButtonDirective };
|
|
@@ -2,8 +2,6 @@
|
|
|
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 * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "./button.directive";
|
|
7
5
|
/**
|
|
8
6
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
9
7
|
* definition for the Button directive.
|
|
@@ -36,7 +34,4 @@ import * as i1 from "./button.directive";
|
|
|
36
34
|
* ```
|
|
37
35
|
*/
|
|
38
36
|
export declare class ButtonModule {
|
|
39
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonModule, never>;
|
|
40
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, [typeof i1.ButtonDirective], never, [typeof i1.ButtonDirective]>;
|
|
41
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
|
|
42
37
|
}
|