@progress/kendo-angular-buttons 17.0.0-develop.2 → 17.0.0-develop.20
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/README.md +27 -106
- package/button/button.component.d.ts +3 -9
- package/buttongroup/buttongroup.component.d.ts +2 -2
- package/chip/chip-list.component.d.ts +3 -3
- package/chip/chip.component.d.ts +4 -7
- package/chip/models/avatar-settings.interface.d.ts +33 -0
- package/dropdownbutton/dropdownbutton.component.d.ts +0 -1
- package/esm2020/button/button.component.mjs +18 -60
- package/esm2020/buttongroup/buttongroup.component.mjs +5 -7
- package/esm2020/chip/chip-list.component.mjs +4 -4
- package/esm2020/chip/chip.component.mjs +33 -24
- package/esm2020/chip/models/avatar-settings.interface.mjs +5 -0
- package/esm2020/dropdownbutton/dropdownbutton.component.mjs +8 -8
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/splitbutton/splitbutton.component.mjs +1 -1
- package/esm2020/util.mjs +6 -0
- package/fesm2015/progress-kendo-angular-buttons.mjs +76 -105
- package/fesm2020/progress-kendo-angular-buttons.mjs +76 -105
- package/index.d.ts +1 -0
- package/package.json +6 -6
- package/util.d.ts +6 -0
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injectable, EventEmitter, isDevMode, Component, Optional, Input, Output, HostBinding, HostListener, ContentChildren, Directive, InjectionToken, Inject, ElementRef, ViewContainerRef, ContentChild, ViewChild, forwardRef, NgModule } from '@angular/core';
|
|
7
7
|
import { Subject, Subscription, fromEvent, merge } from 'rxjs';
|
|
8
|
-
import { isDocumentAvailable, isFirefox,
|
|
8
|
+
import { isDocumentAvailable, isFirefox, isSafari, isChanged, hasObservers, Keys, MultiTabStop, guid, TemplateContextDirective, isPresent as isPresent$1, EventsOutsideAngularDirective, anyChanged, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
9
|
export { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
|
|
10
10
|
import { caretAltDownIcon, xCircleIcon, moreVerticalIcon } from '@progress/kendo-svg-icons';
|
|
11
11
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
12
12
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
13
13
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
14
|
import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
|
|
15
|
-
import { NgIf, NgClass, NgFor, NgTemplateOutlet
|
|
15
|
+
import { NgIf, NgClass, NgStyle, NgFor, NgTemplateOutlet } from '@angular/common';
|
|
16
16
|
import { filter, tap, take } from 'rxjs/operators';
|
|
17
17
|
import * as i3 from '@progress/kendo-angular-popup';
|
|
18
18
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
@@ -44,8 +44,8 @@ const packageMetadata = {
|
|
|
44
44
|
name: '@progress/kendo-angular-buttons',
|
|
45
45
|
productName: 'Kendo UI for Angular',
|
|
46
46
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
47
|
-
publishDate:
|
|
48
|
-
version: '17.0.0-develop.
|
|
47
|
+
publishDate: 1729854892,
|
|
48
|
+
version: '17.0.0-develop.20',
|
|
49
49
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
50
50
|
};
|
|
51
51
|
|
|
@@ -140,10 +140,13 @@ const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousVal
|
|
|
140
140
|
toAdd: newValue !== 'none' ? `k-${componentType}-${fillMode}-${newValue}` : ''
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* @hidden
|
|
145
|
+
*
|
|
146
|
+
* Checks for an empty object - {}
|
|
147
|
+
*/
|
|
148
|
+
const isObjectEmpty = (obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
143
149
|
|
|
144
|
-
const SPAN_TAG_NAME = 'SPAN';
|
|
145
|
-
const BUTTON_TAG_NAME = 'BUTTON';
|
|
146
|
-
const KENDO_BUTTON_TAG_NAME = 'KENDO-BUTTON';
|
|
147
150
|
const DEFAULT_ROUNDED$3 = 'medium';
|
|
148
151
|
const DEFAULT_SIZE$2 = 'medium';
|
|
149
152
|
const DEFAULT_THEME_COLOR$2 = 'base';
|
|
@@ -151,9 +154,8 @@ const DEFAULT_FILL_MODE$3 = 'solid';
|
|
|
151
154
|
/**
|
|
152
155
|
* Represents the Kendo UI Button component for Angular.
|
|
153
156
|
*
|
|
154
|
-
* As of package
|
|
155
|
-
*
|
|
156
|
-
* to avoid discrepancies between the behavior of the `ButtonComponent` and the native HTML Button element.
|
|
157
|
+
* As of package v17, the `span[kendoButton]` and `kendo-button` selectors are removed.
|
|
158
|
+
* Please use the `button[kendoButton]` selector only.
|
|
157
159
|
*/
|
|
158
160
|
class ButtonComponent {
|
|
159
161
|
constructor(element, renderer, service, localization, ngZone) {
|
|
@@ -172,10 +174,6 @@ class ButtonComponent {
|
|
|
172
174
|
* @default false
|
|
173
175
|
*/
|
|
174
176
|
this.toggleable = false;
|
|
175
|
-
/**
|
|
176
|
-
* @hidden
|
|
177
|
-
*/
|
|
178
|
-
this.role = 'button';
|
|
179
177
|
/**
|
|
180
178
|
* Fires each time the selected state of a toggleable button is changed.
|
|
181
179
|
*
|
|
@@ -360,10 +358,6 @@ class ButtonComponent {
|
|
|
360
358
|
const hasIcon = this.icon || this.iconClass || this.imageUrl || this.svgIcon;
|
|
361
359
|
return hasIcon && !this.hasText;
|
|
362
360
|
}
|
|
363
|
-
get roleSetter() {
|
|
364
|
-
const isButtonElementAndRole = this.element.tagName === BUTTON_TAG_NAME && this.role === 'button';
|
|
365
|
-
return isButtonElementAndRole ? undefined : this.role;
|
|
366
|
-
}
|
|
367
361
|
get classDisabled() {
|
|
368
362
|
return this.isDisabled;
|
|
369
363
|
}
|
|
@@ -414,41 +408,14 @@ class ButtonComponent {
|
|
|
414
408
|
return this.element;
|
|
415
409
|
}
|
|
416
410
|
ngOnInit() {
|
|
417
|
-
const elementTagName = this.element.tagName;
|
|
418
|
-
const isSpanOrKendoButton = elementTagName === SPAN_TAG_NAME || elementTagName === KENDO_BUTTON_TAG_NAME;
|
|
419
411
|
if (!this.element.hasAttribute('role') && this.togglable) {
|
|
420
412
|
this.toggleAriaPressed(this.toggleable);
|
|
421
413
|
}
|
|
422
|
-
if (this.role) {
|
|
423
|
-
const isButtonElementAndRole = elementTagName === BUTTON_TAG_NAME && this.role === 'button';
|
|
424
|
-
if (!isButtonElementAndRole) {
|
|
425
|
-
this.setAttribute('role', this.role);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
if (isSpanOrKendoButton && !this.isDisabled) {
|
|
429
|
-
this.tabIndex = 0;
|
|
430
|
-
}
|
|
431
|
-
if (isDevMode() && isSpanOrKendoButton) {
|
|
432
|
-
console.warn(`As of package v16, the "span[kendoButton]" and "kendo-button" selectors are deprecated and can
|
|
433
|
-
be removed in a future major version. We recommend using the "button[kendoButton]" selector
|
|
434
|
-
to avoid discrepancies between the behavior of the "ButtonComponent" and the native HTML Button element.`);
|
|
435
|
-
}
|
|
436
414
|
this.ngZone.runOutsideAngular(() => {
|
|
437
415
|
this.subs.add(this.renderer.listen(this.element, 'click', this._onButtonClick.bind(this)));
|
|
438
|
-
this.subs.add(this.renderer.listen(this.element, 'keydown', (event) => {
|
|
439
|
-
const isSpaceOrEnter = event.keyCode === Keys.Space || event.keyCode === Keys.Enter;
|
|
440
|
-
if (isSpanOrKendoButton && isSpaceOrEnter) {
|
|
441
|
-
this.ngZone.run(() => {
|
|
442
|
-
this.click.emit(event);
|
|
443
|
-
});
|
|
444
|
-
this._onButtonClick();
|
|
445
|
-
}
|
|
446
|
-
}));
|
|
447
416
|
this.subs.add(this.renderer.listen(this.element, 'mousedown', (event) => {
|
|
448
|
-
const elementTagName = this.element.tagName;
|
|
449
|
-
const isButton = elementTagName === BUTTON_TAG_NAME;
|
|
450
417
|
const isBrowserSafari = isDocumentAvailable() && isSafari(navigator.userAgent);
|
|
451
|
-
if (!this.isDisabled &&
|
|
418
|
+
if (!this.isDisabled && isBrowserSafari) {
|
|
452
419
|
event.preventDefault();
|
|
453
420
|
this.element.focus();
|
|
454
421
|
}
|
|
@@ -577,7 +544,7 @@ class ButtonComponent {
|
|
|
577
544
|
}
|
|
578
545
|
}
|
|
579
546
|
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: KendoButtonService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
580
|
-
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ButtonComponent, isStandalone: true, selector: "button[kendoButton]
|
|
547
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ButtonComponent, isStandalone: true, selector: "button[kendoButton]", inputs: { arrowIcon: "arrowIcon", toggleable: "toggleable", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", imageUrl: "imageUrl", iconClass: "iconClass", icon: "icon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", svgIcon: "svgIcon", primary: "primary", look: "look" }, outputs: { selectedChange: "selectedChange", click: "click" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-button": "this.classButton", "class.k-toggle-button": "this.isToggleable", "class.k-icon-button": "this.iconButtonClass", "attr.aria-disabled": "this.classDisabled", "class.k-disabled": "this.classDisabled", "class.k-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
|
|
581
548
|
LocalizationService,
|
|
582
549
|
{
|
|
583
550
|
provide: L10N_PREFIX,
|
|
@@ -595,11 +562,12 @@ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
|
595
562
|
<span *ngIf="iconClass" class="k-button-icon" [ngClass]="iconClass"></span>
|
|
596
563
|
<span class="k-button-text"><ng-content></ng-content></span>
|
|
597
564
|
<span *ngIf="$any(arrowIcon).iconClass" class="k-button-icon" [ngClass]="$any(arrowIcon).iconClass"></span>
|
|
598
|
-
<
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
565
|
+
<span *ngIf="arrowIcon && !$any(arrowIcon).iconClass" class="k-button-arrow">
|
|
566
|
+
<kendo-icon-wrapper
|
|
567
|
+
[name]="$any(arrowIcon).icon || 'caret-alt-down'"
|
|
568
|
+
[svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
|
|
569
|
+
</span>
|
|
570
|
+
|
|
603
571
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
604
572
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
605
573
|
type: Component,
|
|
@@ -612,7 +580,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
612
580
|
useValue: 'kendo.button'
|
|
613
581
|
}
|
|
614
582
|
],
|
|
615
|
-
selector: 'button[kendoButton]
|
|
583
|
+
selector: 'button[kendoButton]',
|
|
616
584
|
template: `
|
|
617
585
|
<kendo-icon-wrapper
|
|
618
586
|
*ngIf="icon || svgIcon"
|
|
@@ -625,11 +593,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
625
593
|
<span *ngIf="iconClass" class="k-button-icon" [ngClass]="iconClass"></span>
|
|
626
594
|
<span class="k-button-text"><ng-content></ng-content></span>
|
|
627
595
|
<span *ngIf="$any(arrowIcon).iconClass" class="k-button-icon" [ngClass]="$any(arrowIcon).iconClass"></span>
|
|
628
|
-
<
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
596
|
+
<span *ngIf="arrowIcon && !$any(arrowIcon).iconClass" class="k-button-arrow">
|
|
597
|
+
<kendo-icon-wrapper
|
|
598
|
+
[name]="$any(arrowIcon).icon || 'caret-alt-down'"
|
|
599
|
+
[svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
|
|
600
|
+
</span>
|
|
601
|
+
|
|
633
602
|
`,
|
|
634
603
|
standalone: true,
|
|
635
604
|
imports: [NgIf, IconWrapperComponent, NgClass]
|
|
@@ -664,8 +633,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
664
633
|
type: Input
|
|
665
634
|
}], svgIcon: [{
|
|
666
635
|
type: Input
|
|
667
|
-
}], role: [{
|
|
668
|
-
type: Input
|
|
669
636
|
}], selectedChange: [{
|
|
670
637
|
type: Output
|
|
671
638
|
}], click: [{
|
|
@@ -679,9 +646,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
679
646
|
}], iconButtonClass: [{
|
|
680
647
|
type: HostBinding,
|
|
681
648
|
args: ['class.k-icon-button']
|
|
682
|
-
}], roleSetter: [{
|
|
683
|
-
type: HostBinding,
|
|
684
|
-
args: ['attr.role']
|
|
685
649
|
}], classDisabled: [{
|
|
686
650
|
type: HostBinding,
|
|
687
651
|
args: ['attr.aria-disabled']
|
|
@@ -764,6 +728,7 @@ class ButtonGroupComponent {
|
|
|
764
728
|
this.currentTabIndex = 0;
|
|
765
729
|
this.lastFocusedIndex = -1;
|
|
766
730
|
this.subs = new Subscription();
|
|
731
|
+
this.wrapperClasses = true;
|
|
767
732
|
this.role = 'group';
|
|
768
733
|
this.focusHandler = () => {
|
|
769
734
|
this.currentTabIndex = -1;
|
|
@@ -787,9 +752,6 @@ class ButtonGroupComponent {
|
|
|
787
752
|
get tabIndex() {
|
|
788
753
|
return this._tabIndex;
|
|
789
754
|
}
|
|
790
|
-
get wrapperClass() {
|
|
791
|
-
return true;
|
|
792
|
-
}
|
|
793
755
|
get disabledClass() {
|
|
794
756
|
return this.disabled;
|
|
795
757
|
}
|
|
@@ -950,7 +912,7 @@ class ButtonGroupComponent {
|
|
|
950
912
|
}
|
|
951
913
|
}
|
|
952
914
|
ButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ButtonGroupComponent, deps: [{ token: KendoButtonService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
953
|
-
ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ButtonGroupComponent, isStandalone: true, selector: "kendo-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", tabIndex: "tabIndex", navigable: "navigable" }, outputs: { navigate: "navigate" }, host: { properties: { "class.k-button-group": "this.
|
|
915
|
+
ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ButtonGroupComponent, isStandalone: true, selector: "kendo-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", tabIndex: "tabIndex", navigable: "navigable" }, outputs: { navigate: "navigate" }, host: { properties: { "class.k-button-group": "this.wrapperClasses", "class.k-disabled": "this.disabledClass", "class.k-button-group-stretched": "this.stretchedClass", "attr.role": "this.role", "attr.dir": "this.dir", "attr.aria-disabled": "this.ariaDisabled", "style.width": "this.wrapperWidth", "attr.tabindex": "this.wrapperTabIndex" } }, providers: [
|
|
954
916
|
KendoButtonService,
|
|
955
917
|
LocalizationService,
|
|
956
918
|
{
|
|
@@ -958,7 +920,7 @@ ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
958
920
|
useValue: 'kendo.buttongroup'
|
|
959
921
|
}
|
|
960
922
|
], queries: [{ propertyName: "buttons", predicate: ButtonComponent }], exportAs: ["kendoButtonGroup"], usesOnChanges: true, ngImport: i0, template: `
|
|
961
|
-
<ng-content select="[kendoButton]
|
|
923
|
+
<ng-content select="[kendoButton]"></ng-content>
|
|
962
924
|
`, isInline: true });
|
|
963
925
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ButtonGroupComponent, decorators: [{
|
|
964
926
|
type: Component,
|
|
@@ -974,7 +936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
974
936
|
],
|
|
975
937
|
selector: 'kendo-buttongroup',
|
|
976
938
|
template: `
|
|
977
|
-
<ng-content select="[kendoButton]
|
|
939
|
+
<ng-content select="[kendoButton]"></ng-content>
|
|
978
940
|
`,
|
|
979
941
|
standalone: true
|
|
980
942
|
}]
|
|
@@ -996,7 +958,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
996
958
|
}], buttons: [{
|
|
997
959
|
type: ContentChildren,
|
|
998
960
|
args: [ButtonComponent]
|
|
999
|
-
}],
|
|
961
|
+
}], wrapperClasses: [{
|
|
1000
962
|
type: HostBinding,
|
|
1001
963
|
args: ['class.k-button-group']
|
|
1002
964
|
}], disabledClass: [{
|
|
@@ -1166,7 +1128,7 @@ class ChipComponent {
|
|
|
1166
1128
|
return this._themeColor;
|
|
1167
1129
|
}
|
|
1168
1130
|
get hasIconClass() {
|
|
1169
|
-
return Boolean(this.icon || this.iconClass || this.
|
|
1131
|
+
return Boolean(this.icon || this.iconClass || (this.avatarSettings && !isObjectEmpty(this.avatarSettings)));
|
|
1170
1132
|
}
|
|
1171
1133
|
get disabledClass() {
|
|
1172
1134
|
return this.disabled;
|
|
@@ -1205,23 +1167,16 @@ class ChipComponent {
|
|
|
1205
1167
|
* @hidden
|
|
1206
1168
|
*/
|
|
1207
1169
|
get kendoIconClass() {
|
|
1208
|
-
this.verifyIconSettings([this.iconClass
|
|
1170
|
+
this.verifyIconSettings([this.iconClass]);
|
|
1209
1171
|
return `k-i-${this.icon}`;
|
|
1210
1172
|
}
|
|
1211
1173
|
/**
|
|
1212
1174
|
* @hidden
|
|
1213
1175
|
*/
|
|
1214
1176
|
get customIconClass() {
|
|
1215
|
-
this.verifyIconSettings([this.icon
|
|
1177
|
+
this.verifyIconSettings([this.icon]);
|
|
1216
1178
|
return this.iconClass;
|
|
1217
1179
|
}
|
|
1218
|
-
/**
|
|
1219
|
-
* @hidden
|
|
1220
|
-
*/
|
|
1221
|
-
get chipAvatarClass() {
|
|
1222
|
-
this.verifyIconSettings([this.icon, this.iconClass]);
|
|
1223
|
-
return this.avatarClass;
|
|
1224
|
-
}
|
|
1225
1180
|
/**
|
|
1226
1181
|
* @hidden
|
|
1227
1182
|
*/
|
|
@@ -1334,7 +1289,7 @@ class ChipComponent {
|
|
|
1334
1289
|
}
|
|
1335
1290
|
}
|
|
1336
1291
|
ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1337
|
-
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChipComponent, isStandalone: true, selector: "kendo-chip", inputs: { label: "label", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass",
|
|
1292
|
+
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChipComponent, isStandalone: true, selector: "kendo-chip", inputs: { label: "label", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", avatarSettings: "avatarSettings", selected: "selected", removable: "removable", removeIcon: "removeIcon", removeSvgIcon: "removeSvgIcon", hasMenu: "hasMenu", menuIcon: "menuIcon", menuSvgIcon: "menuSvgIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", menuToggle: "menuToggle", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
|
|
1338
1293
|
LocalizationService,
|
|
1339
1294
|
{
|
|
1340
1295
|
provide: L10N_PREFIX,
|
|
@@ -1353,11 +1308,19 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
1353
1308
|
size="small"
|
|
1354
1309
|
innerCssClass="k-chip-icon"
|
|
1355
1310
|
[customFontClass]="customIconClass"></kendo-icon-wrapper>
|
|
1356
|
-
|
|
1357
1311
|
<span
|
|
1358
|
-
*ngIf="
|
|
1359
|
-
class="k-chip-avatar k-avatar k-avatar-
|
|
1360
|
-
|
|
1312
|
+
*ngIf="avatarSettings"
|
|
1313
|
+
class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
1314
|
+
[ngStyle]="avatarSettings.cssStyle">
|
|
1315
|
+
<ng-container *ngIf="avatarSettings?.imageSrc">
|
|
1316
|
+
<span class="k-avatar-image">
|
|
1317
|
+
<img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
|
|
1318
|
+
</span>
|
|
1319
|
+
</ng-container>
|
|
1320
|
+
|
|
1321
|
+
<ng-container *ngIf="avatarSettings?.initials">
|
|
1322
|
+
<span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
|
|
1323
|
+
</ng-container>
|
|
1361
1324
|
</span>
|
|
1362
1325
|
|
|
1363
1326
|
<span class="k-chip-content">
|
|
@@ -1387,7 +1350,7 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
1387
1350
|
[customFontClass]="removeIcon"></kendo-icon-wrapper>
|
|
1388
1351
|
</span>
|
|
1389
1352
|
</span>
|
|
1390
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }
|
|
1353
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
1391
1354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChipComponent, decorators: [{
|
|
1392
1355
|
type: Component,
|
|
1393
1356
|
args: [{
|
|
@@ -1405,11 +1368,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1405
1368
|
size="small"
|
|
1406
1369
|
innerCssClass="k-chip-icon"
|
|
1407
1370
|
[customFontClass]="customIconClass"></kendo-icon-wrapper>
|
|
1408
|
-
|
|
1409
1371
|
<span
|
|
1410
|
-
*ngIf="
|
|
1411
|
-
class="k-chip-avatar k-avatar k-avatar-
|
|
1412
|
-
|
|
1372
|
+
*ngIf="avatarSettings"
|
|
1373
|
+
class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
1374
|
+
[ngStyle]="avatarSettings.cssStyle">
|
|
1375
|
+
<ng-container *ngIf="avatarSettings?.imageSrc">
|
|
1376
|
+
<span class="k-avatar-image">
|
|
1377
|
+
<img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
|
|
1378
|
+
</span>
|
|
1379
|
+
</ng-container>
|
|
1380
|
+
|
|
1381
|
+
<ng-container *ngIf="avatarSettings?.initials">
|
|
1382
|
+
<span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
|
|
1383
|
+
</ng-container>
|
|
1413
1384
|
</span>
|
|
1414
1385
|
|
|
1415
1386
|
<span class="k-chip-content">
|
|
@@ -1448,7 +1419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1448
1419
|
}
|
|
1449
1420
|
],
|
|
1450
1421
|
standalone: true,
|
|
1451
|
-
imports: [NgIf, IconWrapperComponent, NgClass]
|
|
1422
|
+
imports: [NgIf, NgStyle, IconWrapperComponent, NgClass]
|
|
1452
1423
|
}]
|
|
1453
1424
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { label: [{
|
|
1454
1425
|
type: Input
|
|
@@ -1458,7 +1429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1458
1429
|
type: Input
|
|
1459
1430
|
}], iconClass: [{
|
|
1460
1431
|
type: Input
|
|
1461
|
-
}],
|
|
1432
|
+
}], avatarSettings: [{
|
|
1462
1433
|
type: Input
|
|
1463
1434
|
}], selected: [{
|
|
1464
1435
|
type: Input
|
|
@@ -1547,7 +1518,7 @@ class ChipListComponent {
|
|
|
1547
1518
|
this.role = 'listbox';
|
|
1548
1519
|
this._size = 'medium';
|
|
1549
1520
|
this.subs = new Subscription();
|
|
1550
|
-
this._navigable =
|
|
1521
|
+
this._navigable = true;
|
|
1551
1522
|
this.currentActiveIndex = 0;
|
|
1552
1523
|
validatePackage(packageMetadata);
|
|
1553
1524
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
@@ -1601,10 +1572,10 @@ class ChipListComponent {
|
|
|
1601
1572
|
}
|
|
1602
1573
|
}
|
|
1603
1574
|
/**
|
|
1604
|
-
*
|
|
1605
|
-
* are part of the default tabbing sequence of the page.
|
|
1575
|
+
* By default, keyboard navigation is available through arrow keys and roving tabindex.
|
|
1576
|
+
* When set to `false`, all chips are part of the default tabbing sequence of the page.
|
|
1606
1577
|
*
|
|
1607
|
-
* @default
|
|
1578
|
+
* @default true
|
|
1608
1579
|
*/
|
|
1609
1580
|
set navigable(value) {
|
|
1610
1581
|
this._navigable = value;
|
|
@@ -2824,9 +2795,6 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2824
2795
|
get focused() {
|
|
2825
2796
|
return this._isFocused && !this._disabled;
|
|
2826
2797
|
}
|
|
2827
|
-
get widgetClasses() {
|
|
2828
|
-
return true;
|
|
2829
|
-
}
|
|
2830
2798
|
get dir() {
|
|
2831
2799
|
return this.direction;
|
|
2832
2800
|
}
|
|
@@ -2909,6 +2877,10 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2909
2877
|
this.containerService.container = this.container;
|
|
2910
2878
|
this.containerService.template = this.popupTemplate;
|
|
2911
2879
|
this.handleButtonAttributes(this.buttonAttributes);
|
|
2880
|
+
const arrowWrapper = this.button.nativeElement.querySelector('.k-button-arrow');
|
|
2881
|
+
if (arrowWrapper) {
|
|
2882
|
+
this.renderer.addClass(arrowWrapper, 'k-menu-button-arrow');
|
|
2883
|
+
}
|
|
2912
2884
|
}
|
|
2913
2885
|
/**
|
|
2914
2886
|
* @hidden
|
|
@@ -2948,7 +2920,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2948
2920
|
}
|
|
2949
2921
|
}
|
|
2950
2922
|
DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", 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 }, { token: PopupContainerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2951
|
-
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DropDownButtonComponent, isStandalone: true, selector: "kendo-dropdownbutton", inputs: { arrowIcon: "arrowIcon", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonAttributes: "buttonAttributes" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "
|
|
2923
|
+
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DropDownButtonComponent, isStandalone: true, selector: "kendo-dropdownbutton", inputs: { arrowIcon: "arrowIcon", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonAttributes: "buttonAttributes" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "attr.dir": "this.dir" } }, providers: [
|
|
2952
2924
|
FocusService,
|
|
2953
2925
|
NavigationService,
|
|
2954
2926
|
NAVIGATION_SETTINGS_PROVIDER$2,
|
|
@@ -2963,6 +2935,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
2963
2935
|
type="button"
|
|
2964
2936
|
[id]="buttonId"
|
|
2965
2937
|
[tabindex]="componentTabIndex"
|
|
2938
|
+
class="k-menu-button"
|
|
2966
2939
|
[class.k-active]="active"
|
|
2967
2940
|
[disabled]="disabled"
|
|
2968
2941
|
[icon]="icon"
|
|
@@ -3001,7 +2974,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
3001
2974
|
</kendo-button-list>
|
|
3002
2975
|
</ng-template>
|
|
3003
2976
|
<ng-container #container></ng-container>
|
|
3004
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
2977
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }] });
|
|
3005
2978
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
3006
2979
|
type: Component,
|
|
3007
2980
|
args: [{
|
|
@@ -3023,6 +2996,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3023
2996
|
type="button"
|
|
3024
2997
|
[id]="buttonId"
|
|
3025
2998
|
[tabindex]="componentTabIndex"
|
|
2999
|
+
class="k-menu-button"
|
|
3026
3000
|
[class.k-active]="active"
|
|
3027
3001
|
[disabled]="disabled"
|
|
3028
3002
|
[icon]="icon"
|
|
@@ -3100,9 +3074,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3100
3074
|
}], focused: [{
|
|
3101
3075
|
type: HostBinding,
|
|
3102
3076
|
args: ['class.k-focus']
|
|
3103
|
-
}], widgetClasses: [{
|
|
3104
|
-
type: HostBinding,
|
|
3105
|
-
args: ['class.k-dropdown-button']
|
|
3106
3077
|
}], dir: [{
|
|
3107
3078
|
type: HostBinding,
|
|
3108
3079
|
args: ['attr.dir']
|
|
@@ -5055,7 +5026,7 @@ SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
5055
5026
|
</kendo-button-list>
|
|
5056
5027
|
</ng-template>
|
|
5057
5028
|
<ng-container #container></ng-container>
|
|
5058
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
5029
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }] });
|
|
5059
5030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
5060
5031
|
type: Component,
|
|
5061
5032
|
args: [{
|
package/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export { ChipModule } from './chip/chip.module';
|
|
|
25
25
|
export { ChipListSelection } from './chip/models/selection';
|
|
26
26
|
export { ChipRemoveEvent } from './chip/chip-remove-event-args.interface';
|
|
27
27
|
export { ChipListRemoveEvent } from './chip/chip-list-remove-event-args.interface';
|
|
28
|
+
export { ChipAvatarSettings } from './chip/models/avatar-settings.interface';
|
|
28
29
|
export { FloatingActionButtonModule } from './floatingactionbutton/floatingactionbutton.module';
|
|
29
30
|
export { FloatingActionButtonComponent } from './floatingactionbutton/floatingactionbutton.component';
|
|
30
31
|
export { FloatingActionButtonTemplateDirective } from './floatingactionbutton/templates/fab-template.directive';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-buttons",
|
|
3
|
-
"version": "17.0.0-develop.
|
|
3
|
+
"version": "17.0.0-develop.20",
|
|
4
4
|
"description": "Buttons Package for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@angular/core": "15 - 18",
|
|
26
26
|
"@angular/platform-browser": "15 - 18",
|
|
27
27
|
"@progress/kendo-licensing": "^1.0.2",
|
|
28
|
-
"@progress/kendo-angular-common": "17.0.0-develop.
|
|
29
|
-
"@progress/kendo-angular-l10n": "17.0.0-develop.
|
|
30
|
-
"@progress/kendo-angular-popup": "17.0.0-develop.
|
|
31
|
-
"@progress/kendo-angular-icons": "17.0.0-develop.
|
|
28
|
+
"@progress/kendo-angular-common": "17.0.0-develop.20",
|
|
29
|
+
"@progress/kendo-angular-l10n": "17.0.0-develop.20",
|
|
30
|
+
"@progress/kendo-angular-popup": "17.0.0-develop.20",
|
|
31
|
+
"@progress/kendo-angular-icons": "17.0.0-develop.20",
|
|
32
32
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tslib": "^2.3.1",
|
|
36
|
-
"@progress/kendo-angular-schematics": "17.0.0-develop.
|
|
36
|
+
"@progress/kendo-angular-schematics": "17.0.0-develop.20",
|
|
37
37
|
"@progress/kendo-common": "^0.2.1"
|
|
38
38
|
},
|
|
39
39
|
"schematics": "./schematics/collection.json",
|
package/util.d.ts
CHANGED
|
@@ -39,3 +39,9 @@ export declare const getStylingClasses: (componentType: any, stylingOption: stri
|
|
|
39
39
|
* Returns the themeColor classes to be added and removed
|
|
40
40
|
*/
|
|
41
41
|
export declare const getThemeColorClasses: (componentType: any, prevFillMode: any, fillMode: any, previousValue: any, newValue: any) => ButtonStylingClasses;
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*
|
|
45
|
+
* Checks for an empty object - {}
|
|
46
|
+
*/
|
|
47
|
+
export declare const isObjectEmpty: (obj: any) => boolean;
|