@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
|
@@ -22,10 +22,12 @@ var ChipComponent = /** @class */ (function () {
|
|
|
22
22
|
* Changes the visual appearance by using alternative styling options.
|
|
23
23
|
*
|
|
24
24
|
* The available values are:
|
|
25
|
-
* * `
|
|
26
|
-
* * `
|
|
25
|
+
* * `solid`
|
|
26
|
+
* * `outline`
|
|
27
|
+
* * `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
|
|
28
|
+
* * `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
|
|
27
29
|
*/
|
|
28
|
-
this.look = '
|
|
30
|
+
this.look = 'solid';
|
|
29
31
|
/**
|
|
30
32
|
* Specifies the selected state of the Chip.
|
|
31
33
|
*/
|
|
@@ -73,14 +75,14 @@ var ChipComponent = /** @class */ (function () {
|
|
|
73
75
|
});
|
|
74
76
|
Object.defineProperty(ChipComponent.prototype, "outlineClass", {
|
|
75
77
|
get: function () {
|
|
76
|
-
return this.look === 'outlined';
|
|
78
|
+
return this.look === 'outline' || this.look === 'outlined';
|
|
77
79
|
},
|
|
78
80
|
enumerable: true,
|
|
79
81
|
configurable: true
|
|
80
82
|
});
|
|
81
|
-
Object.defineProperty(ChipComponent.prototype, "
|
|
83
|
+
Object.defineProperty(ChipComponent.prototype, "solidClass", {
|
|
82
84
|
get: function () {
|
|
83
|
-
return this.look === 'filled';
|
|
85
|
+
return this.look === 'solid' || this.look === 'filled';
|
|
84
86
|
},
|
|
85
87
|
enumerable: true,
|
|
86
88
|
configurable: true
|
|
@@ -220,10 +222,10 @@ var ChipComponent = /** @class */ (function () {
|
|
|
220
222
|
var _this = this;
|
|
221
223
|
this.ngZone.runOutsideAngular(function () {
|
|
222
224
|
var focusListener = _this.renderer.listen(chip, 'focus', function () {
|
|
223
|
-
_this.renderer.addClass(chip, 'k-
|
|
225
|
+
_this.renderer.addClass(chip, 'k-focus');
|
|
224
226
|
});
|
|
225
227
|
var blurListener = _this.renderer.listen(chip, 'blur', function () {
|
|
226
|
-
_this.renderer.removeClass(chip, 'k-
|
|
228
|
+
_this.renderer.removeClass(chip, 'k-focus');
|
|
227
229
|
});
|
|
228
230
|
var contentClickListener = _this.renderer.listen(chip, 'click', function (e) {
|
|
229
231
|
var isRemoveClicked = closest(e.target, '.k-remove-icon');
|
|
@@ -307,10 +309,10 @@ var ChipComponent = /** @class */ (function () {
|
|
|
307
309
|
tslib_1.__metadata("design:paramtypes", [])
|
|
308
310
|
], ChipComponent.prototype, "outlineClass", null);
|
|
309
311
|
tslib_1.__decorate([
|
|
310
|
-
HostBinding('class.k-chip-
|
|
312
|
+
HostBinding('class.k-chip-solid'),
|
|
311
313
|
tslib_1.__metadata("design:type", Boolean),
|
|
312
314
|
tslib_1.__metadata("design:paramtypes", [])
|
|
313
|
-
], ChipComponent.prototype, "
|
|
315
|
+
], ChipComponent.prototype, "solidClass", null);
|
|
314
316
|
tslib_1.__decorate([
|
|
315
317
|
HostBinding('class.k-chip-has-icon'),
|
|
316
318
|
tslib_1.__metadata("design:type", Boolean),
|
|
@@ -318,17 +320,17 @@ var ChipComponent = /** @class */ (function () {
|
|
|
318
320
|
], ChipComponent.prototype, "hasIconClass", null);
|
|
319
321
|
tslib_1.__decorate([
|
|
320
322
|
HostBinding('attr.aria-disabled'),
|
|
321
|
-
HostBinding('class.k-
|
|
323
|
+
HostBinding('class.k-disabled'),
|
|
322
324
|
tslib_1.__metadata("design:type", Boolean),
|
|
323
325
|
tslib_1.__metadata("design:paramtypes", [])
|
|
324
326
|
], ChipComponent.prototype, "disabledClass", null);
|
|
325
327
|
tslib_1.__decorate([
|
|
326
|
-
HostBinding('class.k-
|
|
328
|
+
HostBinding('class.k-selected'),
|
|
327
329
|
tslib_1.__metadata("design:type", Boolean),
|
|
328
330
|
tslib_1.__metadata("design:paramtypes", [])
|
|
329
331
|
], ChipComponent.prototype, "selectedClass", null);
|
|
330
332
|
tslib_1.__decorate([
|
|
331
|
-
HostBinding('class.k-
|
|
333
|
+
HostBinding('class.k-focus'),
|
|
332
334
|
tslib_1.__metadata("design:type", Boolean),
|
|
333
335
|
tslib_1.__metadata("design:paramtypes", [])
|
|
334
336
|
], ChipComponent.prototype, "focusedClass", null);
|
package/dist/es/index.js
CHANGED
|
@@ -18,3 +18,5 @@ export { ListModule } from './listbutton/list.module';
|
|
|
18
18
|
export { TemplateContextDirective } from './listbutton/template-context.directive';
|
|
19
19
|
export { NAVIGATION_CONFIG } from './navigation/navigation-config';
|
|
20
20
|
export { NavigationService } from './navigation/navigation.service';
|
|
21
|
+
export { LocalizedSplitButtonMessagesDirective } from './splitbutton/localization/localized-messages.directive';
|
|
22
|
+
export { Messages } from './splitbutton/localization/messages';
|
|
@@ -57,7 +57,7 @@ var ListComponent = /** @class */ (function () {
|
|
|
57
57
|
ListComponent = tslib_1.__decorate([
|
|
58
58
|
Component({
|
|
59
59
|
selector: 'kendo-button-list',
|
|
60
|
-
template: "\n <ul class=\"k-list k-reset\" unselectable=\"on\">\n <li role=\"menuitem\" unselectable=\"on\" tabindex=\"-1\"\n kendoButtonFocusable\n *ngFor=\"let dataItem of data; let index = index;\"\n [index]=\"index\"\n [ngClass]=\"{'k-item': true, 'k-state-disabled': dataItem.disabled}\"\n (click)=\"onClick(index)\"\n (blur)=\"onBlur()\"\n [attr.aria-disabled]=\"dataItem.disabled ? true : false\">\n <ng-template *ngIf=\"itemTemplate?.templateRef\"\n [templateContext]=\"{\n templateRef: itemTemplate?.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!itemTemplate?.templateRef\">\n <span\n *ngIf=\"dataItem.icon || dataItem.iconClass\"\n [ngClass]=\"getIconClasses(dataItem)\"\n ></span>\n <img\n *ngIf=\"dataItem.imageUrl\"\n class=\"k-image\"\n [src]=\"dataItem.imageUrl\"\n alt=\"\"\n >\n {{ getText(dataItem) }}\n </ng-template>\n </li>\n </ul>\n "
|
|
60
|
+
template: "\n <ul class=\"k-list k-reset\" unselectable=\"on\" role=\"menu\">\n <li role=\"menuitem\" unselectable=\"on\" tabindex=\"-1\"\n kendoButtonFocusable\n *ngFor=\"let dataItem of data; let index = index;\"\n [index]=\"index\"\n [ngClass]=\"{'k-item': true, 'k-state-disabled': dataItem.disabled}\"\n (click)=\"onClick(index)\"\n (blur)=\"onBlur()\"\n [attr.aria-disabled]=\"dataItem.disabled ? true : false\">\n <ng-template *ngIf=\"itemTemplate?.templateRef\"\n [templateContext]=\"{\n templateRef: itemTemplate?.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!itemTemplate?.templateRef\">\n <span\n *ngIf=\"dataItem.icon || dataItem.iconClass\"\n [ngClass]=\"getIconClasses(dataItem)\"\n ></span>\n <img\n *ngIf=\"dataItem.imageUrl\"\n class=\"k-image\"\n [src]=\"dataItem.imageUrl\"\n alt=\"\"\n >\n {{ getText(dataItem) }}\n </ng-template>\n </li>\n </ul>\n "
|
|
61
61
|
}),
|
|
62
62
|
tslib_1.__metadata("design:paramtypes", [])
|
|
63
63
|
], ListComponent);
|
package/dist/es/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 var 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,44 @@
|
|
|
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 { Component, forwardRef } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { Messages } from './messages';
|
|
9
|
+
/**
|
|
10
|
+
* Custom component messages override default component messages
|
|
11
|
+
* ([see example]({% slug rtl_buttons %}).
|
|
12
|
+
*/
|
|
13
|
+
var SplitButtonCustomMessagesComponent = /** @class */ (function (_super) {
|
|
14
|
+
tslib_1.__extends(SplitButtonCustomMessagesComponent, _super);
|
|
15
|
+
function SplitButtonCustomMessagesComponent(service) {
|
|
16
|
+
var _this = _super.call(this) || this;
|
|
17
|
+
_this.service = service;
|
|
18
|
+
return _this;
|
|
19
|
+
}
|
|
20
|
+
SplitButtonCustomMessagesComponent_1 = SplitButtonCustomMessagesComponent;
|
|
21
|
+
Object.defineProperty(SplitButtonCustomMessagesComponent.prototype, "override", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return true;
|
|
24
|
+
},
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
var SplitButtonCustomMessagesComponent_1;
|
|
29
|
+
SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = tslib_1.__decorate([
|
|
30
|
+
Component({
|
|
31
|
+
providers: [
|
|
32
|
+
{
|
|
33
|
+
provide: Messages,
|
|
34
|
+
useExisting: forwardRef(function () { return SplitButtonCustomMessagesComponent_1; })
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
selector: 'kendo-splitbutton-messages',
|
|
38
|
+
template: ""
|
|
39
|
+
}),
|
|
40
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
41
|
+
], SplitButtonCustomMessagesComponent);
|
|
42
|
+
return SplitButtonCustomMessagesComponent;
|
|
43
|
+
}(Messages));
|
|
44
|
+
export { SplitButtonCustomMessagesComponent };
|
|
@@ -0,0 +1,35 @@
|
|
|
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, forwardRef } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { Messages } from './messages';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
var LocalizedSplitButtonMessagesDirective = /** @class */ (function (_super) {
|
|
13
|
+
tslib_1.__extends(LocalizedSplitButtonMessagesDirective, _super);
|
|
14
|
+
function LocalizedSplitButtonMessagesDirective(service) {
|
|
15
|
+
var _this = _super.call(this) || this;
|
|
16
|
+
_this.service = service;
|
|
17
|
+
return _this;
|
|
18
|
+
}
|
|
19
|
+
LocalizedSplitButtonMessagesDirective_1 = LocalizedSplitButtonMessagesDirective;
|
|
20
|
+
var LocalizedSplitButtonMessagesDirective_1;
|
|
21
|
+
LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = tslib_1.__decorate([
|
|
22
|
+
Directive({
|
|
23
|
+
providers: [
|
|
24
|
+
{
|
|
25
|
+
provide: Messages,
|
|
26
|
+
useExisting: forwardRef(function () { return LocalizedSplitButtonMessagesDirective_1; })
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
selector: '[kendoSplitButtonLocalizedMessages]'
|
|
30
|
+
}),
|
|
31
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
32
|
+
], LocalizedSplitButtonMessagesDirective);
|
|
33
|
+
return LocalizedSplitButtonMessagesDirective;
|
|
34
|
+
}(Messages));
|
|
35
|
+
export { LocalizedSplitButtonMessagesDirective };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
var Messages = /** @class */ (function (_super) {
|
|
12
|
+
tslib_1.__extends(Messages, _super);
|
|
13
|
+
function Messages() {
|
|
14
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
Input(),
|
|
18
|
+
tslib_1.__metadata("design:type", String)
|
|
19
|
+
], Messages.prototype, "splitButtonLabel", void 0);
|
|
20
|
+
return Messages;
|
|
21
|
+
}(ComponentMessages));
|
|
22
|
+
export { Messages };
|
|
@@ -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
|
var NAVIGATION_SETTINGS = {
|
|
20
21
|
useLeftRightArrows: true
|
|
21
22
|
};
|
|
@@ -71,6 +72,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
71
72
|
var _this = _super.call(this, focusService, navigationService, wrapperRef, zone, localization, cdr) || this;
|
|
72
73
|
_this.popupService = popupService;
|
|
73
74
|
_this.elRef = elRef;
|
|
75
|
+
_this.localization = localization;
|
|
74
76
|
/**
|
|
75
77
|
* Sets the text of the SplitButton.
|
|
76
78
|
*/
|
|
@@ -336,7 +338,8 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
336
338
|
* @hidden
|
|
337
339
|
*/
|
|
338
340
|
get: function () {
|
|
339
|
-
|
|
341
|
+
var localizationMsg = this.localization.get('splitButtonLabel') || '';
|
|
342
|
+
return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
|
|
340
343
|
},
|
|
341
344
|
enumerable: true,
|
|
342
345
|
configurable: true
|
|
@@ -741,7 +744,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
741
744
|
}
|
|
742
745
|
],
|
|
743
746
|
selector: 'kendo-splitbutton',
|
|
744
|
-
template: "\n <
|
|
747
|
+
template: "\n <ng-container kendoSplitButtonLocalizedMessages\n i18n-splitButtonLabel=\"kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label\"\n splitButtonLabel=\"{{ '{buttonText} splitbutton' }}\">\n </ng-container>\n <button\n kendoButton\n #button\n [type]=\"type\"\n [look]=\"look\"\n [tabindex]=\"componentTabIndex\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [class.k-state-active]=\"active\"\n [iconClass]=\"iconClass\"\n [imageUrl]=\"imageUrl\"\n [ngClass]=\"buttonClass\"\n (focus)=\"onButtonFocus()\"\n (click)=\"onButtonClick()\"\n (blur)=\"onButtonBlur()\"\n (mousedown)=\"toggleButtonActiveState(true)\"\n (mouseup)=\"toggleButtonActiveState(false)\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-owns]=\"listId\"\n [attr.aria-label]=\"ariaLabel\"\n >\n {{ text }}<ng-content></ng-content>\n </button>\n <button\n kendoButton\n #arrowButton\n type=\"button\"\n [class.k-state-active]=\"activeArrow\"\n [disabled]=\"disabled\"\n [icon]=\"arrowButtonIcon\"\n [look]=\"look\"\n [tabindex]=\"-1\"\n [ngClass]=\"arrowButtonClass\"\n (click)=\"onArrowButtonClick()\"\n (mousedown)=\"toggleArrowButtonActiveState(true)\"\n (mouseup)=\"toggleArrowButtonActiveState(false)\"\n ></button>\n <ng-template #popupTemplate>\n <kendo-button-list\n [id]=\"listId\"\n [data]=\"data\"\n [textField]=\"textField\"\n [itemTemplate]=\"itemTemplate\"\n (onItemClick)=\"onItemClick($event)\"\n (keydown)=\"keyDownHandler($event)\"\n (keypress)=\"keyPressHandler($event)\"\n (keyup)=\"keyUpHandler($event)\"\n [attr.dir]=\"dir\"\n >\n </kendo-button-list>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
745
748
|
}),
|
|
746
749
|
tslib_1.__metadata("design:paramtypes", [FocusService,
|
|
747
750
|
NavigationService,
|
|
@@ -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
|
*
|
|
@@ -22,8 +24,8 @@ var SplitButtonModule = /** @class */ (function () {
|
|
|
22
24
|
}
|
|
23
25
|
SplitButtonModule = tslib_1.__decorate([
|
|
24
26
|
NgModule({
|
|
25
|
-
declarations: [SplitButtonComponent],
|
|
26
|
-
exports: [SplitButtonComponent, ListModule],
|
|
27
|
+
declarations: [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
28
|
+
exports: [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent],
|
|
27
29
|
imports: [CommonModule, PopupModule, ButtonModule, ListModule]
|
|
28
30
|
})
|
|
29
31
|
], SplitButtonModule);
|
package/dist/es/util.js
CHANGED
|
@@ -37,3 +37,9 @@ export function closest(element, selector) {
|
|
|
37
37
|
node = node.parentNode;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export var replaceMessagePlaceholder = function (message, name, value) {
|
|
44
|
+
return message.replace(new RegExp("{\\s*" + name + "\\s*}", 'g'), value);
|
|
45
|
+
};
|
|
@@ -20,8 +20,10 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
20
20
|
* Changes the visual appearance by using alternative styling options.
|
|
21
21
|
*
|
|
22
22
|
* The available values are:
|
|
23
|
-
* * `
|
|
24
|
-
* * `
|
|
23
|
+
* * `solid`
|
|
24
|
+
* * `outline`
|
|
25
|
+
* * `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
|
|
26
|
+
* * `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
|
|
25
27
|
*/
|
|
26
28
|
look: ChipLook;
|
|
27
29
|
/**
|
|
@@ -85,7 +87,7 @@ export declare class ChipComponent implements OnInit, AfterViewInit {
|
|
|
85
87
|
readonly ariaChecked: boolean;
|
|
86
88
|
hostClass: boolean;
|
|
87
89
|
readonly outlineClass: boolean;
|
|
88
|
-
readonly
|
|
90
|
+
readonly solidClass: boolean;
|
|
89
91
|
readonly hasIconClass: boolean;
|
|
90
92
|
readonly disabledClass: boolean;
|
|
91
93
|
readonly selectedClass: boolean;
|
|
@@ -22,10 +22,12 @@ let ChipComponent = class ChipComponent {
|
|
|
22
22
|
* Changes the visual appearance by using alternative styling options.
|
|
23
23
|
*
|
|
24
24
|
* The available values are:
|
|
25
|
-
* * `
|
|
26
|
-
* * `
|
|
25
|
+
* * `solid`
|
|
26
|
+
* * `outline`
|
|
27
|
+
* * `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
|
|
28
|
+
* * `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
|
|
27
29
|
*/
|
|
28
|
-
this.look = '
|
|
30
|
+
this.look = 'solid';
|
|
29
31
|
/**
|
|
30
32
|
* Specifies the selected state of the Chip.
|
|
31
33
|
*/
|
|
@@ -68,10 +70,10 @@ let ChipComponent = class ChipComponent {
|
|
|
68
70
|
return this.selected;
|
|
69
71
|
}
|
|
70
72
|
get outlineClass() {
|
|
71
|
-
return this.look === 'outlined';
|
|
73
|
+
return this.look === 'outline' || this.look === 'outlined';
|
|
72
74
|
}
|
|
73
|
-
get
|
|
74
|
-
return this.look === 'filled';
|
|
75
|
+
get solidClass() {
|
|
76
|
+
return this.look === 'solid' || this.look === 'filled';
|
|
75
77
|
}
|
|
76
78
|
get hasIconClass() {
|
|
77
79
|
return this.icon || this.iconClass ? true : false;
|
|
@@ -175,10 +177,10 @@ let ChipComponent = class ChipComponent {
|
|
|
175
177
|
attachElementEventHandlers(chip) {
|
|
176
178
|
this.ngZone.runOutsideAngular(() => {
|
|
177
179
|
const focusListener = this.renderer.listen(chip, 'focus', () => {
|
|
178
|
-
this.renderer.addClass(chip, 'k-
|
|
180
|
+
this.renderer.addClass(chip, 'k-focus');
|
|
179
181
|
});
|
|
180
182
|
const blurListener = this.renderer.listen(chip, 'blur', () => {
|
|
181
|
-
this.renderer.removeClass(chip, 'k-
|
|
183
|
+
this.renderer.removeClass(chip, 'k-focus');
|
|
182
184
|
});
|
|
183
185
|
const contentClickListener = this.renderer.listen(chip, 'click', (e) => {
|
|
184
186
|
const isRemoveClicked = closest(e.target, '.k-remove-icon');
|
|
@@ -263,10 +265,10 @@ tslib_1.__decorate([
|
|
|
263
265
|
tslib_1.__metadata("design:paramtypes", [])
|
|
264
266
|
], ChipComponent.prototype, "outlineClass", null);
|
|
265
267
|
tslib_1.__decorate([
|
|
266
|
-
HostBinding('class.k-chip-
|
|
268
|
+
HostBinding('class.k-chip-solid'),
|
|
267
269
|
tslib_1.__metadata("design:type", Boolean),
|
|
268
270
|
tslib_1.__metadata("design:paramtypes", [])
|
|
269
|
-
], ChipComponent.prototype, "
|
|
271
|
+
], ChipComponent.prototype, "solidClass", null);
|
|
270
272
|
tslib_1.__decorate([
|
|
271
273
|
HostBinding('class.k-chip-has-icon'),
|
|
272
274
|
tslib_1.__metadata("design:type", Boolean),
|
|
@@ -274,17 +276,17 @@ tslib_1.__decorate([
|
|
|
274
276
|
], ChipComponent.prototype, "hasIconClass", null);
|
|
275
277
|
tslib_1.__decorate([
|
|
276
278
|
HostBinding('attr.aria-disabled'),
|
|
277
|
-
HostBinding('class.k-
|
|
279
|
+
HostBinding('class.k-disabled'),
|
|
278
280
|
tslib_1.__metadata("design:type", Boolean),
|
|
279
281
|
tslib_1.__metadata("design:paramtypes", [])
|
|
280
282
|
], ChipComponent.prototype, "disabledClass", null);
|
|
281
283
|
tslib_1.__decorate([
|
|
282
|
-
HostBinding('class.k-
|
|
284
|
+
HostBinding('class.k-selected'),
|
|
283
285
|
tslib_1.__metadata("design:type", Boolean),
|
|
284
286
|
tslib_1.__metadata("design:paramtypes", [])
|
|
285
287
|
], ChipComponent.prototype, "selectedClass", null);
|
|
286
288
|
tslib_1.__decorate([
|
|
287
|
-
HostBinding('class.k-
|
|
289
|
+
HostBinding('class.k-focus'),
|
|
288
290
|
tslib_1.__metadata("design:type", Boolean),
|
|
289
291
|
tslib_1.__metadata("design:paramtypes", [])
|
|
290
292
|
], ChipComponent.prototype, "focusedClass", null);
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
* Sets the Chip appearance.
|
|
7
7
|
*
|
|
8
8
|
* The available styling options are:
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
9
|
+
* - `solid` (default)
|
|
10
|
+
* - `outline`
|
|
11
|
+
* - `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
|
|
12
|
+
* - `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```ts-no-run
|
|
14
|
-
* <kendo-chip look="
|
|
16
|
+
* <kendo-chip look="outline"></kendo-chip>
|
|
15
17
|
* ```
|
|
16
18
|
*
|
|
17
19
|
*/
|
|
18
|
-
export declare type ChipLook = 'filled' | 'outlined';
|
|
20
|
+
export declare type ChipLook = 'solid' | 'outline' | 'filled' | 'outlined';
|
package/dist/es2015/index.d.ts
CHANGED
|
@@ -18,3 +18,5 @@ export { ListModule } from './listbutton/list.module';
|
|
|
18
18
|
export { TemplateContextDirective } from './listbutton/template-context.directive';
|
|
19
19
|
export { NAVIGATION_CONFIG, NavigationConfig } from './navigation/navigation-config';
|
|
20
20
|
export { NavigationService } from './navigation/navigation.service';
|
|
21
|
+
export { LocalizedSplitButtonMessagesDirective } from './splitbutton/localization/localized-messages.directive';
|
|
22
|
+
export { Messages } from './splitbutton/localization/messages';
|
package/dist/es2015/index.js
CHANGED
|
@@ -18,3 +18,5 @@ export { ListModule } from './listbutton/list.module';
|
|
|
18
18
|
export { TemplateContextDirective } from './listbutton/template-context.directive';
|
|
19
19
|
export { NAVIGATION_CONFIG } from './navigation/navigation-config';
|
|
20
20
|
export { NavigationService } from './navigation/navigation.service';
|
|
21
|
+
export { LocalizedSplitButtonMessagesDirective } from './splitbutton/localization/localized-messages.directive';
|
|
22
|
+
export { Messages } from './splitbutton/localization/messages';
|