@progress/kendo-angular-buttons 7.0.4 → 7.0.5-dev.202203241407
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/button/button.directive.js +10 -4
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/util.js +11 -0
- package/dist/es2015/button/button.directive.js +10 -4
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/util.d.ts +6 -0
- package/dist/es2015/util.js +11 -0
- package/dist/fesm2015/index.js +21 -5
- package/dist/fesm5/index.js +21 -5
- package/dist/npm/button/button.directive.js +9 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/util.js +11 -0
- package/dist/systemjs/kendo-angular-buttons.js +1 -1
- package/package.json +2 -1
|
@@ -9,7 +9,7 @@ import { isDocumentAvailable, isChanged, hasObservers, Keys } from '@progress/ke
|
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
12
|
-
import { getStylingClasses, getThemeColorClasses } from '../util';
|
|
12
|
+
import { getStylingClasses, getThemeColorClasses, isFirefox } from '../util';
|
|
13
13
|
var SPAN_TAG_NAME = 'SPAN';
|
|
14
14
|
/**
|
|
15
15
|
* Represents the Kendo UI Button component for Angular.
|
|
@@ -133,7 +133,7 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
133
133
|
if (iconClassName) {
|
|
134
134
|
this.iconSetter(iconClassName, function () {
|
|
135
135
|
_this.isIconClass = true;
|
|
136
|
-
var classes = 'k-button-icon
|
|
136
|
+
var classes = 'k-button-icon ' + iconClassName;
|
|
137
137
|
_this.addIcon(classes);
|
|
138
138
|
});
|
|
139
139
|
}
|
|
@@ -169,6 +169,10 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
169
169
|
* If set to `true`, it disables the Button.
|
|
170
170
|
*/
|
|
171
171
|
set: function (disabled) {
|
|
172
|
+
//Required, because in FF focused buttons are not blurred on disabled
|
|
173
|
+
if (isFirefox(navigator.userAgent) && disabled) {
|
|
174
|
+
this.blur();
|
|
175
|
+
}
|
|
172
176
|
this.isDisabled = disabled;
|
|
173
177
|
this.renderer.setProperty(this.element, 'disabled', disabled);
|
|
174
178
|
},
|
|
@@ -489,8 +493,10 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
489
493
|
};
|
|
490
494
|
ButtonDirective.prototype.addImgIcon = function (imageUrl) {
|
|
491
495
|
var renderer = this.renderer;
|
|
492
|
-
this.iconSpanNode
|
|
493
|
-
|
|
496
|
+
if (!this.iconSpanNode) {
|
|
497
|
+
this.iconSpanNode = renderer.createElement('span');
|
|
498
|
+
renderer.setProperty(this.iconSpanNode, 'className', 'k-button-icon k-icon');
|
|
499
|
+
}
|
|
494
500
|
if (this.imageNode) {
|
|
495
501
|
renderer.setProperty(this.imageNode, 'src', imageUrl);
|
|
496
502
|
}
|
|
@@ -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: 1648130763,
|
|
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
|
};
|
package/dist/es/util.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/* tslint:disable:no-null-keyword */
|
|
6
6
|
/* tslint:disable:no-bitwise */
|
|
7
|
+
import { detectDesktopBrowser, detectMobileOS } from "@progress/kendo-common";
|
|
7
8
|
var resolvedPromise = Promise.resolve(null);
|
|
8
9
|
/**
|
|
9
10
|
* @hidden
|
|
@@ -95,3 +96,13 @@ export var getThemeColorClasses = function (componentType, prevFillMode, fillMod
|
|
|
95
96
|
toAdd: newValue ? "k-" + componentType + "-" + fillMode + "-" + newValue : null
|
|
96
97
|
};
|
|
97
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*
|
|
102
|
+
* Returns true if the used browser is Firefox.
|
|
103
|
+
*/
|
|
104
|
+
export var isFirefox = function (userAgent) {
|
|
105
|
+
var desktopBrowser = detectDesktopBrowser(userAgent);
|
|
106
|
+
var mobileOS = detectMobileOS(userAgent);
|
|
107
|
+
return (desktopBrowser && desktopBrowser.mozilla) || (mobileOS && mobileOS.browser === 'firefox');
|
|
108
|
+
};
|
|
@@ -9,7 +9,7 @@ import { isDocumentAvailable, isChanged, hasObservers, Keys } from '@progress/ke
|
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
12
|
-
import { getStylingClasses, getThemeColorClasses } from '../util';
|
|
12
|
+
import { getStylingClasses, getThemeColorClasses, isFirefox } from '../util';
|
|
13
13
|
const SPAN_TAG_NAME = 'SPAN';
|
|
14
14
|
/**
|
|
15
15
|
* Represents the Kendo UI Button component for Angular.
|
|
@@ -110,7 +110,7 @@ let ButtonDirective = class ButtonDirective {
|
|
|
110
110
|
if (iconClassName) {
|
|
111
111
|
this.iconSetter(iconClassName, () => {
|
|
112
112
|
this.isIconClass = true;
|
|
113
|
-
const classes = 'k-button-icon
|
|
113
|
+
const classes = 'k-button-icon ' + iconClassName;
|
|
114
114
|
this.addIcon(classes);
|
|
115
115
|
});
|
|
116
116
|
}
|
|
@@ -135,6 +135,10 @@ let ButtonDirective = class ButtonDirective {
|
|
|
135
135
|
* If set to `true`, it disables the Button.
|
|
136
136
|
*/
|
|
137
137
|
set disabled(disabled) {
|
|
138
|
+
//Required, because in FF focused buttons are not blurred on disabled
|
|
139
|
+
if (isFirefox(navigator.userAgent) && disabled) {
|
|
140
|
+
this.blur();
|
|
141
|
+
}
|
|
138
142
|
this.isDisabled = disabled;
|
|
139
143
|
this.renderer.setProperty(this.element, 'disabled', disabled);
|
|
140
144
|
}
|
|
@@ -396,8 +400,10 @@ let ButtonDirective = class ButtonDirective {
|
|
|
396
400
|
}
|
|
397
401
|
addImgIcon(imageUrl) {
|
|
398
402
|
let renderer = this.renderer;
|
|
399
|
-
this.iconSpanNode
|
|
400
|
-
|
|
403
|
+
if (!this.iconSpanNode) {
|
|
404
|
+
this.iconSpanNode = renderer.createElement('span');
|
|
405
|
+
renderer.setProperty(this.iconSpanNode, 'className', 'k-button-icon k-icon');
|
|
406
|
+
}
|
|
401
407
|
if (this.imageNode) {
|
|
402
408
|
renderer.setProperty(this.imageNode, 'src', imageUrl);
|
|
403
409
|
}
|