@progress/kendo-angular-buttons 6.3.1 → 6.4.0
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/dist/cdn/js/kendo-angular-buttons.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/chip/chip.component.js +15 -13
- package/dist/es/index.js +2 -0
- package/dist/es/listbutton/list.component.js +1 -1
- package/dist/es/main.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- 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 +5 -2
- package/dist/es/splitbutton/splitbutton.module.js +4 -2
- package/dist/es/util.js +6 -0
- package/dist/es2015/chip/chip.component.d.ts +5 -3
- package/dist/es2015/chip/chip.component.js +15 -13
- package/dist/es2015/chip/models/chip-look.d.ts +6 -4
- package/dist/es2015/index.d.ts +2 -0
- package/dist/es2015/index.js +2 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/listbutton/list.component.js +1 -1
- package/dist/es2015/main.d.ts +1 -0
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/package-metadata.js +1 -1
- 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/dist/es2015/splitbutton/splitbutton.component.d.ts +1 -0
- package/dist/es2015/splitbutton/splitbutton.component.js +8 -2
- package/dist/es2015/splitbutton/splitbutton.module.js +4 -2
- package/dist/es2015/util.d.ts +4 -0
- package/dist/es2015/util.js +4 -0
- package/dist/fesm2015/index.js +94 -22
- package/dist/fesm5/index.js +110 -22
- package/dist/npm/chip/chip.component.js +15 -13
- package/dist/npm/index.js +4 -0
- package/dist/npm/listbutton/list.component.js +1 -1
- package/dist/npm/main.js +2 -0
- package/dist/npm/package-metadata.js +1 -1
- 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 +5 -2
- package/dist/npm/splitbutton/splitbutton.module.js +4 -2
- package/dist/npm/util.js +6 -0
- package/dist/systemjs/kendo-angular-buttons.js +1 -1
- package/package.json +4 -4
|
@@ -59,7 +59,7 @@ ListComponent = tslib_1.__decorate([
|
|
|
59
59
|
Component({
|
|
60
60
|
selector: 'kendo-button-list',
|
|
61
61
|
template: `
|
|
62
|
-
<ul class="k-list k-reset" unselectable="on">
|
|
62
|
+
<ul class="k-list k-reset" unselectable="on" role="menu">
|
|
63
63
|
<li role="menuitem" unselectable="on" tabindex="-1"
|
|
64
64
|
kendoButtonFocusable
|
|
65
65
|
*ngFor="let dataItem of data; let index = index;"
|
package/dist/es2015/main.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { ButtonModule } from './button/button.module';
|
|
|
9
9
|
export { ButtonsModule } from './buttons.module';
|
|
10
10
|
export { SplitButtonComponent, SplitButtonComponent as SplitButton } from './splitbutton/splitbutton.component';
|
|
11
11
|
export { SplitButtonModule } from './splitbutton/splitbutton.module';
|
|
12
|
+
export { SplitButtonCustomMessagesComponent } from './splitbutton/localization/custom-messages.component';
|
|
12
13
|
export { DropDownButtonComponent, DropDownButtonComponent as DropDownButton } from './dropdownbutton/dropdownbutton.component';
|
|
13
14
|
export { DropDownButtonModule } from './dropdownbutton/dropdownbutton.module';
|
|
14
15
|
export { ButtonLook } from './button-look';
|
package/dist/es2015/main.js
CHANGED
|
@@ -9,6 +9,7 @@ export { ButtonModule } from './button/button.module';
|
|
|
9
9
|
export { ButtonsModule } from './buttons.module';
|
|
10
10
|
export { SplitButtonComponent, SplitButtonComponent as SplitButton } from './splitbutton/splitbutton.component';
|
|
11
11
|
export { SplitButtonModule } from './splitbutton/splitbutton.module';
|
|
12
|
+
export { SplitButtonCustomMessagesComponent } from './splitbutton/localization/custom-messages.component';
|
|
12
13
|
export { DropDownButtonComponent, DropDownButtonComponent as DropDownButton } from './dropdownbutton/dropdownbutton.component';
|
|
13
14
|
export { DropDownButtonModule } from './dropdownbutton/dropdownbutton.module';
|
|
14
15
|
export { ChipComponent } from './chip/chip.component';
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-buttons',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1635407170,
|
|
13
13
|
version: '',
|
|
14
14
|
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'
|
|
15
15
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
6
|
+
import { Messages } from './messages';
|
|
7
|
+
/**
|
|
8
|
+
* Custom component messages override default component messages
|
|
9
|
+
* ([see example]({% slug rtl_buttons %}).
|
|
10
|
+
*/
|
|
11
|
+
export declare class SplitButtonCustomMessagesComponent extends Messages {
|
|
12
|
+
protected service: LocalizationService;
|
|
13
|
+
constructor(service: LocalizationService);
|
|
14
|
+
protected readonly override: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
var SplitButtonCustomMessagesComponent_1;
|
|
7
|
+
import { Component, forwardRef } from '@angular/core';
|
|
8
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
+
import { Messages } from './messages';
|
|
10
|
+
/**
|
|
11
|
+
* Custom component messages override default component messages
|
|
12
|
+
* ([see example]({% slug rtl_buttons %}).
|
|
13
|
+
*/
|
|
14
|
+
let SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = class SplitButtonCustomMessagesComponent extends Messages {
|
|
15
|
+
constructor(service) {
|
|
16
|
+
super();
|
|
17
|
+
this.service = service;
|
|
18
|
+
}
|
|
19
|
+
get override() {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = tslib_1.__decorate([
|
|
24
|
+
Component({
|
|
25
|
+
providers: [
|
|
26
|
+
{
|
|
27
|
+
provide: Messages,
|
|
28
|
+
useExisting: forwardRef(() => SplitButtonCustomMessagesComponent_1)
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
selector: 'kendo-splitbutton-messages',
|
|
32
|
+
template: ``
|
|
33
|
+
}),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
35
|
+
], SplitButtonCustomMessagesComponent);
|
|
36
|
+
export { SplitButtonCustomMessagesComponent };
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
6
|
+
import { Messages } from './messages';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare class LocalizedSplitButtonMessagesDirective extends Messages {
|
|
11
|
+
protected service: LocalizationService;
|
|
12
|
+
constructor(service: LocalizationService);
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
var LocalizedSplitButtonMessagesDirective_1;
|
|
7
|
+
import { Directive, forwardRef } from '@angular/core';
|
|
8
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
+
import { Messages } from './messages';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
let LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = class LocalizedSplitButtonMessagesDirective extends Messages {
|
|
14
|
+
constructor(service) {
|
|
15
|
+
super();
|
|
16
|
+
this.service = service;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = tslib_1.__decorate([
|
|
20
|
+
Directive({
|
|
21
|
+
providers: [
|
|
22
|
+
{
|
|
23
|
+
provide: Messages,
|
|
24
|
+
useExisting: forwardRef(() => LocalizedSplitButtonMessagesDirective_1)
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
selector: '[kendoSplitButtonLocalizedMessages]'
|
|
28
|
+
}),
|
|
29
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
30
|
+
], LocalizedSplitButtonMessagesDirective);
|
|
31
|
+
export { LocalizedSplitButtonMessagesDirective };
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export declare class Messages extends ComponentMessages {
|
|
10
|
+
/**
|
|
11
|
+
* The text for the SplitButton aria-label.
|
|
12
|
+
*
|
|
13
|
+
* The text for the aria-label consists of a two-part message - the text of the SplitButton and a localizable string.
|
|
14
|
+
* For a SplitButton with text 'Reply', the default aria-label will be 'Reply splitbutton'.
|
|
15
|
+
*
|
|
16
|
+
* To allow reordering of the SplitButton text and the localizable part, the splitButtonLabel accepts a string with a
|
|
17
|
+
* placeholder for the button text - e.g. 'splitbutton for {buttonText}'. The '{buttonText}' placeholder will be replaced
|
|
18
|
+
* internally with the current SplitButton text, and the resulting aria-label will be rendered as 'splitbutton for Reply'.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
*
|
|
22
|
+
* ```ts-no-run
|
|
23
|
+
* <kendo-splitbutton>
|
|
24
|
+
* <kendo-splitbutton-messages
|
|
25
|
+
* splitButtonLabel="splitbutton for {buttonText}"
|
|
26
|
+
* >
|
|
27
|
+
* </kendo-splitbutton-messages>
|
|
28
|
+
* </kendo-splitbutton>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
splitButtonLabel: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { Input } from '@angular/core';
|
|
7
|
+
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export class Messages extends ComponentMessages {
|
|
12
|
+
}
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
Input(),
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
16
|
+
], Messages.prototype, "splitButtonLabel", void 0);
|
|
@@ -56,6 +56,7 @@ import { ButtonLook } from '../button-look';
|
|
|
56
56
|
export declare class SplitButtonComponent extends ListButton implements AfterViewInit, OnChanges {
|
|
57
57
|
private popupService;
|
|
58
58
|
private elRef;
|
|
59
|
+
private localization;
|
|
59
60
|
/**
|
|
60
61
|
* Sets the text of the SplitButton.
|
|
61
62
|
*/
|
|
@@ -16,6 +16,7 @@ import { isDocumentAvailable, guid, isChanged } from '@progress/kendo-angular-co
|
|
|
16
16
|
import { isPresent, tick } from './../util';
|
|
17
17
|
import { PreventableEvent } from '../preventable-event';
|
|
18
18
|
import { Keys } from '@progress/kendo-angular-common';
|
|
19
|
+
import { replaceMessagePlaceholder } from '../util';
|
|
19
20
|
const NAVIGATION_SETTINGS = {
|
|
20
21
|
useLeftRightArrows: true
|
|
21
22
|
};
|
|
@@ -70,6 +71,7 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
70
71
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
71
72
|
this.popupService = popupService;
|
|
72
73
|
this.elRef = elRef;
|
|
74
|
+
this.localization = localization;
|
|
73
75
|
/**
|
|
74
76
|
* Sets the text of the SplitButton.
|
|
75
77
|
*/
|
|
@@ -289,7 +291,8 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
289
291
|
* @hidden
|
|
290
292
|
*/
|
|
291
293
|
get ariaLabel() {
|
|
292
|
-
|
|
294
|
+
const localizationMsg = this.localization.get('splitButtonLabel') || '';
|
|
295
|
+
return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
|
|
293
296
|
}
|
|
294
297
|
/**
|
|
295
298
|
* @hidden
|
|
@@ -674,10 +677,13 @@ SplitButtonComponent = tslib_1.__decorate([
|
|
|
674
677
|
],
|
|
675
678
|
selector: 'kendo-splitbutton',
|
|
676
679
|
template: `
|
|
680
|
+
<ng-container kendoSplitButtonLocalizedMessages
|
|
681
|
+
i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
|
|
682
|
+
splitButtonLabel="{{ '{buttonText} splitbutton' }}">
|
|
683
|
+
</ng-container>
|
|
677
684
|
<button
|
|
678
685
|
kendoButton
|
|
679
686
|
#button
|
|
680
|
-
role="listbox"
|
|
681
687
|
[type]="type"
|
|
682
688
|
[look]="look"
|
|
683
689
|
[tabindex]="componentTabIndex"
|
|
@@ -9,6 +9,8 @@ import { PopupModule } from '@progress/kendo-angular-popup';
|
|
|
9
9
|
import { ButtonModule } from './../button/button.module';
|
|
10
10
|
import { ListModule } from './../listbutton/list.module';
|
|
11
11
|
import { SplitButtonComponent } from './splitbutton.component';
|
|
12
|
+
import { LocalizedSplitButtonMessagesDirective } from './localization/localized-messages.directive';
|
|
13
|
+
import { SplitButtonCustomMessagesComponent } from './localization/custom-messages.component';
|
|
12
14
|
/**
|
|
13
15
|
* @hidden
|
|
14
16
|
*
|
|
@@ -21,8 +23,8 @@ let SplitButtonModule = class SplitButtonModule {
|
|
|
21
23
|
};
|
|
22
24
|
SplitButtonModule = tslib_1.__decorate([
|
|
23
25
|
NgModule({
|
|
24
|
-
declarations: [SplitButtonComponent],
|
|
25
|
-
exports: [SplitButtonComponent, ListModule],
|
|
26
|
+
declarations: [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
27
|
+
exports: [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
26
28
|
imports: [CommonModule, PopupModule, ButtonModule, ListModule]
|
|
27
29
|
})
|
|
28
30
|
], SplitButtonModule);
|
package/dist/es2015/util.d.ts
CHANGED
|
@@ -14,3 +14,7 @@ export declare const tick: (f: any) => Promise<any>;
|
|
|
14
14
|
* @hidden
|
|
15
15
|
*/
|
|
16
16
|
export declare function closest(element: any, selector: string): any;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare const replaceMessagePlaceholder: (message: string, name: string, value: string) => string;
|
package/dist/es2015/util.js
CHANGED
package/dist/fesm2015/index.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
6
|
-
import { Injectable, EventEmitter, Input, Output, HostBinding, HostListener, Directive, Optional, ElementRef, Renderer2, NgZone, isDevMode, ContentChildren, QueryList, Component, NgModule, TemplateRef, ViewContainerRef, InjectionToken, Inject, ContentChild, ViewChild, ChangeDetectorRef } from '@angular/core';
|
|
6
|
+
import { Injectable, EventEmitter, Input, Output, HostBinding, HostListener, Directive, Optional, ElementRef, Renderer2, NgZone, isDevMode, ContentChildren, QueryList, Component, NgModule, TemplateRef, ViewContainerRef, InjectionToken, Inject, ContentChild, ViewChild, ChangeDetectorRef, forwardRef } from '@angular/core';
|
|
7
7
|
import { BehaviorSubject, Subject, fromEvent, merge, Subscription } from 'rxjs';
|
|
8
8
|
import { Keys, isChanged, isDocumentAvailable, hasObservers, guid, EventsModule } from '@progress/kendo-angular-common';
|
|
9
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
|
+
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { filter, take } from 'rxjs/operators';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
@@ -43,7 +43,7 @@ const packageMetadata = {
|
|
|
43
43
|
name: '@progress/kendo-angular-buttons',
|
|
44
44
|
productName: 'Kendo UI for Angular',
|
|
45
45
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
46
|
-
publishDate:
|
|
46
|
+
publishDate: 1635407170,
|
|
47
47
|
version: '',
|
|
48
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
49
|
};
|
|
@@ -613,6 +613,10 @@ function closest(element, selector) {
|
|
|
613
613
|
node = node.parentNode;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
+
/**
|
|
617
|
+
* @hidden
|
|
618
|
+
*/
|
|
619
|
+
const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|
|
616
620
|
|
|
617
621
|
/**
|
|
618
622
|
* @hidden
|
|
@@ -1145,7 +1149,7 @@ ListComponent = __decorate([
|
|
|
1145
1149
|
Component({
|
|
1146
1150
|
selector: 'kendo-button-list',
|
|
1147
1151
|
template: `
|
|
1148
|
-
<ul class="k-list k-reset" unselectable="on">
|
|
1152
|
+
<ul class="k-list k-reset" unselectable="on" role="menu">
|
|
1149
1153
|
<li role="menuitem" unselectable="on" tabindex="-1"
|
|
1150
1154
|
kendoButtonFocusable
|
|
1151
1155
|
*ngFor="let dataItem of data; let index = index;"
|
|
@@ -1719,6 +1723,7 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1719
1723
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
1720
1724
|
this.popupService = popupService;
|
|
1721
1725
|
this.elRef = elRef;
|
|
1726
|
+
this.localization = localization;
|
|
1722
1727
|
/**
|
|
1723
1728
|
* Sets the text of the SplitButton.
|
|
1724
1729
|
*/
|
|
@@ -1938,7 +1943,8 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1938
1943
|
* @hidden
|
|
1939
1944
|
*/
|
|
1940
1945
|
get ariaLabel() {
|
|
1941
|
-
|
|
1946
|
+
const localizationMsg = this.localization.get('splitButtonLabel') || '';
|
|
1947
|
+
return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
|
|
1942
1948
|
}
|
|
1943
1949
|
/**
|
|
1944
1950
|
* @hidden
|
|
@@ -2323,10 +2329,13 @@ SplitButtonComponent = __decorate([
|
|
|
2323
2329
|
],
|
|
2324
2330
|
selector: 'kendo-splitbutton',
|
|
2325
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>
|
|
2326
2336
|
<button
|
|
2327
2337
|
kendoButton
|
|
2328
2338
|
#button
|
|
2329
|
-
role="listbox"
|
|
2330
2339
|
[type]="type"
|
|
2331
2340
|
[look]="look"
|
|
2332
2341
|
[tabindex]="componentTabIndex"
|
|
@@ -2390,6 +2399,67 @@ SplitButtonComponent = __decorate([
|
|
|
2390
2399
|
ChangeDetectorRef])
|
|
2391
2400
|
], SplitButtonComponent);
|
|
2392
2401
|
|
|
2402
|
+
/**
|
|
2403
|
+
* @hidden
|
|
2404
|
+
*/
|
|
2405
|
+
class Messages extends ComponentMessages {
|
|
2406
|
+
}
|
|
2407
|
+
__decorate([
|
|
2408
|
+
Input(),
|
|
2409
|
+
__metadata("design:type", String)
|
|
2410
|
+
], Messages.prototype, "splitButtonLabel", void 0);
|
|
2411
|
+
|
|
2412
|
+
var LocalizedSplitButtonMessagesDirective_1;
|
|
2413
|
+
/**
|
|
2414
|
+
* @hidden
|
|
2415
|
+
*/
|
|
2416
|
+
let LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = class LocalizedSplitButtonMessagesDirective extends Messages {
|
|
2417
|
+
constructor(service) {
|
|
2418
|
+
super();
|
|
2419
|
+
this.service = service;
|
|
2420
|
+
}
|
|
2421
|
+
};
|
|
2422
|
+
LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = __decorate([
|
|
2423
|
+
Directive({
|
|
2424
|
+
providers: [
|
|
2425
|
+
{
|
|
2426
|
+
provide: Messages,
|
|
2427
|
+
useExisting: forwardRef(() => LocalizedSplitButtonMessagesDirective_1)
|
|
2428
|
+
}
|
|
2429
|
+
],
|
|
2430
|
+
selector: '[kendoSplitButtonLocalizedMessages]'
|
|
2431
|
+
}),
|
|
2432
|
+
__metadata("design:paramtypes", [LocalizationService])
|
|
2433
|
+
], LocalizedSplitButtonMessagesDirective);
|
|
2434
|
+
|
|
2435
|
+
var SplitButtonCustomMessagesComponent_1;
|
|
2436
|
+
/**
|
|
2437
|
+
* Custom component messages override default component messages
|
|
2438
|
+
* ([see example]({% slug rtl_buttons %}).
|
|
2439
|
+
*/
|
|
2440
|
+
let SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = class SplitButtonCustomMessagesComponent extends Messages {
|
|
2441
|
+
constructor(service) {
|
|
2442
|
+
super();
|
|
2443
|
+
this.service = service;
|
|
2444
|
+
}
|
|
2445
|
+
get override() {
|
|
2446
|
+
return true;
|
|
2447
|
+
}
|
|
2448
|
+
};
|
|
2449
|
+
SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = __decorate([
|
|
2450
|
+
Component({
|
|
2451
|
+
providers: [
|
|
2452
|
+
{
|
|
2453
|
+
provide: Messages,
|
|
2454
|
+
useExisting: forwardRef(() => SplitButtonCustomMessagesComponent_1)
|
|
2455
|
+
}
|
|
2456
|
+
],
|
|
2457
|
+
selector: 'kendo-splitbutton-messages',
|
|
2458
|
+
template: ``
|
|
2459
|
+
}),
|
|
2460
|
+
__metadata("design:paramtypes", [LocalizationService])
|
|
2461
|
+
], SplitButtonCustomMessagesComponent);
|
|
2462
|
+
|
|
2393
2463
|
/**
|
|
2394
2464
|
* @hidden
|
|
2395
2465
|
*
|
|
@@ -2402,8 +2472,8 @@ let SplitButtonModule = class SplitButtonModule {
|
|
|
2402
2472
|
};
|
|
2403
2473
|
SplitButtonModule = __decorate([
|
|
2404
2474
|
NgModule({
|
|
2405
|
-
declarations: [SplitButtonComponent],
|
|
2406
|
-
exports: [SplitButtonComponent, ListModule],
|
|
2475
|
+
declarations: [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
2476
|
+
exports: [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
2407
2477
|
imports: [CommonModule, PopupModule, ButtonModule, ListModule]
|
|
2408
2478
|
})
|
|
2409
2479
|
], SplitButtonModule);
|
|
@@ -3045,10 +3115,12 @@ let ChipComponent = class ChipComponent {
|
|
|
3045
3115
|
* Changes the visual appearance by using alternative styling options.
|
|
3046
3116
|
*
|
|
3047
3117
|
* The available values are:
|
|
3048
|
-
* * `
|
|
3049
|
-
* * `
|
|
3118
|
+
* * `solid`
|
|
3119
|
+
* * `outline`
|
|
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).
|
|
3050
3122
|
*/
|
|
3051
|
-
this.look = '
|
|
3123
|
+
this.look = 'solid';
|
|
3052
3124
|
/**
|
|
3053
3125
|
* Specifies the selected state of the Chip.
|
|
3054
3126
|
*/
|
|
@@ -3091,10 +3163,10 @@ let ChipComponent = class ChipComponent {
|
|
|
3091
3163
|
return this.selected;
|
|
3092
3164
|
}
|
|
3093
3165
|
get outlineClass() {
|
|
3094
|
-
return this.look === 'outlined';
|
|
3166
|
+
return this.look === 'outline' || this.look === 'outlined';
|
|
3095
3167
|
}
|
|
3096
|
-
get
|
|
3097
|
-
return this.look === 'filled';
|
|
3168
|
+
get solidClass() {
|
|
3169
|
+
return this.look === 'solid' || this.look === 'filled';
|
|
3098
3170
|
}
|
|
3099
3171
|
get hasIconClass() {
|
|
3100
3172
|
return this.icon || this.iconClass ? true : false;
|
|
@@ -3198,10 +3270,10 @@ let ChipComponent = class ChipComponent {
|
|
|
3198
3270
|
attachElementEventHandlers(chip) {
|
|
3199
3271
|
this.ngZone.runOutsideAngular(() => {
|
|
3200
3272
|
const focusListener = this.renderer.listen(chip, 'focus', () => {
|
|
3201
|
-
this.renderer.addClass(chip, 'k-
|
|
3273
|
+
this.renderer.addClass(chip, 'k-focus');
|
|
3202
3274
|
});
|
|
3203
3275
|
const blurListener = this.renderer.listen(chip, 'blur', () => {
|
|
3204
|
-
this.renderer.removeClass(chip, 'k-
|
|
3276
|
+
this.renderer.removeClass(chip, 'k-focus');
|
|
3205
3277
|
});
|
|
3206
3278
|
const contentClickListener = this.renderer.listen(chip, 'click', (e) => {
|
|
3207
3279
|
const isRemoveClicked = closest(e.target, '.k-remove-icon');
|
|
@@ -3286,10 +3358,10 @@ __decorate([
|
|
|
3286
3358
|
__metadata("design:paramtypes", [])
|
|
3287
3359
|
], ChipComponent.prototype, "outlineClass", null);
|
|
3288
3360
|
__decorate([
|
|
3289
|
-
HostBinding('class.k-chip-
|
|
3361
|
+
HostBinding('class.k-chip-solid'),
|
|
3290
3362
|
__metadata("design:type", Boolean),
|
|
3291
3363
|
__metadata("design:paramtypes", [])
|
|
3292
|
-
], ChipComponent.prototype, "
|
|
3364
|
+
], ChipComponent.prototype, "solidClass", null);
|
|
3293
3365
|
__decorate([
|
|
3294
3366
|
HostBinding('class.k-chip-has-icon'),
|
|
3295
3367
|
__metadata("design:type", Boolean),
|
|
@@ -3297,17 +3369,17 @@ __decorate([
|
|
|
3297
3369
|
], ChipComponent.prototype, "hasIconClass", null);
|
|
3298
3370
|
__decorate([
|
|
3299
3371
|
HostBinding('attr.aria-disabled'),
|
|
3300
|
-
HostBinding('class.k-
|
|
3372
|
+
HostBinding('class.k-disabled'),
|
|
3301
3373
|
__metadata("design:type", Boolean),
|
|
3302
3374
|
__metadata("design:paramtypes", [])
|
|
3303
3375
|
], ChipComponent.prototype, "disabledClass", null);
|
|
3304
3376
|
__decorate([
|
|
3305
|
-
HostBinding('class.k-
|
|
3377
|
+
HostBinding('class.k-selected'),
|
|
3306
3378
|
__metadata("design:type", Boolean),
|
|
3307
3379
|
__metadata("design:paramtypes", [])
|
|
3308
3380
|
], ChipComponent.prototype, "selectedClass", null);
|
|
3309
3381
|
__decorate([
|
|
3310
|
-
HostBinding('class.k-
|
|
3382
|
+
HostBinding('class.k-focus'),
|
|
3311
3383
|
__metadata("design:type", Boolean),
|
|
3312
3384
|
__metadata("design:paramtypes", [])
|
|
3313
3385
|
], ChipComponent.prototype, "focusedClass", null);
|
|
@@ -4753,4 +4825,4 @@ ButtonsModule = __decorate([
|
|
|
4753
4825
|
* Generated bundle index. Do not edit.
|
|
4754
4826
|
*/
|
|
4755
4827
|
|
|
4756
|
-
export { KendoButtonService, DialItemComponent, DialListComponent, FocusService, FocusableDirective, ButtonItemTemplateDirective, ListButton, ListComponent, ListModule, TemplateContextDirective, NAVIGATION_CONFIG, NavigationService, ButtonDirective, ButtonDirective as Button, ButtonGroupComponent, ButtonGroupComponent as ButtonGroup, ButtonGroupModule, ButtonModule, ButtonsModule, SplitButtonComponent, SplitButtonComponent as SplitButton, SplitButtonModule, DropDownButtonComponent, DropDownButtonComponent as DropDownButton, DropDownButtonModule, ChipComponent, ChipListComponent, ChipModule, FloatingActionButtonModule, FloatingActionButtonComponent, FloatingActionButtonTemplateDirective, DialItemTemplateDirective };
|
|
4828
|
+
export { KendoButtonService, DialItemComponent, DialListComponent, FocusService, FocusableDirective, ButtonItemTemplateDirective, ListButton, ListComponent, ListModule, TemplateContextDirective, NAVIGATION_CONFIG, NavigationService, LocalizedSplitButtonMessagesDirective, Messages, ButtonDirective, ButtonDirective as Button, ButtonGroupComponent, ButtonGroupComponent as ButtonGroup, ButtonGroupModule, ButtonModule, ButtonsModule, SplitButtonComponent, SplitButtonComponent as SplitButton, SplitButtonModule, SplitButtonCustomMessagesComponent, DropDownButtonComponent, DropDownButtonComponent as DropDownButton, DropDownButtonModule, ChipComponent, ChipListComponent, ChipModule, FloatingActionButtonModule, FloatingActionButtonComponent, FloatingActionButtonTemplateDirective, DialItemTemplateDirective };
|