@wizishop/angular-components 0.0.49 → 0.0.53

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.
@@ -915,9 +915,13 @@
915
915
  this.disabled = false;
916
916
  this.whiteSpaceNowrap = false;
917
917
  this.opacity = false;
918
+ this.animation = false;
919
+ this.animationRight = false;
920
+ this.animationText = '';
918
921
  this.click = new i0.EventEmitter();
919
922
  this.isLoading = false;
920
923
  this.interval = null;
924
+ this.buttonMaxWidth = '0px';
921
925
  this.currentLoading = 0;
922
926
  }
923
927
  ButtonComponent.prototype.launchLoading = function () {
@@ -940,6 +944,12 @@
940
944
  }
941
945
  }, 200);
942
946
  };
947
+ ButtonComponent.prototype.addMaxWidth = function (size) {
948
+ this.buttonMaxWidth = size + 'px';
949
+ };
950
+ ButtonComponent.prototype.resetMaxWidth = function () {
951
+ this.buttonMaxWidth = '0px';
952
+ };
943
953
  ButtonComponent.prototype.onButtonClick = function (event) {
944
954
  event.stopPropagation();
945
955
  if (!this.disabled) {
@@ -954,7 +964,7 @@
954
964
  ButtonComponent.decorators = [
955
965
  { type: i0.Component, args: [{
956
966
  selector: 'wac-button',
957
- template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n [ngClass]=\"[label === '' ? 'alone' : '', 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\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 </span>\n</a>\n"
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"
958
968
  },] }
959
969
  ];
960
970
  ButtonComponent.ctorParameters = function () { return []; };
@@ -969,6 +979,9 @@
969
979
  disabled: [{ type: i0.Input }],
970
980
  whiteSpaceNowrap: [{ type: i0.Input }],
971
981
  opacity: [{ type: i0.Input }],
982
+ animation: [{ type: i0.Input }],
983
+ animationRight: [{ type: i0.Input }],
984
+ animationText: [{ type: i0.Input }],
972
985
  click: [{ type: i0.Output }]
973
986
  };
974
987
 
@@ -3362,14 +3375,14 @@
3362
3375
  FiltersComponent.prototype.activeFilter = function (index) {
3363
3376
  this.options[index].active = true;
3364
3377
  this.filterActiveIndex = '' + index;
3365
- this.filterChange.emit(true);
3378
+ this.filterChange.emit(index);
3366
3379
  };
3367
3380
  FiltersComponent.prototype.resetFilter = function () {
3368
3381
  this.options.forEach(function (item) {
3369
3382
  item.active = false;
3370
3383
  });
3371
3384
  this.filterActiveIndex = null;
3372
- this.filterChange.emit(true);
3385
+ this.filterChange.emit(-1);
3373
3386
  };
3374
3387
  return FiltersComponent;
3375
3388
  }());