@wizishop/angular-components 0.0.53 → 0.0.54

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.
@@ -922,6 +922,7 @@
922
922
  this.isLoading = false;
923
923
  this.interval = null;
924
924
  this.buttonMaxWidth = '0px';
925
+ this.buttonWidth = '0px';
925
926
  this.currentLoading = 0;
926
927
  }
927
928
  ButtonComponent.prototype.launchLoading = function () {
@@ -959,12 +960,20 @@
959
960
  this.click.emit(event);
960
961
  }
961
962
  };
963
+ ButtonComponent.prototype.ngAfterViewInit = function () {
964
+ var _this = this;
965
+ setTimeout(function () {
966
+ if (_this.animation) {
967
+ _this.buttonWidth = _this.calculWidth.nativeElement.offsetWidth;
968
+ }
969
+ }, 0);
970
+ };
962
971
  return ButtonComponent;
963
972
  }());
964
973
  ButtonComponent.decorators = [
965
974
  { type: i0.Component, args: [{
966
975
  selector: 'wac-button',
967
- template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n (mouseleave)=\"animation ? resetMaxWidth() : ''\"\n (mouseenter)=\"animation ? addMaxWidth(animationText.length * 7 + 30) : ''\"\n [ngClass]=\"[label === '' ? 'alone' : '',animationRight ? 'animation-right' : '', animation ? 'animationText' : '', isLoading ? 'is-loading' : '', opacity ? 'opacity' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '', whiteSpaceNowrap ? 'white-space-no-wrap' : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"animationText.length * 7 + 30 + 'px'\" *ngIf=\"animation && !label\">\n <span class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n"
976
+ template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n (mouseleave)=\"animation ? resetMaxWidth() : ''\"\n (mouseenter)=\"animation ? addMaxWidth(animationText.length * 7 + 30) : ''\"\n [ngClass]=\"[label === '' ? 'alone' : '',animationRight ? 'animation-right' : '', animation ? 'animationText' : '', isLoading ? 'is-loading' : '', opacity ? 'opacity' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '', whiteSpaceNowrap ? 'white-space-no-wrap' : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"buttonWidth + 'px'\">\n <span #calculWidth class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n"
968
977
  },] }
969
978
  ];
970
979
  ButtonComponent.ctorParameters = function () { return []; };
@@ -982,7 +991,8 @@
982
991
  animation: [{ type: i0.Input }],
983
992
  animationRight: [{ type: i0.Input }],
984
993
  animationText: [{ type: i0.Input }],
985
- click: [{ type: i0.Output }]
994
+ click: [{ type: i0.Output }],
995
+ calculWidth: [{ type: i0.ViewChild, args: ['calculWidth',] }]
986
996
  };
987
997
 
988
998
  var InfoComponent = /** @class */ (function () {