@wizishop/angular-components 0.0.100 → 0.0.103

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.
@@ -4613,6 +4613,7 @@ a.wac-link {
4613
4613
  padding: rem(9);
4614
4614
  font-weight: 600;
4615
4615
  transition: 0.3s ease;
4616
+ cursor: default;
4616
4617
 
4617
4618
  &.big {
4618
4619
  padding: rem(11) rem(15);
@@ -4626,10 +4627,6 @@ a.wac-link {
4626
4627
  }
4627
4628
  }
4628
4629
 
4629
- &.hover {
4630
- cursor: pointer;
4631
- }
4632
-
4633
4630
  i {
4634
4631
  color: $wac-white;
4635
4632
  font-weight: 400;
@@ -4706,6 +4703,12 @@ a.wac-link {
4706
4703
  background-color: darken($wac-border-light, 15%);
4707
4704
  }
4708
4705
  }
4706
+
4707
+ &__close {
4708
+ &:hover {
4709
+ cursor: pointer;
4710
+ }
4711
+ }
4709
4712
  }
4710
4713
  .wac-text {
4711
4714
  font-size: rem(14);
@@ -850,18 +850,14 @@
850
850
 
851
851
  var TagComponent = /** @class */ (function () {
852
852
  function TagComponent() {
853
- //todo Refacto, open/close should be handle outside this component
854
853
  this.label = '';
855
854
  this.hasClose = false;
856
855
  this.big = false;
857
856
  this.isOpen = true;
858
857
  this.isOpenChange = new i0.EventEmitter();
859
858
  }
860
- TagComponent.prototype.closeTag = function () {
861
- if (!this.hasClose) {
862
- return;
863
- }
864
- this.isOpen = false;
859
+ TagComponent.prototype.toggleTag = function () {
860
+ this.isOpen = !this.isOpen;
865
861
  this.isOpenChange.next(this.isOpen);
866
862
  };
867
863
  return TagComponent;
@@ -869,7 +865,7 @@
869
865
  TagComponent.decorators = [
870
866
  { type: i0.Component, args: [{
871
867
  selector: 'wac-tag',
872
- template: "<div class=\"wac-tag\" [classList]=\"'wac-tag--' + class\" [ngClass]=\"{ hover: hasClose, 'big': big }\" *ngIf=\"isOpen\" (click)=\"closeTag()\">\n {{ label }}\n <span *ngIf=\"hasClose\"><i class=\"fas fa-times\"></i></span>\n</div>\n"
868
+ template: "<div class=\"wac-tag\" [classList]=\"'wac-tag--' + class\" [ngClass]=\"{ hover: hasClose, 'big': big }\">\n {{ label }}\n <span class=\"wac-tag__close\" *ngIf=\"hasClose\" (click)=\"toggleTag()\"><i class=\"fas fa-times\"></i></span>\n</div>\n"
873
869
  },] }
874
870
  ];
875
871
  TagComponent.ctorParameters = function () { return []; };
@@ -973,7 +969,6 @@
973
969
  };
974
970
  ButtonComponent.prototype.addMaxWidthDelete = function () {
975
971
  this.buttonMaxWidthDelete = this.buttonWidthDelete + 'px';
976
- console.log('here', this.buttonMaxWidthDelete);
977
972
  };
978
973
  ButtonComponent.prototype.resetMaxWidthDelete = function () {
979
974
  this.buttonMaxWidthDelete = '0px';
@@ -1004,7 +999,6 @@
1004
999
  }
1005
1000
  if (_this.confirmDelete) {
1006
1001
  _this.buttonWidthDelete = _this.calculWidthDelete.nativeElement.offsetWidth;
1007
- console.log('here2', _this.buttonWidthDelete);
1008
1002
  }
1009
1003
  }, 1000);
1010
1004
  };
@@ -1913,24 +1907,57 @@
1913
1907
  };
1914
1908
 
1915
1909
  var LinkComponent = /** @class */ (function () {
1916
- function LinkComponent() {
1910
+ function LinkComponent(renderer2) {
1911
+ this.renderer2 = renderer2;
1917
1912
  this.target = '_self';
1918
1913
  }
1914
+ Object.defineProperty(LinkComponent.prototype, "href", {
1915
+ get: function () {
1916
+ return this._link;
1917
+ },
1918
+ set: function (link) {
1919
+ this._link = link;
1920
+ if (link && this.renderer2) {
1921
+ this.setAttributesLink();
1922
+ }
1923
+ },
1924
+ enumerable: false,
1925
+ configurable: true
1926
+ });
1919
1927
  LinkComponent.prototype.ngOnInit = function () { };
1928
+ LinkComponent.prototype.ngAfterViewInit = function () {
1929
+ this.setAttributesLink();
1930
+ };
1931
+ LinkComponent.prototype.setAttributesLink = function () {
1932
+ if (!this.linkComponent) {
1933
+ return;
1934
+ }
1935
+ if (this.href) {
1936
+ this.renderer2.setAttribute(this.linkComponent.nativeElement, "href", this.href);
1937
+ this.renderer2.setAttribute(this.linkComponent.nativeElement, "target", this.target);
1938
+ }
1939
+ else {
1940
+ this.renderer2.removeAttribute(this.linkComponent.nativeElement, "href");
1941
+ this.renderer2.removeAttribute(this.linkComponent.nativeElement, "target");
1942
+ }
1943
+ };
1920
1944
  return LinkComponent;
1921
1945
  }());
1922
1946
  LinkComponent.decorators = [
1923
1947
  { type: i0.Component, args: [{
1924
1948
  selector: 'wac-link',
1925
- template: "<a class=\"wac-link\" [href]=\"href\" [target]=\"target\" [ngClass]=\"{ class: class }\" [id]=\"{ id: id }\"><ng-content></ng-content></a>\n"
1949
+ template: "<a #linkComponent class=\"wac-link\" [ngClass]=\"{ class: class }\" [id]=\"{ id: id }\"><ng-content></ng-content></a>\n"
1926
1950
  },] }
1927
1951
  ];
1928
- LinkComponent.ctorParameters = function () { return []; };
1952
+ LinkComponent.ctorParameters = function () { return [
1953
+ { type: i0.Renderer2 }
1954
+ ]; };
1929
1955
  LinkComponent.propDecorators = {
1930
1956
  href: [{ type: i0.Input }],
1931
1957
  target: [{ type: i0.Input }],
1932
1958
  id: [{ type: i0.Input }],
1933
- class: [{ type: i0.Input }]
1959
+ class: [{ type: i0.Input }],
1960
+ linkComponent: [{ type: i0.ViewChild, args: ['linkComponent',] }]
1934
1961
  };
1935
1962
 
1936
1963
  var ProgressBarComponent = /** @class */ (function () {
@@ -4051,6 +4078,12 @@
4051
4078
  function TableFiltersGroup() {
4052
4079
  return _super !== null && _super.apply(this, arguments) || this;
4053
4080
  }
4081
+ TableFiltersGroup.prototype.set = function (key, value) {
4082
+ _super.prototype.set.call(this, key, value);
4083
+ };
4084
+ TableFiltersGroup.prototype.resetToFirstPage = function () {
4085
+ this.set("currentPage", 1);
4086
+ };
4054
4087
  return TableFiltersGroup;
4055
4088
  }(i1$1.NwbFilterGroup));
4056
4089