@progress/kendo-angular-buttons 7.0.0 → 7.0.1-dev.202201191229

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.
@@ -484,12 +484,7 @@ var ButtonDirective = /** @class */ (function () {
484
484
  }
485
485
  };
486
486
  ButtonDirective.prototype.hasText = function () {
487
- if (isDocumentAvailable()) {
488
- return this.element.textContent.trim().length > 0;
489
- }
490
- else {
491
- return false;
492
- }
487
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
493
488
  };
494
489
  ButtonDirective.prototype.addImgIcon = function (imageUrl) {
495
490
  var renderer = this.renderer;
@@ -520,11 +515,13 @@ var ButtonDirective = /** @class */ (function () {
520
515
  }
521
516
  };
522
517
  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);
518
+ var _this = this;
519
+ if (isDocumentAvailable() && this.hasText()) {
520
+ var span_1 = this.renderer.createElement('span');
521
+ this.renderer.addClass(span_1, 'k-button-text');
522
+ var buttonContentNodes = Array.from(this.element.childNodes);
523
+ buttonContentNodes.forEach(function (node) { return _this.renderer.appendChild(span_1, node); });
524
+ this.renderer.appendChild(this.element, span_1);
528
525
  }
529
526
  };
530
527
  ButtonDirective.prototype.prependChild = function (node) {
@@ -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: 1642595280,
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
  };
@@ -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.
@@ -391,12 +391,7 @@ let ButtonDirective = class ButtonDirective {
391
391
  }
392
392
  }
393
393
  hasText() {
394
- if (isDocumentAvailable()) {
395
- return this.element.textContent.trim().length > 0;
396
- }
397
- else {
398
- return false;
399
- }
394
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
400
395
  }
401
396
  addImgIcon(imageUrl) {
402
397
  let renderer = this.renderer;
@@ -427,11 +422,12 @@ let ButtonDirective = class ButtonDirective {
427
422
  }
428
423
  }
429
424
  addTextSpan() {
430
- if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
425
+ if (isDocumentAvailable() && this.hasText()) {
431
426
  const span = this.renderer.createElement('span');
432
427
  this.renderer.addClass(span, 'k-button-text');
433
- span.append(...Array.from(this.element.childNodes));
434
- this.element.append(span);
428
+ const buttonContentNodes = Array.from(this.element.childNodes);
429
+ buttonContentNodes.forEach(node => this.renderer.appendChild(span, node));
430
+ this.renderer.appendChild(this.element, span);
435
431
  }
436
432
  }
437
433
  prependChild(node) {
@@ -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: 1642569714,
12
+ publishDate: 1642595280,
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
  };
@@ -39,7 +39,7 @@ const packageMetadata = {
39
39
  name: '@progress/kendo-angular-buttons',
40
40
  productName: 'Kendo UI for Angular',
41
41
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
42
- publishDate: 1642569714,
42
+ publishDate: 1642595280,
43
43
  version: '',
44
44
  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'
45
45
  };
@@ -517,12 +517,7 @@ let ButtonDirective = class ButtonDirective {
517
517
  }
518
518
  }
519
519
  hasText() {
520
- if (isDocumentAvailable()) {
521
- return this.element.textContent.trim().length > 0;
522
- }
523
- else {
524
- return false;
525
- }
520
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
526
521
  }
527
522
  addImgIcon(imageUrl) {
528
523
  let renderer = this.renderer;
@@ -553,11 +548,12 @@ let ButtonDirective = class ButtonDirective {
553
548
  }
554
549
  }
555
550
  addTextSpan() {
556
- if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
551
+ if (isDocumentAvailable() && this.hasText()) {
557
552
  const span = this.renderer.createElement('span');
558
553
  this.renderer.addClass(span, 'k-button-text');
559
- span.append(...Array.from(this.element.childNodes));
560
- this.element.append(span);
554
+ const buttonContentNodes = Array.from(this.element.childNodes);
555
+ buttonContentNodes.forEach(node => this.renderer.appendChild(span, node));
556
+ this.renderer.appendChild(this.element, span);
561
557
  }
562
558
  }
563
559
  prependChild(node) {
@@ -37,7 +37,7 @@ var packageMetadata = {
37
37
  name: '@progress/kendo-angular-buttons',
38
38
  productName: 'Kendo UI for Angular',
39
39
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
40
- publishDate: 1642569714,
40
+ publishDate: 1642595280,
41
41
  version: '',
42
42
  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'
43
43
  };
@@ -610,12 +610,7 @@ var ButtonDirective = /** @class */ (function () {
610
610
  }
611
611
  };
612
612
  ButtonDirective.prototype.hasText = function () {
613
- if (isDocumentAvailable()) {
614
- return this.element.textContent.trim().length > 0;
615
- }
616
- else {
617
- return false;
618
- }
613
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
619
614
  };
620
615
  ButtonDirective.prototype.addImgIcon = function (imageUrl) {
621
616
  var renderer = this.renderer;
@@ -646,11 +641,13 @@ var ButtonDirective = /** @class */ (function () {
646
641
  }
647
642
  };
648
643
  ButtonDirective.prototype.addTextSpan = function () {
649
- if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
650
- var span = this.renderer.createElement('span');
651
- this.renderer.addClass(span, 'k-button-text');
652
- span.append.apply(span, Array.from(this.element.childNodes));
653
- this.element.append(span);
644
+ var _this = this;
645
+ if (isDocumentAvailable() && this.hasText()) {
646
+ var span_1 = this.renderer.createElement('span');
647
+ this.renderer.addClass(span_1, 'k-button-text');
648
+ var buttonContentNodes = Array.from(this.element.childNodes);
649
+ buttonContentNodes.forEach(function (node) { return _this.renderer.appendChild(span_1, node); });
650
+ this.renderer.appendChild(this.element, span_1);
654
651
  }
655
652
  };
656
653
  ButtonDirective.prototype.prependChild = function (node) {
@@ -486,12 +486,7 @@ var ButtonDirective = /** @class */ (function () {
486
486
  }
487
487
  };
488
488
  ButtonDirective.prototype.hasText = function () {
489
- if (kendo_angular_common_1.isDocumentAvailable()) {
490
- return this.element.textContent.trim().length > 0;
491
- }
492
- else {
493
- return false;
494
- }
489
+ return kendo_angular_common_1.isDocumentAvailable() && this.element.textContent.trim().length > 0;
495
490
  };
496
491
  ButtonDirective.prototype.addImgIcon = function (imageUrl) {
497
492
  var renderer = this.renderer;
@@ -522,11 +517,13 @@ var ButtonDirective = /** @class */ (function () {
522
517
  }
523
518
  };
524
519
  ButtonDirective.prototype.addTextSpan = function () {
525
- if (kendo_angular_common_1.isDocumentAvailable() && this.hasText() && util_1.isPresent(this.element.append)) {
526
- var span = this.renderer.createElement('span');
527
- this.renderer.addClass(span, 'k-button-text');
528
- span.append.apply(span, Array.from(this.element.childNodes));
529
- this.element.append(span);
520
+ var _this = this;
521
+ if (kendo_angular_common_1.isDocumentAvailable() && this.hasText()) {
522
+ var span_1 = this.renderer.createElement('span');
523
+ this.renderer.addClass(span_1, 'k-button-text');
524
+ var buttonContentNodes = Array.from(this.element.childNodes);
525
+ buttonContentNodes.forEach(function (node) { return _this.renderer.appendChild(span_1, node); });
526
+ this.renderer.appendChild(this.element, span_1);
530
527
  }
531
528
  };
532
529
  ButtonDirective.prototype.prependChild = function (node) {
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-buttons',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1642569714,
14
+ publishDate: 1642595280,
15
15
  version: '',
16
16
  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'
17
17
  };