@progress/kendo-angular-buttons 7.0.0 → 7.0.2

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.
@@ -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, isPresent } from '../util';
12
+ import { getStylingClasses, getThemeColorClasses } from '../util';
13
13
  var SPAN_TAG_NAME = 'SPAN';
14
14
  /**
15
15
  * Represents the Kendo UI Button component for Angular.
@@ -181,7 +181,7 @@ var ButtonDirective = /** @class */ (function () {
181
181
  },
182
182
  /**
183
183
  * The size property specifies the padding of the Button
184
- * ([see example]({% slug appearance_buttondirective %}#toc-size)).
184
+ * ([see example]({% slug appearance_button %}#toc-size)).
185
185
  *
186
186
  * The possible values are:
187
187
  * * `'small'`
@@ -202,7 +202,7 @@ var ButtonDirective = /** @class */ (function () {
202
202
  },
203
203
  /**
204
204
  * The rounded property specifies the border radius of the Button
205
- * ([see example]({% slug appearance_buttondirective %}#toc-rounded)).
205
+ * ([see example]({% slug appearance_button %}#toc-rounded)).
206
206
  *
207
207
  * The possible values are:
208
208
  * * `'small'`
@@ -224,12 +224,13 @@ var ButtonDirective = /** @class */ (function () {
224
224
  },
225
225
  /**
226
226
  * The fillMode property specifies the background and border styles of the Button
227
- * ([see example]({% slug appearance_buttondirective %}#toc-fillMode)).
227
+ * ([see example]({% slug appearance_button %}#toc-fillMode)).
228
228
  *
229
229
  * The possible values are:
230
230
  * * `'flat'`
231
231
  * * `'solid'` (default)
232
232
  * * `'outline'`
233
+ * * `'clear'`
233
234
  * * `'link'`
234
235
  * * `null`
235
236
  */
@@ -247,7 +248,7 @@ var ButtonDirective = /** @class */ (function () {
247
248
  /**
248
249
  * The Button allows you to specify predefined theme colors.
249
250
  * The theme color will be applied as a background and border color while also amending the text color accordingly
250
- * ([see example]({% slug appearance_buttondirective %}#toc-themeColor)).
251
+ * ([see example]({% slug appearance_button %}#toc-themeColor)).
251
252
  *
252
253
  * The possible values are:
253
254
  * * `'base'` (default)
@@ -275,7 +276,7 @@ var ButtonDirective = /** @class */ (function () {
275
276
  },
276
277
  /**
277
278
  * The shape property specifies if the Button will form a rectangle or square.
278
- * ([see example]({% slug appearance_buttondirective %}#toc-shape)).
279
+ * ([see example]({% slug appearance_button %}#toc-shape)).
279
280
  *
280
281
  * The possible values are:
281
282
  * * `'square'`
@@ -484,12 +485,7 @@ var ButtonDirective = /** @class */ (function () {
484
485
  }
485
486
  };
486
487
  ButtonDirective.prototype.hasText = function () {
487
- if (isDocumentAvailable()) {
488
- return this.element.textContent.trim().length > 0;
489
- }
490
- else {
491
- return false;
492
- }
488
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
493
489
  };
494
490
  ButtonDirective.prototype.addImgIcon = function (imageUrl) {
495
491
  var renderer = this.renderer;
@@ -520,11 +516,13 @@ var ButtonDirective = /** @class */ (function () {
520
516
  }
521
517
  };
522
518
  ButtonDirective.prototype.addTextSpan = function () {
523
- if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
524
- var span = this.renderer.createElement('span');
525
- this.renderer.addClass(span, 'k-button-text');
526
- span.append.apply(span, Array.from(this.element.childNodes));
527
- this.element.append(span);
519
+ var _this = this;
520
+ if (isDocumentAvailable() && this.hasText()) {
521
+ var span_1 = this.renderer.createElement('span');
522
+ this.renderer.addClass(span_1, 'k-button-text');
523
+ var buttonContentNodes = Array.from(this.element.childNodes);
524
+ buttonContentNodes.forEach(function (node) { return _this.renderer.appendChild(span_1, node); });
525
+ this.renderer.appendChild(this.element, span_1);
528
526
  }
529
527
  };
530
528
  ButtonDirective.prototype.prependChild = function (node) {
@@ -222,7 +222,6 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
222
222
  * * `null`
223
223
  */
224
224
  set: function (fillMode) {
225
- // Temporary workaround for missing 'clear' styles
226
225
  this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
227
226
  },
228
227
  enumerable: true,
@@ -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: 1642569714,
12
+ publishDate: 1642682315,
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
  };
@@ -254,7 +254,6 @@ var SplitButtonComponent = /** @class */ (function (_super) {
254
254
  * * `link`
255
255
  */
256
256
  set: function (fillMode) {
257
- // Temporary workaround for missing 'clear' styles
258
257
  this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
259
258
  },
260
259
  enumerable: true,
@@ -55,7 +55,7 @@ export declare class ButtonDirective implements OnDestroy, AfterViewInit {
55
55
  disabled: boolean;
56
56
  /**
57
57
  * The size property specifies the padding of the Button
58
- * ([see example]({% slug appearance_buttondirective %}#toc-size)).
58
+ * ([see example]({% slug appearance_button %}#toc-size)).
59
59
  *
60
60
  * The possible values are:
61
61
  * * `'small'`
@@ -66,7 +66,7 @@ export declare class ButtonDirective implements OnDestroy, AfterViewInit {
66
66
  size: ButtonSize;
67
67
  /**
68
68
  * The rounded property specifies the border radius of the Button
69
- * ([see example]({% slug appearance_buttondirective %}#toc-rounded)).
69
+ * ([see example]({% slug appearance_button %}#toc-rounded)).
70
70
  *
71
71
  * The possible values are:
72
72
  * * `'small'`
@@ -78,12 +78,13 @@ export declare class ButtonDirective implements OnDestroy, AfterViewInit {
78
78
  rounded: ButtonRounded;
79
79
  /**
80
80
  * The fillMode property specifies the background and border styles of the Button
81
- * ([see example]({% slug appearance_buttondirective %}#toc-fillMode)).
81
+ * ([see example]({% slug appearance_button %}#toc-fillMode)).
82
82
  *
83
83
  * The possible values are:
84
84
  * * `'flat'`
85
85
  * * `'solid'` (default)
86
86
  * * `'outline'`
87
+ * * `'clear'`
87
88
  * * `'link'`
88
89
  * * `null`
89
90
  */
@@ -91,7 +92,7 @@ export declare class ButtonDirective implements OnDestroy, AfterViewInit {
91
92
  /**
92
93
  * The Button allows you to specify predefined theme colors.
93
94
  * The theme color will be applied as a background and border color while also amending the text color accordingly
94
- * ([see example]({% slug appearance_buttondirective %}#toc-themeColor)).
95
+ * ([see example]({% slug appearance_button %}#toc-themeColor)).
95
96
  *
96
97
  * The possible values are:
97
98
  * * `'base'` (default)
@@ -109,7 +110,7 @@ export declare class ButtonDirective implements OnDestroy, AfterViewInit {
109
110
  themeColor: ButtonThemeColor;
110
111
  /**
111
112
  * The shape property specifies if the Button will form a rectangle or square.
112
- * ([see example]({% slug appearance_buttondirective %}#toc-shape)).
113
+ * ([see example]({% slug appearance_button %}#toc-shape)).
113
114
  *
114
115
  * The possible values are:
115
116
  * * `'square'`
@@ -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, isPresent } from '../util';
12
+ import { getStylingClasses, getThemeColorClasses } from '../util';
13
13
  const SPAN_TAG_NAME = 'SPAN';
14
14
  /**
15
15
  * Represents the Kendo UI Button component for Angular.
@@ -143,7 +143,7 @@ let ButtonDirective = class ButtonDirective {
143
143
  }
144
144
  /**
145
145
  * The size property specifies the padding of the Button
146
- * ([see example]({% slug appearance_buttondirective %}#toc-size)).
146
+ * ([see example]({% slug appearance_button %}#toc-size)).
147
147
  *
148
148
  * The possible values are:
149
149
  * * `'small'`
@@ -160,7 +160,7 @@ let ButtonDirective = class ButtonDirective {
160
160
  }
161
161
  /**
162
162
  * The rounded property specifies the border radius of the Button
163
- * ([see example]({% slug appearance_buttondirective %}#toc-rounded)).
163
+ * ([see example]({% slug appearance_button %}#toc-rounded)).
164
164
  *
165
165
  * The possible values are:
166
166
  * * `'small'`
@@ -178,12 +178,13 @@ let ButtonDirective = class ButtonDirective {
178
178
  }
179
179
  /**
180
180
  * The fillMode property specifies the background and border styles of the Button
181
- * ([see example]({% slug appearance_buttondirective %}#toc-fillMode)).
181
+ * ([see example]({% slug appearance_button %}#toc-fillMode)).
182
182
  *
183
183
  * The possible values are:
184
184
  * * `'flat'`
185
185
  * * `'solid'` (default)
186
186
  * * `'outline'`
187
+ * * `'clear'`
187
188
  * * `'link'`
188
189
  * * `null`
189
190
  */
@@ -197,7 +198,7 @@ let ButtonDirective = class ButtonDirective {
197
198
  /**
198
199
  * The Button allows you to specify predefined theme colors.
199
200
  * The theme color will be applied as a background and border color while also amending the text color accordingly
200
- * ([see example]({% slug appearance_buttondirective %}#toc-themeColor)).
201
+ * ([see example]({% slug appearance_button %}#toc-themeColor)).
201
202
  *
202
203
  * The possible values are:
203
204
  * * `'base'` (default)
@@ -221,7 +222,7 @@ let ButtonDirective = class ButtonDirective {
221
222
  }
222
223
  /**
223
224
  * The shape property specifies if the Button will form a rectangle or square.
224
- * ([see example]({% slug appearance_buttondirective %}#toc-shape)).
225
+ * ([see example]({% slug appearance_button %}#toc-shape)).
225
226
  *
226
227
  * The possible values are:
227
228
  * * `'square'`
@@ -391,12 +392,7 @@ let ButtonDirective = class ButtonDirective {
391
392
  }
392
393
  }
393
394
  hasText() {
394
- if (isDocumentAvailable()) {
395
- return this.element.textContent.trim().length > 0;
396
- }
397
- else {
398
- return false;
399
- }
395
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
400
396
  }
401
397
  addImgIcon(imageUrl) {
402
398
  let renderer = this.renderer;
@@ -427,11 +423,12 @@ let ButtonDirective = class ButtonDirective {
427
423
  }
428
424
  }
429
425
  addTextSpan() {
430
- if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
426
+ if (isDocumentAvailable() && this.hasText()) {
431
427
  const span = this.renderer.createElement('span');
432
428
  this.renderer.addClass(span, 'k-button-text');
433
- span.append(...Array.from(this.element.childNodes));
434
- this.element.append(span);
429
+ const buttonContentNodes = Array.from(this.element.childNodes);
430
+ buttonContentNodes.forEach(node => this.renderer.appendChild(span, node));
431
+ this.renderer.appendChild(this.element, span);
435
432
  }
436
433
  }
437
434
  prependChild(node) {
@@ -204,7 +204,6 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
204
204
  * * `null`
205
205
  */
206
206
  set fillMode(fillMode) {
207
- // Temporary workaround for missing 'clear' styles
208
207
  this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
209
208
  }
210
209
  get fillMode() {